1 2016-04-12 Pedro Alves <palves@redhat.com>
3 * utils.c (prepare_to_throw_exception): Delete.
5 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
9 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
11 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
13 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
15 * linux-aarch64-ipa.c: Add <elf.h> include.
16 * linux-ppc-ipa.c: Add <elf.h> include.
17 * linux-s390-ipa.c: Add <elf.h> include.
19 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
21 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
22 (get_raw_reg_ptr): Likewise.
23 (get_trace_state_variable_value_ptr): Likewise.
24 (set_trace_state_variable_value_ptr): Likewise.
25 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
28 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
29 Marcin Kościelnicki <koriakin@0x04.net>
32 * linux-ppc-low.c (emit_insns): New function.
33 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
34 (ppc_emit_prologue): New function.
35 (ppc_emit_epilogue): New function.
36 (ppc_emit_add): New function.
37 (ppc_emit_sub): New function.
38 (ppc_emit_mul): New function.
39 (ppc_emit_lsh): New function.
40 (ppc_emit_rsh_signed): New function.
41 (ppc_emit_rsh_unsigned): New function.
42 (ppc_emit_ext): New function.
43 (ppc_emit_zero_ext): New function.
44 (ppc_emit_log_not): New function.
45 (ppc_emit_bit_and): New function.
46 (ppc_emit_bit_or): New function.
47 (ppc_emit_bit_xor): New function.
48 (ppc_emit_bit_not): New function.
49 (ppc_emit_equal): New function.
50 (ppc_emit_less_signed): New function.
51 (ppc_emit_less_unsigned): New function.
52 (ppc_emit_ref): New function.
53 (ppc_emit_const): New function.
54 (ppc_emit_reg): New function.
55 (ppc_emit_pop): New function.
56 (ppc_emit_stack_flush): New function.
57 (ppc_emit_swap): New function.
58 (ppc_emit_stack_adjust): New function.
59 (ppc_emit_call): New function.
60 (ppc_emit_int_call_1): New function.
61 (ppc_emit_void_call_2): New function.
62 (ppc_emit_if_goto): New function.
63 (ppc_emit_goto): New function.
64 (ppc_emit_eq_goto): New function.
65 (ppc_emit_ne_goto): New function.
66 (ppc_emit_lt_goto): New function.
67 (ppc_emit_le_goto): New function.
68 (ppc_emit_gt_goto): New function.
69 (ppc_emit_ge_goto): New function.
70 (ppc_write_goto_address): New function.
71 (ppc_emit_ops_impl): New static variable.
72 (ppc64v1_emit_prologue): New function.
73 (ppc64v2_emit_prologue): New function.
74 (ppc64_emit_epilogue): New function.
75 (ppc64_emit_add): New function.
76 (ppc64_emit_sub): New function.
77 (ppc64_emit_mul): New function.
78 (ppc64_emit_lsh): New function.
79 (ppc64_emit_rsh_signed): New function.
80 (ppc64_emit_rsh_unsigned): New function.
81 (ppc64_emit_ext): New function.
82 (ppc64_emit_zero_ext): New function.
83 (ppc64_emit_log_not): New function.
84 (ppc64_emit_bit_and): New function.
85 (ppc64_emit_bit_or): New function.
86 (ppc64_emit_bit_xor): New function.
87 (ppc64_emit_bit_not): New function.
88 (ppc64_emit_equal): New function.
89 (ppc64_emit_less_signed): New function.
90 (ppc64_emit_less_unsigned): New function.
91 (ppc64_emit_ref): New function.
92 (ppc64_emit_const): New function.
93 (ppc64v1_emit_reg): New function.
94 (ppc64v2_emit_reg): New function.
95 (ppc64_emit_pop): New function.
96 (ppc64_emit_stack_flush): New function.
97 (ppc64_emit_swap): New function.
98 (ppc64v1_emit_call): New function.
99 (ppc64v2_emit_call): New function.
100 (ppc64v1_emit_int_call_1): New function.
101 (ppc64v2_emit_int_call_1): New function.
102 (ppc64v1_emit_void_call_2): New function.
103 (ppc64v2_emit_void_call_2): New function.
104 (ppc64_emit_if_goto): New function.
105 (ppc64_emit_eq_goto): New function.
106 (ppc64_emit_ne_goto): New function.
107 (ppc64_emit_lt_goto): New function.
108 (ppc64_emit_le_goto): New function.
109 (ppc64_emit_gt_goto): New function.
110 (ppc64_emit_ge_goto): New function.
111 (ppc64v1_emit_ops_impl): New static variable.
112 (ppc64v2_emit_ops_impl): New static variable.
113 (ppc_emit_ops): New function.
114 (linux_low_target): Wire in ppc_emit_ops.
116 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
117 Marcin Kościelnicki <koriakin@0x04.net>
120 * Makefile.in: Add powerpc-*-ipa.o
121 * configure.srv: Add ipa_obj for powerpc*-linux.
122 * linux-ppc-ipa.c: New file.
123 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
125 (PPC_FIELD): New macro.
126 (PPC_SEXT): New macro.
127 (PPC_OP6): New macro.
131 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
132 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
133 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
134 (ppc_get_thread_area): New function.
135 (is_elfv2_inferior): New function.
136 (gen_ds_form): New function.
137 (GEN_STD): New macro.
138 (GEN_STDU): New macro.
140 (GEN_LDU): New macro.
141 (gen_d_form): New function.
142 (GEN_ADDI): New macro.
143 (GEN_ADDIS): New macro.
145 (GEN_LIS): New macro.
146 (GEN_ORI): New macro.
147 (GEN_ORIS): New macro.
148 (GEN_LWZ): New macro.
149 (GEN_STW): New macro.
150 (GEN_STWU): New macro.
151 (gen_xfx_form): New function.
152 (GEN_MFSPR): New macro.
153 (GEN_MTSPR): New macro.
154 (GEN_MFCR): New macro.
155 (GEN_MTCR): New macro.
156 (GEN_SYNC): New macro.
157 (GEN_LWSYNC): New macro.
158 (gen_x_form): New function.
161 (GEN_LWARX): New macro.
162 (GEN_STWCX): New macro.
163 (GEN_CMPW): New macro.
164 (gen_md_form): New function.
165 (GEN_RLDICL): New macro.
166 (GEN_RLDICR): New macro.
167 (gen_i_form): New function.
170 (gen_b_form): New function.
171 (GEN_BNE): New macro.
172 (GEN_LOAD): New macro.
173 (GEN_STORE): New macro.
174 (gen_limm): New function.
175 (gen_atomic_xchg): New function.
176 (gen_call): New function.
177 (ppc_relocate_instruction): New function.
178 (ppc_install_fast_tracepoint_jump_pad): New function.
179 (ppc_get_min_fast_tracepoint_insn_len): New function.
180 (ppc_get_ipa_tdesc_idx): New function.
181 (the_low_target): Wire in the new functions.
182 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
184 * linux-ppc-tdesc.h: New file.
186 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
188 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
189 (alloc_jump_pad_buffer): New function.
190 * linux-amd64-ipa.c: Add <sys/mman.h> include.
191 (alloc_jump_pad_buffer): New function.
192 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
193 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
194 (alloc_jump_pad_buffer): New function.
195 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
196 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
197 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
198 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
200 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
202 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
203 * linux-amd64-ipa.c: Likewise.
204 * linux-i386-ipa.c: Likewise.
205 * linux-s390-ipa.c: Likewise.
206 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
207 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
208 set_trace_state_variable_value_ptr.
209 (struct ipa_sym_addresses): Likewise.
210 (symbol_list): Likewise.
211 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
212 accessing gdb_collect directly.
213 (gdb_collect_ptr_type): New typedef.
214 (get_raw_reg_ptr_type): New typedef.
215 (get_trace_state_variable_value_ptr_type): New typedef.
216 (set_trace_state_variable_value_ptr_type): New typedef.
217 (gdb_collect_ptr): New global.
218 (get_raw_reg_ptr): New global.
219 (get_trace_state_variable_value_ptr): New global.
220 (set_trace_state_variable_value_ptr): New global.
221 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
222 accessing get_raw_reg directly.
223 (get_get_tsv_func_addr): Likewise for
224 get_trace_state_variable_value_ptr.
225 (get_set_tsv_func_addr): Likewise for
226 set_trace_state_variable_value_ptr.
227 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
229 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
231 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
233 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
235 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
237 (relocate_instruction): Remove own_buf.
238 * server.c (own_buf): Make global.
239 (handle_v_requests): Make global.
240 * server.h (own_buf): New declaration.
241 (handle_v_requests): New prototype.
243 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
246 * linux-s390-low.c (add_insns): New function.
247 (s390_emit_prologue): New function.
248 (s390_emit_epilogue): New function.
249 (s390_emit_add): New function.
250 (s390_emit_sub): New function.
251 (s390_emit_mul): New function.
252 (s390_emit_lsh): New function.
253 (s390_emit_rsh_signed): New function.
254 (s390_emit_rsh_unsigned): New function.
255 (s390_emit_ext): New function.
256 (s390_emit_log_not): New function.
257 (s390_emit_bit_and): New function.
258 (s390_emit_bit_or): New function.
259 (s390_emit_bit_xor): New function.
260 (s390_emit_bit_not): New function.
261 (s390_emit_equal): New function.
262 (s390_emit_less_signed): New function.
263 (s390_emit_less_unsigned): New function.
264 (s390_emit_ref): New function.
265 (s390_emit_if_goto): New function.
266 (s390_emit_goto): New function.
267 (s390_write_goto_address): New function.
268 (s390_emit_litpool): New function.
269 (s390_emit_const): New function.
270 (s390_emit_call): New function.
271 (s390_emit_reg): New function.
272 (s390_emit_pop): New function.
273 (s390_emit_stack_flush): New function.
274 (s390_emit_zero_ext): New function.
275 (s390_emit_swap): New function.
276 (s390_emit_stack_adjust): New function.
277 (s390_emit_set_r2): New function.
278 (s390_emit_int_call_1): New function.
279 (s390_emit_void_call_2): New function.
280 (s390_emit_eq_goto): New function.
281 (s390_emit_ne_goto): New function.
282 (s390_emit_lt_goto): New function.
283 (s390_emit_le_goto): New function.
284 (s390_emit_gt_goto): New function.
285 (s390_emit_ge_goto): New function.
286 (s390x_emit_prologue): New function.
287 (s390x_emit_epilogue): New function.
288 (s390x_emit_add): New function.
289 (s390x_emit_sub): New function.
290 (s390x_emit_mul): New function.
291 (s390x_emit_lsh): New function.
292 (s390x_emit_rsh_signed): New function.
293 (s390x_emit_rsh_unsigned): New function.
294 (s390x_emit_ext): New function.
295 (s390x_emit_log_not): New function.
296 (s390x_emit_bit_and): New function.
297 (s390x_emit_bit_or): New function.
298 (s390x_emit_bit_xor): New function.
299 (s390x_emit_bit_not): New function.
300 (s390x_emit_equal): New function.
301 (s390x_emit_less_signed): New function.
302 (s390x_emit_less_unsigned): New function.
303 (s390x_emit_ref): New function.
304 (s390x_emit_if_goto): New function.
305 (s390x_emit_const): New function.
306 (s390x_emit_call): New function.
307 (s390x_emit_reg): New function.
308 (s390x_emit_pop): New function.
309 (s390x_emit_stack_flush): New function.
310 (s390x_emit_zero_ext): New function.
311 (s390x_emit_swap): New function.
312 (s390x_emit_stack_adjust): New function.
313 (s390x_emit_int_call_1): New function.
314 (s390x_emit_void_call_2): New function.
315 (s390x_emit_eq_goto): New function.
316 (s390x_emit_ne_goto): New function.
317 (s390x_emit_lt_goto): New function.
318 (s390x_emit_le_goto): New function.
319 (s390x_emit_gt_goto): New function.
320 (s390x_emit_ge_goto): New function.
321 (s390_emit_ops): New function.
322 (struct linux_target_ops): Fill in emit_ops hook.
324 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
327 * Makefile.in: Add s390 IPA files.
328 * configure.srv: Build IPA for s390.
329 * linux-s390-ipa.c: New file.
330 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
331 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
332 (tdesc_s390_linux32): Likewise.
333 (init_registers_s390_linux32v1): Likewise.
334 (tdesc_s390_linux32v1): Likewise.
335 (init_registers_s390_linux32v2): Likewise.
336 (tdesc_s390_linux32v2): Likewise.
337 (init_registers_s390_linux64): Likewise.
338 (tdesc_s390_linux64): Likewise.
339 (init_registers_s390_linux64v1): Likewise.
340 (tdesc_s390_linux64v1): Likewise.
341 (init_registers_s390_linux64v2): Likewise.
342 (tdesc_s390_linux64v2): Likewise.
343 (init_registers_s390_te_linux64): Likewise.
344 (tdesc_s390_te_linux64): Likewise.
345 (init_registers_s390_vx_linux64): Likewise.
346 (tdesc_s390_vx_linux64): Likewise.
347 (init_registers_s390_tevx_linux64): Likewise.
348 (tdesc_s390_tevx_linux64): Likewise.
349 (init_registers_s390x_linux64): Likewise.
350 (tdesc_s390x_linux64): Likewise.
351 (init_registers_s390x_linux64v1): Likewise.
352 (tdesc_s390x_linux64v1): Likewise.
353 (init_registers_s390x_linux64v2): Likewise.
354 (tdesc_s390x_linux64v2): Likewise.
355 (init_registers_s390x_te_linux64): Likewise.
356 (tdesc_s390x_te_linux64): Likewise.
357 (init_registers_s390x_vx_linux64): Likewise.
358 (tdesc_s390x_vx_linux64): Likewise.
359 (init_registers_s390x_tevx_linux64): Likewise.
360 (tdesc_s390x_tevx_linux64): Likewise.
361 (have_hwcap_s390_vx): New static variable.
362 (s390_arch_setup): Fill have_hwcap_s390_vx.
363 (s390_get_thread_area): New function.
364 (s390_ft_entry_gpr_esa): New const.
365 (s390_ft_entry_gpr_zarch): New const.
366 (s390_ft_entry_misc): New const.
367 (s390_ft_entry_fr): New const.
368 (s390_ft_entry_vr): New const.
369 (s390_ft_main_31): New const.
370 (s390_ft_main_64): New const.
371 (s390_ft_exit_fr): New const.
372 (s390_ft_exit_vr): New const.
373 (s390_ft_exit_misc): New const.
374 (s390_ft_exit_gpr_esa): New const.
375 (s390_ft_exit_gpr_zarch): New const.
376 (append_insns): New function.
377 (s390_relocate_instruction): New function.
378 (s390_install_fast_tracepoint_jump_pad): New function.
379 (s390_get_min_fast_tracepoint_insn_len): New function.
380 (s390_get_ipa_tdesc_idx): New function.
381 (struct linux_target_ops): Wire in the above functions.
382 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
383 * linux-s390-tdesc.h: New file.
385 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
387 * linux-s390-low.c (s390_supports_tracepoints): New function.
388 (struct linux_target_ops): Fill supports_tracepoints hook.
390 2016-03-18 Yao Qi <yao.qi@linaro.org>
392 * linux-low.c (lwp_signal_can_be_delivered): New function.
393 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
395 2016-03-18 Yao Qi <yao.qi@linaro.org>
397 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
398 0 if signal is enqueued. Remove 'signal' from one debugging
399 message. Move one debugging message to some lines below.
400 Remove code setting 'signal' to 0.
402 2016-03-18 Yao Qi <yao.qi@linaro.org>
404 * linux-low.c (linux_low_filter_event): Remove redundant
405 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
407 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
409 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
410 (struct linux_target_ops): Wire in the above.
412 2016-03-03 Yao Qi <yao.qi@linaro.org>
414 * linux-low.c: Update comments to start_step_over.
416 2016-03-03 Yao Qi <yao.qi@linaro.org>
419 * linux-low.c (handle_extended_wait): Set child suspended
420 if event_lwp->bp_reinsert isn't zero.
422 2016-03-02 Yao Qi <yao.qi@linaro.org>
424 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
425 enqueue_pending_signal.
427 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
429 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
432 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
434 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
435 (s390_regmap_3264) [!__s390x__]: New global.
436 (s390_collect_ptrace_register): Skip map entries containing -1.
437 (s390_supply_ptrace_register): Ditto.
438 (s390_fill_gprs_high): New function.
439 (s390_store_gprs_high): New function.
440 (s390_regsets): Add NT_S390_HIGH_GPRS.
441 (s390_get_hwcap): Enable on 31-bit.
442 (have_hwcap_s390_high_gprs): Enable on 31-bit.
443 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
444 Detect NT_S390_HIGH_GPRS.
445 (s390_usrregs_info_3264): Enable on 31-bit.
446 (s390_regs_info): Enable regs_info_3264 on 31-bit.
447 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
449 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
452 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
453 * configure.srv: Ditto.
454 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
455 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
456 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
457 (init_registers_amd64_linux): Remove prototype.
458 (tdesc_amd64_linux): Remove declaration.
459 (get_ipa_tdesc): New function.
460 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
461 initialize remaining tdescs.
462 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
463 (init_registers_i386_linux): Remove prototype.
464 (tdesc_i386_linux): Remove declaration.
465 (get_ipa_tdesc): New function.
466 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
467 initialize remaining tdescs.
468 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
469 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
470 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
471 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
472 (x86_get_ipa_tdesc_idx): New function.
473 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
474 * linux-x86-tdesc.h: New file.
475 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
476 (target_get_ipa_tdesc_idx): New macro.
477 * tracepoint.c (ipa_tdesc_idx): New macro.
478 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
479 (symbol_list): Add ipa_tdesc_idx.
480 (cmd_qtstart): Write ipa_tdesc_idx in the target.
482 (ipa_tdesc_idx): New variable.
483 (get_context_regcache): Use get_ipa_tdesc.
484 (gdb_collect): Ditto.
486 * tracepoint.h (get_ipa_tdesc): New prototype.
489 2016-02-24 Pedro Alves <palves@redhat.com>
491 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
492 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
493 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
494 Factor out common code between the USE_SIGTRAP_SIGINFO and
495 !USE_SIGTRAP_SIGINFO blocks.
496 (linux_low_filter_event): Call save_stop_reason instead of
497 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
499 (linux_wait_1): Update comments.
501 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
503 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
504 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
505 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
506 ppc_insert_point, ppc_remove_point.
508 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
510 * linux-s390-low.c (s390_supports_z_point_type): New function.
511 (struct linux_target_ops): Wire s390_supports_z_point_type in.
513 2016-02-16 Yao Qi <yao.qi@linaro.org>
515 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
516 PC. Get pc from regcache_read_pc.
518 2016-02-12 Yao Qi <yao.qi@linaro.org>
520 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
521 or linux_get_pc_32bit.
522 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
524 2016-02-12 Yao Qi <yao.qi@linaro.org>
526 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
527 arm_linux_get_next_pcs_fixup.
529 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
531 * tracepoint.c (x_tracepoint_action_download): Change
532 write_inferior_data_ptr to write_inferior_data_pointer.
533 (cmd_qtstart): Likewise.
534 (write_inferior_data_ptr): Remove.
535 (download_agent_expr): Change write_inferior_data_ptr to
536 write_inferior_data_pointer.
537 (download_tracepoint_1): Likewise.
538 (download_tracepoint): Likewise.
539 (download_trace_state_variables): Likewise.
541 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
542 Marcin Kościelnicki <koriakin@0x04.net>
544 * tracepoint.c (struct tracepoint_action_ops): Remove.
545 (struct tracepoint_action): Remove ops.
546 (m_tracepoint_action_download, r_tracepoint_action_download)
547 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
548 size and offset accordingly.
549 (m_tracepoint_action_ops, r_tracepoint_action_ops)
550 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
551 (tracepoint_action_send, tracepoint_action_download): New functions.
552 Helpers for trace action handlers.
553 (add_tracepoint_action): Remove setup actions ops.
554 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
556 2016-02-10 Yao Qi <yao.qi@linaro.org>
558 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
560 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
562 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
564 * configure: Regenerate.
566 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
568 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
569 void * to gdb_byte *.
570 * linux-low.c (siginfo_fixup): Likewise.
571 (linux_xfer_siginfo): Likewise.
572 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
574 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
576 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
578 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
580 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
582 * linux-x86-low.c [__x86_64__]: Include
583 "nat/amd64-linux-siginfo.h".
584 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
585 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
586 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
587 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
588 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
589 (cpt_si_fd, si_timerid, si_overrun): Move from
590 nat/amd64-linux-siginfo.c.
591 * Makefile.in (amd64-linux-siginfo.o:): New rule.
593 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
595 * server.c (skip_to_semicolon): Remove.
596 (process_point_options): Use strchrnul instead of
599 2016-01-26 Yao Qi <yao.qi@linaro.org>
601 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
602 * linux-low.c (install_software_single_step_breakpoints): Don't
603 call regcache_read_pc.
604 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
607 2016-01-26 Yao Qi <yao.qi@linaro.org>
609 * linux-low.c (install_software_single_step_breakpoints): Call
610 regcache_read_pc instead of get_pc.
612 2016-01-26 Yao Qi <yao.qi@linaro.org>
614 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
615 (unblock_async_io): Rename to ...
616 (block_unblock_async_io): ... it. New function.
617 (enable_async_io): Don't install SIGIO handler. Unblock it
619 (disable_async_io): Don't ignore SIGIO. Block it instead.
620 (initialize_async_io): Install SIGIO handler. Don't call
623 2016-01-26 Yao Qi <yao.qi@linaro.org>
625 * remote-utils.c (getpkt): If the buffer isn't empty, and the
626 first character is '\003', call *the_target->request_interrupt.
628 2016-01-25 Yao Qi <yao.qi@linaro.org>
630 * remote-utils.c (new_thread_notify): Remove.
631 (dead_thread_notify): Likewise.
632 * remote-utils.h (new_thread_notify): Remove declaration.
633 (dead_thread_notify): Likewise.
635 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
637 * gdb.trace/pending.exp: Fix expected message on continue.
639 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
641 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
642 it works properly on big-endian machines where sizeof (CORE_ADDR)
645 2016-01-21 Pedro Alves <palves@redhat.com>
647 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
648 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
649 * configure: Regenerate.
651 2016-01-21 Yao Qi <yao.qi@linaro.org>
653 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
654 is_thumb and set it according to CPSR saved on the stack.
655 (get_next_pcs_syscall_next_pc): Pass is_thumb to
656 arm_sigreturn_next_pc.
658 2016-01-18 Yao Qi <yao.qi@linaro.org>
660 * linux-low.c (linux_set_pc_64bit): New function.
661 (linux_get_pc_64bit): New function.
662 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
664 * linux-sparc-low.c (debug_threads): Remove declaration.
665 (sparc_get_pc): Remove.
666 (the_low_target): Use linux_get_pc_64bit instead of
668 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
669 (the_low_target): Use linux_get_pc_64bit and
672 2016-01-18 Yao Qi <yao.qi@linaro.org>
674 * linux-arm-low.c (debug_threads): Remove declaration.
675 (arm_get_pc, arm_set_pc): Remove.
676 (the_low_target): Use linux_get_pc_32bit and
678 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
679 (the_low_target): Use linux_get_pc_32bit and
681 * linux-cris-low.c (debug_threads): Remove declaration.
682 (cris_get_pc, cris_set_pc,): Remove.
683 (the_low_target): Use linux_get_pc_32bit and
685 * linux-crisv32-low.c (debug_threads): Remove declaration.
686 (cris_get_pc, cris_set_pc): Remove.
687 (the_low_target): Use linux_get_pc_32bit and
689 * linux-low.c: Include inttypes.h.
690 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
691 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
692 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
693 (the_low_target): Use linux_get_pc_32bit and
695 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
696 (the_low_target): Use linux_get_pc_32bit and
698 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
699 (the_low_target): Use linux_get_pc_32bit and
701 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
702 (the_low_target): Use linux_get_pc_32bit and
704 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
705 (the_low_target): Use linux_get_pc_32bit and
708 2016-01-18 Gary Benson <gbenson@redhat.com>
710 * configure.ac (AC_FUNC_FORK): New check.
711 * config.in: Regenerate.
712 * configure: Likewise.
714 2016-01-14 Yao Qi <yao.qi@linaro.org>
716 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
717 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
718 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
719 arm_get_next_pcs_ctor.
721 2016-01-12 Josh Stone <jistone@redhat.com>
722 Philippe Waroquiers <philippe.waroquiers@skynet.be>
724 * inferiors.h: Include "gdb_vecs.h".
725 (struct process_info): Add syscalls_to_catch.
726 * inferiors.c (remove_process): Free syscalls_to_catch.
727 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
728 syscall_return stops.
729 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
730 * server.c (handle_general_set): Handle QCatchSyscalls.
731 (handle_query): Report support for QCatchSyscalls.
732 * target.h (struct target_ops): Add supports_catch_syscall.
733 (target_supports_catch_syscall): New macro.
734 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
735 (struct lwp_info): Add syscall_state.
736 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
737 Maintain syscall_state and syscalls_to_catch across exec.
738 (get_syscall_trapinfo): New function, proxy to the_low_target.
739 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
740 (linux_low_filter_event): Toggle syscall_state entry/return for
741 syscall traps, and set it ignored for all others.
742 (gdb_catching_syscalls_p): New function.
743 (gdb_catch_this_syscall_p): New function.
744 (linux_wait_1): Handle SYSCALL_SIGTRAP.
745 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
746 (linux_supports_catch_syscall): New function.
747 (linux_target_ops): Install it.
748 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
749 (the_low_target): Install it.
751 2016-01-12 Mike Frysinger <vapier@gentoo.org>
753 * acinclude.m4: Include new ../warning.m4 file.
754 * configure: Regenerated.
755 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
757 2016-01-12 Mike Frysinger <vapier@gentoo.org>
759 * ax.c (is_goto_target): Mark static.
760 * linux-low.c (register_addr): Likewise.
761 (linux_fetch_registers, linux_store_registers): Likewise.
762 * mem-break.c (any_persistent_commands): Fix old prototype.
763 (add_commands_to_breakpoint): Mark static.
764 * regcache.c (find_register_by_name): Delete unused func.
765 * remote-utils.c (hex_or_minus_one): Mark static.
766 * server.c (monitor_show_help): Mark static.
767 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
768 handle_v_requests): Likewise.
770 2016-01-12 Pedro Alves <palves@redhat.com>
772 Remove use of the registered trademark symbol throughout.
774 2016-01-08 Yao Qi <yao.qi@linaro.org>
776 * remote-utils.c (getpkt): If c is '\003', call target hook
779 2016-01-06 Yao Qi <yao.qi@linaro.org>
781 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
783 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
784 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
785 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
786 (thumb2_breakpoint): Declare.
787 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
789 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
790 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
791 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
793 2016-01-01 Joel Brobecker <brobecker@adacore.com>
795 * gdbreplay.c (gdbreplay_version): Change copyright year in
797 * server.c (gdbserver_version): Likewise.
799 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
801 * server.c (crc32_table): Delete.
802 (crc32): Use libiberty's xcrc32 function.
804 2015-12-22 Joel Brobecker <brobecker@adacore.com>
806 * lynx-low.c (lynx_delete_thread_callback): New function.
807 (lynx_mourn): Properly delete our process and all of its
808 threads. Remove call to clear_inferiors.
810 2015-12-22 Joel Brobecker <brobecker@adacore.com>
812 * target.c (thread_search_callback): Add check that
813 the thread_stopped target callback is not NULL before
816 2015-12-21 Yao Qi <yao.qi@linaro.org>
818 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
821 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
823 * server.c (handle_query): Call target_supports_software_single_step.
825 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
827 * linux-low.c (single_step): New function.
828 (linux_resume_one_lwp_throw): Call single_step.
829 (start_step_over): Likewise.
831 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
833 * Makefile.in (SFILES): Append arch/arm-linux.c,
834 arch/arm-get-next-pcs.c.
835 (arm-linux.o): New rule.
836 (arm-get-next-pcs.o): New rule.
837 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
839 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
840 to linux-aarch32-low.c.
841 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
842 (arm_breakpoint_len, thumb_breakpoint): Likewise.
843 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
844 (thumb2_breakpoint_len): Likewise.
845 (arm_is_thumb_mode): Make non-static.
846 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
847 from linux-aarch32-low.c.
848 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
849 (arm_breakpoint_len, thumb_breakpoint): Likewise.
850 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
851 (thumb2_breakpoint_len): Likewise.
852 (arm_is_thumb_mode): New declaration.
853 * linux-arm-low.c: Include arch/arm-linux.h
854 aarch/arm-get-next-pcs.h, sys/syscall.h.
855 (get_next_pcs_ops): New struct.
856 (get_next_pcs_addr_bits_remove): New function.
857 (get_next_pcs_is_thumb): New function.
858 (get_next_pcs_read_memory_unsigned_integer): Likewise.
859 (arm_sigreturn_next_pc): Likewise.
860 (get_next_pcs_syscall_next_pc): Likewise.
861 (arm_gdbserver_get_next_pcs): Likewise.
862 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
864 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
865 * server.h: Include gdb_vecs.h.
867 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
869 * Makefile.in (SFILES): Append common/common-regcache.c.
870 (OBS): Append common-regcache.o.
871 (common-regcache.o): New rule.
872 * regcache.c (init_register_cache): Initialize cache to
874 (regcache_raw_read_unsigned): New function.
875 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
876 register_status enum.
878 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
880 * linux-aarch64-low.c (the_low_targets): Rename
881 breakpoint_reinsert_addr to get_next_pcs.
882 * linux-arm-low.c (the_low_targets): Likewise.
883 * linux-bfin-low.c (the_low_targets): Likewise.
884 * linux-cris-low.c (the_low_targets): Likewise.
885 * linux-crisv32-low.c (the_low_targets): Likewise.
886 * linux-low.c (can_software_single_step): Likewise.
887 (install_software_single_step_breakpoints): New function.
888 (start_step_over): Use install_software_single_step_breakpoints.
889 * linux-low.h: New CORE_ADDR vector.
890 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
892 * linux-mips-low.c (the_low_targets): Likewise.
893 * linux-nios2-low.c (the_low_targets): Likewise.
894 * linux-sparc-low.c (the_low_targets): Likewise.
896 2015-12-17 Pedro Alves <palves@redhat.com>
898 * linux-low.c (linux_kill_one_lwp): Remove references to
900 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
902 (linux_init_signals): Delete.
903 (initialize_low): Adjust.
904 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
906 2015-12-16 Pedro Alves <palves@redhat.com>
908 * configure.ac (compiler warning flags): When testing a
909 -Wno-foo option, check whether -Wfoo works instead.
910 * configure: Regenerate.
912 2015-12-11 Don Breazeal <donb@codesourcery.com>
914 * server.c (process_serial_event): Don't exit from gdbserver
915 in remote mode if there are still active inferiors.
917 2015-12-11 Yao Qi <yao.qi@linaro.org>
919 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
920 arm_breakpoint_at if the process is 32-bit.
922 2015-12-11 Yao Qi <yao.qi@linaro.org>
924 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
927 2015-12-07 Yao Qi <yao.qi@linaro.org>
929 * configure.srv: Append arm.o to srv_tgtobj for
930 aarch64*-*-linux* target.
931 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
932 from linux-arm-low.c.
933 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
934 (arm_breakpoint_len, thumb_breakpoint): Likewise.
935 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
936 (thumb2_breakpoint_len): Likewise.
937 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
938 (arm_breakpoint_kinds): Likewise.
939 (arm_breakpoint_kind_from_pc): Likewise.
940 (arm_sw_breakpoint_from_kind): Likewise.
941 (arm_breakpoint_kind_from_current_state): Likewise.
942 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
943 (arm_sw_breakpoint_from_kind): Declare.
944 (arm_breakpoint_kind_from_current_state): Declare.
945 (arm_breakpoint_at): Declare.
946 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
947 arm_sw_breakpoint_from_kind if process is 32-bit.
948 (aarch64_breakpoint_kind_from_pc): New function.
949 (aarch64_breakpoint_kind_from_current_state): New function.
950 (the_low_target): Initialize fields breakpoint_kind_from_pc
951 and breakpoint_kind_from_current_state.
952 * linux-arm-low.c (arm_breakpoint_kinds): Move to
954 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
955 (arm_breakpoint, arm_breakpoint_len): Likewise.
956 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
957 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
958 (arm_is_thumb_mode): Likewise.
959 (arm_breakpoint_at): Likewise.
960 (arm_breakpoint_kind_from_pc): Likewise.
961 (arm_sw_breakpoint_from_kind): Likewise.
962 (arm_breakpoint_kind_from_current_state): Likewise.
965 2015-08-04 Yao Qi <yao.qi@linaro.org>
967 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
968 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
969 * server.c (extended_protocol): Remove "static".
970 * server.h (extended_protocol): Declare it.
972 2015-12-04 Josh Stone <jistone@redhat.com>
974 * target.h (struct target_ops) <arch_setup>: Rename to ...
975 (struct target_ops) <post_create_inferior>: ... this.
976 (target_arch_setup): Rename to ...
977 (target_post_create_inferior): ... this, calling post_create_inferior.
978 * server.c (start_inferior): Update target_arch_setup calls to
979 target_post_create_inferior.
980 * linux-low.c (linux_low_ptrace_options): Forward declare.
981 (linux_arch_setup): Update its comment for general use.
982 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
983 (struct linux_target_ops): Use linux_post_create_inferior.
984 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
985 to post_create_inferior.
986 * nto-low.c (struct nto_target_ops): Likewise.
987 * spu-low.c (struct spu_target_ops): Likewise.
988 * win32-low.c (struct win32_target_ops): Likewise.
990 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
992 * linux-arm-low.c: Remove duplicate arch/arm.h include.
994 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
996 * linux-arm-low.c (arm_reinsert_addr): Remove function.
997 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
998 * linux-cris-low.c (cris_reinsert_addr> Remove function.
999 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1000 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1001 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1002 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1003 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1004 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1005 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1006 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1007 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1009 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1011 * linux-low.c (linux_look_up_symbols): Don't call
1012 linux_supports_traceclone.
1013 * linux-low.h (thread_db_init): Remove use_events argument.
1014 * thread-db.c (thread_db_use_event): Remove global variable.
1015 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1016 (struct thread_db) <td_create_bp>: Remove field.
1017 (thread_db_create_event): Remove function.
1018 (thread_db_enable_reporting): Likewise.
1019 (find_one_thread): Don't check for thread_db_use_events.
1020 (attach_thread): Likewise.
1021 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1022 (try_thread_db_load_1): Don't check for thread_db_use_events.
1023 (thread_db_init): Remove use_events argument and thread events
1025 (remove_thread_event_breakpoints): Remove function.
1026 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1028 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1030 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1032 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1033 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1034 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1035 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1036 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1038 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1040 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1041 * linux-low.c (can_hardware_single_step): Use
1042 supports_hardware_single_step.
1043 (can_software_single_step): New function.
1044 (start_step_over): Call can_software_single_step.
1045 (linux_supports_hardware_single_step): New function.
1046 (struct target_ops) <supports_software_single_step>: Initialize.
1047 * linux-low.h (struct linux_target_ops)
1048 <supports_hardware_single_step>: Initialize.
1049 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1050 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1051 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1052 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1053 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1054 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1055 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1056 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1057 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1058 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1060 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1061 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1063 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1064 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1065 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1067 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1068 * target.h (struct target_ops): <supports_software_single_step>:
1070 (target_supports_software_single_step): New macro.
1072 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1074 * linux-low.c (linux_wait_1): Fix pc advance condition.
1075 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1076 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1078 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1080 * linux-arm-low.c (arm_is_thumb_mode): New function.
1081 (arm_breakpoint_at): Use arm_is_thumb_mode.
1082 (arm_breakpoint_kind_from_current_state): New function.
1083 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1085 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1086 (linux_breakpoint_kind_from_current_state): New function.
1087 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1088 * linux-low.h (struct linux_target_ops)
1089 <breakpoint_kind_from_current_state>: New field.
1090 * target.h (struct target_ops): Likewise.
1091 (target_breakpoint_kind_from_current_state): New macro.
1093 2015-11-30 Pedro Alves <palves@redhat.com>
1095 * linux-low.c (linux_resume): Wake up the event loop before
1098 2015-11-30 Pedro Alves <palves@redhat.com>
1100 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1102 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1104 * target.c (struct thread_search): New structure.
1105 (thread_search_callback): New function.
1106 (prev_general_thread): New global.
1107 (prepare_to_access_memory, done_accessing_memory): New functions.
1108 * target.h (prepare_to_access_memory, done_accessing_memory):
1109 Replace macros with function declarations.
1111 2015-11-30 Pedro Alves <palves@redhat.com>
1114 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1115 report TARGET_WAITKIND_NO_RESUMED.
1116 * remote-utils.c (prepare_resume_reply): Handle
1117 TARGET_WAITKIND_NO_RESUMED.
1118 * server.c (report_no_resumed): New global.
1119 (handle_query) <qSupported>: Handle "no-resumed+". Report
1120 "no-resumed+" support.
1121 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1122 return error if the client doesn't support no-resumed events.
1123 (push_stop_notification): New function.
1124 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1125 events if the client supports them.
1127 2015-11-30 Pedro Alves <palves@redhat.com>
1129 * linux-low.c (thread_still_has_status_pending_p): Don't check
1131 (lwp_resumed): New function.
1132 (status_pending_p_callback): Return early if the LWP is not
1133 supposed to be resumed.
1135 2015-11-30 Pedro Alves <palves@redhat.com>
1137 * linux-low.c (handle_extended_wait): Assert that the LWP's
1138 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1139 thread create events, leave the new child's status pending.
1140 (linux_low_filter_event): If GDB wants to hear about thread exit
1141 events, leave the LWP marked dead and don't delete it.
1142 (linux_wait_for_event_filtered): Don't check for thread exit.
1143 (filter_exit_event): New function.
1144 (linux_wait_1): Use it, when returning an exit event.
1145 (linux_resume_one_lwp_throw): Assert that the LWP's
1146 waitstatus is TARGET_WAITKIND_IGNORE.
1147 * remote-utils.c (prepare_resume_reply): Handle
1148 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1149 * server.c (report_thread_events): New global.
1150 (handle_general_set): Handle QThreadEvents.
1151 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1152 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1153 TARGET_WAITKIND_THREAD_EXITED.
1154 * server.h (report_thread_events): Declare.
1156 2015-11-30 Pedro Alves <palves@redhat.com>
1158 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1159 the thread's last_resume_kind was resume_stop.
1161 2015-11-30 Pedro Alves <palves@redhat.com>
1163 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1166 2015-11-30 Pedro Alves <palves@redhat.com>
1168 * server.c (handle_v_requests): Handle vCtrlC.
1170 2015-11-30 Pedro Alves <palves@redhat.com>
1172 * gdbthread.h (find_any_thread_of_pid): Declare.
1173 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1175 * server.c (handle_query): If current_thread is NULL, look for
1176 another thread of the selected process.
1178 2015-11-26 Daniel Colascione <dancol@dancol.org>
1179 Simon Marchi <simon.marchi@ericsson.com>
1181 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1182 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1184 * target.h (struct target_ops) <thread_name>: New field.
1185 (target_thread_name): New macro.
1187 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1189 * regcache.h (regcache_invalidate_pid): Add declaration.
1190 * regcache.c (regcache_invalidate_pid): New function, extracted
1191 from regcache_invalidate.
1192 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1193 Add trivial documentation comment.
1194 * lynx-low.c: Use regcache_invalidate_pid instead of
1195 regcache_invalidate.
1197 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1199 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1200 and Elf64_auxv_t if the target is Android.
1202 2015-11-22 Doug Evans <xdje42@gmail.com>
1204 * target.h: #include <sys/types.h>.
1206 2015-11-19 Pedro Alves <palves@redhat.com>
1208 * linux-low.c (linux_process_qsupported): Change prototype.
1210 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1212 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1213 and adjust to loop over all features.
1214 * server.c (handle_query) <qSupported>: Adjust to call
1215 target_process_qsupported once, passing it a vector of unprocessed
1217 * target.h (struct target_ops) <process_qsupported>: Change
1219 (target_process_qsupported): Adjust.
1221 2015-11-19 Pedro Alves <palves@redhat.com>
1223 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1225 * configure: Regenerate.
1227 2015-11-19 Pedro Alves <palves@redhat.com>
1229 * configure: Regenerate.
1231 2015-11-19 Yao Qi <yao.qi@linaro.org>
1233 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1236 2015-11-19 Yao Qi <yao.qi@linaro.org>
1238 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1239 (struct aarch64_operand): Move enum out.
1241 2015-11-19 Yao Qi <yao.qi@linaro.org>
1243 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1244 struct user_fpsimd_state *.
1245 (aarch64_store_fpregset): Likewise.
1247 2015-11-19 Yao Qi <yao.qi@linaro.org>
1249 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1250 struct user_pt_regs *.
1251 (aarch64_store_gregset): Likewise.
1253 2015-11-18 Pedro Alves <palves@redhat.com>
1255 * Makefile.in (all_object_files): Add $IPA_OBJS.
1257 2015-11-17 Pedro Alves <palves@redhat.com>
1259 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1260 GDB_SIGNAL_0 and gdb_signal_to_string.
1262 2015-11-17 Pedro Alves <palves@redhat.com>
1264 * win32-low.c (handle_output_debug_string): Remove parameter.
1265 (win32_kill): Remove our_status local and adjust call to
1266 handle_output_debug_string.
1267 (get_child_debug_event): Adjust call to
1268 handle_output_debug_string.
1270 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1272 * linux-mips-low.c (mips_fill_gregset): Add cast.
1273 (mips_store_gregset): Likewise.
1274 (mips_fill_fpregset): Likewise.
1275 (mips_store_fpregset): Likewise.
1277 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1279 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1282 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1284 * linux-mips-low.c (mips_linux_new_thread): Change type of
1285 watch_type to enum target_hw_bp_type.
1287 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1289 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1290 Change return type to arm_hwbp_type.
1292 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1294 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1295 (arm_store_gregset): Likewise.
1296 * linux-arm-low.c (arm_get_hwcap): Likewise.
1297 (arm_read_description): Likewise.
1299 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1301 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1303 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1305 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1306 (ppc_fill_vsxregset): Likewise.
1307 (ppc_store_vsxregset): Likewise.
1308 (ppc_fill_vrregset): Likewise.
1309 (ppc_store_vrregset): Likewise.
1310 (ppc_fill_evrregset): Likewise.
1311 (ppc_store_evrregset): Likewise.
1313 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1315 * linux-ppc-low.c (ppc_usrregs_info): Remove
1316 forward-declaration.
1317 (ppc_arch_setup): Move lower in file.
1319 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1321 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1322 (ps_pdwrite): Likewise.
1324 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1326 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1327 to after assert checks.
1329 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1331 * proc-service.c (ps_pdread): Add/adjust casts.
1332 (ps_pdwrite): Add/adjust casts.
1334 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1336 * server.c (handle_search_memory_1): Cast return value of
1339 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1341 * server.c (write_qxfer_response): Change type of data to
1344 2015-10-29 Pedro Alves <palves@redhat.com>
1346 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1348 2015-10-29 Pedro Alves <palves@redhat.com>
1350 * tracepoint.c (clear_installed_tracepoints): Add casts.
1352 2015-10-29 Pedro Alves <palves@redhat.com>
1354 * server.c (handle_v_cont, process_serial_event): Add enum
1355 gdb_signal casts to signal parsing code.
1357 2015-10-29 Pedro Alves <palves@redhat.com>
1359 * linux-low.h (NULL_REGSET): Define.
1360 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1361 * linux-arm-low.c (arm_regsets): Likewise.
1362 * linux-crisv32-low.c (cris_regsets): Likewise.
1363 * linux-m68k-low.c (m68k_regsets): Likewise.
1364 * linux-mips-low.c (mips_regsets): Likewise.
1365 * linux-nios2-low.c (nios2_regsets): Likewise.
1366 * linux-ppc-low.c (ppc_regsets): Likewise.
1367 * linux-s390-low.c (s390_regsets): Likewise.
1368 * linux-sh-low.c (sh_regsets): Likewise.
1369 * linux-sparc-low.c (sparc_regsets): Likewise.
1370 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1371 * linux-tile-low.c (tile_regsets): Likewise.
1372 * linux-x86-low.c (x86_regsets): Likewise.
1373 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1375 2015-10-29 Pedro Alves <palves@redhat.com>
1377 * linux-low.h (NULL_REGSET): Define.
1378 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1379 * linux-arm-low.c (arm_regsets): Likewise.
1380 * linux-crisv32-low.c (cris_regsets): Likewise.
1381 * linux-m68k-low.c (m68k_regsets): Likewise.
1382 * linux-mips-low.c (mips_regsets): Likewise.
1383 * linux-nios2-low.c (nios2_regsets): Likewise.
1384 * linux-ppc-low.c (ppc_regsets): Likewise.
1385 * linux-s390-low.c (s390_regsets): Likewise.
1386 * linux-sh-low.c (sh_regsets): Likewise.
1387 * linux-sparc-low.c (sparc_regsets): Likewise.
1388 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1389 * linux-tile-low.c (tile_regsets): Likewise.
1390 * linux-x86-low.c (x86_regsets): Likewise.
1391 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1393 2015-10-26 Doug Evans <dje@google.com>
1395 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1397 2015-10-26 Doug Evans <dje@google.com>
1399 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1401 2015-10-26 Doug Evans <dje@google.com>
1403 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1405 (attach_thread, find_new_threads_callback): Ditto.
1407 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1409 * mem-break.h (set_breakpoint_data): Remove.
1411 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1413 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1414 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1415 (initialize_low): Remove set_breakpoint_data call.
1416 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1417 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1418 (initialize_low): Remove set_breakpoint_data call.
1419 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1420 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1421 (initialize_low): Remove set_breakpoint_data call.
1423 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1425 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1426 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1427 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1428 * target.h (target_breakpoint_kind_from_pc): New macro.
1430 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1432 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1433 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1434 the default breakpoint kind.
1436 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1438 * linux-arm-low.c (arm_supports_z_point_type): Add software
1441 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1443 * linux-arm-low.c: Refactor breakpoint definitions.
1444 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1445 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1447 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1449 * Makefile.in: Add arm.c/o.
1450 * configure.srv: Likewise.
1451 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1452 (arm_breakpoint_kind_from_pc): New function.
1453 (arm_sw_breakpoint_from_kind): Return proper kind.
1454 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1456 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1458 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1460 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1461 (struct raw_breakpoint) <size>: Remove.
1462 (struct raw_breakpoint) <kind>: Add.
1463 (bp_size): New function.
1464 (bp_opcode): Likewise.
1465 (find_raw_breakpoint_at): Adjust for kind.
1466 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1467 (remove_memory_breakpoint): Adjust for kind call bp_size.
1468 (set_raw_breakpoint_at): Adjust for kind.
1469 (set_breakpoint): Likewise.
1470 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1471 (delete_raw_breakpoint): Adjust for kind.
1472 (delete_breakpoint): Likewise.
1473 (find_gdb_breakpoint): Likewise.
1474 (set_gdb_breakpoint_1): Likewise.
1475 (set_gdb_breakpoint): Likewise.
1476 (delete_gdb_breakpoint_1): Likewise.
1477 (delete_gdb_breakpoint): Likewise.
1478 (uninsert_raw_breakpoint): Likewise.
1479 (reinsert_raw_breakpoint): Likewise.
1480 (set_breakpoint_data): Remove.
1481 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1482 (check_mem_read): Adjust for kind call bp_size.
1483 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1484 (clone_one_breakpoint): Adjust for kind.
1485 * mem-break.h (set_gdb_breakpoint): Likewise.
1486 (delete_gdb_breakpoint): Likewise.
1487 * server.c (process_serial_event): Likewise.
1489 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1491 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1492 (struct linux_target_ops) <breakpoint>: Remove.
1493 (struct linux_target_ops) <breakpoint_len>: Remove.
1494 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1495 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1496 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1497 (arm_sw_breakpoint_from_kind): New function.
1498 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1499 (struct linux_target_ops) <breakpoint>: Remove.
1500 (struct linux_target_ops) <breakpoint_len>: Remove.
1501 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1503 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1504 (struct linux_target_ops) <breakpoint>: Remove.
1505 (struct linux_target_ops) <breakpoint_len>: Remove.
1506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1508 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1509 (struct linux_target_ops) <breakpoint>: Remove.
1510 (struct linux_target_ops) <breakpoint_len>: Remove.
1511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1513 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1514 and sw_breakpoint_from_kind to increment the pc.
1515 (linux_breakpoint_kind_from_pc): New function.
1516 (linux_sw_breakpoint_from_kind): New function.
1517 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1518 (initialize_low): Call breakpoint_kind_from_pc and
1519 sw_breakpoint_from_kind to replace breakpoint_data/len.
1520 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1523 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1524 (struct linux_target_ops) <breakpoint>: Remove.
1525 (struct linux_target_ops) <breakpoint_len>: Remove.
1526 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1528 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1529 (struct linux_target_ops) <breakpoint>: Remove.
1530 (struct linux_target_ops) <breakpoint_len>: Remove.
1531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1533 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1534 (struct linux_target_ops) <breakpoint>: Remove.
1535 (struct linux_target_ops) <breakpoint_len>: Remove.
1536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1538 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1539 (struct linux_target_ops) <breakpoint>: Remove.
1540 (struct linux_target_ops) <breakpoint_len>: Remove.
1541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1542 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1543 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1544 (struct linux_target_ops) <breakpoint>: Remove.
1545 (struct linux_target_ops) <breakpoint_len>: Remove.
1546 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1547 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1548 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1549 (struct linux_target_ops) <breakpoint>: Remove.
1550 (struct linux_target_ops) <breakpoint_len>: Remove.
1551 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1552 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1553 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1554 (struct linux_target_ops) <breakpoint>: Remove.
1555 (struct linux_target_ops) <breakpoint_len>: Remove.
1556 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1557 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1558 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1559 (struct linux_target_ops) <breakpoint>: Remove.
1560 (struct linux_target_ops) <breakpoint_len>: Remove.
1561 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1562 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1563 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1564 (struct linux_target_ops) <breakpoint>: Remove.
1565 (struct linux_target_ops) <breakpoint_len>: Remove.
1566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1567 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1568 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1569 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1570 (struct linux_target_ops) <breakpoint>: Remove.
1571 (struct linux_target_ops) <breakpoint_len>: Remove.
1572 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1573 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1574 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1575 (struct linux_target_ops) <breakpoint>: Remove.
1576 (struct linux_target_ops) <breakpoint_len>: Remove.
1577 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1578 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1580 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1582 * linux-cris-low.c (cris_get_pc): Remove void arg.
1584 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1586 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1589 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1591 * inferiors.c (thread_pid_matches_callback): New function.
1592 (find_thread_process): New function.
1593 (remove_thread): Reset current_thread.
1594 (remove_process): Assert threads have been removed first.
1596 2015-10-15 Yao Qi <yao.qi@linaro.org>
1598 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1600 (aarch64_remove_point): Likewise.
1601 * regcache.c (regcache_register_size): New function.
1603 2015-10-12 Yao Qi <yao.qi@linaro.org>
1605 * linux-aarch64-low.c: Update all callers as emit_load_store
1606 is renamed to aarch64_emit_load_store.
1608 2015-10-12 Yao Qi <yao.qi@linaro.org>
1610 * linux-aarch64-low.c: Update all callers of function renaming
1611 from emit_insn to aarch64_emit_insn.
1613 2015-10-12 Yao Qi <yao.qi@linaro.org>
1615 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1616 arch/aarch64-insn.h.
1617 (struct aarch64_memory_operand): Likewise.
1619 (emit_insn): Move to arch/aarch64-insn.c.
1620 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1621 (emit_load_store): Move to arch/aarch64-insn.c.
1622 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1623 (can_encode_int32): Remove.
1625 2015-10-12 Yao Qi <yao.qi@linaro.org>
1627 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1628 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1629 (aarch64_relocate_instruction): Likewise.
1630 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1631 (struct aarch64_insn_visitor): Likewise.
1633 2015-10-12 Yao Qi <yao.qi@linaro.org>
1635 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1636 (struct aarch64_insn_visitor): New.
1637 (struct aarch64_insn_relocation_data): New.
1638 (aarch64_ftrace_insn_reloc_b): New function.
1639 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1640 (aarch64_ftrace_insn_reloc_cb): Likewise.
1641 (aarch64_ftrace_insn_reloc_tb): Likewise.
1642 (aarch64_ftrace_insn_reloc_adr): Likewise.
1643 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1644 (aarch64_ftrace_insn_reloc_others): Likewise.
1646 (aarch64_relocate_instruction): Use visitor.
1648 2015-10-12 Yao Qi <yao.qi@linaro.org>
1650 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1651 int. Add argument buf.
1652 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1653 aarch64_relocate_instruction.
1655 2015-10-12 Yao Qi <yao.qi@linaro.org>
1657 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1658 argument insn. Remove local variable insn. Don't call
1660 (aarch64_install_fast_tracepoint_jump_pad): Call
1663 2015-09-30 Yao Qi <yao.qi@linaro.org>
1665 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1666 (emit_load_store_pair): Likewise.
1668 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1670 * dll.c (match_dll): Add cast(s).
1671 (unloaded_dll): Likewise.
1672 * linux-low.c (second_thread_of_pid_p): Likewise.
1673 (delete_lwp_callback): Likewise.
1674 (count_events_callback): Likewise.
1675 (select_event_lwp_callback): Likewise.
1676 (linux_set_resume_request): Likewise.
1677 * server.c (accumulate_file_name_length): Likewise.
1678 (emit_dll_description): Likewise.
1679 (handle_qxfer_threads_worker): Likewise.
1680 (visit_actioned_threads): Likewise.
1681 * thread-db.c (any_thread_of): Likewise.
1682 * tracepoint.c (same_process_p): Likewise.
1683 (match_blocktype): Likewise.
1684 (build_traceframe_info_xml): Likewise.
1686 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1688 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1690 (gdb_unparse_agent_expr): Likewise.
1691 * hostio.c (require_data): Likewise.
1692 (handle_pread): Likewise.
1693 * linux-low.c (disable_regset): Likewise.
1694 (fetch_register): Likewise.
1695 (store_register): Likewise.
1696 (get_dynamic): Likewise.
1697 (linux_qxfer_libraries_svr4): Likewise.
1698 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1699 (set_fast_tracepoint_jump): Likewise.
1700 (uninsert_fast_tracepoint_jumps_at): Likewise.
1701 (reinsert_fast_tracepoint_jumps_at): Likewise.
1702 (validate_inserted_breakpoint): Likewise.
1703 (clone_agent_expr): Likewise.
1704 * regcache.c (init_register_cache): Likewise.
1705 * remote-utils.c (putpkt_binary_1): Likewise.
1706 (decode_M_packet): Likewise.
1707 (decode_X_packet): Likewise.
1708 (look_up_one_symbol): Likewise.
1709 (relocate_instruction): Likewise.
1710 (monitor_output): Likewise.
1711 * server.c (handle_search_memory): Likewise.
1712 (handle_qxfer_exec_file): Likewise.
1713 (handle_qxfer_libraries): Likewise.
1714 (handle_qxfer): Likewise.
1715 (handle_query): Likewise.
1716 (handle_v_cont): Likewise.
1717 (handle_v_run): Likewise.
1718 (captured_main): Likewise.
1719 * target.c (write_inferior_memory): Likewise.
1720 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1721 * tracepoint.c (init_trace_buffer): Likewise.
1722 (add_tracepoint_action): Likewise.
1723 (add_traceframe): Likewise.
1724 (add_traceframe_block): Likewise.
1725 (cmd_qtdpsrc): Likewise.
1726 (cmd_qtdv): Likewise.
1727 (cmd_qtstatus): Likewise.
1728 (response_source): Likewise.
1729 (response_tsv): Likewise.
1730 (cmd_qtnotes): Likewise.
1731 (gdb_collect): Likewise.
1732 (initialize_tracepoint): Likewise.
1734 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1736 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1737 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1738 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1740 (enum aarch64_condition_codes): New enum.
1741 (w0): New static global.
1744 (struct aarch64_memory_operand) <type>: New
1745 MEMORY_OPERAND_POSTINDEX type.
1746 (postindex_memory_operand): New helper function.
1747 (emit_ret): New function.
1748 (emit_load_store_pair): New function, factored out of emit_stp
1749 with support for MEMORY_OPERAND_POSTINDEX.
1750 (emit_stp): Rewrite using emit_load_store_pair.
1751 (emit_ldp): New function.
1752 (emit_load_store): Likewise.
1753 (emit_ldr): Mention post-index instruction in comment.
1754 (emit_ldrh): New function.
1755 (emit_ldrb): New function.
1756 (emit_ldrsw): Mention post-index instruction in comment.
1757 (emit_str): Likewise.
1758 (emit_subs): New function.
1759 (emit_cmp): Likewise.
1760 (emit_and): Likewise.
1761 (emit_orr): Likewise.
1762 (emit_orn): Likewise.
1763 (emit_eor): Likewise.
1764 (emit_mvn): Likewise.
1765 (emit_lslv): Likewise.
1766 (emit_lsrv): Likewise.
1767 (emit_asrv): Likewise.
1768 (emit_mul): Likewise.
1769 (emit_sbfm): Likewise.
1770 (emit_sbfx): Likewise.
1771 (emit_ubfm): Likewise.
1772 (emit_ubfx): Likewise.
1773 (emit_csinc): Likewise.
1774 (emit_cset): Likewise.
1775 (emit_nop): Likewise.
1776 (emit_ops_insns): New helper function.
1777 (emit_pop): Likewise.
1778 (emit_push): Likewise.
1779 (aarch64_emit_prologue): New function.
1780 (aarch64_emit_epilogue): Likewise.
1781 (aarch64_emit_add): Likewise.
1782 (aarch64_emit_sub): Likewise.
1783 (aarch64_emit_mul): Likewise.
1784 (aarch64_emit_lsh): Likewise.
1785 (aarch64_emit_rsh_signed): Likewise.
1786 (aarch64_emit_rsh_unsigned): Likewise.
1787 (aarch64_emit_ext): Likewise.
1788 (aarch64_emit_log_not): Likewise.
1789 (aarch64_emit_bit_and): Likewise.
1790 (aarch64_emit_bit_or): Likewise.
1791 (aarch64_emit_bit_xor): Likewise.
1792 (aarch64_emit_bit_not): Likewise.
1793 (aarch64_emit_equal): Likewise.
1794 (aarch64_emit_less_signed): Likewise.
1795 (aarch64_emit_less_unsigned): Likewise.
1796 (aarch64_emit_ref): Likewise.
1797 (aarch64_emit_if_goto): Likewise.
1798 (aarch64_emit_goto): Likewise.
1799 (aarch64_write_goto_address): Likewise.
1800 (aarch64_emit_const): Likewise.
1801 (aarch64_emit_call): Likewise.
1802 (aarch64_emit_reg): Likewise.
1803 (aarch64_emit_pop): Likewise.
1804 (aarch64_emit_stack_flush): Likewise.
1805 (aarch64_emit_zero_ext): Likewise.
1806 (aarch64_emit_swap): Likewise.
1807 (aarch64_emit_stack_adjust): Likewise.
1808 (aarch64_emit_int_call_1): Likewise.
1809 (aarch64_emit_void_call_2): Likewise.
1810 (aarch64_emit_eq_goto): Likewise.
1811 (aarch64_emit_ne_goto): Likewise.
1812 (aarch64_emit_lt_goto): Likewise.
1813 (aarch64_emit_le_goto): Likewise.
1814 (aarch64_emit_gt_goto): Likewise.
1815 (aarch64_emit_ge_got): Likewise.
1816 (aarch64_emit_ops_impl): New static global variable.
1817 (aarch64_emit_ops): New target function, return
1818 &aarch64_emit_ops_impl.
1819 (struct linux_target_ops): Install it.
1821 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1823 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1824 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1826 * linux-aarch64-ipa.c: New file.
1827 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1829 (aarch64_get_thread_area): New target method.
1830 (extract_signed_bitfield): New helper function.
1831 (aarch64_decode_ldr_literal): New function.
1832 (enum aarch64_opcodes): New enum.
1833 (struct aarch64_register): New struct.
1834 (struct aarch64_operand): New struct.
1835 (x0): New static global.
1844 (aarch64_register): New helper function.
1845 (register_operand): Likewise.
1846 (immediate_operand): Likewise.
1847 (struct aarch64_memory_operand): New struct.
1848 (offset_memory_operand): New helper function.
1849 (preindex_memory_operand): Likewise.
1850 (enum aarch64_system_control_registers): New enum.
1851 (ENCODE): New macro.
1852 (emit_insn): New helper function.
1853 (emit_b): New function.
1854 (emit_bcond): Likewise.
1855 (emit_cb): Likewise.
1856 (emit_tb): Likewise.
1857 (emit_blr): Likewise.
1858 (emit_stp): Likewise.
1859 (emit_ldp_q_offset): Likewise.
1860 (emit_stp_q_offset): Likewise.
1861 (emit_load_store): Likewise.
1862 (emit_ldr): Likewise.
1863 (emit_ldrsw): Likewise.
1864 (emit_str): Likewise.
1865 (emit_ldaxr): Likewise.
1866 (emit_stxr): Likewise.
1867 (emit_stlr): Likewise.
1868 (emit_data_processing_reg): Likewise.
1869 (emit_data_processing): Likewise.
1870 (emit_add): Likewise.
1871 (emit_sub): Likewise.
1872 (emit_mov): Likewise.
1873 (emit_movk): Likewise.
1874 (emit_mov_addr): Likewise.
1875 (emit_mrs): Likewise.
1876 (emit_msr): Likewise.
1877 (emit_sevl): Likewise.
1878 (emit_wfe): Likewise.
1879 (append_insns): Likewise.
1880 (can_encode_int32_in): New helper function.
1881 (aarch64_relocate_instruction): New function.
1882 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1883 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1884 (struct linux_target_ops): Install aarch64_get_thread_area,
1885 aarch64_install_fast_tracepoint_jump_pad and
1886 aarch64_get_min_fast_tracepoint_insn_len.
1888 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1890 * Makefile.in (aarch64-insn.o): New rule.
1891 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1893 2015-09-21 Yao Qi <yao.qi@linaro.org>
1895 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1897 2015-09-21 Yao Qi <yao.qi@linaro.org>
1899 * tracepoint.c (max_jump_pad_size): Remove.
1901 2015-09-18 Yao Qi <yao.qi@linaro.org>
1903 * linux-aarch64-low.c: Don't include sys/uio.h.
1904 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1906 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1908 * tracepoint.c (eval_result_type): Change prototype.
1909 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1911 2015-09-15 Pedro Alves <palves@redhat.com>
1913 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1914 Check whether to report exec events instead of checking whether
1915 multiprocess is enabled.
1917 2015-09-15 Pedro Alves <palves@redhat.com>
1920 * remote-utils.c (prepare_resume_reply): Merge
1921 TARGET_WAITKIND_VFORK_DONE switch case with the
1922 TARGET_WAITKIND_FORKED case.
1924 2015-09-15 Yao Qi <yao.qi@linaro.org>
1926 * server.c (handle_query): Check string comparison using
1927 "else if" instead of "if".
1929 2015-09-15 Yao Qi <yao.qi@linaro.org>
1931 * server.c (vCont_supported): New global variable.
1932 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1933 matches. Append ";vContSupported+" to own_buf.
1934 (handle_v_requests): Append ";s;S" to own_buf if target supports
1935 hardware single step or vCont_supported is false.
1936 (capture_main): Set vCont_supported to zero.
1938 2015-09-15 Yao Qi <yao.qi@linaro.org>
1940 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1942 (linux_supports_hardware_single_step): ... New function.
1943 (linux_target_ops): Update.
1944 * lynx-low.c (lynx_target_ops): Set field
1945 supports_hardware_single_step to target_can_do_hardware_single_step.
1946 * nto-low.c (nto_target_ops): Likewise.
1947 * spu-low.c (spu_target_ops): Likewise.
1948 * win32-low.c (win32_target_ops): Likewise.
1949 * target.c (target_can_do_hardware_single_step): New function.
1950 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1951 Remove. <supports_hardware_single_step>: New field.
1952 (target_supports_conditional_breakpoints): Remove.
1953 (target_supports_hardware_single_step): New macro.
1954 (target_can_do_hardware_single_step): Declare.
1955 * server.c (handle_query): Use target_supports_hardware_single_step
1956 instead of target_supports_conditional_breakpoints.
1958 2015-09-15 Yao Qi <yao.qi@linaro.org>
1960 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1962 (struct linux_target_ops the_low_target): Install
1963 aarch64_linux_siginfo_fixup.
1965 2015-09-11 Don Breazeal <donb@codesourcery.com>
1966 Luis Machado <lgustavo@codesourcery.com>
1968 * linux-low.c (linux_mourn): Static declaration.
1969 (linux_arch_setup): Move in front of
1970 handle_extended_wait.
1971 (linux_arch_setup_thread): New function.
1972 (handle_extended_wait): Handle exec events. Call
1973 linux_arch_setup_thread. Make event_lwp argument a
1974 pointer-to-a-pointer.
1975 (check_zombie_leaders): Do not check stopped threads.
1976 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1977 (linux_low_filter_event): Add lwp and thread for exec'ing
1978 non-leader thread if leader thread has been deleted.
1979 Refactor code into linux_arch_setup_thread and call it.
1980 Pass child lwp pointer by reference to handle_extended_wait.
1981 (linux_wait_for_event_filtered): Update comment.
1982 (linux_wait_1): Prevent clobbering exec event status.
1983 (linux_supports_exec_events): New function.
1984 (linux_target_ops) <supports_exec_events>: Initialize new member.
1985 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1987 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1988 * server.c (report_exec_events): New global variable.
1989 (handle_query): Handle qSupported query for exec-events feature.
1990 (captured_main): Initialize report_exec_events.
1991 * server.h (report_exec_events): Declare new global variable.
1992 * target.h (struct target_ops) <supports_exec_events>: New
1994 (target_supports_exec_events): New macro.
1995 * win32-low.c (win32_target_ops) <supports_exec_events>:
1996 Initialize new member.
1998 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2000 * linux-low.c (linux_low_enable_btrace): Remove.
2001 (linux_target_ops): Replace linux_low_enable_btrace with
2002 linux_enable_btrace.
2004 2015-09-03 Yao Qi <yao.qi@linaro.org>
2006 * linux-aarch64-low.c (aarch64_insert_point): Call
2007 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2010 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2012 * linux-low.c (check_stopped_by_breakpoint): Use
2013 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2015 2015-08-27 Pedro Alves <palves@redhat.com>
2017 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2019 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2021 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2022 the XNEW-family equivalent.
2023 (compile_bytecodes): Likewise.
2024 * dll.c (loaded_dll): Likewise.
2025 * event-loop.c (append_callback_event): Likewise.
2026 (create_file_handler): Likewise.
2027 (create_file_event): Likewise.
2028 * hostio.c (handle_open): Likewise.
2029 * inferiors.c (add_thread): Likewise.
2030 (add_process): Likewise.
2031 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2032 * linux-arm-low.c (arm_new_process): Likewise.
2033 (arm_new_thread): Likewise.
2034 * linux-low.c (add_to_pid_list): Likewise.
2035 (linux_add_process): Likewise.
2036 (handle_extended_wait): Likewise.
2037 (add_lwp): Likewise.
2038 (enqueue_one_deferred_signal): Likewise.
2039 (enqueue_pending_signal): Likewise.
2040 (linux_resume_one_lwp_throw): Likewise.
2041 (linux_resume_one_thread): Likewise.
2042 (linux_read_memory): Likewise.
2043 (linux_write_memory): Likewise.
2044 * linux-mips-low.c (mips_linux_new_process): Likewise.
2045 (mips_linux_new_thread): Likewise.
2046 (mips_add_watchpoint): Likewise.
2047 * linux-x86-low.c (initialize_low_arch): Likewise.
2048 * lynx-low.c (lynx_add_process): Likewise.
2049 * mem-break.c (set_raw_breakpoint_at): Likewise.
2050 (set_breakpoint): Likewise.
2051 (add_condition_to_breakpoint): Likewise.
2052 (add_commands_to_breakpoint): Likewise.
2053 (clone_agent_expr): Likewise.
2054 (clone_one_breakpoint): Likewise.
2055 * regcache.c (new_register_cache): Likewise.
2056 * remote-utils.c (look_up_one_symbol): Likewise.
2057 * server.c (queue_stop_reply): Likewise.
2058 (start_inferior): Likewise.
2059 (queue_stop_reply_callback): Likewise.
2060 (handle_target_event): Likewise.
2061 * spu-low.c (fetch_ppc_memory): Likewise.
2062 (store_ppc_memory): Likewise.
2063 * target.c (set_target_ops): Likewise.
2064 * thread-db.c (thread_db_load_search): Likewise.
2065 (try_thread_db_load_1): Likewise.
2066 * tracepoint.c (add_tracepoint): Likewise.
2067 (add_tracepoint_action): Likewise.
2068 (create_trace_state_variable): Likewise.
2069 (cmd_qtdpsrc): Likewise.
2070 (cmd_qtro): Likewise.
2071 (add_while_stepping_state): Likewise.
2072 * win32-low.c (child_add_thread): Likewise.
2073 (get_image_name): Likewise.
2075 2015-08-25 Yao Qi <yao.qi@linaro.org>
2077 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2079 2015-08-25 Yao Qi <yao.qi@linaro.org>
2081 * Makefile.in (aarch64-linux.o): New rule.
2082 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2084 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2085 (aarch64_init_debug_reg_state): Make it extern.
2086 (aarch64_linux_prepare_to_resume): Remove.
2088 2015-08-25 Yao Qi <yao.qi@linaro.org>
2090 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2091 lwp_arch_private_info and ptid_of_lwp.
2093 2015-08-25 Yao Qi <yao.qi@linaro.org>
2095 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2096 Find proc_info by find_process_pid. All callers updated.
2098 2015-08-25 Yao Qi <yao.qi@linaro.org>
2100 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2102 (debug_reg_change_callback): Remove.
2103 (aarch64_notify_debug_reg_change): Remove.
2105 2015-08-25 Yao Qi <yao.qi@linaro.org>
2107 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2108 Call current_lwp_ptid.
2110 2015-08-25 Yao Qi <yao.qi@linaro.org>
2112 * linux-aarch64-low.c (debug_reg_change_callback): Use
2115 2015-08-25 Yao Qi <yao.qi@linaro.org>
2117 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2119 2015-08-25 Yao Qi <yao.qi@linaro.org>
2121 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2123 2015-08-25 Yao Qi <yao.qi@linaro.org>
2125 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2128 2015-08-25 Yao Qi <yao.qi@linaro.org>
2130 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2132 (debug_reg_change_callback): Remove argument entry and add argument
2133 lwp. Remove local variable thread. Don't print thread id in the
2134 debugging output. Don't check whether pid of thread equals to pid.
2135 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2136 iterate_over_lwps instead find_inferior.
2138 2015-08-24 Pedro Alves <palves@redhat.com>
2140 * inferiors.c (get_first_process): New function.
2141 * inferiors.h (get_first_process): New declaration.
2142 * remote-utils.c (read_ptid): Default to the first process in the
2143 list, instead of to the current thread's process.
2145 2015-08-24 Pedro Alves <palves@redhat.com>
2147 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2148 * event-loop.c: Likewise.
2149 * remote-utils.c: Likewise.
2150 * tracepoint.c: Likewise.
2152 2015-08-24 Pedro Alves <palves@redhat.com>
2154 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2157 2015-08-21 Pedro Alves <palves@redhat.com>
2159 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2160 instead of literal 1.
2162 2015-08-21 Pedro Alves <palves@redhat.com>
2164 * tdesc.c (default_description): Explicitly zero-initialize.
2166 2015-08-21 Pedro Alves <palves@redhat.com>
2169 * inferiors.c (remove_thread): Discard any pending stop reply for
2171 * server.c (remove_all_on_match_pid): Rename to ...
2172 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2174 (discard_queued_stop_replies): Change parameter to a ptid. Now
2176 (handle_v_kill, kill_inferior_callback, captured_main)
2177 (process_serial_event): Adjust.
2178 * server.h (discard_queued_stop_replies): Declare.
2180 2015-08-21 Pedro Alves <palves@redhat.com>
2182 * linux-low.c (wait_for_sigstop): Always switch to no thread
2183 selected if the previously current thread dies.
2184 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2185 process instead of the current thread's.
2186 * remote-utils.c (input_interrupt): Don't check if there's no
2188 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2189 current thread to the general thread fails, error out.
2190 (handle_qxfer_auxv, handle_qxfer_libraries)
2191 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2192 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2193 (handle_query): Check if there's a thread selected instead of
2194 checking whether there's any thread in the thread list.
2195 (handle_qxfer_threads, handle_qxfer_btrace)
2196 (handle_qxfer_btrace_conf): Don't error out early if there's no
2197 thread in the thread list.
2198 (handle_v_cont, myresume): Don't set the current thread to the
2200 (process_serial_event) <Hg handling>: Also set thread_id if the
2201 previous general thread is still alive.
2202 (process_serial_event) <g/G handling>: If setting the current
2203 thread to the general thread fails, error out.
2204 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2205 thread's lwp instead of the current thread's.
2206 * target.c (set_desired_thread): If the desired thread was not
2207 found, leave the current thread pointing to NULL. Return an int
2208 (boolean) indicating success.
2209 * target.h (set_desired_thread): Change return type to int.
2211 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2213 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2214 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2216 (ps_get_thread_area): New function.
2218 2015-08-19 Gary Benson <gbenson@redhat.com>
2220 * hostio.c (handle_pread): Do not attempt to read more data
2221 than hostio_reply_with_data can fit in a packet.
2223 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2225 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2227 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2229 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2231 2015-08-06 Pedro Alves <palves@redhat.com>
2233 * tracepoint.c (expr_eval_result): Now an int.
2235 2015-08-06 Pedro Alves <palves@redhat.com>
2237 * gdbthread.h (struct regcache): Forward declare.
2238 (struct thread_info) <regcache_data>: Now a struct regcache
2240 * inferiors.c (inferior_regcache_data)
2241 (set_inferior_regcache_data): Now work with struct regcache
2243 * inferiors.h (struct regcache): Forward declare.
2244 (inferior_regcache_data, set_inferior_regcache_data): Now work
2245 with struct regcache pointers.
2246 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2247 (free_register_cache_thread): Remove struct regcache pointer
2250 2015-08-06 Pedro Alves <palves@redhat.com>
2252 * server.c (captured_main): On error, print the exception message
2253 to stderr, and if run_once is set, throw a quit.
2255 2015-08-06 Pedro Alves <palves@redhat.com>
2257 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2260 2015-08-06 Pedro Alves <palves@redhat.com>
2262 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2263 reading beyond the passed in buffer length.
2265 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2267 * tracepoint.c (symbol_list) <required>: Remove.
2269 2015-08-06 Pedro Alves <palves@redhat.com>
2271 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2272 count if stopping and suspending threads.
2273 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2274 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2275 (linux_detach): Complete an ongoing step-over.
2276 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2278 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2279 (linux_wait_1): If passing a signal to the inferior after
2280 finishing a step-over, unsuspend and re-resume all lwps. If we
2281 see a single-step event but the thread should be continuing, don't
2282 pass the trap to gdb.
2283 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2284 internal_error instead of gdb_assert.
2285 (enqueue_pending_signal): New function.
2286 (check_ptrace_stopped_lwp_gone): Add debug output.
2287 (start_step_over): Use internal_error instead of gdb_assert.
2288 (complete_ongoing_step_over): New function.
2289 (linux_resume_one_thread): Don't resume a suspended thread.
2290 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2293 2015-08-06 Pedro Alves <palves@redhat.com>
2295 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2296 (linux_thread_alive): Use lwp_is_marked_dead.
2297 (extended_event_reported): Delete.
2298 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2299 instead of extended_event_reported.
2300 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2302 (lwp_is_marked_dead): New function.
2303 (lwp_running): Use lwp_is_marked_dead.
2304 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2307 2015-08-06 Pedro Alves <palves@redhat.com>
2309 * linux-low.c (linux_wait_1): Move fork event output out of the
2310 !report_to_gdb check. Pass event_child->waitstatus to
2311 target_waitstatus_to_string instead of ourstatus.
2313 2015-08-04 Yao Qi <yao.qi@linaro.org>
2315 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2316 if current_thread is 32 bit.
2318 2015-08-04 Yao Qi <yao.qi@linaro.org>
2320 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2321 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2322 * server.c (extended_protocol): Remove "static".
2323 * server.h (extended_protocol): Declare it.
2325 2015-08-04 Yao Qi <yao.qi@linaro.org>
2327 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2328 both aarch64 and aarch32.
2329 (aarch64_set_pc): Likewise.
2331 2015-08-04 Yao Qi <yao.qi@linaro.org>
2333 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2334 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2335 arm-with-neon.xml to srv_xmlfiles.
2336 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2337 (is_64bit_tdesc): New function.
2338 (aarch64_linux_read_description): New function.
2339 (aarch64_arch_setup): Call aarch64_linux_read_description.
2340 (regs_info): Rename to regs_info_aarch64.
2341 (aarch64_regs_info): Return right regs_info.
2342 (initialize_low_arch): Call initialize_low_arch_aarch32.
2344 2015-08-04 Yao Qi <yao.qi@linaro.org>
2346 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2347 * linux-aarch32-low.c: New file.
2348 * linux-aarch32-low.h: New file.
2349 * linux-arm-low.c (arm_fill_gregset): Move it to
2350 linux-aarch32-low.c.
2351 (arm_store_gregset): Likewise.
2352 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2353 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2354 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2355 (regs_info): Rename to regs_info_arm.
2356 (arm_regs_info): Return regs_info_aarch32 if
2357 have_ptrace_getregset is 1 and target description is
2358 arm_with_neon or arm_with_vfpv3.
2359 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2360 Call initialize_low_arch_aarch32 instead.
2362 2015-08-04 Yao Qi <yao.qi@linaro.org>
2364 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2365 * linux-low.c: ... here.
2366 * linux-low.h (have_ptrace_getregset): Declare it.
2368 2015-08-04 Pedro Alves <palves@redhat.com>
2370 * thread-db.c (struct thread_db): Use new typedefs.
2371 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2373 (disable_thread_event_reporting): Cast result of dlsym to
2374 destination function pointer type.
2375 (thread_db_mourn): Use td_ta_delete_ftype.
2377 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2379 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2381 (CDX_BREAKPOINT): Define for R2.
2382 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2383 (the_low_target): Add comments.
2385 2015-07-30 Yao Qi <yao.qi@linaro.org>
2387 * linux-arm-low.c (arm_hwcap): Remove it.
2388 (arm_read_description): New local variable arm_hwcap. Don't
2389 set arm_hwcap to zero.
2391 2015-07-30 Yao Qi <yao.qi@linaro.org>
2393 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2394 Use regcache->tdesc instead.
2395 (arm_store_wmmxregset): Likewise.
2396 (arm_fill_vfpregset): Likewise.
2397 (arm_store_vfpregset): Likewise.
2399 2015-07-30 Yao Qi <yao.qi@linaro.org>
2401 * linux-arm-low.c: Include arch/arm.h.
2402 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2403 (arm_store_gregset): Likewise.
2405 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2407 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2408 ptrace's 4th parameter.
2410 2015-07-27 Yao Qi <yao.qi@linaro.org>
2412 * configure.srv (case aarch64*-*-linux*): Don't set
2415 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2417 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2419 * linux-arm-low.c: Likewise.
2420 * linux-cris-low.c: Likewise.
2421 * linux-crisv32-low.c: Likewise.
2422 * linux-low.c: Likewise.
2423 * linux-m68k-low.c: Likewise.
2424 * linux-mips-low.c: Likewise.
2425 * linux-nios2-low.c: Likewise.
2426 * linux-s390-low.c: Likewise.
2427 * linux-sparc-low.c: Likewise.
2428 * linux-tic6x-low.c: Likewise.
2429 * linux-tile-low.c: Likewise.
2430 * linux-x86-low.c: Likewise.
2432 2015-07-24 Pedro Alves <palves@redhat.com>
2434 * config.in: Regenerate.
2435 * configure: Regenerate.
2437 2015-07-24 Pedro Alves <palves@redhat.com>
2439 * acinclude.m4: Include ../ptrace.m4.
2440 * configure.ac: Call GDB_AC_PTRACE.
2441 * config.in, configure: Regenerate.
2443 2015-07-24 Yao Qi <yao.qi@linaro.org>
2445 * linux-low.c (linux_create_inferior): Remove setting to
2446 proc->priv->new_inferior.
2447 (linux_attach): Likewise.
2448 (linux_low_filter_event): Likewise.
2449 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2451 2015-07-24 Yao Qi <yao.qi@linaro.org>
2453 * linux-low.c (linux_arch_setup): New function.
2454 (linux_low_filter_event): If proc->tdesc is NULL and
2455 proc->attached is true, call the_low_target.arch_setup.
2456 Otherwise, keep status pending, and return.
2457 (linux_resume_one_lwp_throw): Don't call get_pc if
2458 thread->while_stepping isn't NULL. Don't call
2459 get_thread_regcache if proc->tdesc is NULL.
2460 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2461 (linux_target_ops): Install arch_setup.
2462 * server.c (start_inferior): Call the_target->arch_setup.
2463 * target.h (struct target_ops) <arch_setup>: New field.
2464 (target_arch_setup): New marco.
2465 * lynx-low.c (lynx_target_ops): Update.
2466 * nto-low.c (nto_target_ops): Update.
2467 * spu-low.c (spu_target_ops): Update.
2468 * win32-low.c (win32_target_ops): Update.
2470 2015-07-24 Yao Qi <yao.qi@linaro.org>
2472 * linux-low.c (linux_add_process): Don't set
2473 proc->priv->new_inferior.
2474 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2475 (linux_attach): Likewise.
2477 2015-07-24 Yao Qi <yao.qi@linaro.org>
2479 * server.c (start_inferior): Code refactor.
2481 2015-07-24 Yao Qi <yao.qi@linaro.org>
2483 * server.c (process_serial_event): Set general_thread.
2485 2015-07-21 Yao Qi <yao.qi@linaro.org>
2487 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2488 aarch64_linux_get_debug_reg_capacity.
2490 2015-07-17 Yao Qi <yao.qi@linaro.org>
2492 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2493 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2494 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2495 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2496 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2497 (AARCH64_HWP_ALIGNMENT): Likewise.
2498 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2499 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2500 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2501 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2502 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2503 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2504 (struct aarch64_debug_reg_state): Likewise.
2505 (struct arch_lwp_info): Likewise.
2506 (aarch64_align_watchpoint): Likewise.
2507 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2508 (aarch64_watchpoint_length): Likewise.
2509 (aarch64_point_encode_ctrl_reg): Likewise
2510 (aarch64_point_is_aligned): Likewise.
2511 (aarch64_align_watchpoint): Likewise.
2512 (aarch64_linux_set_debug_regs):
2513 (aarch64_dr_state_insert_one_point): Likewise.
2514 (aarch64_dr_state_remove_one_point): Likewise.
2515 (aarch64_handle_breakpoint): Likewise.
2516 (aarch64_handle_aligned_watchpoint): Likewise.
2517 (aarch64_handle_unaligned_watchpoint): Likewise.
2518 (aarch64_handle_watchpoint): Likewise.
2520 2015-07-17 Yao Qi <yao.qi@linaro.org>
2522 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2523 and don't aarch64_get_debug_reg_state. All callers update.
2524 (aarch64_handle_aligned_watchpoint): Likewise.
2525 (aarch64_handle_unaligned_watchpoint): Likewise.
2526 (aarch64_handle_watchpoint): Likewise.
2527 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2528 (aarch64_remove_point): Likewise.
2530 2015-07-17 Yao Qi <yao.qi@linaro.org>
2532 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2534 (aarch64_handle_unaligned_watchpoint): Likewise.
2536 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2538 Revert the previous 3 commits:
2539 Move gdb_regex* to common/
2540 Move linux_find_memory_regions_full & co.
2541 gdbserver build-id attribute generator
2543 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2544 Jan Kratochvil <jan.kratochvil@redhat.com>
2546 gdbserver build-id attribute generator.
2547 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2548 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2549 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2551 (get_dynamic): Use find_pdhr to traverse program headers.
2552 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2553 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2554 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2555 (get_hex_build_id): New.
2556 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2557 to reply XML document.
2559 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2560 Jan Kratochvil <jan.kratochvil@redhat.com>
2562 * target.c: Include target/target-utils.h and fcntl.h.
2563 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2564 (target_fileio_read_stralloc): New functions.
2566 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2568 * Makefile.in (OBS): Add gdb_regex.o.
2570 * config.in: Rebuilt.
2571 * configure: Rebuilt.
2573 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2574 Jan Kratochvil <jan.kratochvil@redhat.com>
2576 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2577 * Makefile.in (OBS): Add target-utils.o.
2578 (linux-maps.o, target-utils.o): New.
2579 * configure.srv (srv_linux_obj): Add linux-maps.o.
2581 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2583 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2585 (the_low_target): Install it.
2587 2015-07-14 Pedro Alves <palves@redhat.com>
2589 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2590 Instead, ignore ECHILD, and throw an error for other errnos.
2592 2015-07-10 Pedro Alves <palves@redhat.com>
2594 * event-loop.c (struct callback_event) <data>: Change type to
2595 gdb_client_data instance instead of gdb_client_data pointer.
2596 (append_callback_event): Adjust.
2598 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2600 * linux-aarch64-low.c: Add comments for each linux_target_ops
2601 method. Remove comments already covered in target_ops and
2602 linux_target_ops definitions.
2603 (the_low_target): Add comments for each unimplemented method.
2605 2015-07-09 Yao Qi <yao.qi@linaro.org>
2607 * linux-aarch64-low.c (aarch64_regmap): Remove.
2608 (aarch64_usrregs_info): Remove.
2609 (regs_info): Set field usrregs to NULL.
2611 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2613 * linux-low.c: Include "rsp-low.h"
2614 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2615 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2616 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2617 (handle_btrace_enable_pt): New.
2618 (handle_btrace_general_set): Support "pt".
2619 (handle_btrace_conf_general_set): Support "pt:size".
2621 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2623 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2626 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2628 * linux-aarch64-low.c: Remove comment about endianness.
2629 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2630 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2633 2015-06-24 Gary Benson <gbenson@redhat.com>
2635 * linux-i386-ipa.c (stdint.h): Do not include.
2636 * lynx-i386-low.c (stdint.h): Likewise.
2637 * lynx-ppc-low.c (stdint.h): Likewise.
2638 * mem-break.c (stdint.h): Likewise.
2639 * thread-db.c (stdint.h): Likewise.
2640 * tracepoint.c (stdint.h): Likewise.
2641 * win32-low.c (stdint.h): Likewise.
2643 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2645 * server.c (write_qxfer_response): Update call to
2646 remote_escape_output.
2648 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2649 Jan Kratochvil <jan.kratochvil@redhat.com>
2651 Merge multiple hex conversions.
2652 * gdbreplay.c (tohex): Rename to 'fromhex'.
2653 (logchar): Use fromhex.
2655 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2657 * server.c (handle_qxfer_libraries): Set `version' attribute for
2660 2015-06-10 Gary Benson <gbenson@redhat.com>
2662 * target.h (struct target_ops) <multifs_open>: New field.
2663 <multifs_unlink>: Likewise.
2664 <multifs_readlink>: Likewise.
2665 * linux-low.c (nat/linux-namespaces.h): New include.
2666 (linux_target_ops): Initialize the_target->multifs_open,
2667 the_target->multifs_unlink and the_target->multifs_readlink.
2668 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2669 * hostio.c (hostio_fs_pid): New static variable.
2670 (hostio_handle_new_gdb_connection): New function.
2671 (handle_setfs): Likewise.
2672 (handle_open): Use the_target->multifs_open as appropriate.
2673 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2674 (handle_readlink): Use the_target->multifs_readlink as
2676 (handle_vFile): Handle vFile:setfs packets.
2677 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2678 after target_handle_new_gdb_connection.
2680 2015-06-10 Gary Benson <gbenson@redhat.com>
2682 * configure.ac (AC_CHECK_FUNCS): Add setns.
2683 * config.in: Regenerate.
2684 * configure: Likewise.
2685 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2686 (linux-namespaces.o): New rule.
2687 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2689 2015-06-09 Gary Benson <gbenson@redhat.com>
2691 * hostio.c (handle_open): Process mode argument with
2692 fileio_to_host_mode.
2694 2015-06-01 Yao Qi <yao.qi@linaro.org>
2696 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2697 * linux-x86-low.c: Likewise.
2699 2015-05-28 Don Breazeal <donb@codesourcery.com>
2701 * linux-low.c (handle_extended_wait): Initialize
2702 thread_info.last_resume_kind for new fork children.
2704 2015-05-15 Pedro Alves <palves@redhat.com>
2706 * target.h (target_handle_new_gdb_connection): Rewrite using if
2707 wrapped in do/while.
2709 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2711 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2712 * configure, config.in: Regenerate.
2713 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2716 2015-05-12 Don Breazeal <donb@codesourcery.com>
2718 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2719 PTRACE_EVENT_VFORK_DONE.
2720 (linux_low_ptrace_options, extended_event_reported): Add vfork
2722 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2723 and "vforkdone" for RSP 'T' Stop Reply Packet.
2724 * server.h (report_vfork_events): Declare
2727 2015-05-12 Don Breazeal <donb@codesourcery.com>
2729 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2730 (the_low_target) <new_fork>: Initialize new member.
2731 * linux-arm-low.c (arm_new_fork): New function.
2732 (the_low_target) <new_fork>: Initialize new member.
2733 * linux-low.c (handle_extended_wait): Call new target function
2735 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2736 * linux-mips-low.c (mips_add_watchpoint): New function
2737 extracted from mips_insert_point.
2738 (the_low_target) <new_fork>: Initialize new member.
2739 (mips_linux_new_fork): New function.
2740 (mips_insert_point): Call mips_add_watchpoint.
2741 * linux-x86-low.c (x86_linux_new_fork): New function.
2742 (the_low_target) <new_fork>: Initialize new member.
2744 2015-05-12 Don Breazeal <donb@codesourcery.com>
2746 * linux-low.c (handle_extended_wait): Implement return value,
2747 rename argument 'event_child' to 'event_lwp', handle
2748 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2749 (linux_low_ptrace_options): New function.
2750 (linux_low_filter_event): Call linux_low_ptrace_options,
2751 use different argument fo linux_enable_event_reporting,
2752 use return value from handle_extended_wait.
2753 (extended_event_reported): New function.
2754 (linux_wait_1): Call extended_event_reported and set
2755 status to report fork events.
2756 (linux_write_memory): Add pid to debug message.
2757 (reset_lwp_ptrace_options_callback): New function.
2758 (linux_handle_new_gdb_connection): New function.
2759 (linux_target_ops): Initialize new structure member.
2760 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2761 * lynx-low.c: Initialize new structure member.
2762 * remote-utils.c (prepare_resume_reply): Implement stop reason
2763 "fork" for "T" stop message.
2764 * server.c (handle_query): Call handle_new_gdb_connection.
2765 * server.h (report_fork_events): Declare global flag.
2766 * target.h (struct target_ops) <handle_new_gdb_connection>:
2768 (target_handle_new_gdb_connection): New macro.
2769 * win32-low.c: Initialize new structure member.
2771 2015-05-12 Don Breazeal <donb@codesourcery.com>
2773 * mem-break.c (APPEND_TO_LIST): Define macro.
2774 (clone_agent_expr): New function.
2775 (clone_one_breakpoint): New function.
2776 (clone_all_breakpoints): New function.
2777 * mem-break.h: Declare new functions.
2779 2015-05-12 Don Breazeal <donb@codesourcery.com>
2781 * linux-low.c (linux_supports_fork_events): New function.
2782 (linux_supports_vfork_events): New function.
2783 (linux_target_ops): Initialize new structure members.
2784 (initialize_low): Call linux_check_ptrace_features.
2785 * lynx-low.c (lynx_target_ops): Initialize new structure
2787 * server.c (report_fork_events, report_vfork_events):
2789 (handle_query): Add new features to qSupported packet and
2791 (captured_main): Initialize new global variables.
2792 * target.h (struct target_ops) <supports_fork_events>:
2794 <supports_vfork_events>: New member.
2795 (target_supports_fork_events): New macro.
2796 (target_supports_vfork_events): New macro.
2797 * win32-low.c (win32_target_ops): Initialize new structure
2800 2015-05-12 Gary Benson <gbenson@redhat.com>
2802 * server.c (handle_qxfer_exec_file): Use current process
2805 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2807 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2808 Remove HAVE_PTRACE_GETREGS conditionals.
2809 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2810 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2812 2015-05-08 Yao Qi <yao.qi@linaro.org>
2814 * linux-low.c (linux_supports_conditional_breakpoints): New
2816 (linux_target_ops): Install new target method.
2817 * lynx-low.c (lynx_target_ops): Install NULL hook for
2818 supports_conditional_breakpoints.
2819 * nto-low.c (nto_target_ops): Likewise.
2820 * spu-low.c (spu_target_ops): Likewise.
2821 * win32-low.c (win32_target_ops): Likewise.
2822 * server.c (handle_query): Check
2823 target_supports_conditional_breakpoints.
2824 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2826 (target_supports_conditional_breakpoints): New macro.
2828 2015-05-06 Pedro Alves <palves@redhat.com>
2831 * server.c (start_inferior): If the process exits, mourn it.
2833 2015-04-21 Gary Benson <gbenson@redhat.com>
2835 * hostio.c (fileio_open_flags_to_host): Factored out to
2836 fileio_to_host_openflags in common/fileio.c. Single use
2839 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2841 * linux-xtensa-low.c (xtensa_fill_gregset)
2842 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2845 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2847 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2848 (regs_info): Replace usrregs pointer with NULL.
2850 2015-04-17 Gary Benson <gbenson@redhat.com>
2852 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2853 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2854 * server.c (handle_qxfer_exec_file): New function.
2855 (qxfer_packets): Add exec-file entry.
2856 (handle_query): Report qXfer:exec-file:read as supported packet.
2858 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2860 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2862 2015-04-09 Gary Benson <gbenson@redhat.com>
2864 * hostio-errno.c (errno_to_fileio_error): Remove function.
2865 Update caller to use remote_fileio_to_fio_error.
2867 2015-04-09 Yao Qi <yao.qi@linaro.org>
2869 * linux-low.c (linux_insert_point): Call
2870 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2871 (linux_remove_point): Call remove_memory_breakpoint if type is
2873 * linux-x86-low.c (x86_insert_point): Don't call
2874 insert_memory_breakpoint.
2875 (x86_remove_point): Don't call remove_memory_breakpoint.
2877 2015-04-01 Pedro Alves <palves@redhat.com>
2878 Cleber Rosa <crosa@redhat.com>
2880 * server.c (gdbserver_usage): Reorganize and extend the usage
2883 2015-03-24 Pedro Alves <palves@redhat.com>
2885 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2886 output. Also dump TRAP_TRACE.
2887 (linux_low_filter_event): In debug output, distinguish a
2888 resume_stop SIGSTOP from a delayed SIGSTOP.
2890 2015-03-24 Gary Benson <gbenson@redhat.com>
2892 * linux-x86-low.c (x86_linux_new_thread): Moved to
2894 (x86_linux_prepare_to_resume): Likewise.
2896 2015-03-24 Gary Benson <gbenson@redhat.com>
2898 * Makefile.in (x86-linux-dregs.o): New rule.
2899 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2900 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2901 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2902 (x86_linux_dr_get): Likewise.
2903 (x86_linux_dr_set): Likewise.
2904 (update_debug_registers_callback): Likewise.
2905 (x86_linux_dr_set_addr): Likewise.
2906 (x86_linux_dr_get_addr): Likewise.
2907 (x86_linux_dr_set_control): Likewise.
2908 (x86_linux_dr_get_control): Likewise.
2909 (x86_linux_dr_get_status): Likewise.
2910 (x86_linux_update_debug_registers): Likewise.
2912 2015-03-24 Gary Benson <gbenson@redhat.com>
2914 * linux-x86-low.c (x86_linux_update_debug_registers):
2915 New function, factored out from...
2916 (x86_linux_prepare_to_resume): ...this.
2918 2015-03-24 Gary Benson <gbenson@redhat.com>
2920 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2921 (x86_linux_dr_set): Likewise.
2922 (update_debug_registers_callback): Likewise.
2923 (x86_linux_dr_set_addr): Likewise.
2924 (x86_linux_dr_get_addr): Likewise.
2925 (x86_linux_dr_set_control): Likewise.
2926 (x86_linux_dr_get_control): Likewise.
2927 (x86_linux_dr_get_status): Likewise.
2928 (x86_linux_prepare_to_resume): Likewise.
2930 2015-03-24 Gary Benson <gbenson@redhat.com>
2932 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2933 Use perror_with_name. Pass string through gettext.
2934 (x86_linux_dr_set): Likewise.
2936 2015-03-24 Gary Benson <gbenson@redhat.com>
2938 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2939 (x86_linux_dr_set_addr): ...this.
2940 (x86_dr_low_get_addr): Rename to...
2941 (x86_linux_dr_get_addr): ...this.
2942 (x86_dr_low_set_control): Rename to...
2943 (x86_linux_dr_set_control): ...this.
2944 (x86_dr_low_get_control): Rename to...
2945 (x86_linux_dr_get_control): ...this.
2946 (x86_dr_low_get_status): Rename to...
2947 (x86_linux_dr_get_status): ...this.
2948 (x86_dr_low): Update with new function names.
2950 2015-03-24 Gary Benson <gbenson@redhat.com>
2952 * Makefile.in (x86-linux.o): New rule.
2953 * configure.srv: Add x86-linux.o to relevant targets.
2954 * linux-low.c (lwp_set_arch_private_info): New function.
2955 (lwp_arch_private_info): Likewise.
2956 * linux-x86-low.c: Include nat/x86-linux.h.
2957 (arch_lwp_info): Removed structure.
2958 (update_debug_registers_callback):
2959 Use lwp_set_debug_registers_changed.
2960 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2961 and lwp_set_debug_registers_changed.
2962 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2964 2015-03-24 Gary Benson <gbenson@redhat.com>
2966 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2967 * linux-arm-low.c (arm_new_thread): Likewise.
2968 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2969 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2970 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2971 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2973 2015-03-24 Gary Benson <gbenson@redhat.com>
2975 * linux-low.c (ptid_of_lwp): New function.
2976 (lwp_is_stopped): Likewise.
2977 (lwp_stop_reason): Likewise.
2978 * linux-x86-low.c (update_debug_registers_callback):
2980 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2983 2015-03-24 Gary Benson <gbenson@redhat.com>
2985 * linux-low.h (linux_stop_lwp): Remove declaration.
2987 2015-03-24 Gary Benson <gbenson@redhat.com>
2989 * linux-low.h: Include nat/linux-nat.h.
2990 * linux-low.c (iterate_over_lwps_args): New structure.
2991 (iterate_over_lwps_filter): New function.
2992 (iterate_over_lwps): Likewise.
2993 * linux-x86-low.c (update_debug_registers_callback):
2994 Update signature to what iterate_over_lwps expects.
2995 Remove PID check that iterate_over_lwps now performs.
2996 (x86_dr_low_set_addr): Use iterate_over_lwps.
2997 (x86_dr_low_set_control): Likewise.
2999 2015-03-24 Gary Benson <gbenson@redhat.com>
3001 * linux-x86-low.c (x86_debug_reg_state): New function.
3002 (x86_linux_prepare_to_resume): Use the above.
3004 2015-03-24 Gary Benson <gbenson@redhat.com>
3006 * linux-low.c (current_lwp_ptid): New function.
3007 * linux-x86-low.c: Include nat/linux-nat.h.
3008 (x86_dr_low_get_addr): Use current_lwp_ptid.
3009 (x86_dr_low_get_control): Likewise.
3010 (x86_dr_low_get_status): Likewise.
3012 2015-03-20 Pedro Alves <palves@redhat.com>
3014 * tracepoint.c (cmd_qtstatus): Make "str" const.
3016 2015-03-20 Pedro Alves <palves@redhat.com>
3018 * server.c (handle_general_set): Make "req_str" const.
3020 2015-03-19 Pedro Alves <palves@redhat.com>
3022 * linux-low.c (linux_resume_one_lwp): Rename to ...
3023 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3024 instead call perror_with_name.
3025 (check_ptrace_stopped_lwp_gone): New function.
3026 (linux_resume_one_lwp): Reimplement as wrapper around
3027 linux_resume_one_lwp_throw that swallows errors if the LWP is
3030 2015-03-19 Pedro Alves <palves@redhat.com>
3032 * linux-low.c (count_events_callback, select_event_lwp_callback):
3033 No longer check whether the thread has resume_stop as last resume
3036 2015-03-19 Pedro Alves <palves@redhat.com>
3038 * linux-low.c (count_events_callback, select_event_lwp_callback):
3039 Use the lwp's status_pending_p field, not the thread's.
3041 2015-03-19 Pedro Alves <palves@redhat.com>
3043 * linux-low.c (select_event_lwp_callback): Update comments to
3044 no longer mention SIGTRAP.
3046 2015-03-18 Gary Benson <gbenson@redhat.com>
3048 * server.c (handle_query): Do not report vFile:fstat as supported.
3050 2015-03-11 Gary Benson <gbenson@redhat.com>
3052 * hostio.c (sys/types.h): New include.
3053 (sys/stat.h): Likewise.
3054 (common-remote-fileio.h): Likewise.
3055 (handle_fstat): New function.
3056 (handle_vFile): Handle vFile:fstat packets.
3058 2015-03-11 Gary Benson <gbenson@redhat.com>
3060 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3061 struct stat.st_blocks and struct stat.st_blksize.
3062 * configure: Regenerate.
3063 * config.in: Likewise.
3064 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3065 (OBS): Add common-remote-fileio.o.
3066 (common-remote-fileio.o): New rule.
3068 2015-03-09 Pedro Alves <palves@redhat.com>
3070 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3071 'struct sockaddr' pointer in 'accept' call.
3073 2015-03-09 Pedro Alves <palves@redhat.com>
3076 2015-03-07 Pedro Alves <palves@redhat.com>
3077 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3078 or <winsock2.h> here. Instead include "gdb_socket.h".
3079 (remote_open): Use union gdb_sockaddr_u.
3080 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3081 or <winsock2.h> here. Instead include "gdb_socket.h".
3082 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3083 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3085 (init_named_socket, gdb_agent_helper_thread): Use union
3088 2015-03-07 Pedro Alves <palves@redhat.com>
3090 * configure.ac (build_warnings): Move
3091 -Wdeclaration-after-statement to the C-specific set.
3092 * configure: Regenerate.
3094 2015-03-07 Pedro Alves <palves@redhat.com>
3096 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3097 or <winsock2.h> here. Instead include "gdb_socket.h".
3098 (remote_open): Use union gdb_sockaddr_u.
3099 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3100 or <winsock2.h> here. Instead include "gdb_socket.h".
3101 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3102 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3104 (init_named_socket, gdb_agent_helper_thread): Use union
3107 2015-03-07 Pedro Alves <palves@redhat.com>
3109 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3112 2015-03-06 Yao Qi <yao.qi@linaro.org>
3114 * linux-aarch64-low.c (aarch64_insert_point): Use
3115 show_debug_regs as a boolean.
3116 (aarch64_remove_point): Likewise.
3118 2015-03-05 Pedro Alves <palves@redhat.com>
3120 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3121 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3122 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3123 * nto-low.c (nto_target_ops): Likewise.
3124 * spu-low.c (spu_target_ops): Likewise.
3125 * win32-low.c (win32_target_ops): Likewise.
3127 2015-03-04 Pedro Alves <palves@redhat.com>
3129 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3130 Decide whether a breakpoint triggered based on the SIGTRAP's
3132 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3133 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3134 (linux_low_filter_event): Check for breakpoints before checking
3136 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3138 (linux_stopped_by_sw_breakpoint)
3139 (linux_supports_stopped_by_sw_breakpoint)
3140 (linux_stopped_by_hw_breakpoint)
3141 (linux_supports_stopped_by_hw_breakpoint): New functions.
3142 (linux_target_ops): Install new target methods.
3144 2015-03-04 Pedro Alves <palves@redhat.com>
3146 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3147 * server.c (swbreak_feature, hwbreak_feature): New globals.
3148 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3149 (captured_main): Clear swbreak_feature and hwbreak_feature.
3150 * server.h (swbreak_feature, hwbreak_feature): Declare.
3151 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3152 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3153 supports_stopped_by_hw_breakpoint>: New fields.
3154 (target_supports_stopped_by_sw_breakpoint)
3155 (target_stopped_by_sw_breakpoint)
3156 (target_supports_stopped_by_hw_breakpoint)
3157 (target_stopped_by_hw_breakpoint): Declare.
3159 2015-03-04 Pedro Alves <palves@redhat.com>
3161 enum lwp_stop_reason -> enum target_stop_reason
3162 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3163 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3164 (linux_wait_1, stuck_in_jump_pad_callback)
3165 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3166 (linux_stopped_by_watchpoint):
3167 * linux-low.h (enum lwp_stop_reason): Delete.
3168 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3169 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3171 2015-03-04 Yao Qi <yao.qi@linaro.org>
3173 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3175 2015-03-03 Gary Benson <gbenson@redhat.com>
3177 * hostio.c (handle_vFile): Fix prefix lengths.
3179 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3181 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3184 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3186 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3187 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3188 (clean): Add "rm -f" for above C files.
3189 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3190 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3191 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3192 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3193 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3194 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3195 (init_registers_s390x_vx_linux64)
3196 (init_registers_s390x_tevx_linux64)
3197 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3198 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3200 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3201 (s390_store_vxrs_high): New functions.
3202 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3204 (s390_arch_setup): Add logic for selecting one of the new target
3205 descriptions. Activate the new vector regsets if applicable.
3206 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3207 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3208 and init_registers_s390x_tevx_linux64.
3210 2015-03-01 Pedro Alves <palves@redhat.com>
3212 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3215 2015-02-27 Pedro Alves <palves@redhat.com>
3217 * linux-x86-low.c (u_debugreg_offset): New function.
3218 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3220 2015-02-27 Pedro Alves <palves@redhat.com>
3222 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3223 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3224 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3225 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3226 (ps_lsetfpregs, ps_getpid)
3227 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3228 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3229 (ps_lsetxregs, ps_plog): Declare.
3231 2015-02-27 Pedro Alves <palves@redhat.com>
3233 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3234 IP_AGENT_EXPORT_FUNC.
3235 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3236 IP_AGENT_EXPORT_FUNC.
3237 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3238 (IP_AGENT_EXPORT): Delete.
3239 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3240 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3241 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3242 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3243 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3244 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3245 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3246 (traceframe_read_count, traceframe_write_count)
3247 (traceframes_created, trace_state_variables, get_raw_reg)
3248 (get_trace_state_variable_value, set_trace_state_variable_value)
3249 (ust_loaded, helper_thread_id, cmd_buf): Use
3250 IPA_SYM_EXPORTED_NAME.
3251 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3252 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3253 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3254 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3255 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3256 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3257 EXTERN_C_PUSH/EXTERN_C_POP.
3258 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3259 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3260 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3261 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3262 (traceframe_write_count, traceframe_read_count)
3263 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3264 (about_to_request_buffer_space, get_trace_state_variable_value)
3265 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3266 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3267 EXTERN_C_PUSH/EXTERN_C_POP.
3268 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3269 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3270 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3271 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3272 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3273 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3274 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3275 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3277 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3278 (IP_AGENT_EXPORT_VAR_DECL): Define.
3280 (gdb_agent_get_raw_reg): Declare.
3282 2015-02-27 Tom Tromey <tromey@redhat.com>
3283 Pedro Alves <palves@redhat.com>
3285 Rename symbols whose names are reserved C++ keywords throughout.
3287 2015-02-27 Pedro Alves <palves@redhat.com>
3289 * Makefile.in (COMPILER): New, get it from autoconf.
3290 (CXX): Get from autoconf instead.
3291 (COMPILE.pre): Use COMPILER.
3292 (CC-LD): Rename to ...
3293 (CC_LD): ... this. Use COMPILER.
3294 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3295 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3296 * acinclude.m4: Include build-with-cxx.m4.
3297 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3298 Disable -Werror by default if building in C++ mode.
3299 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3300 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3301 the C++ compiler. Save/restore CXXFLAGS too.
3302 * configure: Regenerate.
3304 2015-02-27 Pedro Alves <palves@redhat.com>
3306 * acinclude.m4: Include libiberty.m4.
3307 * configure.ac: Call libiberty_INIT.
3308 * config.in, configure: Regenerate.
3310 2015-02-26 Pedro Alves <palves@redhat.com>
3312 * linux-low.c (linux_wait_1): When incrementing the PC past a
3313 program breakpoint always use the_low_target.breakpoint_len as
3314 increment, rather than the maximum between that and
3315 the_low_target.decr_pc_after_break.
3317 2015-02-23 Pedro Alves <palves@redhat.com>
3319 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3320 thread was doing a step-over; always adjust the PC if
3321 we stepped over a permanent breakpoint.
3322 (linux_wait_1): If we stepped over breakpoint that was on top of a
3323 permanent breakpoint, manually advance the PC past it.
3325 2015-02-23 Pedro Alves <palves@redhat.com>
3327 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3329 (x86_fill_gregset, x86_store_gregset): Use it when handling
3332 2015-02-20 Pedro Alves <palves@redhat.com>
3334 * thread-db.c: Include "nat/linux-procfs.h".
3335 (thread_db_init): Skip listing new threads if the kernel supports
3336 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3338 2015-02-20 Pedro Alves <palves@redhat.com>
3340 * linux-low.c (status_pending_p_callback): Use ptid_match.
3342 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3344 PR breakpoints/16812
3345 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3346 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3347 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3349 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3351 PR breakpoints/15956
3352 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3354 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3356 * linux-low.c (linux_low_btrace_conf): Print size.
3357 * server.c (handle_btrace_conf_general_set): New.
3358 (hanle_general_set): Call handle_btrace_conf_general_set.
3359 (handle_query): Report Qbtrace-conf:bts:size as supported.
3361 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3363 * linux-low.c (linux_low_enable_btrace): Update parameters.
3364 (linux_low_btrace_conf): New.
3365 (linux_target_ops)<to_btrace_conf>: Initialize.
3366 * server.c (current_btrace_conf): New.
3367 (handle_btrace_enable): Rename to ...
3368 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
3369 to target_enable_btrace. Update comment. Update users.
3370 (handle_qxfer_btrace_conf): New.
3371 (qxfer_packets): Add btrace-conf entry.
3372 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3373 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3374 (target_ops)<read_btrace_conf>: New.
3375 (target_enable_btrace): Update parameters.
3376 (target_read_btrace_conf): New.
3378 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3380 * server.c (handle_btrace_general_set): Remove call to
3381 target_supports_btrace.
3382 (supported_btrace_packets): New.
3383 (handle_query): Call supported_btrace_packets.
3384 * target.h: include btrace-common.h.
3385 (btrace_target_info): Removed.
3386 (supports_btrace, target_supports_btrace): Update parameters.
3388 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3390 * Makefile.in (SFILES): Add common/btrace-common.c.
3391 (OBS): Add common/btrace-common.o.
3392 (btrace-common.o): Add build rules.
3393 * linux-low: Include btrace-common.h.
3394 (linux_low_read_btrace): Use struct btrace_data. Call
3395 btrace_data_init and btrace_data_fini.
3397 2015-02-06 Pedro Alves <palves@redhat.com>
3399 * thread-db.c (find_new_threads_callback): Add debug output.
3401 2015-02-04 Pedro Alves <palves@redhat.com>
3403 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3404 (resume_stopped_resumed_lwps): New function.
3405 (linux_wait_for_event_filtered): Use it.
3407 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3409 * Makefile.in (SFILES): Add linux-personality.c.
3410 (linux-personality.o): New rule.
3411 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3412 list of objects to be built.
3413 * linux-low.c: Include nat/linux-personality.h.
3414 (linux_create_inferior): Remove code to disable address space
3415 randomization (moved to ../nat/linux-personality.c). Create
3416 cleanup to disable address space randomization.
3418 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3420 * Makefile.in (posix-strerror.o): New rule.
3421 (mingw-strerror.o): Likewise.
3422 * configure: Regenerated.
3423 * configure.ac: Source file ../common/common.host. Initialize new
3424 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3426 2015-01-14 Yao Qi <yao@codesourcery.com>
3428 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3429 (ppc-linux.o): New rule.
3430 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3431 * configure.ac: AC_CHECK_FUNCS(getauxval).
3432 * config.in: Re-generated.
3433 * configure: Re-generated.
3434 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3435 ppc64_64bit_inferior_p
3437 2015-01-14 Yao Qi <yao@codesourcery.com>
3439 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3440 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3441 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3442 (PT_ORIG_R3, PT_TRAP): Likewise.
3443 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3444 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3445 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3447 2015-01-10 Joel Brobecker <brobecker@adacore.com>
3449 * i387-fp.c (i387_cache_to_xsave): In look over
3450 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3451 zmmh_low_space field by use of zmmh_high_space.
3453 2015-01-09 Pedro Alves <palves@redhat.com>
3455 * linux-low.c (step_over_bkpt): Move higher up in the file.
3456 (handle_extended_wait): Don't store the stop_pc here.
3457 (get_stop_pc): Adjust comments and rename to ...
3458 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3459 stopped for a software breakpoint or hardware breakpoint.
3460 (thread_still_has_status_pending_p): New function.
3461 (status_pending_p_callback): Use
3462 thread_still_has_status_pending_p. If the event is no longer
3463 interesting, resume the LWP.
3464 (handle_tracepoints): Add assert.
3465 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3466 (wstatus_maybe_breakpoint): New function.
3467 (cancel_breakpoint): Delete function.
3468 (check_stopped_by_watchpoint): New function, factored out from
3469 linux_low_filter_event.
3470 (lp_status_maybe_breakpoint): Delete function.
3471 (linux_low_filter_event): Remove filter_ptid argument.
3472 Leave thread group exits pending here. Store the LWP's stop PC.
3473 Always leave events pending.
3474 (linux_wait_for_event_filtered): Pull all events out of the
3475 kernel, and leave them all pending.
3476 (count_events_callback, select_event_lwp_callback): Consider all
3478 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3479 (select_event_lwp): Only give preference to the stepping LWP in
3480 all-stop mode. Adjust comments.
3481 (ignore_event): New function.
3482 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3483 references to cancel_breakpoints. Adjust to renames. Also give
3484 equal priority to all LWPs that have had events in non-stop mode.
3485 If reporting a software breakpoint event, unadjust the LWP's PC.
3486 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3487 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3489 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3490 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3491 (linux_stopped_by_watchpoint): Adjust.
3492 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3493 * linux-low.h (enum lwp_stop_reason): New.
3494 (struct lwp_info) <stop_pc>: Adjust comment.
3495 <stopped_by_watchpoint>: Delete field.
3496 <stop_reason>: New field.
3497 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3498 * mem-break.c (software_breakpoint_inserted_here)
3499 (hardware_breakpoint_inserted_here): New function.
3500 * mem-break.h (software_breakpoint_inserted_here)
3501 (hardware_breakpoint_inserted_here): Declare.
3502 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3503 (cancel_breakpoints): Delete.
3504 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3505 (upload_fast_traceframes): Remove references to
3508 2015-01-09 Pedro Alves <palves@redhat.com>
3510 * thread-db.c (find_new_threads_callback): Ignore thread if the
3511 kernel thread ID is -1.
3513 2015-01-09 Pedro Alves <palves@redhat.com>
3515 * linux-low.c (linux_attach_fail_reason_string): Move to
3516 nat/linux-ptrace.c, and rename.
3517 (linux_attach_lwp): Update comment.
3518 (attach_proc_task_lwp_callback): New function.
3519 (linux_attach): Adjust to rename and use
3520 linux_proc_attach_tgid_threads.
3521 (linux_attach_fail_reason_string): Delete declaration.
3523 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3525 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3526 * server.c (gdbserver_version): Likewise.
3528 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3530 * remote-utils.c: Include ctype.h.
3531 (input_interrupt): Explicitly handle the case when the char
3532 received is the NUL byte. Improve the printing of non-ASCII
3535 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3537 * linux-low.c (linux_low_filter_event): Update call to
3538 linux_enable_event_reporting following the addition of
3539 a new parameter to that function.
3541 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3544 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3545 (AARCH64_FPCR_REGNO): Likewise.
3546 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3547 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3548 (aarch64_store_fpregset): Likewise.
3550 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3552 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3553 Remove FIXME comment about assumption about N.
3555 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3557 * configure.ac: If large-file support is disabled in GDBserver,
3558 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3559 * configure: Regenerate.
3561 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3563 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3564 warning upon ENODATA from ptrace.
3565 * linux-s390-low.c (s390_store_tdb): New.
3566 (s390_regsets): Add regset for NT_S390_TDB.
3568 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3570 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3571 without a fill_function.
3572 * linux-s390-low.c (s390_fill_last_break): Remove.
3573 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3574 (s390_arch_setup): Use regset's size instead of fill_function for
3577 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3579 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3580 the regset's store function when ptrace returned an error.
3581 * regcache.c (get_thread_regcache): Invalidate register cache
3582 before fetching inferior's registers.
3584 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3586 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3587 while-loop as for-loop.
3588 (regsets_store_inferior_registers): Likewise.
3590 2014-11-28 Yao Qi <yao@codesourcery.com>
3592 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3593 * config.in, configure: Re-generate.
3594 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3597 2014-11-21 Yao Qi <yao@codesourcery.com>
3599 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3600 (AC_CHECK_HEADERS): Remove malloc.h.
3601 * configure: Re-generated.
3602 * config.in: Re-generated.
3603 * server.h: Don't include alloca.h and malloc.h.
3604 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3605 Don't include malloc.h.
3607 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3609 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3610 corresponding ERRNO check in same block.
3612 2014-11-12 Pedro Alves <palves@redhat.com>
3614 * server.c (cont_thread): Update comment.
3615 (start_inferior, attach_inferior): No longer clear cont_thread.
3616 (handle_v_cont): No longer set cont_thread.
3617 (captured_main): Clear cont_thread each time a GDB connects.
3619 2014-11-12 Pedro Alves <palves@redhat.com>
3621 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3622 thread, and don't resume all threads if the Hc thread has exited.
3624 2014-11-12 Pedro Alves <palves@redhat.com>
3626 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3627 the process group instead of to a specific LWP.
3629 2014-10-15 Pedro Alves <palves@redhat.com>
3632 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3634 (arm_set_thread_context): Delete.
3635 (the_low_target): Adjust.
3636 * win32-i386-low.c (debug_registers_changed)
3637 (debug_registers_used): Delete.
3638 (update_debug_registers_callback): New function.
3639 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3640 needing to update their debug registers.
3641 (win32_get_current_dr): New function.
3642 (x86_dr_low_get_addr, x86_dr_low_get_control)
3643 (x86_dr_low_get_status): Fetch the debug register from the thread
3645 (i386_initial_stuff): Adjust.
3646 (i386_get_thread_context): Remove current_event parameter. Don't
3647 clear debug_registers_changed nor copy DR values to
3649 (i386_set_thread_context): Delete.
3650 (i386_prepare_to_resume): New function.
3651 (i386_thread_added): Mark the thread as needing to update irs
3653 (the_low_target): Remove i386_set_thread_context and install
3654 i386_prepare_to_resume.
3655 * win32-low.c (win32_get_thread_context): Adjust.
3656 (win32_set_thread_context): Use SetThreadContext
3658 (win32_prepare_to_resume): New function.
3659 (win32_require_context): New function, factored out from ...
3660 (thread_rec): ... this.
3661 (continue_one_thread): Call win32_prepare_to_resume on each thread
3662 we're about to continue.
3663 (win32_resume): Call win32_prepare_to_resume on the event thread.
3664 * win32-low.h (struct win32_thread_info)
3665 <debug_registers_changed>: New field.
3666 (struct win32_target_ops): Change prototype of set_thread_context,
3667 delete set_thread_context and add prepare_to_resume.
3668 (win32_require_context): New declaration.
3670 2014-10-08 Gary Benson <gbenson@redhat.com>
3672 * server.h: Do not include common-exceptions.h.
3674 2014-10-08 Gary Benson <gbenson@redhat.com>
3676 * server.h: Do not include cleanups.h.
3678 2014-09-30 James Hogan <james.hogan@imgtec.com>
3680 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3683 2014-09-23 Yao Qi <yao@codesourcery.com>
3685 * linux-low.c (lp_status_maybe_breakpoint): New function.
3686 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3687 (count_events_callback): Likewise.
3688 (select_event_lwp_callback): Likewise.
3689 (cancel_breakpoints_callback): Likewise.
3691 2014-09-19 Don Breazeal <donb@codesourcery.com>
3693 * linux-low.c (handle_extended_wait): Call
3694 linux_ptrace_get_extended_event.
3695 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3696 linux_is_extended_waitstatus.
3698 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3700 * Makefile.in (CPPFLAGS): Define.
3701 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3702 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3704 2014-09-16 Gary Benson <gbenson@redhat.com>
3706 * inferiors.h (current_inferior): Renamed as...
3707 (current_thread): New variable. All uses updated.
3708 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3709 (maybe_move_out_of_jump_pad): Likewise.
3710 (cancel_breakpoint): Likewise.
3711 (linux_low_filter_event): Likewise.
3712 (wait_for_sigstop): Likewise.
3713 (linux_resume_one_lwp): Likewise.
3714 (need_step_over_p): Likewise.
3715 (start_step_over): Likewise.
3716 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3717 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3718 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3719 and save_inferior as saved_thread.
3720 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3722 (regcache_invalidate_thread): Likewise.
3723 * remote-utils.c (prepare_resume_reply): Likewise.
3724 * thread-db.c (thread_db_get_tls_address): Likewise.
3725 (disable_thread_event_reporting): Likewise.
3726 (remove_thread_event_breakpoints): Likewise.
3727 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3729 * target.h (set_desired_inferior): Renamed as...
3730 (set_desired_thread): New declaration. All uses updated.
3731 * server.c (myresume): Updated comment to reference thread instead
3733 (handle_serial_event): Likewise.
3734 (handle_target_event): Likewise.
3736 2014-09-12 Tom Tromey <tromey@redhat.com>
3737 Gary Benson <gbenson@redhat.com>
3739 * regcache.h: Include common-regcache.h.
3740 (regcache_read_pc): Don't declare.
3741 * regcache.c (get_thread_regcache_for_ptid): New function.
3743 2014-09-11 Tom Tromey <tromey@redhat.com>
3744 Gary Benson <gbenson@redhat.com>
3746 * symbol.c: New file.
3747 * Makefile.in (SFILES): Add symbol.c.
3748 (OBS): Add symbol.o.
3750 2014-09-11 Gary Benson <gbenson@redhat.com>
3752 * target.c (target_stop_ptid, target_continue_ptid): New
3755 2014-09-11 Tom Tromey <tromey@redhat.com>
3756 Gary Benson <gbenson@redhat.com>
3758 * target.h: Include target/target.h.
3759 * target.c (target_read_memory, target_read_uint32)
3760 (target_write_memory): New functions.
3762 2014-09-11 Gary Benson <gbenson@redhat.com>
3764 * server.h (debug_hw_points): Don't declare.
3765 * server.c (debug_hw_points): Don't define. Replace all uses
3766 with show_debug_regs.
3767 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3768 all uses with show_debug_regs.
3770 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3772 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3773 endianness into account.
3774 (ppc_supply_ptrace_register): Likewise.
3776 2014-09-03 James Hogan <james.hogan@imgtec.com>
3778 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3779 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3781 2014-09-03 Gary Benson <gbenson@redhat.com>
3783 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3784 ALL_DEBUG_ADDRESS_REGISTERS.
3786 2014-09-02 Gary Benson <gbenson@redhat.com>
3788 * i386-low.h: Renamed as...
3789 * x86-low.h: New file. All type, function and variable name
3790 prefixes changed from "i386_" to "x86_". All references updated.
3791 * i386-low.c: Renamed as...
3792 * x86-low.c: New file. All type, function and variable name
3793 prefixes changed from "i386_" to "x86_". All references updated.
3795 2014-09-02 Gary Benson <gbenson@redhat.com>
3797 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3798 (x86_linux_new_thread): Likewise.
3800 2014-08-29 Gary Benson <gbenson@redhat.com>
3802 * server.h (setjmp.h): Do not include.
3803 (toplevel): Do not declare.
3804 (common-exceptions.h): Include.
3805 (cleanups.h): Likewise.
3806 * server.c (toplevel): Do not define.
3807 (exit_code): New static global.
3808 (detach_or_kill_for_exit_cleanup): New function.
3809 (main): New function. Original main renamed to...
3810 (captured_main): New function.
3811 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3813 2014-08-29 Gary Benson <gbenson@redhat.com>
3815 * Makefile.in (SFILES): Add common/common-exceptions.c.
3816 (OBS): Add common-exceptions.o.
3817 (common-exceptions.o): New rule.
3818 * utils.c (prepare_to_throw_exception): New function.
3820 2014-08-29 Gary Benson <gbenson@redhat.com>
3822 * config.in: Regenerate.
3823 * configure: Likewise.
3825 2014-08-29 Gary Benson <gbenson@redhat.com>
3827 * Makefile.in (SFILES): Add common/cleanups.c.
3829 (cleanups.o): New rule.
3831 2014-08-29 Gary Benson <gbenson@redhat.com>
3833 * utils.c (internal_vwarning): New function.
3835 2014-08-28 Gary Benson <gbenson@redhat.com>
3837 * utils.h (fatal): Remove declaration.
3838 * utils.c (fatal): Remove function.
3840 2014-08-28 Gary Benson <gbenson@redhat.com>
3842 * tracepoint.c (gdb_agent_init): Replace fatal with
3844 (initialize_tracepoint): Likewise.
3846 2014-08-28 Gary Benson <gbenson@redhat.com>
3848 * remote-utils.c (remote_prepare): Replace fatal with error.
3850 2014-08-28 Gary Benson <gbenson@redhat.com>
3852 * linux-low.c (linux_async): Replace fatal with warning.
3854 (linux_start_non_stop): Return -1 if linux_async failed.
3856 2014-08-28 Gary Benson <gbenson@redhat.com>
3858 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3860 (i386_dr_low_get_addr): Remove vague comment.
3861 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3864 2014-08-28 Gary Benson <gbenson@redhat.com>
3866 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3867 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3869 (linux_resume_one_lwp): Likewise.
3870 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3872 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3873 with internal_error.
3874 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3875 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3876 (find_register_by_name): Replace fatal with internal_error.
3877 (find_regno): Likewise.
3878 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3879 * thread-db.c (thread_db_create_event): Likewise.
3880 (thread_db_load_search): Likewise.
3881 (try_thread_db_load_1): Likewise.
3882 * tracepoint.c (get_jump_space_head): Replace fatal with
3884 (claim_trampoline_space): Likewise.
3885 (have_fast_tracepoint_trampoline_buffer): Likewise.
3886 (cmd_qtstart): Likewise.
3887 (stop_tracing): Likewise.
3888 (fast_tracepoint_collecting): Likewise.
3889 (target_malloc): Likewise.
3890 (download_tracepoint): Likewise.
3891 (download_trace_state_variables): Replace check with gdb_assert.
3892 (upload_fast_traceframes): Replace fatal with internal_error.
3894 2014-08-19 Tom Tromey <tromey@redhat.com>
3895 Gary Benson <gbenson@redhat.com>
3897 * Makefile.in (SFILES): Add common/common-debug.c.
3898 (OBS): Add common-debug.o.
3899 (common-debug.o): New rule.
3900 * debug.h (debug_printf): Don't declare.
3901 * debug.c (debug_printf): Renamed and rewritten as...
3902 (debug_vprintf): New function.
3904 2014-08-19 Gary Benson <gbenson@redhat.com>
3906 * utils.h: Do not include print-utils.h.
3908 2014-08-19 Tom Tromey <tromey@redhat.com>
3909 Gary Benson <gbenson@redhat.com>
3911 * server.h: Add static assertion.
3912 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3914 2014-08-19 Tom Tromey <tromey@redhat.com>
3915 Gary Benson <gbenson@redhat.com>
3917 * Makefile.in (SFILES): Add common/errors.c.
3918 (OBS): Add errors.o.
3919 (IPA_OBS): Add errors-ipa.o.
3920 (errors.o): New rule.
3921 (errors-ipa.o): Likewise.
3922 * utils.h (perror_with_name, error, warning): Don't declare.
3923 * utils.c (warning): Renamed and rewritten as...
3924 (vwarning): New function.
3925 (error): Renamed and rewritten as...
3926 (verror): New function.
3927 (internal_error): Renamed and rewritten as...
3928 (internal_verror): New function.
3930 2014-08-07 Gary Benson <gbenson@redhat.com>
3932 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3933 * configure: Regenerate.
3934 * config.in: Likewise.
3935 * server.h: Do not include errno.h.
3936 * event-loop.c: Likewise.
3937 * hostio-errno.c: Likewise.
3938 * linux-low.c: Likewise.
3939 * remote-utils.c: Likewise.
3940 * spu-low.c: Likewise.
3941 * utils.c: Likewise.
3942 * gdbreplay.c: Unconditionally include errno.h.
3944 2014-08-07 Gary Benson <gbenson@redhat.com>
3946 * server.h: Do not include string.h.
3947 * event-loop.c: Likewise.
3948 * linux-low.c: Likewise.
3949 * regcache.c: Likewise.
3950 * remote-utils.c: Likewise.
3951 * spu-low.c: Likewise.
3952 * utils.c: Likewise.
3954 2014-08-07 Gary Benson <gbenson@redhat.com>
3956 * server.h: Do not include gdb_assert.h.
3958 2014-08-07 Gary Benson <gbenson@redhat.com>
3960 * server.h: Do not include common-utils.h.
3962 2014-08-07 Gary Benson <gbenson@redhat.com>
3964 * server.h: Do not include ptid.h.
3965 * notif.h: Likewise.
3967 2014-08-07 Gary Benson <gbenson@redhat.com>
3969 * server.h: Do not include gdb_locale.h.
3971 2014-08-07 Gary Benson <gbenson@redhat.com>
3973 * server.h: Do not include gdb/signals.h.
3974 * win32-low.c: Likewise.
3976 2014-08-07 Gary Benson <gbenson@redhat.com>
3978 * server.h: Do not include pathmax.h.
3980 2014-08-07 Gary Benson <gbenson@redhat.com>
3982 * server.h: Do not include libiberty.h.
3983 * linux-bfin-low.c: Likewise.
3985 2014-08-07 Gary Benson <gbenson@redhat.com>
3987 * server.h: Do not include ansidecl.h.
3989 2014-08-07 Gary Benson <gbenson@redhat.com>
3991 * linux-x86-low.c: Do not include stddef.h.
3992 * lynx-ppc-low.c: Likewise.
3993 * tracepoint.c: Likewise.
3995 2014-08-07 Gary Benson <gbenson@redhat.com>
3997 * server.h: Do not include stdarg.h.
3998 * nto-low.c: Likewise.
4000 2014-08-07 Gary Benson <gbenson@redhat.com>
4002 * server.h: Do not include stdlib.h.
4003 * inferiors.c: Likewise.
4004 * linux-low.c: Likewise.
4005 * regcache.c: Likewise.
4006 * spu-low.c: Likewise.
4007 * tracepoint.c: Likewise.
4008 * utils.c: Likewise.
4010 2014-08-07 Gary Benson <gbenson@redhat.com>
4012 * server.h: Do not include stdio.h.
4013 * linux-low.c: Likewise.
4014 * remote-utils.c: Likewise.
4015 * spu-low.c: Likewise.
4016 * utils.c: Likewise.
4017 * wincecompat.c: Likewise.
4019 2014-08-06 Gary Benson <gbenson@redhat.com>
4021 * regcache.c (init_register_cache): Move conditionals inside if.
4023 2014-08-06 Gary Benson <gbenson@redhat.com>
4025 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4027 2014-07-31 Gary Benson <gbenson@redhat.com>
4029 * ax.h: Do not include server.h.
4030 * gdbthread.h: Likewise.
4031 * lynx-low.h: Likewise.
4032 * notif.h: Likewise.
4034 2014-07-30 Gary Benson <gbenson@redhat.com>
4036 * server.h: Include common-defs.h.
4037 Do not include config.h or build-gnulib-gdbserver/config.h.
4039 2014-07-30 Gary Benson <gbenson@redhat.com>
4041 * hostio-errno.c: Move server.h to top of includes list.
4042 * inferiors.c: Likewise.
4043 * linux-x86-low.c: Likewise.
4044 * notif.c: Include server.h.
4046 2014-07-24 Tom Tromey <tromey@redhat.com>
4047 Gary Benson <gbenson@redhat.com>
4049 * server.h (CORE_ADDR): Now unsigned.
4051 2014-07-16 Pedro Alves <palves@redhat.com>
4053 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4055 2014-07-15 Pedro Alves <palves@redhat.com>
4057 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4060 2014-07-11 Pedro Alves <palves@redhat.com>
4062 * linux-low.c (kill_wait_lwp): New function, based on
4063 kill_one_lwp_callback, but use my_waitpid directly.
4064 (kill_one_lwp_callback, linux_kill): Use it.
4066 2014-06-23 Pedro Alves <palves@redhat.com>
4068 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4069 before setting DR0..DR3.
4071 2014-06-20 Gary Benson <gbenson@redhat.com>
4073 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4074 * configure: Regenerated.
4075 * config.in: Likewise.
4077 2014-06-20 Gary Benson <gbenson@redhat.com>
4079 * Makefile.in (SFILES): Update locations for files moved
4081 (object file files): Reordered.
4083 2014-06-20 Gary Benson <gbenson@redhat.com>
4085 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4086 (i386_dr_low_set_addr): Likewise.
4087 (i386_dr_low_get_addr): Likewise.
4088 (i386_dr_low_can_set_control): Likewise.
4089 (i386_dr_low_set_control): Likewise.
4090 (i386_dr_low_get_control): Likewise.
4091 (i386_dr_low_get_status): Likewise.
4092 (i386_get_debug_register_length): Likewise.
4093 * linux-x86-low.c (i386_dr_low_set_addr):
4094 Changed signature. Made static.
4095 (i386_dr_low_get_addr): Likewise.
4096 (i386_dr_low_set_control): Likewise.
4097 (i386_dr_low_get_control): Likewise.
4098 (i386_dr_low_get_status): Likewise.
4099 (i386_dr_low): New global variable.
4100 * win32-i386-low.c (i386_dr_low_set_addr):
4101 Changed signature. Made static.
4102 (i386_dr_low_get_addr): Likewise.
4103 (i386_dr_low_set_control): Likewise.
4104 (i386_dr_low_get_control): Likewise.
4105 (i386_dr_low_get_status): Likewise.
4106 (i386_dr_low): New global variable.
4108 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4110 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4111 * Makefile.in (AR, AR_FLAGS): Define.
4112 * configure: Regenerate.
4114 2014-06-19 Gary Benson <gbenson@redhat.com>
4116 * Makefile.in (i386-dregs.o): New rule.
4117 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4118 * i386-low.c (target.h): Remove include.
4119 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4120 (DR_CONTROL_SHIFT): Likewise.
4121 (DR_CONTROL_SIZE): Likewise.
4122 (DR_RW_EXECUTE): Likewise.
4123 (DR_RW_WRITE): Likewise.
4124 (DR_RW_READ): Likewise.
4125 (DR_RW_IORW): Likewise.
4126 (DR_LEN_1): Likewise.
4127 (DR_LEN_2): Likewise.
4128 (DR_LEN_4): Likewise.
4129 (DR_LEN_8): Likewise.
4130 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4131 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4132 (DR_ENABLE_SIZE): Likewise.
4133 (DR_LOCAL_SLOWDOWN): Likewise.
4134 (DR_GLOBAL_SLOWDOWN): Likewise.
4135 (DR_CONTROL_RESERVED): Likewise.
4136 (I386_DR_CONTROL_MASK): Likewise.
4137 (I386_DR_VACANT): Likewise.
4138 (I386_DR_LOCAL_ENABLE): Likewise.
4139 (I386_DR_GLOBAL_ENABLE): Likewise.
4140 (I386_DR_DISABLE): Likewise.
4141 (I386_DR_SET_RW_LEN): Likewise.
4142 (I386_DR_GET_RW_LEN): Likewise.
4143 (I386_DR_WATCH_HIT): Likewise.
4144 (i386_wp_op_t): Likewise.
4145 (i386_show_dr): Likewise.
4146 (i386_length_and_rw_bits): Likewise.
4147 (i386_insert_aligned_watchpoint): Likewise.
4148 (i386_remove_aligned_watchpoint): Likewise.
4149 (i386_handle_nonaligned_watchpoint): Likewise.
4150 i386_update_inferior_debug_regs(): Likewise.
4151 (i386_dr_insert_watchpoint): Likewise.
4152 (i386_dr_remove_watchpoint): Likewise.
4153 (i386_dr_region_ok_for_watchpoint): Likewise.
4154 (i386_dr_stopped_data_address): Likewise.
4155 (i386_dr_stopped_by_watchpoint): Likewise.
4157 2014-06-19 Gary Benson <gbenson@redhat.com>
4159 * i386-low.c (i386_dr_show): Renamed to
4160 i386_show_dr and made static. All uses updated.
4161 (i386_dr_length_and_rw_bits): Renamed to
4162 i386_length_and_rw_bits and made static.
4164 (i386_dr_insert_aligned_watchpoint): Renamed to
4165 i386_insert_aligned_watchpoint and made static.
4167 (i386_dr_remove_aligned_watchpoint): Renamed to
4168 i386_remove_aligned_watchpoint and made static.
4170 (i386_dr_update_inferior_debug_regs): Renamed to
4171 i386_update_inferior_debug_regs and made static.
4174 2014-06-18 Gary Benson <gbenson@redhat.com>
4176 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4177 (i386_dr_low_can_set_control): Likewise.
4178 (i386_get_debug_register_length): Likewise.
4179 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4180 (i386_dr_low_can_set_control): Likewise.
4181 (i386_get_debug_register_length): Likewise.
4183 2014-06-17 Gary Benson <gbenson@redhat.com>
4185 * i386-low.h (i386-dregs.h): New include.
4186 (DR_FIRSTADDR): Now in i386-dregs.h.
4187 (DR_LASTADDR): Likewise.
4188 (DR_NADDR): Likewise.
4189 (DR_STATUS): Likewise.
4190 (DR_CONTROL): Likewise.
4191 (i386_debug_reg_state): Likewise.
4192 (i386_dr_insert_watchpoint): Likewise.
4193 (i386_dr_remove_watchpoint): Likewise.
4194 (i386_dr_region_ok_for_watchpoint): Likewise.
4195 (i386_dr_stopped_data_address): Likewise.
4196 (i386_dr_stopped_by_watchpoint): Likewise.
4197 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4199 2014-06-18 Gary Benson <gbenson@redhat.com>
4201 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4202 i386_dr_insert_watchpoint.
4203 (i386_low_remove_watchpoint): Renamed to
4204 i386_dr_remove_watchpoint.
4205 (i386_low_region_ok_for_watchpoint): Renamed to
4206 i386_dr_region_ok_for_watchpoint.
4207 (i386_low_stopped_data_address): Renamed to
4208 i386_dr_stopped_data_address.
4209 (i386_low_stopped_by_watchpoint): Renamed to
4210 i386_dr_stopped_by_watchpoint.
4211 * i386-low.c (i386_show_dr): Renamed to
4212 i386_dr_show and made nonstatic. All uses updated.
4213 (i386_length_and_rw_bits): Renamed to
4214 i386_dr_length_and_rw_bits and made nonstatic.
4216 (i386_insert_aligned_watchpoint): Renamed to
4217 i386_dr_insert_aligned_watchpoint and made nonstatic.
4219 (i386_remove_aligned_watchpoint): Renamed to
4220 i386_dr_remove_aligned_watchpoint and made nonstatic.
4222 (i386_update_inferior_debug_regs): Renamed to
4223 i386_dr_update_inferior_debug_regs and made nonstatic.
4225 (i386_low_insert_watchpoint): Renamed to
4226 i386_dr_insert_watchpoint. All uses updated.
4227 (i386_low_remove_watchpoint): Renamed to
4228 i386_dr_remove_watchpoint. All uses updated.
4229 (i386_low_region_ok_for_watchpoint): Renamed to
4230 i386_dr_region_ok_for_watchpoint. All uses updated.
4231 (i386_low_stopped_data_address): Renamed to
4232 i386_dr_stopped_data_address. All uses updated.
4233 (i386_low_stopped_by_watchpoint): Renamed to
4234 i386_dr_stopped_by_watchpoint. All uses updated.
4236 2014-06-18 Gary Benson <gbenson@redhat.com>
4238 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4239 (i386_dr_low_can_set_control): Likewise.
4240 (i386_insert_aligned_watchpoint): New check.
4242 2014-06-18 Gary Benson <gbenson@redhat.com>
4244 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4247 2014-06-18 Gary Benson <gbenson@redhat.com>
4249 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4250 instead of fatal and error.
4251 (i386_handle_nonaligned_watchpoint): Likewise.
4253 2014-06-18 Gary Benson <gbenson@redhat.com>
4255 * i386-low.c (i386_get_debug_register_length): New macro.
4256 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4257 (i386_show_dr): Use debug_printf instead of fprintf. Use
4258 phex to format values.
4260 2014-06-18 Gary Benson <gbenson@redhat.com>
4262 * i386-low.h: Comment changes.
4263 * i386-low.c: Likewise.
4265 2014-06-18 Gary Benson <gbenson@redhat.com>
4267 * i386-low.c: Whitespace changes.
4269 2014-06-12 Tom Tromey <tromey@redhat.com>
4271 * utils.c (freeargv): Remove.
4273 2014-06-12 Tom Tromey <tromey@redhat.com>
4275 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4276 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4277 (parse_debug_format_options): Likewise.
4278 (gdbserver_usage): Likewise.
4279 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4280 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4281 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4283 ($(LIBGNU)): Depend on libiberty.
4284 (all-lib): Recurse into all subdirs.
4285 (install-only): Invoke "install" target in subdirs.
4286 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4288 * configure: Rebuild.
4289 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4290 for vasprintf, vsnprintf, or gettimeofday.
4291 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4294 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4296 * development.sh: Delete.
4297 * Makefile.in (config.status): Adjust dependency on development.sh.
4298 * configure.ac: Adjust development.sh source call.
4299 * configure: Regenerate.
4301 2014-06-02 Pedro Alves <palves@redhat.com>
4303 * ax.c (gdb_free_agent_expr): New function.
4304 * ax.h (gdb_free_agent_expr): New declaration.
4305 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4307 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4309 (clear_breakpoint_conditions_and_commands): New function.
4310 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4311 (clear_breakpoint_conditions_and_commands): New declaration.
4313 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4315 * linux-aarch64-low.c (asm/ptrace.h): Include.
4317 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4319 Fix TLS access for -static -pthread.
4320 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4321 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4322 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4324 2014-05-20 Pedro Alves <palves@redhat.com>
4326 * linux-aarch64-low.c (aarch64_insert_point)
4327 (aarch64_remove_point): No longer check whether the type is
4328 supported here. Adjust to new interface.
4329 (the_low_target): Install aarch64_supports_z_point_type as
4330 supports_z_point_type method.
4331 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4332 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4333 instead of a Z packet char. Adjust.
4334 (arm_supports_z_point_type): New function.
4335 (arm_insert_point, arm_remove_point): Adjust to new interface.
4336 (the_low_target): Install arm_supports_z_point_type.
4337 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4338 (cris_insert_point, cris_remove_point): Adjust to new interface.
4339 Don't check whether the type is supported here.
4340 (the_low_target): Install cris_supports_z_point_type.
4341 * linux-low.c (linux_supports_z_point_type): New function.
4342 (linux_insert_point, linux_remove_point): Adjust to new interface.
4343 * linux-low.h (struct linux_target_ops) <insert_point,
4344 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4345 raw_breakpoint pointer parameter.
4346 <supports_z_point_type>: New method.
4347 * linux-mips-low.c (mips_supports_z_point_type): New function.
4348 (mips_insert_point, mips_remove_point): Adjust to new interface.
4349 Use mips_supports_z_point_type.
4350 (the_low_target): Install mips_supports_z_point_type.
4351 * linux-ppc-low.c (the_low_target): Install NULL as
4352 supports_z_point_type method.
4353 * linux-s390-low.c (the_low_target): Install NULL as
4354 supports_z_point_type method.
4355 * linux-sparc-low.c (the_low_target): Install NULL as
4356 supports_z_point_type method.
4357 * linux-x86-low.c (x86_supports_z_point_type): New function.
4358 (x86_insert_point): Adjust to new insert_point interface. Use
4359 insert_memory_breakpoint. Adjust to new
4360 i386_low_insert_watchpoint interface.
4361 (x86_remove_point): Adjust to remove_point interface. Use
4362 remove_memory_breakpoint. Adjust to new
4363 i386_low_remove_watchpoint interface.
4364 (the_low_target): Install x86_supports_z_point_type.
4365 * lynx-low.c (lynx_target_ops): Install NULL as
4366 supports_z_point_type callback.
4367 * nto-low.c (nto_supports_z_point_type): New.
4368 (nto_insert_point, nto_remove_point): Adjust to new interface.
4369 (nto_target_ops): Install nto_supports_z_point_type.
4370 * mem-break.c: Adjust intro comment.
4371 (struct raw_breakpoint) <raw_type, size>: New fields.
4372 <inserted>: Update comment.
4373 <shlib_disabled>: Delete field.
4374 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4375 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4376 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4377 (raw_bkpt_type_to_target_hw_bp_type): New function.
4378 (find_enabled_raw_code_breakpoint_at): New function.
4379 (find_raw_breakpoint_at): New type and size parameters. Use them.
4380 (insert_memory_breakpoint): New function, based off
4381 set_raw_breakpoint_at.
4382 (remove_memory_breakpoint): New function.
4383 (set_raw_breakpoint_at): Reimplement.
4384 (set_breakpoint): New, based on set_breakpoint_at.
4385 (set_breakpoint_at): Reimplement.
4386 (delete_raw_breakpoint): Go through the_target->remove_point
4387 instead of assuming memory breakpoints.
4388 (find_gdb_breakpoint_at): Delete.
4389 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4390 (find_gdb_breakpoint): New function.
4391 (set_gdb_breakpoint_at): Delete.
4392 (z_type_supported): New function.
4393 (set_gdb_breakpoint_1): New function, loosely based off
4394 set_gdb_breakpoint_at.
4395 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4396 (delete_gdb_breakpoint_at): Delete.
4397 (delete_gdb_breakpoint_1): New function, loosely based off
4398 delete_gdb_breakpoint_at.
4399 (delete_gdb_breakpoint): New function.
4400 (clear_gdb_breakpoint_conditions): Rename to ...
4401 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4403 (add_condition_to_breakpoint): Make static.
4404 (add_breakpoint_condition): Take a struct breakpoint pointer
4405 instead of an address. Adjust.
4406 (gdb_condition_true_at_breakpoint): Rename to ...
4407 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4409 (gdb_condition_true_at_breakpoint): Reimplement.
4410 (add_breakpoint_commands): Take a struct breakpoint pointer
4411 instead of an address. Adjust.
4412 (gdb_no_commands_at_breakpoint): Rename to ...
4413 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4414 parameter. Return true if no breakpoint was found. Change debug
4416 (gdb_no_commands_at_breakpoint): Reimplement.
4417 (run_breakpoint_commands): Rename to ...
4418 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4419 and change return type to boolean.
4420 (run_breakpoint_commands): New function.
4421 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4422 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4423 breakpoint. Go through the_target->remove_point instead of
4424 assuming memory breakpoint.
4425 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4426 software and hardware breakpoints.
4427 (reinsert_raw_breakpoint): Go through the_target->insert_point
4428 instead of assuming memory breakpoint.
4429 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4430 software and hardware breakpoints.
4431 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4432 Check both software and hardware breakpoints.
4433 (validate_inserted_breakpoint): Assert the breakpoint is a
4434 software breakpoint. Set the inserted flag to -1 instead of
4435 setting shlib_disabled.
4436 (delete_disabled_breakpoints): Adjust.
4437 (validate_breakpoints): Only validate software breakpoints.
4438 Adjust to inserted flag change.
4439 (check_mem_read, check_mem_write): Skip breakpoint types other
4440 than software breakpoints. Adjust to inserted flag change.
4441 * mem-break.h (enum raw_bkpt_type): New enum.
4442 (raw_breakpoint, struct process_info): Forward declare.
4443 (Z_packet_to_target_hw_bp_type): Delete declaration.
4444 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4445 (set_gdb_breakpoint, delete_gdb_breakpoint)
4446 (clear_breakpoint_conditions): New declarations.
4447 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4448 (breakpoint_inserted_here): Update comment.
4449 (add_breakpoint_condition, add_breakpoint_commands): Replace
4450 address parameter with a breakpoint pointer parameter.
4451 (gdb_breakpoint_here): Update comment.
4452 (delete_gdb_breakpoint_at): Delete.
4453 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4454 * server.c (process_point_options): Take a struct breakpoint
4455 pointer instead of an address. Adjust.
4456 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4457 delete_gdb_breakpoint.
4458 * spu-low.c (spu_target_ops): Install NULL as
4459 supports_z_point_type method.
4460 * target.h: Include mem-break.h.
4461 (struct target_ops) <prepare_to_access_memory>: Update comment.
4462 <supports_z_point_type>: New field.
4463 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4464 instead of a char. Also take a raw breakpoint pointer.
4465 * win32-arm-low.c (the_low_target): Install NULL as
4466 supports_z_point_type.
4467 * win32-i386-low.c (i386_supports_z_point_type): New function.
4468 (i386_insert_point, i386_remove_point): Adjust to new interface.
4469 (the_low_target): Install i386_supports_z_point_type.
4470 * win32-low.c (win32_supports_z_point_type): New function.
4471 (win32_insert_point, win32_remove_point): Adjust to new interface.
4472 (win32_target_ops): Install win32_supports_z_point_type.
4473 * win32-low.h (struct win32_target_ops):
4474 <supports_z_point_type>: New method.
4475 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4476 instead of a char. Also take a raw breakpoint pointer.
4478 2014-05-20 Pedro Alves <palves@redhat.com>
4480 * mem-break.h: Include break-common.h.
4481 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4482 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4483 (Z_packet_to_target_hw_bp_type): New declaration.
4484 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4485 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4486 (Z_PACKET_ACCESS_WP): Delete macros.
4487 (Z_packet_to_hw_type): Delete function.
4488 * i386-low.h: Don't include break-common.h here.
4489 (Z_packet_to_hw_type): Delete declaration.
4490 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4491 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4492 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4493 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4494 * linux-aarch64-low.c: Don't include break-common.h here.
4495 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4496 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4497 (Z_packet_to_target_hw_bp_type): Delete function.
4498 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4500 (mips_insert_point, mips_remove_point): Use
4501 Z_packet_to_target_hw_bp_type.
4503 2014-05-20 Pedro Alves <palves@redhat.com>
4505 * linux-aarch64-low.c: Include break-common.h.
4506 (enum target_point_type): Delete.
4507 (Z_packet_to_point_type): Rename to ...
4508 (Z_packet_to_target_hw_bp_type): ... this, and return a
4509 target_hw_bp_type instead.
4510 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4511 instead of an enum target_point_type.
4512 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4514 (aarch64_dr_state_insert_one_point)
4515 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4516 (aarch64_handle_aligned_watchpoint)
4517 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4518 Take an enum target_hw_bp_type instead of an enum
4520 (aarch64_supports_z_point_type): New function.
4521 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4522 use Z_packet_to_target_hw_bp_type.
4524 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4526 * configure.ac: Only use -Werror by default when DEVELOPMENT
4528 * configure: Regenerate.
4530 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4532 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4533 * linux-x86-low.c (X86_64_USER_REGS): New.
4534 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4536 2014-04-28 Yao Qi <yao@codesourcery.com>
4538 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4541 2014-04-25 Pedro Alves <palves@redhat.com>
4544 * linux-low.c (linux_attach_fail_reason_string): New function.
4545 (linux_attach_lwp): Delete.
4546 (linux_attach_lwp_1): Rename to ...
4547 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4548 argument. Remove "initial" parameter. Return int instead of
4549 void. Don't error or warn here.
4550 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4551 failure to attach to the tgid. Call warning when failing to
4553 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4554 argument. Remove "initial" parameter. Return int instead of
4555 void. Don't error or warn here.
4556 (linux_attach_fail_reason_string): New declaration.
4557 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4558 interface change. Use linux_attach_fail_reason_string.
4560 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4561 Walfred Tedeschi <walfred.tedeschi@intel.com>
4563 * Makefile.in: Added rules to handle new files
4564 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4565 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4566 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4567 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4568 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4569 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4571 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4572 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4573 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4574 i386/x32-avx512.xml.
4575 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4576 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4577 i386/x32-avx512-linux.xml.
4578 * i387-fp.c (num_avx512_k_registers): New constant for number
4580 (num_avx512_zmmh_low_registers): New constant for number of
4581 lower ZMM registers (0-15).
4582 (num_avx512_zmmh_high_registers): New constant for number of
4583 higher ZMM registers (16-31).
4584 (num_avx512_ymmh_registers): New contant for number of higher
4585 YMM registers (ymm16-31 added by avx521 on x86_64).
4586 (num_avx512_xmm_registers): New constant for number of higher
4587 XMM registers (xmm16-31 added by AVX512 on x86_64).
4588 (struct i387_xsave): Add space for AVX512 registers.
4589 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4590 Add code to handle AVX512 registers.
4591 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4592 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4593 prototypei from generated file.
4594 (tdesc_amd64_avx512_linux): Likewise.
4595 (init_registers_x32_avx512_linux): Likewise.
4596 (tdesc_x32_avx512_linux): Likewise.
4597 (init_registers_i386_avx512_linux): Likewise.
4598 (tdesc_i386_avx512_linux): Likewise.
4599 (x86_64_regmap): Add AVX512 registers.
4600 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4602 (initialize_low_arch): Add code to initialize AVX512 registers.
4604 2014-04-23 Pedro Alves <palves@redhat.com>
4606 * mem-break.c (find_gdb_breakpoint_at): Make static.
4607 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4609 2014-04-23 Pedro Alves <palves@redhat.com>
4611 * i386-low.c: Don't include break-common.h here.
4612 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4613 prototype to take target_hw_bp_type as argument instead of a Z
4615 * i386-low.h: Include break-common.h here.
4616 (Z_packet_to_hw_type): Declare.
4617 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4619 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4620 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4621 (x86_remove_point): Convert the packet number to a
4622 target_hw_bp_type before calling i386_low_remove_watchpoint.
4623 * win32-i386-low.c (i386_insert_point): Convert the packet number
4624 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4625 (i386_remove_point): Convert the packet number to a
4626 target_hw_bp_type before calling i386_low_remove_watchpoint.
4628 2014-04-23 Pedro Alves <palves@redhat.com>
4630 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4632 2014-04-10 Pedro Alves <palves@redhat.com>
4634 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4635 Check if the condition or command is NULL before checking if the
4636 breakpoint is known. On success, return true.
4637 * mem-break.h (add_breakpoint_condition): Document return.
4638 (add_breakpoint_commands): Add describing comment.
4639 * server.c (skip_to_semicolon): New function.
4640 (process_point_options): Use it.
4642 2014-04-09 Pedro Alves <palves@redhat.com>
4644 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4647 2014-02-27 Pedro Alves <palves@redhat.com>
4650 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4652 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4654 (last_thread_of_process_p): Take a PID argument instead of a
4656 (linux_wait_for_lwp): Delete.
4657 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4659 (linux_low_filter_event): New function, party factored out from
4660 linux_wait_for_event.
4661 (linux_wait_for_event): Rename to ...
4662 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4663 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4664 sigsuspend. Check for zombie leaders.
4665 (linux_wait_for_event): Reimplement as wrapper around
4666 linux_wait_for_event_filtered.
4667 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4668 a normal or signal exit is seen, it's the whole process exiting.
4669 (wait_for_sigstop): No longer a for_each_inferior callback.
4670 Rewrite on top of linux_wait_for_event_filtered.
4671 (stop_all_lwps): Call wait_for_sigstop directly.
4672 * server.c (resume, handle_target_event): Handle
4673 TARGET_WAITKIND_NO_RESUMED.
4675 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4677 * win32-low.c (psapi_get_dll_name,
4678 * win32_CreateToolhelp32Snapshot): Delete.
4679 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4680 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4682 (handle_load_dll): Add function description.
4683 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4685 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4687 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4689 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4690 base address when calling win32_add_one_solib.
4691 (handle_load_dll): Delete local variable load_addr.
4692 Remove 0x1000 offset applied to DLL base address when calling
4693 win32_add_one_solib.
4694 (handle_unload_dll): Add comment.
4696 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4698 * win32-low.c (win32_add_all_dlls): Renames
4699 win32_ensure_ntdll_loaded. Rewrite function documentation.
4700 Adjust implementation to always load all DLLs.
4701 Add 0x1000 offset to DLL base address when calling
4702 win32_add_one_solib.
4703 (child_initialization_done): New static global.
4704 (do_initial_child_stuff): Set child_initialization_done to
4705 zero during child initialization, and 1 after. Replace call
4706 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4708 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4709 (handle_unload_dll): Add function documentation.
4710 (get_child_debug_event): Ignore load and unload DLL events
4711 during child initialization.
4713 2014-02-20 Doug Evans <dje@google.com>
4715 Remove global all_lwps.
4716 * inferiors.h (ptid_of): Move here from linux-low.h.
4717 (pid_of, lwpid_of): Ditto.
4718 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4719 parameter is a struct thread_info * now.
4720 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4721 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4722 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4724 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4725 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4726 * linux-arm-low.c (update_registers_callback): Update, "entry"
4727 parameter is a struct thread_info * now.
4728 Fetch lwpid from current_inferior directly.
4729 (arm_insert_point): Pass &all_threads to find_inferior instead of
4731 (arm_remove_point): Ditto.
4732 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4733 (arm_prepare_to_resume): Fetch pid from thread.
4734 (arm_read_description): Fetch lwpid from current_inferior directly.
4735 * linux-low.c (all_lwps): Delete.
4736 (delete_lwp): Delete call to remove_inferior.
4737 (handle_extended_wait): Fetch lwpid from thread.
4738 (add_lwp): Don't set lwp->entry.id. Remove call to
4739 add_inferior_to_list.
4740 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4741 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4742 (kill_one_lwp_callback): Ditto.
4743 (linux_kill): Don't dereference NULL pointer.
4744 Fetch ptid,lwpid from thread.
4745 (get_detach_signal): Fetch ptid from thread.
4746 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4747 Simplify call to regcache_invalidate_thread.
4748 (delete_lwp_callback): Update, "entry" parameter is a
4749 struct thread_info * now. Fetch pid from thread.
4750 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4751 (status_pending_p_callback): Update, "entry" parameter is a
4752 struct thread_info * now. Fetch ptid from thread.
4753 (find_lwp_pid): Update, "entry" parameter is a
4754 struct thread_info * now.
4755 (linux_wait_for_lwp): Fetch pid from thread.
4756 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4757 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4758 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4759 (dequeue_one_deferred_signal): Ditto.
4760 (cancel_breakpoint): Fetch ptid from current_inferior.
4761 (linux_wait_for_event): Pass &all_threads to find_inferior,
4762 not &all_lwps. Fetch ptid, lwpid from thread.
4763 (count_events_callback): Update, "entry" parameter is a
4764 struct thread_info * now.
4765 (select_singlestep_lwp_callback): Ditto.
4766 (select_event_lwp_callback): Ditto.
4767 (cancel_breakpoints_callback): Ditto.
4768 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4770 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4771 (unsuspend_one_lwp): Update, "entry" parameter is a
4772 struct thread_info * now.
4773 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4775 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4776 Fetch lwpid from thread, not lwp.
4777 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4778 Pass &all_threads to find_inferior, not &all_lwps.
4779 (send_sigstop): Fetch lwpid from thread, not lwp.
4780 (send_sigstop_callback): Update, "entry" parameter is a
4781 struct thread_info * now.
4782 (suspend_and_send_sigstop_callback): Ditto.
4783 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4784 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4785 struct thread_info * now.
4786 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4788 (lwp_running): Update, "entry" parameter is a
4789 struct thread_info * now.
4790 (stop_all_lwps): Fetch ptid from thread.
4791 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4792 (linux_resume_one_lwp): Fetch lwpid from thread.
4793 (linux_set_resume_request): Update, "entry" parameter is a
4794 struct thread_info * now. Fetch pid, lwpid from thread.
4795 (resume_status_pending_p): Update, "entry" parameter is a
4796 struct thread_info * now.
4797 (need_step_over_p): Ditto. Fetch lwpid from thread.
4798 (start_step_over): Fetch lwpid from thread.
4799 (linux_resume_one_thread): Update, "entry" parameter is a
4800 struct thread_info * now. Fetch lwpid from thread.
4801 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4802 (proceed_one_lwp): Update, "entry" parameter is a
4803 struct thread_info * now. Fetch lwpid from thread.
4804 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4805 struct thread_info * now.
4806 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4807 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4808 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4810 (regsets_store_inferior_registers): Ditto.
4811 (fetch_register, store_register): Ditto.
4812 (linux_read_memory, linux_write_memory): Ditto.
4813 (linux_request_interrupt): Ditto.
4814 (linux_read_auxv): Ditto.
4815 (linux_xfer_siginfo): Ditto.
4816 (linux_qxfer_spu): Ditto.
4817 (linux_qxfer_libraries_svr4): Ditto.
4818 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4819 moved to inferiors.h.
4821 (get_thread_lwp): Update.
4822 (struct lwp_info): Delete member "entry". Simplify comment for
4825 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4826 current_inferior directly.
4827 (update_watch_registers_callback): Update, "entry" parameter is a
4828 struct thread_info * now. Fetch pid from thread.
4829 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4830 (mips_insert_point): Fetch lwpid from current_inferior.
4831 Pass &all_threads to find_inferior, not &all_lwps.
4832 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4833 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4835 (mips_stopped_data_address): Ditto.
4836 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4838 * linux-tile-low.c (tile_arch_setup): Ditto.
4839 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4840 (update_debug_registers_callback): Update, "entry" parameter is a
4841 struct thread_info * now. Fetch pid from thread.
4842 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4843 Pass &all_threads to find_inferior, not &all_lwps.
4844 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4845 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4846 Pass &all_threads to find_inferior, not &all_lwps.
4847 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4848 (i386_dr_low_get_status): Ditto.
4849 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4850 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4851 (x86_linux_read_description): Ditto.
4852 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4854 2014-02-20 Doug Evans <dje@google.com>
4856 * inferiors.c (get_first_inferior): Fix buglet.
4858 2014-02-19 Doug Evans <dje@google.com>
4860 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4861 * inferiors.c (add_thread): Change result type to struct thread_info *.
4862 All callers updated.
4863 (add_lwp): Call add_thread here instead of in callers.
4864 All callers updated.
4865 * linux-low.h (get_lwp_thread): Rewrite.
4866 (struct lwp_info): New member "thread".
4868 2014-02-19 Doug Evans <dje@google.com>
4870 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4871 All callers updated.
4873 2014-02-19 Doug Evans <dje@google.com>
4875 * inferiors.c (add_thread): Fix whitespace.
4877 2014-02-19 Doug Evans <dje@google.com>
4879 * dll.c (clear_dlls): Replace accessing list implemention details
4881 * gdbthread.h (get_first_thread): Declare.
4882 * inferiors.c (for_each_inferior_with_data): New function.
4883 (get_first_thread): New function.
4884 (find_thread_ptid): Simplify.
4885 (get_first_inferior): New function.
4886 (clear_list): Delete.
4887 (one_inferior_p): New function.
4888 (clear_inferior_list): New function.
4889 (clear_inferiors): Update.
4890 * inferiors.h (for_each_inferior_with_data): Declare.
4891 (clear_inferior_list): Declare.
4892 (one_inferior_p): Declare.
4893 (get_first_inferior): Declare.
4894 * linux-low.c (linux_wait_for_event): Replace accessing list
4895 implemention details with API function.
4896 * server.c (target_running): Ditto.
4897 (accumulate_file_name_length): New function.
4898 (emit_dll_description): New function.
4899 (handle_qxfer_libraries): Replace accessing list implemention
4900 details with API function.
4901 (handle_qxfer_threads_worker): New function.
4902 (handle_qxfer_threads_proper): Replace accessing list implemention
4903 details with API function.
4904 (handle_query): Ditto.
4905 (visit_actioned_threads_callback_ftype): New typedef.
4906 (visit_actioned_threads_data): New struct.
4907 (visit_actioned_threads): Rewrite to be find_inferior callback.
4908 (resume): Call find_inferior.
4909 (handle_status): Replace accessing list implemention
4910 details with API function.
4911 (process_serial_event): Replace accessing list implemention details
4913 * target.c (set_desired_inferior): Replace accessing list implemention
4914 details with API function.
4915 * tracepoint.c (same_process_p): New function.
4916 (gdb_agent_about_to_close): Replace accessing list implemention
4917 details with API function.
4918 * win32-low.c (child_delete_thread): Replace accessing list
4919 implemention details with API function.
4920 (match_dll_by_basename): New function.
4921 (dll_is_loaded_by_basename): New function.
4922 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4923 details call to dll_is_loaded_by_basename.
4925 2014-02-19 Doug Evans <dje@google.com>
4927 * dll.h (struct dll_info): Add comment.
4928 * gdbthread.h (struct thread_info): Add comment.
4929 (current_ptid): Simplify.
4930 * inferiors.c (add_process): Update.
4931 (remove_process): Update.
4932 * inferiors.h (struct process_info): Rename member "head" to "entry".
4933 * linux-low.c (delete_lwp): Update.
4935 (last_thread_of_process_p): Update.
4936 (kill_one_lwp_callback, linux_kill): Update.
4937 (status_pending_p_callback): Update.
4938 (wait_for_sigstop): Update. Simplify read of ptid.
4939 (start_step_over): Update.
4940 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4941 (get_lwp_thread): Update.
4942 (struct lwp_info): Rename member "head" to "entry".
4943 * regcache.h (inferior_list_entry): Delete.
4944 * server.c (kill_inferior_callback): Update.
4945 (detach_or_kill_inferior_callback): Update.
4946 (print_started_pid): Update.
4947 (print_attached_pid): Update.
4948 (process_serial_event): Simplify read of ptid.
4949 * thread-db.c (thread_db_create_event): Update.
4950 (thread_db_get_tls_address): Update.
4951 * win32-low.c (current_inferior_ptid): Simplify.
4953 2014-02-19 Tom Tromey <tromey@redhat.com>
4955 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4957 (target_supports_btrace): Update.
4959 2014-02-14 Yao Qi <yao@codesourcery.com>
4961 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4962 (rsp-low-ipa.o): New target.
4964 2014-02-12 Tom Tromey <tromey@redhat.com>
4966 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4967 convert_ascii_to_int.
4968 * regcache.c (registers_to_string): Likewise.
4969 * remote-utils.c (decode_M_packet): Likewise.
4970 * server.c (process_serial_event): Likewise.
4972 2014-02-12 Tom Tromey <tromey@redhat.com>
4974 * server.c (handle_query, handle_v_run): Use hex2bin, not
4976 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4978 2014-02-12 Tom Tromey <tromey@redhat.com>
4980 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4981 convert_int_to_ascii.
4982 * regcache.c (registers_to_string, collect_register_as_string):
4984 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4986 * server.c (process_serial_event): Likewise.
4987 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4988 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4990 2014-02-12 Tom Tromey <tromey@redhat.com>
4992 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4993 bin2hex, not hexify.
4994 * tracepoint.c (cmd_qtstatus): Likewise.
4996 2014-02-12 Tom Tromey <tromey@redhat.com>
4998 * remote-utils.c (monitor_output): Pass explicit length to
5001 2014-02-12 Tom Tromey <tromey@redhat.com>
5003 * tracepoint.c: Include rsp-low.h.
5004 * server.c: Include rsp-low.h.
5005 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5006 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5008 * remote-utils.c: Include rsp-low.h.
5009 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5010 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5011 (convert_int_to_ascii, convert_ascii_to_int): Move to
5013 * regcache.c: Include rsp-low.h.
5014 * ax.c: Include rsp-low.h.
5015 * Makefile.in (SFILES): Add common/rsp-low.c.
5016 (OBS): Add rsp-low.o.
5017 (rsp-low.o): New target.
5019 2014-02-12 Tom Tromey <tromey@redhat.com>
5021 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5022 Include print-utils.h.
5023 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5024 (plongest, thirty_two, phex_nz): Remove.
5025 * Makefile.in (SFILES): Add common/print-utils.c.
5026 (OBS): Add print-utils.o.
5027 (print-utils-ipa.o): New target.
5028 (print-utils.o): New target.
5029 (IPA_OBJS): Add print-utils-ipa.o.
5031 2014-02-06 Tom Tromey <tromey@redhat.com>
5033 * Makefile.in (SFILES): Fix indentation.
5035 2014-02-05 Doug Evans <dje@google.com>
5037 * linux-low.c (linux_wait_for_event): Improve comment.
5038 (linux_wait_1): Keep current_inferior in sync with event_child.
5040 2014-01-22 Doug Evans <dje@google.com>
5042 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5044 2014-01-22 Doug Evans <dje@google.com>
5046 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5047 * configure: Regenerate.
5048 * config.in: Regenerate.
5049 * Makefile.in (SFILES): Add debug.c.
5051 * debug.c: New file.
5052 * debug.h: New file.
5053 * linux-aarch64-low.c (*): Update all debugging printfs to use
5054 debug_printf instead of fprintf.
5055 * linux-arm-low.c (*): Ditto.
5056 * linux-cris-low.c (*): Ditto.
5057 * linux-crisv32-low.c (*): Ditto.
5058 * linux-m32r-low.c (*): Ditto.
5059 * linux-sparc-low.c (*): Ditto.
5060 * linux-x86.c (*): Ditto.
5061 * linux-low.c (*): Ditto.
5062 (linux_wait_1): Add calls to debug_enter, debug_exit.
5063 (linux_wait): Remove redundant debugging printf.
5064 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5065 (linux_resume, unstop_all_lwps): Ditto.
5066 * mem-break.c (*): Update all debugging printfs to use
5067 debug_printf instead of fprintf.
5068 * remote-utils.c (*): Ditto.
5069 * thread-db.c (*): Ditto.
5070 * server.c #include <ctype.h>, "gdb_vecs.h".
5071 (debug_threads): Moved to debug.c.
5072 (*): Update all debugging printfs to use debug_printf instead of
5074 (start_inferior): Replace call to fflush with call to debug_flush.
5075 (monitor_show_help): Mention set debug-format.
5076 (parse_debug_format_options): New function.
5077 (handle_monitor_command): Handle "monitor set debug-format".
5078 (gdbserver_usage): Mention --debug-format.
5079 (main): Parse --debug-format.
5080 * server.h (debug_threads): Declaration moved to debug.h.
5082 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5083 trace_debug_1 that uses debug_printf.
5084 (tracepoint_look_up_symbols): Update all debugging printfs to use
5085 debug_printf instead of fprintf.
5087 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5089 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5092 2014-01-17 Pedro Alves <palves@redhat.com>
5095 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5096 defined after including gdb_proc_service.h.
5098 2014-01-16 Doug Evans <dje@google.com>
5100 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5101 (match_dll): Use it.
5103 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5105 * target.h (target_ops) <read_btrace>: Change parameters and
5106 return type to allow error reporting.
5107 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5108 trace reading errors on.
5109 * linux-low.c (linux_low_read_btrace): Pass trace reading
5111 (linux_low_disable_btrace): New.
5113 2014-01-15 Doug Evans <dje@google.com>
5115 * inferiors.c (thread_id_to_gdb_id): Delete.
5116 * inferiors.h (thread_id_to_gdb_id): Delete.
5118 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5120 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5121 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5124 2014-01-08 Pedro Alves <palves@redhat.com>
5126 * server.c (handle_status): Don't discard previous queued stop
5127 replies or thread's pending status here.
5128 (main) <disconnection>: Do it here instead.
5130 2014-01-08 Pedro Alves <palves@redhat.com>
5132 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5133 * server.c (visit_actioned_threads, handle_pending_status): New
5135 (handle_v_cont): Factor out parts to ...
5136 (resume): ... this new function. If in all-stop, and a thread
5137 being resumed has a pending status, report it without actually
5139 (myresume): Adjust to use the new 'resume' function.
5140 (clear_pending_status_callback, set_pending_status_callback)
5141 (find_status_pending_thread_callback): New functions.
5142 (handle_status): Handle the case of multiple threads having
5143 interesting statuses to report. Report threads' real last signal
5144 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5145 with an interesting thread to report the status for, instead of
5146 always reporting the status of the first thread.
5148 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5150 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5151 * gdbreplay.c (gdbreplay_version): Likewise.
5153 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5155 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5156 iov.iov_len with the real length in use.
5158 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5160 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5161 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5162 for all targets that use win32-low.c.
5163 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5164 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5166 2013-12-13 Pedro Alves <palves@redhat.com>
5168 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5169 if equal to TARGET_WAITKIND_LOADED.
5170 * win32-low.c (cached_status): New static global.
5171 (win32_wait): Add declaration.
5172 (do_initial_child_stuff): Flush all initial pending debug events
5173 up to the initial breakpoint.
5174 (win32_wait): If CACHED_STATUS was set, return that instead
5175 of doing a real wait. Remove the code resuming the execution
5176 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5177 during the initial phase. Also remove the code changing
5178 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5179 TARGET_WAITKIND_STOPPED.
5181 2013-12-11 Yao Qi <yao@codesourcery.com>
5183 * notif.c (handle_notif_ack): Return 0 if no notification
5186 2013-11-20 Doug Evans <dje@google.com>
5188 * linux-low.c (linux_set_resume_request): Fix comment.
5190 2013-11-20 Doug Evans <dje@google.com>
5192 * linux-low.c (resume_status_pending_p): Tweak comment.
5194 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5196 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5197 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5198 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5199 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5200 (srv_amd64_regobj): Add amd64-mpx.o.
5201 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5202 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5203 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5204 * i387-fp.c (num_pl_bnd_register) Added constant.
5205 (num_pl_bnd_cfg_registers) Added constant.
5206 (struct i387_xsave) Added reserved area and MPX fields.
5207 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5208 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5210 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5211 (init_registers_amd64_mpx_linux): Declare new function.
5212 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5213 (x86_64_regmap): Add MPX registers.
5214 (x86_linux_read_description): Add MPX case.
5215 (initialize_low_arch): Initialize MPX targets.
5217 2013-11-18 Tom Tromey <tromey@redhat.com>
5219 * configure: Rebuild.
5220 * configure.ac: Don't check for stdlib.h.
5221 * gdbreplay.c: Unconditionally include stdlib.h.
5223 2013-11-18 Tom Tromey <tromey@redhat.com>
5225 * config.in: Rebuild.
5226 * configure: Rebuild.
5227 * configure.ac: Don't use AC_HEADER_DIRENT.
5229 2013-11-18 Tom Tromey <tromey@redhat.com>
5231 * server.h: Don't check HAVE_STRING_H.
5232 * gdbreplay.c: Don't check HAVE_STRING_H.
5233 * configure: Rebuild.
5235 2013-11-18 Tom Tromey <tromey@redhat.com>
5237 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5240 2013-11-08 Tom Tromey <tromey@redhat.com>
5242 * configure, config.in: Rebuild.
5243 * configure.ac: Remove unused configury.
5245 2013-11-08 Tom Tromey <tromey@redhat.com>
5247 * acinclude.m4: Include common.m4, codeset.m4.
5248 * configure, config.in: Rebuild.
5249 * configure.ac: Use GDB_AC_COMMON.
5251 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5253 * linux-s390-low.c (HWCAP_S390_TE): New define.
5254 (s390_arch_setup): Consider the TE field in the HWCAP for
5255 determining 'have_regset_tdb'.
5257 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5260 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5263 2013-10-02 Pedro Alves <palves@redhat.com>
5265 * server.c (process_serial_event): Don't output "GDBserver
5266 exiting" if GDB is connected through stdio.
5267 * target.c (mywait): Likewise, be silent if GDB is connected
5270 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5272 * lynx-low.c (lynx_add_threads_after_attach): New function.
5273 (lynx_attach): Remove call to add_thread. Add call to
5274 lynx_add_threads_after_attach instead.
5276 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5278 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5279 * config.in, configure: Regenerated.
5281 2013-09-18 Yao Qi <yao@codesourcery.com>
5284 * server.c (start_inferior): Clear 'resume_info'.
5286 2013-09-16 Jiong Wang <jiwang@tilera.com>
5288 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5291 2013-09-16 Jiong Wang <jiwang@tilera.com>
5293 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5294 linux-tile-low.o to srv_tgtobj.
5296 2013-09-16 Will Newton <will.newton@linaro.org>
5298 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5301 2013-09-06 Pedro Alves <palves@redhat.com>
5303 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5304 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5305 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5306 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5307 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5308 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5310 2013-09-06 Pedro Alves <palves@redhat.com>
5312 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5313 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5315 2013-09-06 Pedro Alves <palves@redhat.com>
5317 * linux-amd64-ipa.c: Include tracepoint.h.
5318 * linux-i386-ipa.c: Include tracepoint.h.
5320 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5322 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5323 (ps_get_thread_area): New function.
5325 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5327 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5328 (initialize_low_arch): Call init_registers_crisv32 rather than
5329 init_register_crisv32.
5331 2013-09-05 Pedro Alves <palves@redhat.com>
5333 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5335 * hostio.h: ... this new file.
5336 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5337 win32-low.c: Include hostio.h.
5339 2013-09-05 Pedro Alves <palves@redhat.com>
5341 * server.h (gdb_client_data, handler_func, callback_handler_func)
5342 (delete_file_handler, add_file_handler, append_callback_event)
5343 (delete_callback_event, start_event_loop, initialize_event_loop):
5344 Move to event-loop.h and include it.
5345 * event-loop.h: New file.
5347 2013-09-05 Pedro Alves <palves@redhat.com>
5349 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5350 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5351 (loaded_dll, unloaded_dll): Move to ...
5352 * dll.h: ... this new file.
5353 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5355 2013-09-05 Pedro Alves <palves@redhat.com>
5357 * server.h (current_process, get_thread_process, all_processes)
5358 (add_inferior_to_list, for_each_inferior, current_inferior)
5359 (remove_inferior, add_process, remove_process, find_process_pid)
5360 (have_started_inferiors_p, have_attached_inferiors_p)
5361 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5362 (clear_inferiors, find_inferior, find_inferior_id)
5363 (inferior_target_data, set_inferior_target_data)
5364 (inferior_regcache_data, set_inferior_regcache_data): Move to
5365 inferiors.h, and include it.
5366 * inferiors.h: New file.
5368 2013-09-05 Pedro Alves <palves@redhat.com>
5370 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5374 2013-09-05 Pedro Alves <palves@redhat.com>
5376 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5378 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5379 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5380 (handle_tracepoint_general_set, handle_tracepoint_query)
5381 (tracepoint_finished_step, tracepoint_was_hit)
5382 (release_while_stepping_state_list, current_traceframe)
5383 (in_readonly_region, traceframe_read_mem)
5384 (fetch_traceframe_registers, traceframe_read_sdata)
5385 (traceframe_read_info, struct fast_tpoint_collect_status)
5386 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5387 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5388 (supply_fast_tracepoint_registers)
5389 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5390 (ipa_tdesc, claim_trampoline_space)
5391 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5392 (agent_mem_read, agent_get_trace_state_variable_value)
5393 (agent_set_trace_state_variable_value, agent_tsv_read)
5394 (agent_mem_read_string, get_raw_reg_func_addr)
5395 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5396 * tracepoint.h: ... this new file.
5398 2013-09-05 Pedro Alves <palves@redhat.com>
5400 * server.h (perror_with_name, error, fatal, warning, paddress)
5401 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5403 * utils.h: New file.
5405 2013-09-05 Pedro Alves <palves@redhat.com>
5407 * server.h (remote_debug, noack_mode, transport_is_reliable)
5408 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5409 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5410 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5411 (write_enn, initialize_async_io, enable_async_io)
5412 (disable_async_io, check_remote_input_interrupt_request)
5413 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5414 (dead_thread_notify, prepare_resume_reply)
5415 (decode_address_to_semicolon, decode_address, decode_m_packet)
5416 (decode_M_packet, decode_X_packet, decode_xfer_write)
5417 (decode_search_memory_packet, unhexify, hexify)
5418 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5419 (look_up_one_symbol, relocate_instruction)
5420 (monitor_output): Move to remote-utils.h, and include it.
5421 * remote-utils.h: New file.
5423 2013-09-05 Pedro Alves <palves@redhat.com>
5425 * server.h (_): Delete.
5427 2013-09-02 Pedro Alves <palves@redhat.com>
5429 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5430 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5432 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5434 2013-09-02 Pierre Muller <muller@sourceware.org>
5436 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5437 or WriteProcessMemory complete successfully and handle
5438 ERROR_PARTIAL_COPY error.
5440 2013-09-02 Pedro Alves <palves@redhat.com>
5442 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5443 error instead of EIO.
5445 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5448 * linux-low.c: Include filestuff.h.
5449 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5450 * lynx-low.c: Include filestuff.h.
5451 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5452 * server.c: Include filestuff.h.
5453 (main): Call notice_open_fds.
5454 * spu-low.c: Include filestuff.h.
5455 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5457 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
5459 * Makefile.in: Explain why ../target and ../nat are not
5460 listed as include file search paths.
5461 (linux-waitpid.o): New object file rule.
5462 * configure.srv (srv_native_linux_obj): New variable.
5463 Replace all occurrences of linux native object files with
5464 $srv_native_linux_obj.
5465 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5466 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5467 (linux_enable_event_reporting): Remove declaration.
5468 (my_waitpid): Moved to common/linux-waitpid.c.
5469 (linux_wait_for_event): Pass ptid when calling
5470 linux_enable_event_reporting.
5471 (linux_supports_tracefork_flag): Remove.
5472 (linux_enable_event_reporting): Likewise.
5473 (linux_tracefork_grandchild): Remove.
5474 (STACK_SIZE): Moved to common/linux-ptrace.c.
5475 (linux_tracefork_child): Remove.
5476 (linux_test_for_tracefork): Remove.
5477 (linux_look_up_symbols): Call linux_supports_traceclone.
5478 (initialize_low): Remove call to linux_test_for_tracefork.
5479 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5480 common/linux-ptrace.h.
5481 (PTRACE_TYPE_ARG4): Likewise.
5482 Include linux-ptrace.h.
5484 2013-08-21 Pedro Alves <palves@redhat.com>
5486 * config.in: Renegerate.
5488 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5490 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5491 (SFILES): Remove $(srcdir)/common/target-common.c and
5492 add $(srcdir)/target/waitstatus.c.
5493 (OBS): Remove target-common.o and add waitstatus.o.
5494 (server_h): Remove $(srcdir)/../common/target-common.h and
5495 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5496 and $(srcdir)/../target/waitstatus.h.
5497 (target-common.o): Remove.
5498 (waitstatus.o): New target object file.
5499 * target.h: Do not include target-common.h and
5500 include target/resume.h, target/wait.h and
5501 target/waitstatus.h.
5503 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5505 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5506 to PTRACE_TYPE_ARG3.
5507 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5508 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5510 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5511 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5513 2013-07-27 Jie Zhang <jie@codesourcery.com>
5514 Daniel Jacobowitz <dan@codesourcery.com>
5515 Yao Qi <yao@codesourcery.com>
5517 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5518 (mips-linux-watch.o): New rule.
5519 (mips_linux_watch_h): New variable.
5520 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5522 * linux-mips-low.c: Include mips-linux-watch.h.
5523 (struct arch_process_info, struct arch_lwp_info): New.
5524 (update_watch_registers_callback): New function.
5525 (mips_linux_new_process, mips_linux_new_thread) New functions.
5526 (mips_linux_prepare_to_resume, mips_insert_point): New
5528 (mips_remove_point, mips_stopped_by_watchpoint): New
5530 (rsp_bp_type_to_target_hw_bp_type): New function.
5531 (mips_stopped_data_address): New function.
5532 (the_low_target): Add watchpoint support functions.
5534 2013-07-27 Yao Qi <yao@codesourcery.com>
5536 * i386-low.c: Include break-common.h.
5537 (enum target_hw_bp_type): Remove.
5539 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5541 * Makefile.in (SFILES): /common/target-common.c.
5542 (OBS): Add target-common.o.
5543 (server_h): Add $(srcdir)/../common/target-common.h.
5544 (target-common.o): New target.
5545 * server.c (queue_stop_reply_callback): Free
5546 status string after use.
5547 * target.c (target_waitstatus_to_string): Remove.
5548 * target.h: Include target-common.h.
5549 (resume_kind): Likewise.
5550 (target_waitkind): Likewise.
5551 (target_waitstatus): Likewise.
5552 (TARGET_WNOHANG): Likewise.
5554 2013-07-04 Yao Qi <yao@codesourcery.com>
5556 * Makefile.in (host_alias): Use @host_noncanonical@.
5557 (target_alias): Use @target_noncanonical@.
5558 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5559 ACX_NONCANONICAL_HOST.
5560 * configure: Regenerated.
5563 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5565 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5566 * configure: Rebuild.
5567 * Makefile.in (version_host, version_target): Get from configure.
5568 (version.c): Use $(version_host) and $(version_target).
5570 2013-07-03 Pedro Alves <palves@redhat.com>
5572 * Makefile.in (config.status): Depend on development.sh.
5573 * acinclude.m4: Include libmcheck.m4.
5574 * configure: Regenerate.
5576 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5578 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5579 attribute inside the parentheses.
5580 (winapi_DebugSetProcessKillOnExit): Ditto.
5581 (winapi_DebugBreakProcess): Ditto.
5582 (winapi_GenerateConsoleCtrlEvent): Ditto.
5584 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5586 * notif.h (notif_event): Add a dummy member to avoid compiler
5589 2013-07-01 Pedro Alves <palves@redhat.com>
5591 * hostio.c (HOSTIO_PATH_MAX): Define.
5592 (require_filename, handle_open, handle_unlink, handle_readlink):
5595 2013-07-01 Pedro Alves <palves@redhat.com>
5597 * server.h: Include "pathmax.h".
5598 * linux-low.c: Don't include sys/param.h.
5599 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5601 * win32-low.c: Don't include sys/param.h.
5602 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5604 2013-07-01 Pedro Alves <palves@redhat.com>
5606 * event-loop.c: Don't check HAVE_UNISTD_H before including
5608 * gdbreplay.c: Likewise.
5609 * remote-utils.c: Likewise.
5610 * server.c: Likewise.
5611 * configure.ac: Don't check for unistd.h.
5612 * configure: Regenerate.
5614 2013-06-28 Tom Tromey <tromey@redhat.com>
5616 * Makefile.in (version.c): Use version.in, not
5619 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5621 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5622 * configure: Rebuild.
5623 * Makefile.in (version_host, version_target): Get from configure.
5624 (version.c): Use $(version_host) and $(version_target).
5626 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5628 Fix trace-status to output user name without trailing colon.
5629 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5631 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5633 Fix trace-status to output proper start-time and stop-time.
5634 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5635 output start time and stop time in hex as gdb expects.
5637 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5639 * tracepoint.c (build_traceframe_info_xml): Output trace state
5640 variables present in the trace buffer.
5642 2013-06-24 Tom Tromey <tromey@redhat.com>
5644 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5646 (version.o): Remove.
5647 * gdbreplay.c: Include version.h.
5648 (version, host_name): Don't declare.
5649 * server.h: Include version.h.
5650 (version, host_name): Don't declare.
5652 2013-06-12 Pedro Alves <palves@redhat.com>
5654 * linux-x86-low.c (linux_is_elf64): Delete global.
5655 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5656 with local linux_pid_exe_is_elf_64_file use.
5658 2013-06-11 Pedro Alves <palves@redhat.com>
5660 * linux-low.c (regset_disabled, disable_regset): New functions.
5661 (regsets_fetch_inferior_registers)
5662 (regsets_store_inferior_registers): Use them.
5663 (initialize_regsets_info); Don't allocate the disabled_regsets
5665 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5668 2013-06-11 Pedro Alves <palves@redhat.com>
5670 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5673 2013-06-11 Pedro Alves <palves@redhat.com>
5675 * linux-x86-low.c (initialize_low_arch): Call
5676 init_registers_x32_avx_linux.
5678 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5680 Fix compatibility with Android Bionic.
5681 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5684 2013-06-07 Pedro Alves <palves@redhat.com>
5687 * Makefile.in (OBS): Add tdesc.o.
5688 (IPA_OBJS): Add tdesc-ipa.o.
5689 (tdesc-ipa.o): New rule.
5690 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5692 * linux-low.c (new_inferior): Delete.
5693 (disabled_regsets, num_regsets): Delete.
5694 (linux_add_process): Adjust to set the new per-process
5696 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5697 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5698 was a stop. When calling arch_setup, switch the current inferior
5699 to the thread that got an event.
5700 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5701 (regsets_fetch_inferior_registers)
5702 (regsets_store_inferior_registers): New regsets_info parameter.
5704 (linux_register_in_regsets): New regs_info parameter. Adjust to
5706 (register_addr, fetch_register, store_register): New usrregs_info
5707 parameter. Adjust to use it.
5708 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5709 parameter regs_info. Adjust to use it.
5710 (linux_fetch_registers): Get the current inferior's regs_info, and
5712 (linux_store_registers): Ditto.
5713 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5714 (initialize_low): Don't initialize the target_regsets here. Call
5715 initialize_low_arch.
5716 * linux-low.h (target_regsets): Delete declaration.
5717 (struct regsets_info): New.
5718 (struct usrregs_info): New.
5719 (struct regs_info): New.
5720 (struct process_info_private) <new_inferior>: New field.
5721 (struct linux_target_ops): Delete the num_regs, regmap, and
5722 regset_bitmap fields. New field regs_info.
5723 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5724 * i387-fp.c (num_xmm_registers): Delete.
5725 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5726 calls to new interface.
5727 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5728 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5729 Infer the number of xmm registers from the regcache's target
5731 * i387-fp.h (num_xmm_registers): Delete.
5732 * inferiors.c (add_thread): Don't install the thread's regcache
5734 * proc-service.c (gregset_info): Fetch the current inferior's
5735 regs_info. Adjust to use it.
5736 * regcache.c: Include tdesc.h.
5737 (register_bytes, reg_defs, num_registers)
5738 (gdbserver_expedite_regs): Delete.
5739 (get_thread_regcache): If the thread doesn't have a regcache yet,
5740 create one, instead of aborting gdbserver.
5741 (regcache_invalidate_one): Rename to ...
5742 (regcache_invalidate_thread): ... this.
5743 (regcache_invalidate_one): New.
5744 (regcache_invalidate): Only invalidate registers of the current
5746 (init_register_cache): Add target_desc parameter, and use it.
5747 (new_register_cache): Ditto. Assert the target description has a
5748 non zero registers_size.
5749 (regcache_cpy): Add assertions. Adjust.
5750 (realloc_register_cache, set_register_cache): Delete.
5751 (registers_to_string, registers_from_string): Adjust.
5752 (find_register_by_name, find_regno, find_register_by_number)
5753 (register_cache_size): Add target_desc parameter, and use it.
5754 (free_register_cache_thread, free_register_cache_thread_one)
5755 (regcache_release, register_cache_size): New.
5756 (register_size): Add target_desc parameter, and use it.
5757 (register_data, supply_register, supply_register_zeroed)
5758 (supply_regblock, supply_register_by_name, collect_register)
5759 (collect_register_as_string, collect_register_by_name): Adjust.
5760 * regcache.h (struct target_desc): Forward declare.
5761 (struct regcache) <tdesc>: New field.
5762 (init_register_cache, new_register_cache): Add target_desc
5764 (regcache_invalidate_thread): Declare.
5765 (regcache_invalidate_one): Delete declaration.
5766 (regcache_release): Declare.
5767 (find_register_by_number, register_cache_size, register_size)
5768 (find_regno): Add target_desc parameter.
5769 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5771 * remote-utils.c: Include tdesc.h.
5772 (outreg, prepare_resume_reply): Adjust.
5773 * server.c: Include tdesc.h.
5774 (gdbserver_xmltarget): Delete declaration.
5775 (get_features_xml, process_serial_event): Adjust.
5776 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5778 (struct process_info) <tdesc>: New field.
5779 (ipa_tdesc): Declare.
5780 * tdesc.c: New file.
5781 * tdesc.h: New file.
5782 * tracepoint.c: Include tdesc.h.
5783 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5784 (get_context_regcache): Adjust to pass ipa_tdesc down.
5785 (do_action_at_tracepoint): Adjust to get the register cache size
5786 from the context regcache's description.
5787 (traceframe_walk_blocks): Adjust to get the register cache size
5788 from the current trace frame's description.
5789 (traceframe_get_pc): Adjust to get current trace frame's
5790 description and pass it down.
5791 (gdb_collect): Adjust to get the register cache size from the
5793 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5794 (gdbserver_xmltarget): Delete.
5795 (initialize_low_tracepoint): Set the ipa's target description.
5796 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5797 (initialize_low_tracepoint): Set the ipa's target description.
5798 * linux-x86-low.c: Include tdesc.h.
5799 [__x86_64__] (is_64bit_tdesc): New.
5800 (ps_get_thread_area, x86_get_thread_area): Use it.
5801 (i386_cannot_store_register): Rename to ...
5802 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5803 (i386_cannot_fetch_register): Rename to ...
5804 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5805 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5807 (target_regsets): Rename to ...
5808 (x86_regsets): ... this.
5809 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5811 (x86_siginfo_fixup): Use is_64bit_tdesc.
5812 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5813 (tdesc_x32_avx_linux, tdesc_x32_linux)
5814 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5816 (x86_linux_update_xmltarget): Delete.
5817 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5818 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5819 (AMD64_LINUX_USER64_CS): New.
5820 (x86_linux_read_description): New, based on
5821 x86_linux_update_xmltarget.
5822 (same_process_callback): New.
5823 (x86_arch_setup_process_callback): New.
5824 (x86_linux_update_xmltarget): New.
5825 (x86_regsets_info): New.
5826 (amd64_linux_regs_info): New.
5827 (i386_linux_usrregs_info): New.
5828 (i386_linux_regs_info): New.
5829 (x86_linux_regs_info): New.
5830 (x86_arch_setup): Reimplement.
5831 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5832 (x86_emit_ops): Ditto.
5833 (the_low_target): Adjust. Install x86_linux_regs_info,
5834 x86_cannot_fetch_register, and x86_cannot_store_register.
5835 (initialize_low_arch): New.
5836 * linux-ia64-low.c (tdesc_ia64): Declare.
5837 (ia64_fetch_register): Adjust.
5838 (ia64_usrregs_info, regs_info): New globals.
5839 (ia64_regs_info): New function.
5840 (the_low_target): Adjust.
5841 (initialize_low_arch): New function.
5842 * linux-sparc-low.c (tdesc_sparc64): Declare.
5843 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5845 (sparc_arch_setup): New function.
5846 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5847 (the_low_target): Adjust.
5848 (initialize_low_arch): New function.
5849 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5850 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5851 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5852 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5853 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5854 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5855 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5856 (tdesc_powerpc_isa205_vsx64l): Declare.
5857 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5858 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5859 (ppc_set_pc, ppc_get_hwcap): Adjust.
5860 (ppc_usrregs_info): Forward declare.
5861 (!__powerpc64__) ppc_regmap_adjusted: New global.
5862 (ppc_arch_setup): Adjust to the current process'es target
5864 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5865 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5866 (ppc_store_evrregset): Adjust.
5867 (target_regsets): Rename to ...
5868 (ppc_regsets): ... this, and make static.
5869 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5870 (ppc_regs_info): New function.
5871 (the_low_target): Adjust.
5872 (initialize_low_arch): New function.
5873 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5874 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5875 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5876 (tdesc_s390x_linux64v2): Declare.
5877 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5878 (s390_fill_gregset, s390_store_last_break): Adjust.
5879 (target_regsets): Rename to ...
5880 (s390_regsets): ... this, and make static.
5881 (s390_get_pc, s390_set_pc): Adjust.
5882 (s390_get_hwcap): New target_desc parameter, and use it.
5883 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5884 (s390_arch_setup): Adjust to set the current process'es target
5885 description. Don't adjust the regmap.
5886 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5887 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5888 (regs_info_3264): New globals.
5889 (s390_regs_info): New function.
5890 (the_low_target): Adjust.
5891 (initialize_low_arch): New function.
5892 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5893 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5894 [__mips64] (init_registers_mips_linux)
5895 (init_registers_mips_dsp_linux): Delete defines.
5896 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5897 (have_dsp): New global.
5898 (mips_read_description): New, based on mips_arch_setup.
5899 (mips_arch_setup): Reimplement.
5900 (get_usrregs_info): New function.
5901 (mips_cannot_fetch_register, mips_cannot_store_register)
5902 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5903 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5904 (target_regsets): Rename to ...
5905 (mips_regsets): ... this, and make static.
5906 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5907 (dsp_regs_info, regs_info): New globals.
5908 (mips_regs_info): New function.
5909 (the_low_target): Adjust.
5910 (initialize_low_arch): New function.
5911 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5912 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5914 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5915 (arm_read_description): New, with bits factored from
5917 (arm_arch_setup): Reimplement.
5918 (target_regsets): Rename to ...
5919 (arm_regsets): ... this, and make static.
5920 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5921 (arm_regs_info): New function.
5922 (the_low_target): Adjust.
5923 (initialize_low_arch): New function.
5924 * linux-m68k-low.c (tdesc_m68k): Declare.
5925 (target_regsets): Rename to ...
5926 (m68k_regsets): ... this, and make static.
5927 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5928 (m68k_regs_info): New function.
5929 (m68k_arch_setup): New function.
5930 (the_low_target): Adjust.
5931 (initialize_low_arch): New function.
5932 * linux-sh-low.c (tdesc_sharch): Declare.
5933 (target_regsets): Rename to ...
5934 (sh_regsets): ... this, and make static.
5935 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5936 (sh_regs_info, sh_arch_setup): New functions.
5937 (the_low_target): Adjust.
5938 (initialize_low_arch): New function.
5939 * linux-bfin-low.c (tdesc_bfin): Declare.
5940 (bfin_arch_setup): New function.
5941 (bfin_usrregs_info, regs_info): New globals.
5942 (bfin_regs_info): New function.
5943 (the_low_target): Adjust.
5944 (initialize_low_arch): New function.
5945 * linux-cris-low.c (tdesc_cris): Declare.
5946 (cris_arch_setup): New function.
5947 (cris_usrregs_info, regs_info): New globals.
5948 (cris_regs_info): New function.
5949 (the_low_target): Adjust.
5950 (initialize_low_arch): New function.
5951 * linux-cris-low.c (tdesc_crisv32): Declare.
5952 (cris_arch_setup): New function.
5953 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5954 (cris_regs_info): New function.
5955 (the_low_target): Adjust.
5956 (initialize_low_arch): New function.
5957 * linux-m32r-low.c (tdesc_m32r): Declare.
5958 (m32r_arch_setup): New function.
5959 (m32r_usrregs_info, regs_info): New globals.
5960 (m32r_regs_info): Adjust.
5961 (initialize_low_arch): New function.
5962 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5963 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5964 (tic6x_usrregs_info): Forward declare.
5965 (tic6x_read_description): New function, based on ...
5966 (tic6x_arch_setup): ... this. Reimplement.
5967 (target_regsets): Rename to ...
5968 (tic6x_regsets): ... this, and make static.
5969 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5970 (tic6x_regs_info): New function.
5971 (the_low_target): Adjust.
5972 (initialize_low_arch): New function.
5973 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5974 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5975 (target_regsets): Rename to ...
5976 (xtensa_regsets): ... this, and make static.
5977 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5979 (xtensa_arch_setup, xtensa_regs_info): New functions.
5980 (the_low_target): Adjust.
5981 (initialize_low_arch): New function.
5982 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5983 (nios2_arch_setup): Set the current process'es tdesc.
5984 (target_regsets): Rename to ...
5985 (nios2_regsets): ... this.
5986 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5987 (nios2_regs_info): New function.
5988 (the_low_target): Adjust.
5989 (initialize_low_arch): New function.
5990 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5991 (aarch64_arch_setup): Set the current process'es tdesc.
5992 (target_regsets): Rename to ...
5993 (aarch64_regsets): ... this.
5994 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5995 (aarch64_regs_info): New function.
5996 (the_low_target): Adjust.
5997 (initialize_low_arch): New function.
5998 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6000 (target_regsets): Rename to ...
6001 (tile_regsets): ... this.
6002 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6003 (tile_regs_info): New function.
6004 (tile_arch_setup): Set the current process'es tdesc.
6005 (the_low_target): Adjust.
6006 (initialize_low_arch): New function.
6007 * spu-low.c (tdesc_spu): Declare.
6008 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6009 * win32-arm-low.c (tdesc_arm): Declare.
6010 (arm_arch_setup): New function.
6011 (the_low_target): Install arm_arch_setup instead of
6013 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6014 (init_windows_x86): Rename to ...
6015 (i386_arch_setup): ... this. Set `win32_tdesc'.
6016 (the_low_target): Adjust.
6017 * win32-low.c (win32_tdesc): New global.
6018 (child_add_thread): Don't create the thread cache here.
6019 (do_initial_child_stuff): Set the new process'es tdesc.
6020 * win32-low.h (struct target_desc): Forward declare.
6021 (win32_tdesc): Declare.
6022 * lynx-i386-low.c (tdesc_i386): Declare global.
6023 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6024 * lynx-low.c (lynx_tdesc): New global.
6025 (lynx_add_process): Set the new process'es tdesc.
6026 * lynx-low.h (struct target_desc): Forward declare.
6027 (lynx_tdesc): Declare global.
6028 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6029 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6030 * nto-low.c (nto_tdesc): New global.
6031 (do_attach): Set the new process'es tdesc.
6032 * nto-low.h (struct target_desc): Forward declare.
6033 (nto_tdesc): Declare.
6034 * nto-x86-low.c (tdesc_i386): Declare.
6035 (nto_x86_arch_setup): Set `nto_tdesc'.
6037 2013-06-04 Gary Benson <gbenson@redhat.com>
6039 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6040 to qSupported response when appropriate.
6041 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6042 with nonzero-length annex.
6043 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6044 arguments supplied in annex.
6046 2013-05-31 Doug Evans <dje@google.com>
6049 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6050 64 bits in 64-cross-32 environment.
6052 2013-05-28 Pedro Alves <palves@redhat.com>
6054 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6055 (aarch64-without-fpu.c): Delete rule.
6056 * configure.srv (aarch64*-*-linux*): Remove references to
6057 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6058 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6061 2013-05-24 Pedro Alves <palves@redhat.com>
6063 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6064 instead of strchr/decode_address. Error if the range isn't split
6065 with a ','. Don't assume there's be a ':' in the action.
6067 2013-05-23 Yao Qi <yao@codesourcery.com>
6068 Pedro Alves <palves@redhat.com>
6070 * linux-low.c (lwp_in_step_range): New function.
6071 (linux_wait_1): If the thread was range stepping and stopped
6072 outside the stepping range, report the stop to GDB. Otherwise,
6073 continue stepping. Add range stepping debug output.
6074 (linux_set_resume_request): Copy the step range from the resume
6076 (linux_supports_range_stepping): New.
6077 (linux_target_ops) <supports_range_stepping>: Set to
6078 linux_supports_range_stepping.
6079 * linux-low.h (struct linux_target_ops)
6080 <supports_range_stepping>: New field.
6081 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6082 * linux-x86-low.c (x86_supports_range_stepping): New.
6083 (the_low_target) <supports_range_stepping>: Set to
6084 x86_supports_range_stepping.
6085 * server.c (handle_v_cont): Handle 'r' action.
6086 (handle_v_requests): Append ";r" if the target supports range
6088 * target.h (struct thread_resume) <step_range_start,
6089 step_range_end>: New fields.
6090 (struct target_ops) <supports_range_stepping>:
6092 (target_supports_range_stepping): New macro.
6094 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6096 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6097 confusion in comment.
6099 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6101 * lynx-low.c (struct process_info_private): New type.
6102 (lynx_add_process): New function.
6103 (lynx_create_inferior, lynx_attach): Replace calls to
6104 add_process by calls to lynx_add_process.
6105 (lynx_resume): If PTID is null, then try using
6106 current_process()->private->last_wait_event_ptid.
6108 (lynx_clear_inferiors): Delete. The contents of that function
6109 has been inlined in lynx_mourn;
6110 (lynx_wait_1): Save the ptid in the process's private data.
6111 (lynx_mourn): Free the process' private data. Replace call
6112 to lynx_clear_inferiors by call to clear_inferiors.
6114 2013-05-17 Yao Qi <yao@codesourcery.com>
6116 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6119 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6121 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6122 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6123 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6124 PT_TEXT_END_ADDR guards. Update comments.
6125 (linux_target_op) <read_offsets>: Conditionally define to
6126 linux_read_offsets if the target is UCLIBC and if it defines
6127 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6129 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6130 Andrew Jenner <andrew@codesourcery.com>
6132 * Makefile.in (SFILES): Add linux-nios2-low.c.
6133 (clean): Add action to delete nios2-linux.c.
6134 (nios2-linux.c): New rule.
6135 * configure.srv: Add nios2*-*-linux*.
6136 * linux-nios2-low.c: New.
6138 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6140 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6142 2013-04-25 Hui Zhu <hui@codesourcery.com>
6145 * ax.c (ax_printf): Add fflush.
6147 2013-04-22 Tom Tromey <tromey@redhat.com>
6149 * Makefile.in (SFILES): Add filestuff.c.
6150 (OBS): Add filestuff.o.
6151 (filestuff.o): New target.
6152 * config.in, configure: Rebuild.
6153 * configure.ac: Check for fdwalk, pipe2.
6155 2013-04-17 Pedro Alves <palves@redhat.com>
6157 * configure.ac (USE_THREAD_DB): Delete variable.
6158 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6159 Don't AC_SUBST USE_THREAD_DB.
6160 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6161 * config.in, configure: Regenerate.
6163 2013-04-16 Pedro Alves <palves@redhat.com>
6165 * linux-low.h (struct lwp_info) <thread_known>: Move under
6166 the USE_THREAD_DB #ifdef.
6168 2013-04-16 Pedro Alves <palves@redhat.com>
6170 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6171 (linux-low.o): Delete rule.
6172 * linux-low.h: Always include "gdb_thread_db.h" instead of
6173 conditionally including thread_db.h.
6174 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6177 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6179 * Makefile.in (install-only): Fix make install regression.
6181 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6183 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6184 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6186 * gdbserver.1: Remove.
6188 2013-03-22 Pedro Alves <palves@redhat.com>
6190 * linux-low.c (handle_extended_wait): Don't call
6191 linux_enable_event_reporting.
6193 2013-03-15 Tony Theodore <tonyt@logyst.com>
6196 * Makefile.in (SHELL): Use @SHELL@.
6198 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6200 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6203 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6205 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6206 Remove extraneous NULL element.
6208 2013-03-13 Yao Qi <yao@codesourcery.com>
6210 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6211 'V' block in trace frame.
6213 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6215 * target.h (struct target_ops): Add btrace ops.
6216 (target_supports_btrace): New macro.
6217 (target_enable_btrace): New macro.
6218 (target_disable_btrace): New macro.
6219 (target_read_btrace): New macro.
6220 * gdbthread.h (struct thread_info): Add btrace field.
6221 * server.c: Include btrace-common.h.
6222 (handle_btrace_general_set): New function.
6223 (handle_btrace_enable): New function.
6224 (handle_btrace_disable): New function.
6225 (handle_general_set): Call handle_btrace_general_set.
6226 (handle_qxfer_btrace): New function.
6227 (struct qxfer qxfer_packets[]): Add btrace entry.
6228 * inferiors.c (remove_thread): Disable btrace.
6229 * linux-low: Include linux-btrace.h.
6230 (linux_low_enable_btrace): New function.
6231 (linux_low_read_btrace): New function.
6232 (linux_target_ops): Add btrace ops.
6233 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6234 Add srv_linux_btrace=yes.
6235 (x86_64-*-linux*): Add linux-btrace.o.
6236 Add srv_linux_btrace=yes.
6237 * configure.ac: Define HAVE_LINUX_BTRACE.
6238 * config.in: Regenerated.
6239 * configure: Regenerated.
6241 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6243 * server.c (handle_qxfer): Preserve error message if -3 is
6245 (qxfer): Document the -3 return value.
6247 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6249 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6250 (linux_btrace_h): New variable.
6251 (linux-btrace.o): New rule.
6253 2013-03-08 Stan Shebs <stan@codesourcery.com>
6254 Hafiz Abid Qadeer <abidh@codesourcery.com>
6256 * tracepoint.c (trace_buffer_size): New global.
6257 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6258 (init_trace_buffer): Change to one-argument function. Allocate
6259 trace buffer memory.
6260 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6261 handle QTBuffer:size packet.
6262 (cmd_bigqtbuffer_size): New function.
6263 (initialize_tracepoint): Call init_trace_buffer with
6264 DEFAULT_TRACE_BUFFER_SIZE.
6265 * server.c (handle_query): Add QTBuffer:size in the
6268 2013-03-07 Yao Qi <yao@codesourcery.com>
6270 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6271 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6273 (cmd_qtsp): Adjust condition. Do post increment.
6274 Set cur_action and cur_step_action back to 0.
6276 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6279 * linux-low.c (linux_write_memory): Return early success if LEN is
6282 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6284 * configure.srv: Add x86_64-*-cygwin* as target.
6286 2013-02-28 Tom Tromey <tromey@redhat.com>
6288 * configure.ac: Invoke AC_SYS_LARGEFILE.
6289 * configure, config.in: Rebuild.
6291 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6293 * win32-low.c: Throughout, fix format strings and casts of
6294 printf-like functions to avoid type related warnings on all
6296 (get_child_debug_event): Print dwDebugEventCode as hex since
6297 that's how it's usually documented.
6299 2013-02-28 Yao Qi <yao@codesourcery.com>
6301 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6304 2013-02-27 Jiong Wang <jiwang@tilera.com>
6306 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6307 (reg-tilegx32.c): New rule.
6308 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6309 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6310 different register info initializer according to elf class.
6311 (init_registers_tilgx32): New function. The tilegx32 register info
6313 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6314 (tile_store_gregset): Likewise.
6316 2013-02-27 Yao Qi <yao@codesourcery.com>
6318 * server.c (process_point_options): Print debug message when
6319 debug_threads is true.
6321 2013-02-26 Yao Qi <yao@codesourcery.com>
6323 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6325 2013-02-19 Pedro Alves <palves@redhat.com>
6326 Kai Tietz <ktietz@redhat.com>
6330 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6331 instead of strtoul to extract address from packet.
6332 (process_serial_event) <'z'>: Likewise.
6334 2013-02-18 Yao Qi <yao@codesourcery.com>
6336 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6338 2013-02-14 Pedro Alves <palves@redhat.com>
6342 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6343 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6345 2013-02-14 Pedro Alves <palves@redhat.com>
6347 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6349 2013-02-14 Pedro Alves <palves@redhat.com>
6351 * tracepoint.c (save_string): Delete.
6352 (add_tracepoint_action): Use savestring instead of save_string.
6354 2013-02-12 Pedro Alves <palves@redhat.com>
6356 * linux-xtensa-low.c: Ditto.
6357 * xtensa-xtregs.c: Ditto.
6359 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6361 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6364 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6366 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6367 aarch64_num_wp_regs and aarch64_num_bp_regs to
6368 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6370 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6372 * linux-aarch64-low.c (ps_get_thread_area): Replace
6373 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6375 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6376 Marcus Shawcroft <marcus.shawcroft@arm.com>
6377 Nigel Stephens <nigel.stephens@arm.com>
6378 Yufeng Zhang <yufeng.zhang@arm.com>
6380 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6381 (aarch64.c, aarch64-without-fpu.c): New targets.
6382 * configure.srv (aarch64*-*-linux*): New.
6383 * linux-aarch64-low.c: New file.
6385 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6387 * linux-low.c (handle_extended_wait, linux_create_inferior)
6388 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6389 (dequeue_one_deferred_signal, linux_resume_one_thread)
6390 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6391 (linux_tracefork_grandchild, linux_test_for_tracefork)
6392 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6393 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6394 where the argument is 0.
6396 2013-01-25 Yao Qi <yao@codesourcery.com>
6398 * event-loop.c: Include "queue.h".
6399 (gdb_event_p): New typedef.
6400 (struct gdb_event) <next_event>: Remove.
6401 (event_queue): Change to QUEUE(gdb_event_p).
6402 (async_queue_event): Remove.
6403 (gdb_event_xfree): New.
6404 (initialize_event_loop): New.
6405 (process_event): Use API from QUEUE.
6406 (wait_for_event): Likewise.
6407 * server.c (main): Call initialize_event_loop.
6408 * server.h (initialize_event_loop): Declare.
6410 2013-01-18 Yao Qi <yao@codesourcery.com>
6412 * ax.h (struct eval_agent_expr_context): New.
6413 (gdb_eval_agent_expr): Update declaration.
6414 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6415 TFRAME. Add new argument CTX.
6416 * server.h (struct eval_agent_expr_context): Declare.
6417 (agent_mem_read, agent_tsv_read): Update declaration.
6418 (agent_mem_read_string): Likewise.
6419 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6420 (add_traceframe_block): Add new argument TPOINT.
6421 Increase TPOINT->traceframe_usage.
6422 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6423 eval_tracepoint_agent_expr.
6424 (condition_true_at_tracepoint): Likewise.
6425 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6426 (agent_mem_read_string, agent_tsv_read): Likewise.
6428 2013-01-16 Yao Qi <yao@codesourcery.com>
6430 * linux-low.c (linux_resume_one_lwp): Don't check
6431 'lwp->bp_reinsert != 0'.
6433 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6434 Pedro Alves <palves@redhat.com>
6436 * lynx-low.c (ptrace_request_to_str): Define a temporary
6437 macro and use it to simplify this function's implementation.
6439 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6441 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6444 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6446 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6448 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6450 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6452 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6454 * lynx-low.c (lynx_resume): Use the resume_info parameter
6455 to determine the ptid for the lynx_ptrace call, unless
6456 it is equal to minus_one_ptid, in which case we use the
6457 ptid of the current_inferior.
6458 (lynx_wait_1): After having received a thread create/exit
6459 event, resume the inferior's execution using the signaling
6460 thread's ptid, rather than the old ptid.
6462 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6464 * lynx-low.c (lynx_resume): Delete variable ret.
6466 2013-01-01 Joel Brobecker <brobecker@adacore.com>
6468 * gdbreplay.c (gdbreplay_version): Update copyright year.
6469 * server.c (gdbserver_version): Likewise.
6471 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6473 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6476 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6478 * lynx-low.c (ptrace_request_to_str): Add handling for
6481 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6483 * lynx-low.c (lynx_attach): Delete variable new_process.
6485 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6487 * lynx-low.c (lynx_create_inferior): Delete variable
6490 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6492 * lynx-low.c (ptrace_request_to_str): Do not handle
6493 PTRACE_GETTHREADLIST if this macro does not exist.
6495 2012-12-15 Yao Qi <yao@codesourcery.com>
6497 * Makefile.in (OBS): Add notif.o.
6498 * notif.c, notif.h: New.
6499 * server.c: Include "notif.h".
6500 (struct vstop_notif) <next>: Remove.
6502 (queue_stop_reply): Update.
6503 (push_event, send_next_stop_reply): Remove.
6504 (discard_queued_stop_replies): Update.
6505 (notif_stop): New variable.
6506 (handle_v_stopped): Remove.
6507 (handle_v_requests): Don't call handle_v_stopped. Call
6508 handle_ack_notif instead.
6509 (queue_stop_reply_callback): Call notif_event_enque instead
6510 of queue_stop_reply.
6511 (handle_status): Don't call send_next_stop_reply, call
6512 notif_write_event instead.
6513 (kill_inferior_callback): Likewise.
6514 (detach_or_kill_inferior_callback): Likewise.
6515 (main): Call initialize_notif.
6516 (process_serial_event): Call QUEUE_is_empty.
6517 (handle_target_event): Call notif_push instead of push event.
6518 * server.h (push_event): Remove declaration.
6520 2012-12-10 Tom Tromey <tromey@redhat.com>
6522 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6523 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6526 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6527 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6528 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6529 (amd64-linux-ipa.o, ax.o): Rewrite.
6530 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6531 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6532 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6533 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6534 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6535 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6536 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6537 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6538 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6539 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6540 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6541 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6542 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6543 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6544 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6545 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6546 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6547 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6548 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6549 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6550 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6551 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6552 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6553 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6554 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6555 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6556 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6557 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6558 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6559 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6560 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6561 (reg-tilegx.o): Remove.
6562 (all_object_files): New macro.
6563 Include .deps files.
6564 * aclocal.m4, configure: Rebuild.
6565 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6566 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6567 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6569 2012-12-05 Tom Tromey <tromey@redhat.com>
6572 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6574 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6576 * configure.ac: Check for linux/perf_event.h.
6577 * config.in: Regenerated.
6578 * configure: Regenerated.
6580 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6582 * hostio.c (handle_readlink): Decrease buffer size
6583 parameter passed to readlink by one byte.
6585 2012-11-26 Yao Qi <yao@codesourcery.com>
6587 * configure.ac (build_warnings): Append '-Wempty-body'.
6588 * configure: Regenerated.
6589 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6592 2012-11-15 Pierre Muller <muller@sourceware.org>
6594 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6595 * config.in: Regenerate.
6596 * configure: Regenerate.
6597 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6598 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6599 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6600 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6602 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6603 instead of <sys/wait.h> header.
6604 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6606 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6608 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6609 (various make rules): Remove -DGDBSERVER
6611 2012-11-09 Yao Qi <yao@codesourcery.com>
6613 * spu-low.c (current_ptid): Move it to ..
6614 * gdbthread.h: ... here. New.
6615 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6616 * server.c (myresume, process_serial_event): Likewise.
6617 * thread-db.c (thread_db_find_new_threads): Likewise.
6618 * tracepoint.c (run_inferior_command): Likewise.
6620 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6622 * server.c (handle_search_memory_1): Include access length in
6625 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6627 * linux-crisv32-low.c: Fix compile errors.
6629 2012-09-04 Yao Qi <yao@codesourcery.com>
6631 * tracepoint.c (cmd_qtsv): Adjust debug message.
6632 Don't check CUR_TPOINT.
6634 2012-08-28 Yao Qi <yao@codesourcery.com>
6636 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6637 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6638 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6639 Remove declarations of xmalloc, xreallloc, xstrdup and
6641 * Makefile.in (libiberty_h): New.
6642 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6643 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6645 2012-08-23 Yao Qi <yao@codesourcery.com>
6647 * server.h: Remove declaration of 'xsnprintf'.
6649 2012-08-22 Keith Seitz <keiths@redhat.com>
6651 * server.h: Include build-gnulib-gbserver/config.h.
6652 * gdbreplay.c: Likewise.
6654 2012-08-08 Doug Evans <dje@google.com>
6656 * Makefile.in (SFILES): Add gdb_vecs.c.
6657 (OBS): Add gdb_vecs.o.
6658 (gdb_vecs_h, host_defs_h): New variables.
6659 (thread-db.o): Add $(gdb_vecs_h) dependency.
6660 (gdb_vecs.o): New rule.
6661 * thread-db.c: #include "gdb_vecs.h".
6662 (thread_db_load_search): Use a vector to iterate over path elements.
6663 Handle text appearing after "$pdir".
6665 * configure.ac: Add check for strstr.
6666 * config.in: Regenerate.
6667 * configure: Regenerate.
6669 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6671 * hostio.c (handle_pread): If pread fails, fall back to attempting
6673 (handle_pwrite): Likewise for pwrite.
6675 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6677 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6678 between unsupported TYPE and unimplementable ADDR/LEN combination.
6679 (arm_insert_point): Act on new return value.
6681 2012-07-31 Pedro Alves <palves@redhat.com>
6683 * server.c (process_point_options): Only skip tokens if we find
6684 one that is unrecognized. Don't treat 'X' specially while
6685 skipping unrecognized tokens.
6687 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6689 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6690 to 4-byte-align HW breakpoint addresses for Thumb.
6692 2012-07-27 Yao Qi <yao@codesourcery.com>
6696 * server.h: Declare gdb_agent_about_to_close.
6697 * target.c (kill_inferior): Include "agent.h".
6698 New. Send command 'kill'.
6699 * target.h (kill_inferior): Removed macro.
6700 * tracepoint.c (gdb_agent_about_to_close): New.
6701 (gdb_agent_helper_thread): Handle command 'close'.
6702 Wait endlessly until the inferior stops.
6703 Install gdb_agent_remove_socket to atexit hook.
6704 (agent_socket_name): New static variable.
6705 (gdb_agent_socket_init): Replace local variable 'name' with
6706 'agent_socket_name'.
6707 (gdb_agent_remove_socket): New.
6709 2012-07-27 Yao Qi <yao@codesourcery.com>
6711 * server.c (process_point_options): Stop at 'X' when parsing.
6713 2012-07-19 Michael Eager <eager@eagercon.com>
6715 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6717 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6718 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6719 hardware breakpoint.
6721 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6723 * gdbserver/linux-low.c (initialize_low): Call
6724 linux_ptrace_init_warnings.
6726 2012-07-02 Doug Evans <dje@google.com>
6728 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6731 2012-07-02 Stan Shebs <stan@codesourcery.com>
6733 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6734 (ax.o): Add it to build rule.
6736 (OBS): Add format.o.
6737 (IPA_OBS): Add format.o.
6738 * server.c (handle_query): Claim support for breakpoint commands.
6739 (process_point_options): Add command case.
6740 (process_serial_event): Leave running if there are printfs in
6742 * mem-break.h (any_persistent_commands): Declare.
6743 (add_breakpoint_commands): Declare.
6744 (gdb_no_commands_at_breakpoint): Declare.
6745 (run_breakpoint_commands): Declare.
6746 * mem-break.c (struct point_command_list): New struct.
6747 (struct breakpoint): New field command_list.
6748 (any_persistent_commands): New function.
6749 (add_commands_to_breakpoint): New function.
6750 (add_breakpoint_commands): New function.
6751 (gdb_no_commands_at_breakpoint): New function.
6752 (run_breakpoint_commands): New function.
6753 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6755 * ax.c: Include format.h.
6756 (ax_printf): New function.
6757 (gdb_eval_agent_expr): Add printf opcode.
6759 2012-06-13 Yao Qi <yao@codesourcery.com>
6761 * server.c (start_inferior): Remove duplicated writes to fields
6762 'last_resume_kind' and 'last_status' of 'current_inferior'.
6764 2012-06-12 Yao Qi <yao@codesourcery.com>
6765 Pedro Alves <palves@redhat.com>
6767 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6769 * server.c (handle_v_cont): Extend comment.
6771 2012-06-11 Yao Qi <yao@codesourcery.com>
6773 * linux-low.c (linux_attach): Add 'static'.
6775 2012-06-06 Yao Qi <yao@codesourcery.com>
6777 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6779 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6781 Fix gcc -flto compilation warning.
6782 * server.c (main): Make variable multi_mode and attach volatile.
6784 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6786 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6787 if the platform doesn't know about it.
6789 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6791 * Makefile.in (SFILES): Add linux-tile-low.c.
6792 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6793 * configure.srv: Handle tilegx-*-linux*.
6794 * linux-tile-low.c: New file.
6796 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6798 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6800 2012-05-24 Pedro Alves <palves@redhat.com>
6804 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6806 2012-05-24 Pedro Alves <palves@redhat.com>
6810 Replace target_signal with gdb_signal throughout.
6812 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6814 * linux-low.c (linux_store_registers): Avoid the copying sequence
6815 when no data has been retrieved by ptrace.
6817 2012-05-22 Will Deacon <will.deacon@arm.com>
6819 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6820 Include asm/ptrace.h.
6821 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6824 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6826 * linux-low.c (linux_store_registers): Don't re-retrieve data
6827 with ptrace that has already been obtained from /proc. Always
6828 copy any data retrieved with ptrace to the buffer supplied.
6830 2012-05-11 Yao Qi <yao@codesourcery.com>
6831 Pedro Alves <palves@redhat.com>
6833 * linux-low.c (enum stopping_threads_kind): New.
6834 (stopping_threads): Change type to `enum stopping_threads_kind'.
6835 (handle_extended_wait): If stopping and suspending threads, leave
6836 the new_lwp suspended too.
6837 (linux_wait_for_event): Adjust.
6838 (stop_all_lwps): Set `stopping_threads' to
6839 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6840 whether we're suspending threads or just stopping them. Assert no
6843 2012-04-29 Yao Qi <yao@codesourcery.com>
6845 * server.h: Move some code to ...
6846 * gdbthread.h: ... here. New.
6847 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6848 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6849 (nto-low.o, win32-low.o): Likewise.
6850 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6851 * regcache.c, remote-utils.c, server.c: Likewise.
6852 * target.c, tracepoint.c, win32-low.c: Likewise.
6854 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6856 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6857 (PTRACE_ARG4_TYPE): Likewise.
6858 (PTRACE_XFER_TYPE): Likewise.
6859 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6860 ptrace to PTRACE_ARG3_TYPE.
6861 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6862 (PTRACE_ARG4_TYPE): Likewise.
6863 (PTRACE_XFER_TYPE): Likewise.
6864 (linux_detach_one_lwp): Cast fourth argument of
6865 ptrace to long then PTRACE_ARG4_TYPE.
6866 (regsets_fetch_inferior_registers): Cast third argument of
6867 ptrace to long then PTRACE_ARG3_TYPE.
6868 (regsets_store_inferior_registers): Likewise.
6870 2012-04-20 Pedro Alves <palves@redhat.com>
6872 * configure: Regenerate.
6874 2012-04-19 Pedro Alves <palves@redhat.com>
6876 * Makefile.in (GNULIB_BUILDDIR): New.
6877 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6878 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6879 (all, install-only, uninstall, clean-info, all-lib, clean): No
6880 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6881 (maintainer-clean realclean distclean): Use subdir_do.
6883 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6884 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6885 * acinclude.m4: Include acx_configure_dir.m4.
6886 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6887 calls. Call AC_PROG_RANLIB. Configure gnulib using
6890 (GNULIB_STDINT_H): Adjust.
6891 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6892 * gdbreplay.c: Include build-gnulib/config.h.
6893 * server.h: Likewise.
6894 * aclocal.m4: Regenerate.
6895 * config.in: Regenerate.
6896 * configure: Regenerate.
6898 2012-04-19 Pedro Alves <palves@redhat.com>
6900 * Makefile.in (LIBGNU, INCGNU): Adjust.
6901 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6902 (all, install-only, uninstall, clean-info, all-lib, clean)
6903 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6904 * configure.ac: Adjust AC_OUTPUT output.
6905 * aclocal.m4: Regenerate.
6906 * configure: Regenerate.
6908 2012-04-19 Pedro Alves <palves@redhat.com>
6910 * Makefile.in (generated_files): New.
6911 (server_h): Remove the explicit dependency on config.h, and depend
6912 on $generated_files.
6914 2012-04-19 Pedro Alves <palves@redhat.com>
6916 * Makefile.in (INCGNU): Add -Ignulib.
6918 2012-04-19 Pedro Alves <palves@redhat.com>
6920 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6921 (INCGNU): ... this, and spell out -I here.
6922 (GNULIB_LIB): Rename to ...
6924 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6926 2012-04-19 Pedro Alves <palves@redhat.com>
6928 * config.in: Regenerate.
6930 2012-04-19 Pedro Alves <palves@redhat.com>
6932 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6933 * server.h (memmem): Remove declaration.
6934 * config.in: Regenerate.
6935 * configure: Regenerate.
6937 2012-04-19 Yao Qi <yao@codesourcery.com>
6939 * Makefile.in (SFILES): Add common/vec.c.
6943 2012-04-19 Yao Qi <yao@codesourcery.com>
6945 * remote-utils.c (prepare_resume_reply): Replace with macro
6946 target_core_of_thread.
6947 * server.c (handle_qxfer_threads_proper): Likewise.
6948 * target.h (traget_core_of_thread): New macro.
6950 2012-04-18 Pedro Alves <palves@redhat.com>
6952 * aclocal.m4: Regenerate.
6953 * configure: Regenerate.
6955 2012-04-16 Yao Qi <yao@codesourcery.com>
6957 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6958 duplicated on address.
6960 2012-04-16 Yao Qi <yao@codesourcery.com>
6962 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6963 (struct tracepoint_action_ops) <send>: New field.
6964 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6965 (agent_expr_send, x_tracepoint_action_send): New.
6966 (l_tracepoint_action_send): New.
6967 (cmd_qtdp): Download and install tracepoint
6968 according to `use_agent'.
6969 (run_inferior_command): Add one more parameter `len'.
6971 (tracepoint_send_agent): New.
6972 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6974 2012-04-16 Yao Qi <yao@codesourcery.com>
6976 * tracepoint.c (download_tracepoints): Moved to ...
6977 (cmd_qtstart): ... here.
6979 2012-04-14 Yao Qi <yao@codesourcery.com>
6981 * tracepoint.c: Include inttypes.h.
6982 (struct collect_memory_action): Use sized types.
6983 (struct tracepoint): Likewise.
6984 (cmd_qtdp, stop_tracing): Update print specifiers.
6985 (cmd_qtp, response_tracepoint): Likewise.
6986 (collect_data_at_tracepoint): Likewise.
6987 (collect_data_at_step): Likewise.
6989 2012-04-14 Yao Qi <yao@codesourcery.com>
6991 Import gnulib module inttypes.
6992 * aclocal.m4, config.in, configure: Regenerated.
6994 2012-04-14 Yao Qi <yao@codesourcery.com>
6996 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6997 Makefile and config.status at last.
6999 2012-04-13 Yao Qi <yao@codesourcery.com>
7001 * tracepoint.c: Include stdint.h unconditionally.
7003 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7005 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7006 on BFD_HAVE_SYS_PROCFS_TYPE.
7007 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7008 * configure: Regenerate.
7009 * config.in: Likewise.
7011 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7013 * Makefile.in (clean): Also remove x32.c x32-linux.c
7014 x32-avx.c x32-avx-linux.c.
7015 (x32.o): New target.
7017 (x32-linux.o): Likewise.
7018 (x32-linux.c): Likewise.
7019 (x32-avx.o): Likewise.
7020 (x32-avx.c): Likewise.
7021 (x32-avx-linux.o): Likewise.
7022 (x32-avx-linux.c): Likewise.
7024 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7025 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7026 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7027 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7028 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7029 i386/x32-avx-linux.xml.
7031 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7032 (init_registers_x32_avx_linux): Likwise.
7033 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7034 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7036 2012-04-13 Pedro Alves <palves@redhat.com>
7038 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7039 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7040 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7041 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7044 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7046 * linux-x86-low.c (compat_x32_clock_t): New.
7047 (compat_x32_siginfo_t): Likewise.
7048 (compat_x32_siginfo_from_siginfo): Likewise.
7049 (siginfo_from_compat_x32_siginfo): Likewise.
7050 (linux_is_elf64): Likewise.
7051 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7052 and siginfo_from_compat_x32_siginfo for x32.
7053 (x86_arch_setup): Set linux_is_elf64.
7055 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7058 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7060 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7061 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7062 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7063 compatible with process.
7065 2012-04-12 Yao Qi <yao@codesourcery.com>
7067 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7068 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7069 (install-only, install-info, clean): Handle sub dir gnulib.
7070 (all-lib, am--refresh): New targets.
7071 (memmem.o): Remove target.
7072 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7073 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7074 (AC_REPLACE_FUNCS): Remove memmem.
7075 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7076 (AC_OUTPUT): Generate Makefile in gnulib/.
7077 * aclocal.m4, config.in, configure: Regenerated.
7079 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7081 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7083 2012-04-05 Pedro Alves <palves@redhat.com>
7085 -Werror=strict-aliasing
7087 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7090 2012-04-04 Pedro Alves <palves@redhat.com>
7092 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7093 (sparc_store_gregset_from_stack, sparc_store_gregset)
7094 (sparc_breakpoint_at): Fix formatting.
7096 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7098 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7100 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7101 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7102 * config.in: Regenerate.
7103 * configure: Likewise.
7105 2012-03-29 Pedro Alves <palves@redhat.com>
7107 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7108 Correct ptrace arguments.
7110 2012-03-28 Pedro Alves <palves@redhat.com>
7112 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7113 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7114 (IA64_FR1_REGNUM): New defines.
7115 (ia64_fetch_register): New.
7116 (the_low_target): Install it.
7117 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7119 * linux-low.c (linux_fetch_registers): Try the
7120 the_low_target.fetch_register hook first.
7122 * linux-arm-low.c (the_low_target): Adjust.
7123 * linux-bfin-low.c (the_low_target): Adjust.
7124 * linux-cris-low.c (the_low_target): Adjust.
7125 * linux-crisv32-low.c (the_low_target): Adjust.
7126 * linux-m32r-low.c (the_low_target): Adjust.
7127 * linux-m68k-low.c (the_low_target): Adjust.
7128 * linux-mips-low.c (the_low_target): Adjust.
7129 * linux-ppc-low.c (the_low_target): Adjust.
7130 * linux-s390-low.c (the_low_target): Adjust.
7131 * linux-sh-low.c (the_low_target): Adjust.
7132 * linux-sparc-low.c (the_low_target): Adjust.
7133 * linux-tic6x-low.c (the_low_target): Adjust.
7134 * linux-x86-low.c (the_low_target): Adjust.
7135 * linux-xtensa-low.c (the_low_target): Adjust.
7137 2012-03-26 Pedro Alves <palves@redhat.com>
7139 * server.c (handle_qxfer_libraries): Don't bail early if
7140 the_target->qxfer_libraries_svr4 is not NULL.
7142 2012-03-26 Pedro Alves <palves@redhat.com>
7144 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7146 2012-03-23 Pedro Alves <palves@redhat.com>
7148 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7149 "library-list-svr4" element's start tag when the the DSO list is
7152 2012-03-23 Pedro Alves <palves@redhat.com>
7154 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7155 a variable whose type size is the same as the inferior's pointer
7158 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7160 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7162 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7163 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7164 * linux-low.h: Include <signal.h>.
7165 (struct siginfo): Remove forward declaration.
7166 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7169 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7171 * .gitignore: Ignore more files.
7173 2012-03-19 Pedro Alves <palves@redhat.com>
7174 Jan Kratochvil <jan.kratochvil@redhat.com>
7176 * server.c (cont_thread, general_thread): Add describing comments.
7177 (start_inferior): Clear `cont_thread'.
7178 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7181 2012-03-15 Yao Qi <yao@codesourcery.com>
7183 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7185 (cmd_qtdp): ... here.
7187 2012-03-15 Yao Qi <yao@codesourcery.com>
7189 * tracepoint.c (struct tracepoint_action_ops): New.
7190 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7191 (m_tracepoint_action_download): New.
7192 (r_tracepoint_action_download): New.
7193 (x_tracepoint_action_download): New.
7194 (l_tracepoint_action_download): New.
7195 (add_tracepoint_action): Install `action->ops' according type.
7196 (download_tracepoint_1): Move code `download' function pointer
7197 of various tracepoint_action_ops.
7199 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7201 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7202 linux_ptrace_attach_warnings.
7204 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7206 * Makefile.in (linux-ptrace.o): New.
7207 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7208 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7209 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7210 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7211 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7213 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7215 2012-03-08 Yao Qi <yao@codesourcery.com>
7216 Pedro Alves <palves@redhat.com>
7218 Fix PR server/13392.
7219 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7221 * tracepoint.c (remove_tracepoint): New.
7222 (cmd_qtdp): Call remove_tracepoint when failed to install.
7224 2012-03-07 Pedro Alves <palves@redhat.com>
7226 * linux-low.c (get_detach_signal): New.
7227 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7228 Pass on pending signals to PTRACE_DETACH. Check the result of the
7230 * server.c (program_signals, program_signals_p): New.
7231 (handle_general_set): Handle QProgramSignals.
7232 * server.h (program_signals, program_signals_p): Declare.
7234 2012-03-05 Pedro Alves <palves@redhat.com>
7235 Jan Kratochvil <jan.kratochvil@redhat.com>
7237 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7240 2012-03-03 Yao Qi <yao@codesourcery.com>
7242 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7243 agent_look_up_symbols.
7245 2012-03-03 Yao Qi <yao@codesourcery.com>
7247 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7248 (linux-x86-low.o): Likewise.
7249 * server.h: Remove in_process_agent_loaded.
7250 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7254 2012-03-03 Yao Qi <yao@codesourcery.com>
7256 * tracepoint.c (gdb_agent_capability): New global.
7257 (in_process_agent_loaded_ust): Renamed to
7258 `in_process_agent_supports_ust'.
7260 (in_process_agent_supports_ust): Call agent_capability_check.
7261 (clear_installed_tracepoints): Assert that agent supports
7264 2012-03-03 Yao Qi <yao@codesourcery.com>
7266 * linux-low.c (linux_supports_agent): New.
7267 (linux_target_ops): Initialize field `supports_agent' with
7268 linux_supports_agent.
7269 * target.h (struct target_ops) <supports_agent>: New.
7270 (target_supports_agent): New macro.
7271 * server.c (handle_general_set): Handle packet 'QAgent'.
7272 (handle_query): Send `QAgent+'.
7273 * Makefile.in (server.o): Depends on agent.h.
7275 2012-03-03 Yao Qi <yao@codesourcery.com>
7277 * Makefile.in (OBS): Add agent.o.
7278 Add new rule for agent.o.
7279 Track dependence of tracepoint.c on agent.h.
7280 * tracepoint.c (run_inferior_command_1):
7281 (run_inferior_command): Call agent_run_command.
7282 (gdb_ust_connect_sync_socket): Deleted. Move it to
7284 (resume_thread, stop_thread): Likewise.
7285 (gdb_ust_socket_init): Renamed to ...
7286 (gdb_agent_socket_init): ... New.
7287 (gdb_ust_thread): Renamed to ...
7288 (gdb_agent_helper_thread): ... New.
7289 (gdb_ust_init): Move some code to ...
7290 (gdb_agent_init): ... here. New.
7291 [HAVE_UST]: Call gdb_ust_init.
7292 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7293 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7294 * config.in, configure: Regenerated.
7296 2012-03-02 Pedro Alves <palves@redhat.com>
7298 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7299 * linux-low.c (struct simple_pid_list): New.
7300 (stopped_pids): New a struct simple_pid_list pointer.
7301 (add_to_pid_list, pull_pid_from_list): New.
7302 (handle_extended_wait): Don't assume the first signal new children
7303 report is SIGSTOP. Adjust call to pull_pid_from_list.
7304 (linux_wait_for_lwp): Adjust.
7306 2012-03-02 Yao Qi <yao@codesourcery.com>
7308 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7311 2012-03-02 Yao Qi <yao@codesourcery.com>
7313 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7314 `stop_pc' and `tpoint'. Update caller.
7316 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7318 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7319 * linux-low.c (use_linux_regsets): New macro.
7320 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7321 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7322 (linux_register_in_regsets): New function.
7323 (usr_fetch_inferior_registers): Skip registers covered by
7325 (usr_store_inferior_registers): Likewise.
7326 (usr_fetch_inferior_registers): New macro.
7327 (usr_store_inferior_registers): Likewise.
7328 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7329 (linux_store_registers): Likewise.
7330 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7332 (init_registers_mips64_dsp_linux): Likewise.
7333 (init_registers_mips_linux): New macro.
7334 (init_registers_mips_dsp_linux): Likewise.
7335 (mips_dsp_num_regs): Likewise.
7336 (DSP_BASE, DSP_CONTROL): New fallback macros.
7337 (mips_base_regs): New macro.
7338 (mips_regmap): Use it. Fix the size.
7339 (mips_dsp_regmap): New variable.
7340 (mips_dsp_regset_bitmap): Likewise.
7341 (mips_arch_setup): New function.
7342 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7344 (mips_cannot_store_register): Likewise.
7345 (the_low_target): Update .arch_setup, .num_regs and .regmap
7346 initializers. Add .regset_bitmap initializer.
7347 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7349 * linux-bfin-low.c (the_low_target): Likewise.
7350 * linux-cris-low.c (the_low_target): Likewise.
7351 * linux-crisv32-low.c (the_low_target): Likewise.
7352 * linux-ia64-low.c (the_low_target): Likewise.
7353 * linux-m32r-low.c (the_low_target): Likewise.
7354 * linux-m68k-low.c (the_low_target): Likewise.
7355 * linux-ppc-low.c (the_low_target): Likewise.
7356 * linux-s390-low.c (the_low_target): Likewise.
7357 * linux-sh-low.c (the_low_target): Likewise.
7358 * linux-sparc-low.c (the_low_target): Likewise.
7359 * linux-tic6x-low.c (the_low_target): Likewise.
7360 * linux-x86-low.c (the_low_target): Likewise.
7361 * linux-xtensa-low.c (the_low_target): Likewise.
7362 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7363 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7364 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7366 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7367 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7369 2012-02-29 Yao Qi <yao@codesourcery.com>
7370 Pedro Alves <palves@redhat.com>
7372 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7373 `step_over_finished' is true.
7375 2012-02-27 Pedro Alves <palves@redhat.com>
7377 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7378 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7380 2012-02-27 Pedro Alves <palves@redhat.com>
7383 * linux-low.c (pid_is_stopped): New.
7384 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7386 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7388 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7391 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7393 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7395 2012-02-24 Luis Machado <lgustavo@codesourcery>
7397 * server.c (handle_query): Advertise support for target-side
7398 breakpoint condition evaluation.
7399 (process_point_options): New function.
7400 (process_serial_event): When inserting a breakpoint, check for
7401 a target-side condition that should be evaluated.
7403 * mem-break.c: Include regcache.h and ax.h.
7404 (point_cond_list_t): New data structure.
7405 (breakpoint) <cond_list>: New field.
7406 (find_gdb_breakpoint_at): Make non-static.
7407 (delete_gdb_breakpoint_at): Clear any target-side
7409 (clear_gdb_breakpoint_conditions): New function.
7410 (add_condition_to_breakpoint): Likewise.
7411 (add_breakpoint_condition): Likewise.
7412 (gdb_condition_true_at_breakpoint): Likewise.
7413 (gdb_breakpoint_here): Return result directly instead
7414 of going through a local variable.
7416 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7417 (clear_gdb_breakpoint_conditions): Likewise.
7418 (add_breakpoint_condition): Likewise.
7419 (gdb_condition_true_at_breakpoint): Likewise.
7421 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7422 (need_step_over_p): Take target-side breakpoint condition into
7425 2012-02-24 Luis Machado <lgustavo@codesourcery>
7427 * server.h: Include tracepoint.h.
7428 (agent_mem_read, agent_get_trace_state_variable_value,
7429 agent_set_trace_state_variable_value,
7430 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7431 get_set_tsv_func_addr): New prototypes.
7433 * ax.h: New include file.
7434 * ax.c: New source file.
7436 * tracepoint.c: Include ax.h.
7437 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7438 agent_expr, eval_result_type): Move to ax.h.
7439 (parse_agent_expr): Rename to ...
7440 (gdb_parse_agent_expr): ... this, make it non-static and move
7442 (unparse_agent_expr) Rename to ...
7443 (gdb_unparse_agent_expr): ... this, make it non-static and move
7445 (eval_agent_expr): Rename to ...
7446 (eval_tracepoint_agent_expr): ... this.
7447 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7448 forward declarations.
7449 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7450 (agent_get_trace_state_variable_value): New function.
7451 (agent_set_trace_state_variable_value): New function.
7452 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7453 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7454 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7455 (condition_true_at_tracepoint): Likewise.
7456 (parse_agent_expr): Rename to ...
7457 (gdb_parse_agent_expr): ... this and move to ax.c.
7458 (unparse_agent_expr): Rename to ...
7459 (gdb_unparse_agent_expr): ... this and move to ax.c.
7460 (gdb_agent_op_name): Move to ax.c.
7461 (eval_agent_expr): Rename to ...
7462 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7464 (eval_tracepoint_agent_expr): New function.
7465 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7467 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7469 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7470 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7471 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7472 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7473 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7474 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7475 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7476 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7477 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7478 (compile_bytecodes): Remove forward declaration.
7479 (is_goto_target): Move to ax.c.
7480 (compile_bytecodes): Move to ax.c and call
7481 agent_get_trace_state_variable_value (...) and
7482 agent_set_trace_state_variable_value (...).
7484 * Makefile.in: Update ax.c and IPA dependencies.
7486 2012-02-24 Pedro Alves <palves@redhat.com>
7488 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7489 (cmd_bigqtbuffer_circular): ... this. Only handle
7490 'QTBuffer:circular:'.
7491 (handle_tracepoint_general_set): Adjust.
7493 2012-02-16 Yao Qi <yao@codesourcery.com>
7495 * inferiors.c: Move code to ...
7496 * dll.c: .... here. New.
7497 * server.h: Declare clear_dlls.
7498 * Makefile.in (SFILES): Add dll.c.
7502 2012-02-11 Yao Qi <yao@codesourcery.com>
7504 * server.c: (handle_monitor_command): Add a new parameter
7506 (handle_query): Update caller.
7508 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7510 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7511 * configure, config.in: Regenerate.
7512 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7515 2012-02-02 Pedro Alves <palves@redhat.com>
7517 Try SIGKILL first, then PTRACE_KILL.
7518 * linux-low.c (linux_kill_one_lwp): New.
7519 (linux_kill_one_lwp): Rename to ...
7520 (kill_one_lwp_callback): ... this. Use the new
7523 2012-02-02 Pedro Alves <palves@redhat.com>
7525 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7528 2012-01-27 Pedro Alves <palves@redhat.com>
7530 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7531 (elf_64_file_p): Make static.
7532 (linux_pid_exe_is_elf_64_file): New.
7533 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7534 Delete declarations.
7535 (linux_pid_exe_is_elf_64_file): Declare.
7536 * linux-x86-low.c (x86_arch_setup): Use
7537 linux_pid_exe_is_elf_64_file.
7539 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7541 * linux-low.c (linux_wait_for_event_1): Rename to ...
7542 (linux_wait_for_event): ... here and merge it with former
7543 linux_wait_for_event - new variable wait_ptid, use it.
7544 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7546 2012-01-23 Pedro Alves <palves@redhat.com>
7548 * server.c (main): Avoid yet another case of infinite loop while
7549 detaching/killing after a longjmp.
7551 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7554 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7556 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7558 * hostio.c (handle_readlink): New function.
7559 (handle_vFile): Call it to handle "vFile:readlink" packets.
7561 2012-01-20 Pedro Alves <palves@redhat.com>
7562 Ulrich Weigand <ulrich.weigand@linaro.org>
7564 * server.c (handle_v_requests): Only support vAttach and vRun to
7565 start multiple processes when in extended protocol mode.
7567 2012-01-17 Pedro Alves <palves@redhat.com>
7569 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7570 memalign plus mprotect to allocate the scratch buffer.
7572 2012-01-13 Pedro Alves <palves@redhat.com>
7574 * server.c (attach_inferior): Clear `cont_thread'.
7576 2012-01-13 Pedro Alves <palves@redhat.com>
7578 * server.c (main): Avoid infinite loop while detaching/killing
7581 2012-01-09 Doug Evans <dje@google.com>
7583 * server.c (start_inferior): Set last_ptid in --wrapper case.
7585 2012-01-06 Yao Qi <yao@codesourcery.com>
7587 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7589 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7591 2012-01-04 Yao Qi <yao@codesourcery.com>
7593 * tracepoint.c (cmd_qtdp): Print debug message
7594 for static tracepoint.
7596 2012-01-04 Yao Qi <yao@codesourcery.com>
7598 * tracepoint.c (trace_vdebug): Differentiate debug message
7599 between gdbserver and IPA.
7601 2012-01-03 Yao Qi <yao@codesourcery.com>
7603 * tracepoint.c (tracepoint_was_hit): Don't collect for
7606 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7608 * terminal.h: Reformat copyright header.
7610 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7612 * server.c (gdbserver_version): Update copyright year.
7613 * gdbreplay.c (gdbreplay_version): Likewise.
7615 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7617 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7620 2011-12-18 Hui Zhu <teawater@gmail.com>
7621 * linux-low.c (linux_create_inferior): Save return value to ret.
7623 2011-12-18 Hui Zhu <teawater@gmail.com>
7625 * linux-low.c (linux_create_inferior): Save return value to ret.
7627 2011-12-16 Doug Evans <dje@google.com>
7629 * linux-low.c (linux_create_inferior): If stdio connection,
7630 redirect stdin from /dev/null, stdout to stderr.
7631 * remote-utils.c (remote_is_stdio): New static global.
7632 (remote_connection_is_stdio): New function.
7633 (remote_prepare): Handle stdio connection.
7634 (remote_open): Ditto.
7635 (remote_close): Don't close stdin for stdio connections.
7636 (read_prim,write_prim): New functions. Replace all calls to
7637 read/write to these.
7638 * server.c (main): Watch for "-" argument. Move call to
7639 remote_prepare before start_inferior.
7640 * server.h (STDIO_CONNECTION_NAME): New macro.
7641 (remote_connection_is_stdio): Declare.
7643 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7644 in debugging output.
7646 2011-12-15 Yao Qi <yao@codesourcery.com>
7648 * tracepoint.c: Include sys/syscall.h.
7649 (gdb_ust_thread): Remove preprocessor conditional.
7651 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7653 * linux-low.c (linux_detach_one_lwp): Call
7654 the_low_target.prepare_to_resume before detaching.
7656 2011-12-14 Yao Qi <yao@codesourcery.com>
7658 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7661 2011-12-14 Yao Qi <yao@codesourcery.com>
7663 * i386-low.c (i386_low_stopped_data_address): Initialize local
7666 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7670 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7671 DR_CONTROL unless necessary. Extend comments.
7672 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7673 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7675 2011-12-13 Yao Qi <yao@codesourcery.com>
7677 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7679 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7681 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7683 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7684 Print new debug message for such case.
7686 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7688 Fix overlapping memcpy.
7689 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7690 the read_inferior_memory transfer.
7691 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7692 write_inferior_memory transfer.
7693 (set_fast_tracepoint_jump): New variable buf. Use it for the
7694 read_inferior_memory and write_inferior_memory transfers.
7695 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7696 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7697 Use it for the write_inferior_memory transfer.
7698 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7701 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7703 * linux-low.c (fetch_register, store_register): Make code
7704 consistent, fix formatting.
7706 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7708 * linux-low.c (usr_store_inferior_registers): Factor out code
7709 to handle individual registers into...
7710 (store_register): ... this new function.
7712 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7714 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7715 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7716 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7717 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7718 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7719 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7720 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7721 (srv_xmlfiles): Add new XML files.
7723 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7725 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7726 (init_registers_s390_linux32v1): Add prototype.
7727 (init_registers_s390_linux32v2): Likewise.
7728 (init_registers_s390_linux64v1): Likewise.
7729 (init_registers_s390_linux64v2): Likewise.
7730 (init_registers_s390x_linux64v1): Likewise.
7731 (init_registers_s390x_linux64v2): Likewise.
7732 (s390_num_regs): Increment to 52.
7733 (s390_regmap): Add orig_r2 register.
7734 (s390_num_regs_3264): Increment to 68.
7735 (s390_regmap_3264): Add orig_r2 register.
7736 (s390_collect_ptrace_register): Handle orig_r2 register.
7737 (s390_supply_ptrace_register): Likewise.
7738 (s390_fill_last_break): New function.
7739 (s390_store_last_break): Likewise.
7740 (s390_fill_system_call): New function.
7741 (s390_store_system_call): Likewise.
7742 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7744 (s390_check_regset): New function.
7745 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7746 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7747 Update target_regsets for available register sets.
7749 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7750 Jan Kratochvil <jan.kratochvil@redhat.com>
7752 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7753 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7755 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7756 * linux-low.h (struct process_info_private): New member r_debug.
7757 * server.c (handle_qxfer_libraries): Call
7758 the_target->qxfer_libraries_svr4.
7759 (handle_qxfer_libraries_svr4): New function.
7760 (qxfer_packets): New entry "libraries-svr4".
7761 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7762 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7763 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7764 PACKET_qXfer_libraries_svr4.
7766 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7768 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7769 PSW address/mask between 8-byte and 16-byte formats.
7770 (s390_supply_ptrace_register): Likewise.
7771 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7772 basic addressing mode bit.
7774 2011-11-24 Stan Shebs <stan@codesourcery.com>
7776 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7778 2011-11-17 Stan Shebs <stan@codesourcery.com>
7780 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7781 (tracing_start_time): New global.
7782 (tracing_stop_time): New global.
7783 (tracing_user_name): New global.
7784 (tracing_notes): New global.
7785 (tracing_stop_note): New global.
7786 (cmd_qtstart): Set traceframe_usage, start_time.
7787 (stop_tracing): Set stop_time.
7788 (cmd_qtstatus): Report additional status.
7789 (cmd_qtp): New function.
7790 (handle_tracepoint_query): Call it.
7791 (cmd_qtnotes): New function.
7792 (handle_tracepoint_general_set): Call it.
7793 (get_timestamp): Rename from tsv_get_timestamp.
7795 2011-11-14 Stan Shebs <stan@codesourcery.com>
7796 Kwok Cheung Yeung <kcy@codesourcery.com>
7798 * linux-x86-low.c (small_jump_insn): New.
7799 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7800 trampoline and error message, build a trampoline and issue a small
7801 jump instruction to it.
7802 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7803 trampoline and error message.
7804 (x86_get_min_fast_tracepoint_insn_len): New.
7805 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7806 * linux-low.h (struct linux_target_ops): Add arguments to
7807 install_fast_tracepoint_jump_pad operation, add new operation.
7808 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7810 (linux_get_min_fast_tracepoint_insn_len): New function.
7811 (linux_target_op): Add new operation.
7812 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7813 (gdb_trampoline_buffer_end): Ditto.
7814 (gdb_trampoline_buffer_error): Ditto.
7815 (struct ipa_sym_addresses): Add fields for new IPA variables.
7816 (symbol_list): Add entries for new IPA variables.
7817 (struct tracepoint): Add fields to hold the address range of the
7818 trampoline used by the tracepoint.
7819 (trampoline_buffer_head): New static variable.
7820 (trampoline_buffer_tail): Ditto.
7821 (claim_trampoline_space): New function.
7822 (have_fast_tracepoint_trampoline_buffer): New function.
7823 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7825 (install_fast_tracepoint): Ditto, also add error buffer argument.
7826 (cmd_qtminftpilen): New function.
7827 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7828 (fast_tracepoint_from_trampoline_address): New function.
7829 (fast_tracepoint_collecting): Handle trampoline as part of jump
7831 (set_trampoline_buffer_space): New function.
7832 (initialize_tracepoint): Initialize new IPA variables.
7833 * target.h (struct target_ops): Add arguments to
7834 install_fast_tracepoint_jump_pad operation, add new
7835 get_min_fast_tracepoint_insn_len operation.
7836 (target_get_min_fast_tracepoint_insn_len): New.
7837 (install_fast_tracepoint_jump_pad): Add arguments.
7838 * server.h (IPA_BUFSIZ): Define.
7839 * linux-i386-ipa.c: Include extra header files.
7840 (initialize_fast_tracepoint_trampoline_buffer): New function.
7841 (initialize_low_tracepoint): Call it.
7842 * server.h (set_trampoline_buffer_space): Declare.
7843 (claim_trampoline_space): Ditto.
7844 (have_fast_tracepoint_trampoline_buffer): Ditto.
7846 2011-11-14 Yao Qi <yao@codesourcery.com>
7848 * server.c (handle_query): Handle InstallInTrace for qSupported.
7849 * tracepoint.c (add_tracepoint): Sort list.
7850 (install_tracepoint, download_tracepoint): New.
7851 (cmd_qtdp): Call them to install and download tracepoints.
7852 (sort_tracepoints): Removed.
7853 (cmd_qtstart): Update.
7855 2011-11-14 Yao Qi <yao@codesourcery.com>
7857 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7858 * mem-break.h: Declare.
7859 * tracepoint.c (cmd_qtstart): Move some code to ...
7860 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7862 (download_tracepoints): Move some code to ...
7863 (download_tracepoint_1): ... here. New.
7865 2011-11-08 Yao Qi <yao@codesourcery.com>
7867 * remote-utils.c (relocate_instruction): A comment fix.
7869 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7871 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7872 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7873 dr_status_mirror and dr_control_mirror from debug_reg_state.
7874 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7875 (i386_initial_stuff): Remove use of deleted globals.
7876 (i386_get_thread_context, i386_set_thread_context,
7877 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7878 from debug_reg_state.
7880 2011-11-05 Yao Qi <yao@codesourcery.com>
7882 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7883 address as TPOINT's.
7885 2011-11-02 Stan Shebs <stan@codesourcery.com>
7887 * tracepoint.c (agent_mem_read_string): New function.
7888 (eval_agent_expr): Call it for tracenz.
7889 * server.c (handle_query): Report support for tracenz.
7891 2011-11-02 Yao Qi <yao@codesourcery.com>
7893 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7895 2011-11-02 Yao Qi <yao@codesourcery.com>
7897 * target.h: Fix a typo in comment.
7899 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7901 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7902 clobber the breakpoints' shadows with fast tracepoint jumps.
7903 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7904 * target.c (write_inferior_memory): Also pass MYADDR down to
7907 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7909 * configure.ac: Check support for personality routine.
7910 * configure: Regenerate.
7911 * config.in: Likewise.
7912 * linux-low.c: Include <sys/personality.h>.
7913 Define ADDR_NO_RANDOMIZE if necessary.
7914 (linux_create_inferior): Disable address space randomization when
7915 forking inferior, if requested.
7916 (linux_supports_disable_randomization): New function.
7917 (linux_target_ops): Install it.
7918 * server.h (disable_randomization): Declare.
7919 * server.c (disable_randomization): New global variable.
7920 (handle_general_set): Handle QDisableRandomization.
7921 (handle_query): Likewise for qSupported.
7922 (main): Support --disable-randomization and --no-disable-randomization
7923 command line arguments.
7924 * target.h (struct target_ops): Add supports_disable_randomization.
7925 (target_supports_disable_randomization): New macro.
7927 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7929 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7931 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7932 [!PT_GETDSBT] (target_loadmap): New definition.
7933 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7934 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7935 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7936 and PT_GETDSBT to LINUX_LOADMAP.
7937 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7938 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7940 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7942 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7943 (arm_linux_hwbp_cap): New static variable.
7944 (arm_linux_get_hwbp_cap): Replace by ...
7945 (arm_linux_init_hwbp_cap): ... this new function.
7946 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7947 (arm_linux_get_hw_watchpoint_count): Likewise.
7948 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7949 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7950 (arm_prepare_to_resume): Use perror_with_name instead of error.
7952 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7954 * linux-arm-low.c: Include <signal.h>.
7955 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7956 (struct arm_linux_hwbp_cap): New data type.
7957 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7958 (struct arm_linux_hw_breakpoint): New data type.
7959 (MAX_BPTS, MAX_WPTS): Define.
7960 (struct arch_process_info, struct arch_lwp_info): New data types.
7961 (arm_linux_get_hwbp_cap): New function.
7962 (arm_linux_get_hw_breakpoint_count): Likewise.
7963 (arm_linux_get_hw_watchpoint_count): Likewise.
7964 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7965 (arm_hwbp_control_initialize): Likewise.
7966 (arm_hwbp_control_is_enabled): Likewise.
7967 (arm_hwbp_control_is_initialized): Likewise.
7968 (arm_hwbp_control_disable): Likewise.
7969 (arm_linux_hw_breakpoint_equal): Likewise.
7970 (arm_linux_hw_point_initialize): Likewise.
7971 (struct update_registers_data): New data structure.
7972 (update_registers_callback: New function.
7973 (arm_insert_point): Likewise.
7974 (arm_remove_point): Likewise.
7975 (arm_stopped_by_watchpoint): Likewise.
7976 (arm_stopped_data_address): Likewise.
7977 (arm_new_process): Likewise.
7978 (arm_new_thread): Likewise.
7979 (arm_prepare_to_resume): Likewise.
7980 (the_low_target): Register arm_insert_point, arm_remove_point,
7981 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7982 arm_new_thread, and arm_prepare_to_resume.
7984 2011-09-15 Stan Shebs <stan@codesourcery.com>
7986 * server.h (struct emit_ops): Add compare-goto fields.
7987 * tracepoint.c (gdb_agent_op_sizes): New table.
7988 (emit_eq_goto): New function.
7989 (emit_ne_goto): New function.
7990 (emit_lt_goto): New function.
7991 (emit_le_goto): New function.
7992 (emit_gt_goto): New function.
7993 (emit_ge_goto): New function.
7994 (is_goto_target): New function.
7995 (compile_bytecodes): Recognize special cases of compare-goto
7996 combinations and call specialized emitters for them.
7997 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7998 (amd64_emit_ne_goto): New function.
7999 (amd64_emit_lt_goto): New function.
8000 (amd64_emit_le_goto): New function.
8001 (amd64_emit_gt_goto): New function.
8002 (amd64_emit_ge_goto): New function.
8003 (amd64_emit_ops): Add the new functions.
8004 (i386_emit_eq_goto): New function.
8005 (i386_emit_ne_goto): New function.
8006 (i386_emit_lt_goto): New function.
8007 (i386_emit_le_goto): New function.
8008 (i386_emit_gt_goto): New function.
8009 (i386_emit_ge_goto): New function.
8010 (i386_emit_ops): Add the new functions.
8012 2011-09-08 Stan Shebs <stan@codesourcery.com>
8014 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8015 (i386_emit_epilogue): Restore %ebx.
8017 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8019 * server.c (step_thread): Remove definition.
8020 (process_serial_event): Don't handle Hs.
8021 * server.h (step_thread): Remove declaration.
8022 * target.c (set_desired_inferior): Remove use of step_thread.
8024 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8026 * linux-low.c: Include linux-procfs.h.
8027 (linux_attach_lwp_1): Update comments.
8028 (linux_attach): Scan for existing threads when attaching to a
8029 process that is the tgid.
8030 * Makefile.in: Update dependencies.
8032 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8034 * configure.srv: Add linux-procfs.o dependencies.
8036 2011-08-14 Yao Qi <yao@codesourcery.com>
8038 * target.h (struct target_ops): Fix indent.
8039 * win32-low.c (win32_target_ops): Fix comment.
8041 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8042 Yao Qi <yao@codesourcery.com>
8044 * Makefile.in (clean): Remove tic6x-*.c files.
8045 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8046 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8047 (tic6x-c64xp-linux.c): Likewise.
8048 * configure.srv: Add support for tic6x-*-uclinux.
8049 * linux-tic6x-low.c: New.
8050 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8052 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8053 Yao Qi <yao@codesourcery.com>
8055 * target.h (struct target_ops): Add read_loadmap.
8056 * linux-low.c (struct target_loadseg): New type.
8057 (struct target_loadmap): New type.
8058 (linux_read_loadmap): New function.
8059 (linux_target_ops): Add linux_read_loadmap.
8060 * server.c (handle_query): Support qXfer:fdpic:read packet.
8061 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8064 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8066 * win32-low.c: Include <stdint.h>.
8068 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8070 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8071 to the inferior here.
8072 (i386_remove_aligned_watchpoint): Ditto.
8073 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8074 fit part of the watchpoint in the debug registers.
8075 (i386_update_inferior_debug_regs): New.
8076 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8077 registers, and only update the inferior on success.
8078 (i386_low_remove_watchpoint): Ditto.
8080 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8082 * linux-low.c (compare_ints, unique, list_threads, show_process,
8083 linux_core_of_thread): Delete.
8084 (linux_target_ops): Change linux_core_of_thread to
8085 linux_common_core_of_thread.
8086 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8087 * utils.c (malloc_failure): Change type of argument.
8088 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8089 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8090 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8091 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8092 (IPA_OBJS): Add common-utils-ipa.o.
8093 (ptid_h, linux_osdata_h): New macros.
8094 (server_h): Add common/common-utils.h, common/xml-utils.h,
8095 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8097 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8098 ptid.o, buffer.o): New rules.
8099 (linux-low.o): Add common/linux-osdata.h as a dependency.
8100 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8101 * configure.ac: Add AC_HEADER_DIRENT check.
8102 * config.in: Regenerate.
8103 * configure: Regenerate.
8104 * remote-utils.c (xml_escape_text): Delete.
8105 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8106 buffer_xml_printf): Move to common/buffer.c.
8107 * server.c (main): Remove call to initialize_inferiors.
8108 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8109 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8110 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8111 internal_error, gdb_assert, gdb_assert_fail): Delete.
8112 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8113 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8115 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8116 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8117 initialize_inferiors): Delete.
8119 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8121 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8124 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8126 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8128 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8130 2011-05-26 Yao Qi <yao@codesourcery.com>
8132 * Makefile.in (thread-db.o): Track dependence to
8133 common/gdb_thread_db.h.
8134 * thread-db.c: include gdb_thread_db.h from right place.
8136 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8138 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8139 __FILE__ and __LINE__ to internal_error.
8141 2011-05-13 Doug Evans <dje@google.com>
8143 * thread-db.c (try_thread_db_load_from_sdir): New function.
8144 (try_thread_db_load_from_dir): New function.
8145 (thread_db_load_search): Handle $sdir, ignore $pdir.
8146 Remove trying of system directories if search of
8147 libthread-db-search-path fails, that is now done via $sdir.
8149 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8151 * server.c (handle_query): Add EnableDisableTracepoints to the list
8152 of supported features.
8153 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8155 (cmd_qtenable_disable): New.
8156 (cmd_qtstart): Install tracepoints even if disabled.
8157 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8158 receiving a QTEnable or QTDisable packet.
8159 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8160 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8162 (gdb_probe): Skip data collection if static tracepoint is disabled.
8164 2011-05-10 Doug Evans <dje@google.com>
8166 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8168 2011-05-04 Doug Evans <dje@google.com>
8170 * linux-low.c (linux_join): Skip process lookup.
8171 * spu-low.c (spu_join): Ditto.
8172 * server.c (join_inferiors_callback): Delete.
8173 (process_serial_event): For 'D' packet (detach) call join_inferior
8176 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8178 * README: Don't mention xscale*-*-linux*.
8179 * configure.srv (xscale*-*-linux*): Don't handle target.
8181 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8183 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8185 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8186 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8187 (i386_emit_void_call_2): Likewise.
8189 2011-04-26 Yao Qi <yao@codesourcery.com>
8191 * linux-low.c: Move common macros to linux-ptrace.h.
8192 Include linux-ptrace.h.
8193 * Makefile.in (linux_ptrace_h): New.
8194 (linux-low.o): Depends on linux-ptrace.h.
8196 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8198 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8199 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8200 (remote_prepare): New function with most of the TCP code from ...
8201 (remote_open): ... here. Detect PORT here unconditionally. Move also
8202 setting transport_is_reliable.
8203 * server.c (run_once): New variable.
8204 (gdbserver_usage): Document it.
8205 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8206 the first run if RUN_ONCE.
8207 * server.h (run_once, remote_prepare): New declarations.
8209 2011-04-19 Tom Tromey <tromey@redhat.com>
8211 * win32-low.c (handle_load_dll): Remove duplicate "the".
8213 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8215 Remove support for old Cygwin 1.5 versions.
8216 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8217 function to avoid warning.
8218 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8221 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8223 * gdbserver/server.h (Macro _): Define it if not available.
8225 2011-03-14 Michael Snyder <msnyder@vmware.com>
8227 * hostio.c (handle_close): Remove unnecessary null test.
8229 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8231 * Makefile.in (maintainer-clean realclean distclean): Remove
8232 "make ... subdir_do" command.
8234 2011-03-10 Michael Snyder <msnyder@vmware.com>
8236 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8238 * server.c (handle_v_run): Free alloced buffer on early return.
8240 2011-03-09 Yao Qi <yao@codesourcery.com>
8243 2011-03-04 Yao Qi <yao@codesourcery.com>
8245 * Makefile.in: Remove GNU make feature --directory.
8247 2011-03-05 Yao Qi <yao@codesourcery.com>
8249 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8250 (subdir_do): New make target. Copied from gdb/Makefile.
8251 (maintainer-clean, realclean, distclean, clean): Call corresponding
8252 make targets in common/Makefile.
8254 2011-02-11 Yao Qi <yao@codesourcery.com>
8256 * configure.ac: Call AC_PROG_RANLIB.
8257 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8258 * configure: Regenerate.
8260 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8262 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8264 2011-03-06 Yao Qi <yao@codesourcery.com>
8266 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8268 2011-03-05 Yao Qi <yao@codesourcery.com>
8270 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8271 (subdir_do): New make target. Copied from gdb/Makefile.
8272 (maintainer-clean, realclean, distclean, clean): Call corresponding
8273 make targets in common/Makefile.
8275 2011-03-04 Yao Qi <yao@codesourcery.com>
8277 * Makefile.in: Remove GNU make feature --directory.
8279 2011-03-04 Michael Snyder <msnyder@vmware.com>
8281 * server.c (queue_stop_reply): Call xmalloc not malloc.
8283 2011-03-02 Michael Snyder <msnyder@vmware.com>
8285 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8287 2011-02-28 Michael Snyder <msnyder@vmware.com>
8289 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8290 (cmd_qtframe): Ditto.
8291 (cmd_qtbuffer): Ditto.
8292 (cmd_bigqtbuffer): Ditto.
8294 * utils.c (decimal2str): Initialize 'width' to nine, then
8297 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8299 * hostio.c (require_data): Free *data, not data.
8301 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8303 * hostio.c (require_data): Use free, not xfree.
8305 2011-02-27 Michael Snyder <msnyder@vmware.com>
8307 * server.c (handle_query): Discard unused value.
8309 * hostio.c (require_data): Free malloc memory before returning
8312 2011-02-26 Michael Snyder <msnyder@vmware.com>
8314 * linux-low.c (list_threads): Call closedir for dirent.
8316 2011-02-27 Michael Snyder <msnyder@vmware.com>
8318 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8319 a case statement falls through.
8321 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8323 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8326 2011-02-26 Michael Snyder <msnyder@vmware.com>
8328 * utils.c (decimal2str): Eliminate dead code and dead param.
8329 (pulongest): Drop dead param from call to decimal2str.
8332 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8334 Revert the following patch (not approved yet):
8335 2011-02-21 Hui Zhu <teawater@gmail.com>
8336 * tracepoint.c (tp_printf): New function.
8337 (eval_agent_expr): Handle gdb_agent_op_printf.
8339 2011-02-21 Hui Zhu <teawater@gmail.com>
8341 * tracepoint.c (tp_printf): New function.
8342 (eval_agent_expr): Handle gdb_agent_op_printf.
8344 2011-02-18 Tom Tromey <tromey@redhat.com>
8346 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8347 (tracepoint.o): Likewise.
8348 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8349 (gdb_agent_op_names): Likewise.
8351 2011-02-18 Tom Tromey <tromey@redhat.com>
8353 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8354 gdb_agent_op_rot>: New constants.
8355 (gdb_agent_op_names): Add pick and roll.
8356 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8359 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8361 * aclocal.m4: Regenerated with aclocal-1.11.1.
8363 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8365 * server.c (handle_qxfer_traceframe_info): New.
8366 (qxfer_packets): Register "traceframe-info".
8367 (handle_query): Report support for qXfer:traceframe-info:read+.
8368 * tracepoint.c (match_blocktype): New.
8369 (traceframe_find_block_type): Rename to ...
8370 (traceframe_walk_blocks): ... this. Add callback filter argument,
8372 (traceframe_find_block_type): New, reimplemented on top of
8373 traceframe_walk_blocks.
8374 (build_traceframe_info_xml): New.
8375 (traceframe_read_info): New.
8376 * server.h (traceframe_read_info): Declare.
8378 2011-02-11 Yao Qi <yao@codesourcery.com>
8380 * configure.ac: Call AC_PROG_RANLIB.
8381 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8382 * configure: Regenerate.
8384 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8386 * server.c (gdb_read_memory): Change return semantics to allow
8388 (handle_search_memory_1): Adjust.
8389 (process_serial_event) <'m' packet>: Handle partial transfers.
8390 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8392 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8394 * regcache.c (init_register_cache): Initialize
8395 regcache->register_status.
8396 (free_register_cache): Release regcache->register_status.
8397 (regcache_cpy): Copy register_status.
8398 (registers_to_string): Print 'x's for unavailable registers.
8399 (supply_register): Mark the register's status valid or
8400 unavailable, depending on whether a buffer was passed in or not.
8401 (supply_register_zeroed): New.
8402 (supply_regblock): Mark the registers' status valid or
8403 unavailable, depending on whether a buffer was passed in or not.
8404 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8405 (struct regcache): New `register_status' field.
8406 (supply_register_zeroed): Declare.
8407 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8408 supply_register_zeroed, rather than passing a NULL buffer to
8410 * tracepoint.c (fetch_traceframe_registers): Update comment.
8412 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8414 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8417 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8419 * server.h (decode_xfer_write): Change prototype.
8420 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8421 and don't extract the annex here.
8422 * server.c (decode_xfer_read): Remove `annex' parameter,
8423 and don't extract the annex here.
8425 (struct qxfer): New.
8426 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8427 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8428 (handle_qxfer_statictrace): New functions, abstracted out from
8429 handle_query, and made to use the struct qxfer interface.
8430 (handle_threads_qxfer_proper): Rename to ...
8431 (handle_qxfer_threads_proper): ... this.
8432 (handle_threads_qxfer): Rename to ...
8433 (handle_qxfer_threads): ... this. Adjust.
8434 (qxfer_packets): New array.
8435 (handle_qxfer): New function.
8436 (handle_query): Use handle_qxfer.
8438 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8440 * gdbreplay.c: Shorten lines of >= 80 columns.
8441 * linux-low.c: Ditto.
8442 * linux-ppc-low.c: Ditto.
8443 * linux-s390-low.c: Ditto.
8444 * linux-sparc-low.c: Ditto.
8445 * linux-x86-low.c: Ditto.
8446 * linux-xtensa-low.c: Ditto.
8447 * mem-break.c: Ditto.
8449 * regcache.h: Ditto.
8450 * remote-utils.c: Ditto.
8453 * thread-db.c: Ditto.
8454 * tracepoint.c: Ditto.
8456 * win32-low.h: Ditto.
8458 2011-01-05 Joel Brobecker <brobecker@adacore.com>
8460 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8463 2011-01-01 Joel Brobecker <brobecker@adacore.com>
8465 * server.c (gdbserver_version): Update copyright year in version
8467 * gdbreplay.c (gdbreplay_version): Ditto.
8469 2010-12-29 Jie Zhang <jie.zhang@analog.com>
8471 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8472 * linux-bfin-low.c: New file.
8473 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8474 PT_DATA_ADDR for BFIN targets.
8475 * Makefile.in (SFILES): Add linux-bfin-low.c.
8476 (clean): Remove reg-bfin.c.
8477 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8478 * README: Mention supported Blackfin targets.
8480 2010-12-23 Mike Frysinger <vapier@gentoo.org>
8482 * .gitignore: New file.
8484 2010-11-16 Mike Frysinger <vapier@gentoo.org>
8486 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8488 2010-10-22 Jie Zhang <jie@codesourcery.com>
8490 * Makefile.in: Add FLAGS_TO_PASS variable.
8491 (install): Remove dependency of install-only and recursively
8492 invoke make for install-only.
8494 2010-10-04 Doug Evans <dje@google.com>
8496 * Makefile.in (uninstall): Use $(DESTDIR).
8498 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8502 * linux-x86-low.c (compat_siginfo_from_siginfo)
8503 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8504 si_code is < 0. Check for si_code == SI_TIMER before checking for
8507 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8509 * lynx-i386-low.c: New file.
8510 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8512 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8514 * lynx-low.c (ptrace_request_to_str): Remove handling for
8515 request values that have been removed in LynxOS 5.x.
8517 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8519 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8522 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8524 * configure.ac: Add --enable-inprocess-agent option.
8525 * configure: Rebuilt.
8527 2010-09-06 Yao Qi <yao@codesourcery.com>
8529 * linux-low.c (linux_kill): Remove unused variable.
8530 (linux_stabilize_threads): Likewise.
8531 * server.c (start_inferior): Likewise.
8532 (queue_stop_reply_callback): Likewise.
8533 * tracepoint.c (do_action_at_tracepoint): Likewise.
8535 2010-09-06 Yao Qi <yao@codesourcery.com>
8537 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8540 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8542 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8544 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8546 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8549 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8551 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8552 gdbserver/lynx-ppc-low.c: New files.
8553 * Makefile.in (lynx_low_h): New variable.
8554 (lynx-low.o, lynx-ppc-low.o): New rules.
8555 * configure.ac: On LynxOS, link with -lnetinet.
8556 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8557 * configure: regenerate.
8559 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8561 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8562 * configure.ac: Add check for vasprintf and vsnprintf.
8563 * configure, config.in: Regenerate.
8564 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8566 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8568 * gdbreplay.c: Move include of alloca.h up, next to include of
8570 * server.h: Add include of malloc.h.
8571 * mem-break.c: Remove include of malloc.h.
8572 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8574 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8576 * Makefile.in (memmem.o): Build with -Wno-error.
8578 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8580 * utils.c (xsnprintf): Make non-static.
8581 * server.h: Add xsnprintf declaration.
8582 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8583 replace calls to snprintf by calls to xsnprintf throughout.
8585 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8587 * configure.ac: Add configure check for alloca.
8588 * configure, config.in: Regenerate.
8589 * server.h: Include alloca.h if it exists.
8590 * gdbreplay.c: Include alloca.h if it exists.
8592 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8594 * linux-low.c (__SIGRTMIN): Define if not already defined.
8595 (linux_create_inferior): Check for __ANDROID__ rather than
8597 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8598 are already deferred.
8599 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8600 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8601 stopped and already has a pending signal to report.
8602 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8603 a pending signal to report or is moving out of a jump pad.
8604 (linux_init_signals): Check for __ANDROID__ rather than
8607 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8609 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8610 debug_threads check. Avoid a linear search when not doing debug
8613 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8615 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8616 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8617 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8618 (process_event): Change local fd's type to gdb_fildes_t.
8619 (create_file_handler): Adjust prototype.
8620 (delete_file_handler): Adjust prototype.
8621 (handle_file_event): Adjust prototype. Use pfildes.
8622 (create_file_event): Adjsut prototype.
8623 * remote-utils.c (remote_desc, listen_desc): Change type to
8625 * server.h: New gdb_fildes_t typedef.
8626 [USE_WIN32API]: Include winsock2.h.
8627 (delete_file_handler, add_file_handler): Adjust prototypes.
8629 * utils.c (pfildes): New.
8631 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8633 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8634 * configure: Regenerate.
8636 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8638 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8639 (linux_done_accessing_memory): ... this.
8640 (linux_target_ops): Adjust.
8641 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8642 * nto-low.c (nto_target_ops): Adjust comment.
8643 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8644 * spu-low.c (spu_target_ops): Adjust comment.
8645 * target.h (target_ops): Rename unprepare_to_access_memory field
8646 to done_accessing_memory.
8647 (unprepare_to_access_memory): Rename to ...
8648 (done_accessing_memory): ... this.
8650 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8652 * linux-low.c (linux_prepare_to_access_memory): New.
8653 (linux_unprepare_to_access_memory): New.
8654 (linux_target_ops): Install them.
8655 * server.c (read_memory): Rename to ...
8656 (gdb_read_memory): ... this. Use
8657 prepare_to_access_memory/prepare_to_access_memory.
8658 (write_memory): Rename to ...
8659 (gdb_write_memory): ... this. Use
8660 prepare_to_access_memory/prepare_to_access_memory.
8661 (handle_search_memory_1): Adjust.
8662 (process_serial_event): Adjust.
8663 * target.h (struct target_ops): New fields
8664 prepare_to_access_memory and unprepare_to_access_memory.
8665 (prepare_to_access_memory, unprepare_to_access_memory): New.
8666 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8667 prepare_to_access_memory/prepare_to_access_memory.
8668 * nto-low.c (nto_target_ops): Adjust.
8669 * spu-low.c (spu_target_ops): Adjust.
8670 * win32-low.c (win32_target_ops): Adjust.
8672 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8674 * Makefile.in (WARN_CFLAGS): Get it from configure.
8675 (WERROR_CFLAGS): New.
8676 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8677 * configure.ac: Introduce --enable-werror, which adds -Werror to
8678 the compiler command line. Enabled by default. Disable with
8679 --disable-werror. Add -Wdeclaration-after-statement
8680 Wpointer-arith and -Wformat-nonliteral to warning flags.
8681 * configure: Regenerate.
8683 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8685 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8687 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8689 * gdbreplay.c (remote_error): New.
8691 (expect): Use gdbchar. Check for error reading from GDB.
8692 Clarify sync error output.
8693 (play): Check for errors writing to GDB.
8694 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8695 * remote-utils.c (getpkt): Check for errors writing to the remote
8698 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8700 * linux-low.c (linux_wait_1): Move non-debugging code out of
8701 `debug_threads' control.
8703 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8705 * linux-low.c (linux_wait_1): Don't set last_status here.
8706 * server.c (push_event, queue_stop_reply_callback): Assert we're
8707 not pushing a TARGET_WAITKIND_IGNORE event.
8708 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8709 (myresume, handle_target_event): Set the thread's last_resume_kind
8710 and last_status from the target returned status.
8712 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8716 * linux-x86-low.c (update_debug_registers_callback): New.
8717 (i386_dr_low_set_addr): Use it.
8718 (i386_dr_low_get_addr): New.
8719 (i386_dr_low_set_control): Use update_debug_registers_callback.
8720 (i386_dr_low_get_control): New.
8721 (i386_dr_low_get_status): Adjust.
8722 * linux-low.c (linux_stop_lwp): New.
8723 * linux-low.h (linux_stop_lwp): Declare.
8725 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8726 argument instead of a i386_debug_reg_state.
8727 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8728 a i386_debug_reg_state.
8729 (i386_insert_aligned_watchpoint): Adjust.
8730 (i386_remove_aligned_watchpoint): Adjust.
8731 (i386_low_stopped_data_address): Read the debug registers from the
8732 inferior instead of from the mirrors.
8733 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8734 (i386_dr_low_get_addr): Declare.
8735 (i386_dr_low_get_control): Declare.
8736 (i386_dr_low_get_status): Change prototype.
8738 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8739 (i386_dr_low_get_addr): New.
8740 (i386_dr_low_get_control): New.
8741 (i386_dr_low_get_status): Adjust prototype. Return
8743 (i386_initial_stuff): Clear dr_status_mirror and
8745 (i386_get_thread_context): Adjust.
8746 (i386_set_thread_context): Adjust.
8747 (i386_thread_added): Adjust.
8749 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8751 * linux-low.h (linux_thread_area): Delete declaration.
8753 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8755 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8756 after its termination.
8758 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8760 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8761 (gdb_wants_all_stopped): Delete.
8762 (linux_wait_1): Don't call them.
8763 * server.c (handle_v_cont): Tag all threads as want-stopped.
8764 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8765 stopped as "client-wants-stopped".
8767 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8769 * Makefile.in (signals_h): New.
8770 (server_h): Depend on it.
8771 (server.o): Don't depend on $(signals_def).
8772 (signals.o): Depend on $(signals_def).
8774 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8776 * Makefile.in (signals_def): New.
8777 (server_h): Append include/gdb/signals.h and signals_def.
8778 (server.o): Append signals_def.
8780 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8782 * server.c (handle_target_event): Use target_signal_to_host for
8783 resume_info.sig initialization.
8784 * target.h (struct thread_resume) <sig>: New comment.
8786 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8788 * server.c (handle_query): strcpy() the returned string from paddress()
8789 instead of sprintf().
8790 * utils.c (paddress): Return phex_nz().
8792 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8794 * server.c (handle_v_cont): Call mourn_inferior if process
8796 (myresume): Likewise.
8798 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8800 Static tracepoints, and integration with UST.
8802 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8803 * mem-break.c (uninsert_all_breakpoints)
8804 (reinsert_all_breakpoints): New.
8805 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8806 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8807 (gdb_agent_ust_loaded, helper_thread_id)
8808 (gdb_agent_helper_thread_id): New macros.
8809 (struct ipa_sym_addresses): Add addr_ust_loaded,
8810 addr_helper_thread_id, addr_cmd_buf.
8811 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8812 (in_process_agent_loaded_ust): New.
8813 (write_e_ust_not_loaded): New.
8814 (maybe_write_ipa_ust_not_loaded): New.
8815 (struct collect_static_trace_data_action): New.
8816 (enum tracepoint_type) <static_tracepoint>: New.
8817 (struct tracepoint) <handle>: Mention static tracepoints.
8818 (struct static_tracepoint_ctx): New.
8819 (CMD_BUF_SIZE): New.
8820 (add_tracepoint_action): Handle static tracepoint actions.
8821 (unprobe_marker_at): New.
8822 (clear_installed_tracepoints): Handle static tracepoints.
8823 (cmd_qtdp): Handle static tracepoints.
8824 (probe_marker_at): New.
8825 (cmd_qtstart): Handle static tracepoints.
8826 (response_tracepoint): Handle static tracepoints.
8827 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8828 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8829 (get_context_regcache): Handle static tracepoints.
8830 (do_action_at_tracepoint): Handle static tracepoint actions.
8831 (traceframe_find_block_type): Handle static trace data blocks.
8832 (traceframe_read_sdata): New.
8833 (download_tracepoints): Download static tracepoint actions.
8834 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8835 (GDB_PROBE_NAME): New.
8840 (ust_marker_to_static_tracepoint): New.
8842 (collect_ust_data_at_tracepoint): New.
8843 (gdb_ust_probe): New.
8844 (UNIX_PATH_MAX, SOCK_DIR): New.
8845 (gdb_ust_connect_sync_socket): New.
8846 (resume_thread, stop_thread): New.
8847 (run_inferior_command): New.
8848 (init_named_socket): New.
8849 (gdb_ust_socket_init): New.
8850 (cstr_to_hexstr): New.
8852 (first_marker, next_marker): New.
8853 (response_ust_marker): New.
8854 (cmd_qtfstm, cmd_qtsstm): New.
8855 (unprobe_marker_at, probe_marker_at): New.
8856 (cmd_qtstmat, gdb_ust_thread): New.
8857 (gdb_ust_init): New.
8858 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8859 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8861 (x86_64_st_collect_regmap): New.
8862 (X86_64_NUM_ST_COLLECT_GREGS): New.
8863 (AMD64_RIP_REGNUM): New.
8864 (supply_static_tracepoint_registers): New.
8865 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8867 (i386_st_collect_regmap): New.
8868 (i386_NUM_ST_COLLECT_GREGS): New.
8869 (supply_static_tracepoint_registers): New.
8870 * server.c (handle_query): Handle qXfer:statictrace:read.
8871 <qSupported>: Report support for StaticTracepoints, and
8872 qXfer:statictrace:read features.
8873 * server.h (traceframe_read_sdata)
8874 (supply_static_tracepoint_registers): Declare.
8875 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8876 (unpack_varlen_hex): Include in IPA build.
8877 * Makefile.in (ustlibs, ustinc): New.
8878 (IPA_OBJS): Add remote-utils-ipa.o.
8879 ($(IPA_LIB)): Link -ldl and -lpthread.
8881 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8882 * config.in, configure: Regenerate.
8884 2010-06-20 Ian Lance Taylor <iant@google.com>
8885 Pedro Alves <pedro@codesourcery.com>
8887 * linux-x86-low.c (always_true): Delete.
8888 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8889 trying to fool the compiler with always_true.
8891 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8893 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8894 conditions in gdbserver.
8896 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8898 * spu-low.c (spu_read_memory): Wrap around local store limit.
8899 (spu_write_memory): Likewise.
8901 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8903 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8904 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8906 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8908 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8909 uses with LONGEST uses.
8911 2010-06-14 Stan Shebs <stan@codesourcery.com>
8912 Pedro Alves <pedro@codesourcery.com>
8916 * linux-x86-low.c: Include limits.h.
8921 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8922 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8923 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8924 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8925 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8926 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8927 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8928 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8929 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8930 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8931 (amd64_emit_void_call_2): New.
8932 (amd64_emit_ops): New.
8933 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8934 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8935 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8936 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8937 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8938 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8939 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8940 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8941 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8942 (i386_emit_stack_adjust, i386_emit_int_call_1)
8943 (i386_emit_void_call_2): New.
8944 (i386_emit_ops): New.
8945 (x86_emit_ops): New.
8946 (the_low_target): Install x86_emit_ops.
8947 * server.h (struct emit_ops): New.
8948 (get_raw_reg_func_addr): Declare.
8949 (current_insn_ptr, emit_error): Declare.
8950 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8951 (set_trace_state_variable_value): New defines.
8952 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8953 addr_get_trace_state_variable_value and
8954 addr_set_trace_state_variable_value.
8955 (symbol_list): New fields for get_raw_reg,
8956 get_trace_state_variable_value and set_trace_state_variable_value.
8957 (condfn): New typedef.
8958 (struct tracepoint): New field `compiled_cond'.
8959 (do_action_at_tracepoint): Clear compiled_cond.
8960 (get_trace_state_variable_value, set_trace_state_variable_value):
8962 (condition_true_at_tracepoint): If there's a compiled condition,
8964 (current_insn_ptr, emit_error): New globals.
8965 (struct bytecode_address): New.
8966 (get_raw_reg_func_addr): New.
8967 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8968 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8969 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8970 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8971 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8972 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8973 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8974 (compile_tracepoint_condition, compile_bytecodes): New.
8975 * target.h (emit_ops): Forward declare.
8976 (struct target_ops): New field emit_ops.
8977 (target_emit_ops): New.
8978 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8979 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8980 * linux-low.c (linux_emit_ops): New.
8981 (linux_target_ops): Install it.
8982 * linux-low.h (struct linux_target_ops): New field emit_ops.
8984 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8986 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8987 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8989 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8990 Stan Shebs <stan@codesourcery.com>
8992 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8993 (all): Depend on $(extra_libraries).
8994 (install-only): Install the IPA.
8995 (IPA_OBJS, IPA_LIB): New.
8996 (clean): Remove the IPA lib.
8997 (IPAGENT_CFLAGS): New.
8998 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8999 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9000 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9001 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9002 * configure.ac: Check for atomic builtins support in the compiler.
9003 (IPA_DEPFILES, extra_libraries): Define.
9004 * configure.srv (ipa_obj): Add description.
9005 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9006 (i[34567]86-*-linux*): Set ipa_obj.
9007 (x86_64-*-linux*): Set ipa_obj.
9008 * linux-low.c (stabilizing_threads): New.
9009 (supports_fast_tracepoints): New.
9010 (linux_detach): Stabilize threads before detaching.
9011 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9012 the lwp is either not stabilizing, or is moving out of a jump pad.
9013 (linux_fast_tracepoint_collecting): New.
9014 (maybe_move_out_of_jump_pad): New.
9015 (enqueue_one_deferred_signal): New.
9016 (dequeue_one_deferred_signal): New.
9017 (linux_wait_for_event_1): If moving out of a jump pad, defer
9018 pending signals to later.
9019 (linux_stabilize_threads): New.
9020 (linux_wait_1): Check if threads need moving out of jump pads, and
9022 (stuck_in_jump_pad_callback): New.
9023 (move_out_of_jump_pad_callback): New.
9025 (linux_resume_one_lwp): Handle moving out of jump pads.
9026 (linux_set_resume_request): Dequeue deferred signals.
9027 (need_step_over_p): Also step over fast tracepoint jumps.
9028 (start_step_over): Also uninsert fast tracepoint jumps.
9029 (finish_step_over): Also reinsert fast tracepoint jumps.
9030 (linux_install_fast_tracepoint_jump): New.
9031 (linux_target_ops): Install linux_stabilize_threads and
9032 linux_install_fast_tracepoint_jump_pad.
9033 * linux-low.h (linux_target_ops) <get_thread_area,
9034 install_fast_tracepoint_jump_pad>: New fields.
9035 (struct lwp_info) <collecting_fast_tracepoint,
9036 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9037 (linux_get_thread_area): Declare.
9038 * linux-x86-low.c (jump_insn): New.
9039 (x86_get_thread_area): New.
9040 (append_insns): New.
9042 (amd64_install_fast_tracepoint_jump_pad): New.
9043 (i386_install_fast_tracepoint_jump_pad): New.
9044 (x86_install_fast_tracepoint_jump_pad): New.
9045 (the_low_target): Install x86_get_thread_area and
9046 x86_install_fast_tracepoint_jump_pad.
9047 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9048 (struct fast_tracepoint_jump): New.
9049 (fast_tracepoint_jump_insn): New.
9050 (fast_tracepoint_jump_shadow): New.
9051 (find_fast_tracepoint_jump_at): New.
9052 (fast_tracepoint_jump_here): New.
9053 (delete_fast_tracepoint_jump): New.
9054 (set_fast_tracepoint_jump): New.
9055 (uninsert_fast_tracepoint_jumps_at): New.
9056 (reinsert_fast_tracepoint_jumps_at): New.
9057 (set_breakpoint_at): Use write_inferior_memory.
9058 (uninsert_raw_breakpoint): Use write_inferior_memory.
9059 (check_mem_read): Mask out fast tracepoint jumps.
9060 (check_mem_write): Mask out fast tracepoint jumps.
9061 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9062 (set_fast_tracepoint_jump): Declare.
9063 (delete_fast_tracepoint_jump)
9064 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9065 (reinsert_fast_tracepoint_jumps_at): Declare.
9066 * regcache.c: Don't compile many functions when building the
9067 in-process agent library.
9068 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9069 the register buffer in the heap.
9070 (free_register_cache): If the register buffer isn't owned by the
9071 regcache, don't free it.
9072 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9073 pre-existing register caches.
9074 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9076 (convert_ascii_to_int): : Constify `from' parameter type.
9077 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9078 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9079 the needed buffer in-place.
9080 (relocate_instruction): New.
9081 * server.c (handle_query) <qSymbols>: If the target supports
9082 tracepoints, give it a chance of looking up symbols. Report
9083 support for fast tracepoints.
9084 (handle_status): Stabilize threads.
9085 (process_serial_event): Adjust.
9086 * server.h (struct fast_tracepoint_jump): Forward declare.
9087 (struct process_info) <fast_tracepoint_jumps>: New field.
9088 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9089 (decode_X_packet, decode_M_packet): Adjust.
9090 (relocate_instruction): Declare.
9091 (in_process_agent_loaded): Declare.
9092 (tracepoint_look_up_symbols): Declare.
9093 (struct fast_tpoint_collect_status): Declare.
9094 (fast_tracepoint_collecting): Declare.
9095 (force_unlock_trace_buffer): Declare.
9096 (handle_tracepoint_bkpts): Declare.
9097 (initialize_low_tracepoint)
9098 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9099 * target.h (struct target_ops) <stabilize_threads,
9100 install_fast_tracepoint_jump_pad>: New fields.
9101 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9102 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9103 [HAVE_STDINT_H]: Include stdint.h.
9104 (trace_debug_1): Rename to ...
9105 (trace_vdebug): ... this.
9106 (trace_debug): Rename to ...
9107 (trace_debug_1): ... this. Add `level' parameter.
9109 (ATTR_USED, ATTR_NOINLINE): New.
9110 (IP_AGENT_EXPORT): New.
9111 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9112 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9113 (about_to_request_buffer_space, trace_buffer_is_full)
9114 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9115 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9116 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9117 (traceframe_write_count, traceframes_created)
9118 (trace_state_variables)
9119 New renaming defines.
9120 (struct ipa_sym_addresses): New.
9121 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9123 (ipa_sym_addrs): New.
9124 (all_tracepoint_symbols_looked_up): New.
9125 (in_process_agent_loaded): New.
9126 (write_e_ipa_not_loaded): New.
9127 (maybe_write_ipa_not_loaded): New.
9128 (tracepoint_look_up_symbols): New.
9129 (debug_threads) [IN_PROCESS_AGENT]: New.
9130 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9131 (UNKNOWN_SIDE_EFFECTS): New.
9132 (stop_tracing): New.
9133 (flush_trace_buffer): New.
9134 (stop_tracing_bkpt): New.
9135 (flush_trace_buffer_bkpt): New.
9136 (read_inferior_integer): New.
9137 (read_inferior_uinteger): New.
9138 (read_inferior_data_pointer): New.
9139 (write_inferior_data_pointer): New.
9140 (write_inferior_integer): New.
9141 (write_inferior_uinteger): New.
9142 (struct collect_static_trace_data_action): Delete.
9143 (enum tracepoint_type): New.
9144 (struct tracepoint) <type>: New field `type'.
9145 <actions_str, step_actions, step_actions_str>: Only include in
9147 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9148 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9149 (tracepoints): Use IP_AGENT_EXPORT.
9150 (last_tracepoint): Don't include in the IPA.
9151 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9152 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9153 (alloced_trace_state_variables): New.
9154 (trace_state_variables): Use IP_AGENT_EXPORT.
9155 (traceframe_t): Delete unused variable.
9156 (circular_trace_buffer): Don't include in the IPA.
9157 (trace_buffer_start): Delete.
9158 (struct trace_buffer_control): New.
9159 (trace_buffer_free): Delete.
9160 (struct ipa_trace_buffer_control): New.
9161 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9162 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9164 (trace_buffer_ctrl): New.
9165 (TRACE_BUFFER_CTRL_CURR): New.
9166 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9167 Reimplement as macros.
9168 (trace_buffer_wrap): Delete.
9169 (traceframe_write_count, traceframe_read_count)
9170 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9171 (struct tracepoint_hit_ctx) <type>: New field.
9172 (struct fast_tracepoint_ctx): New.
9173 (memory_barrier): New.
9175 (record_tracepoint_error): Update atomically in the IPA.
9176 (clear_inferior_trace_buffer): New.
9177 (about_to_request_buffer_space): New.
9178 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9179 updating the same buffer.
9180 (add_tracepoint): Default the tracepoint's type to trap
9181 tracepoint, and orig_size to -1.
9182 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9184 (create_trace_state_variable): New parameter `gdb'. Handle it.
9185 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9186 (cmd_qtdp): Handle fast tracepoints.
9188 (max_jump_pad_size): New.
9189 (gdb_jump_pad_head): New.
9190 (get_jump_space_head): New.
9191 (claim_jump_space): New.
9192 (sort_tracepoints): New.
9193 (MAX_JUMP_SIZE): New.
9194 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9196 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9197 support. Upload fast traceframes, and delete internal IPA
9199 (stop_tracing_handler): New.
9200 (flush_trace_buffer_handler): New.
9201 (cmd_qtstop): Upload fast tracepoints.
9202 (response_tracepoint): Handle fast tracepoints.
9203 (tracepoint_finished_step): Upload fast traceframes. Set the
9204 tracepoint hit context's tracepoint type.
9205 (handle_tracepoint_bkpts): New.
9206 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9207 type. Add comment about fast tracepoints.
9208 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9209 non-existing action_str field.
9210 (get_context_regcache): Handle fast tracepoints.
9211 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9213 (fast_tracepoint_from_jump_pad_address): New.
9214 (fast_tracepoint_from_ipa_tpoint_address): New.
9215 (collecting_t): New.
9216 (force_unlock_trace_buffer): New.
9217 (fast_tracepoint_collecting): New.
9220 (write_inferior_data_ptr): New.
9221 (target_tp_heap): New.
9222 (target_malloc): New.
9223 (download_agent_expr): New.
9225 (download_tracepoints): New.
9226 (download_trace_state_variables): New.
9227 (upload_fast_traceframes): New.
9228 (IPA_FIRST_TRACEFRAME): New.
9229 (IPA_NEXT_TRACEFRAME_1): New.
9230 (IPA_NEXT_TRACEFRAME): New.
9231 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9232 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9233 (gdb_jump_pad_buffer_end): New.
9234 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9235 (initialize_tracepoint): Adjust.
9236 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9237 buffer. Initialize the low module.
9238 * utils.c (PREFIX, TOOLNAME): New.
9239 (malloc_failure): Use PREFIX.
9240 (error): In the IPA, an error causes an exit.
9241 (fatal, warning): Use PREFIX.
9242 (internal_error): Use TOOLNAME.
9243 (NUMCELLS): Increase to 10.
9244 * configure, config.in: Regenerate.
9246 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9248 * server.c (handle_query) <qSupported>: Do two passes over the
9249 qSupported string to avoid nesting strtok.
9251 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9253 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9255 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9257 * configure: Regenerate.
9258 * proc-service.list: New.
9260 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9262 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9265 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9267 * gdbreplay.c (remote_open): Check error return from socket() call by
9268 its equality to -1 not by it being negative.
9269 * remote-utils.c (remote_open): Likewise.
9271 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9273 * config.h: Regenerate.
9275 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9277 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9278 doesn't provide PTRACE_GET_THREAD_AREA.
9280 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9282 * linux-m68k-low.c: Include <asm/ptrace.h>
9283 (ps_get_thread_area): Implement.
9285 2010-05-03 Doug Evans <dje@google.com>
9287 * event-loop.c (struct callback_event): New struct.
9288 (callback_list): New global.
9289 (append_callback_event, delete_callback_event): New functions.
9290 (process_callback): New function.
9291 (start_event_loop): Call it.
9292 * remote-utils.c (NOT_SCHEDULED): Define.
9293 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9294 moved out of readchar.
9295 (readchar): Rewrite. Call reschedule before returning.
9296 (reset_readchar): New function.
9297 (remote_close): Call it.
9298 (process_remaining, reschedule): New functions.
9299 * server.h (callback_handler_func): New typedef.
9300 (append_callback_event, delete_callback_event): Declare.
9302 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9304 * proc-service.c (ps_pglobal_lookup): Use
9305 thread_db_look_up_one_symbol.
9306 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9307 parameter. Use it instead of all_symbols_looked_up.
9308 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9310 (all_symbols_looked_up): Don't declare.
9311 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9312 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9314 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9315 Set all_symbols_looked_up here.
9316 (thread_db_look_up_one_symbol): New.
9317 (thread_db_get_tls_address): Adjust.
9318 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9319 thread_db object on the heap, and tentatively set it in the
9321 (thread_db_init): Don't set all_symbols_looked_up here.
9322 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9324 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9326 * linux-low.c (linux_kill, linux_detach): Adjust.
9327 (status_pending_p_callback): Remove redundant statement. Check
9328 for !TARGET_WAITIKIND_IGNORE, instead of
9329 TARGET_WAITKIND_STOPPED.
9330 (handle_tracepoints): Make sure LWP is locked. Adjust.
9331 (linux_wait_for_event_1): Adjust.
9332 (linux_cancel_breakpoints): New.
9333 (unsuspend_one_lwp): New.
9334 (unsuspend_all_lwps): New.
9335 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9336 (send_sigstop_callback): Change return type to int, add new
9337 `except' parameter and handle it.
9338 (suspend_and_send_sigstop_callback): New.
9339 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9340 pass them down. If SUSPEND, also increment the lwp's suspend
9342 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9343 (need_step_over_p): Don't consider suspended LWPs.
9344 (start_step_over): Adjust.
9345 (proceed_one_lwp): Change return type to int, add new `except'
9346 parameter and handle it.
9347 (unsuspend_and_proceed_one_lwp): New.
9348 (proceed_all_lwps): Use find_inferior instead of
9350 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9351 also decrement the suspend count of LWPs. Pass `except' down,
9352 instead of hacking its suspend count.
9353 (linux_pause_all): Add `freeze' parameter. Adjust.
9354 (linux_unpause_all): New.
9355 (linux_target_ops): Install linux_unpause_all.
9356 * server.c (handle_status): Adjust.
9357 * target.h (struct target_ops): New fields `unpause_all' and
9358 `cancel_breakpoints'. Add new parameter to `pause_all'.
9359 (pause_all): Add new `freeze' parameter.
9361 (cancel_breakpoints): New.
9362 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9364 (cmd_qtstart): Pause threads.
9365 (stop_tracing): Pause threads, and cancel breakpoints.
9366 * win32-low.c (win32_target_ops): Adjust.
9368 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9370 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9371 the inferior right away from here...
9372 (linux_wait_1): ... to here, and adjust to check the thread's
9373 last_resume_kind instead of the lwp's step or stop_expected flags.
9375 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9377 * README: Use consistent `GDB' and `GDBserver' spellings.
9379 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9381 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9382 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9383 (linux_detach_one_lwp): Assume the lwp is stopped.
9384 (any_thread_of): Delete.
9385 (linux_detach): Stop all lwps here. Don't blindly delete all
9387 (delete_lwp_callback): New.
9388 (linux_mourn): Delete all lwps of the process that is gone.
9389 (linux_wait_1): Don't delete the last lwp of the process here.
9390 * mem-break.h (mark_breakpoints_out): Declare.
9391 * mem-break.c (mark_breakpoints_out): New.
9392 (free_all_breakpoints): Use it.
9393 * server.c (handle_target_event): If the process is gone, mark
9395 * thread-db.c (struct thread_db) <create_bp>: New field.
9396 (thread_db_enable_reporting): Fix prototype. Store a thread event
9397 breakpoint reference in the thread_db struct.
9398 (thread_db_load_search): Clear the thread_db object.
9399 (try_thread_db_load_1): Ditto.
9400 (switch_to_process): New.
9401 (disable_thread_event_reporting): Use it.
9402 (remove_thread_event_breakpoints): New.
9403 (thread_db_detach, thread_db_mourn): Use it.
9405 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9407 * linux-low.c (linux_enable_event_reporting): New.
9408 (linux_wait_for_event_1, handle_extended_wait): Use it.
9410 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9412 * linux-low.c (linux_kill_one_lwp, linux_kill)
9413 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9414 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9415 SIGSTOP even if the LWP is stopped.
9416 (send_sigstop_callback): New.
9417 (stop_all_lwps): Use send_sigstop_callback instead.
9418 (linux_resume_one_thread): Adjust.
9419 (proceed_one_lwp): Still proceed an LWP that the client has
9420 requested to stop, if we haven't reported it as stopped yet. Make
9421 sure that LWPs the client want stopped, have a pending SIGSTOP.
9423 2010-04-26 Doug Evans <dje@google.com>
9425 * server.c (handle_general_set): Make static.
9427 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9428 Print received char after testing for error/eof instead of before.
9429 (input_interrupt): Tweak comment.
9431 2010-04-23 Doug Evans <dje@google.com>
9433 * server.c (start_inferior): Print inferior argv if --debug.
9435 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9437 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9438 * nto-x86-low.c: Include server.h
9440 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9442 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9443 be consistent with other sources of this directory.
9444 (init_registers_amd64): Correct name of source file of this function
9447 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9449 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9452 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9454 * win32-i386-low.c: Add 64-bit support.
9455 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9456 (init_registers_amd64): Declare.
9457 (mappings): Add 64-bit version of array.
9458 (init_windows_x86): New function.
9459 (the_low_target): Change init_arch field to init_windows_x86.
9461 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9463 * win32-low.c: Adapt to support also 64-bit architecture.
9464 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9465 (get_image_name): Use SIZE_T type for local variable `done'.
9466 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9467 (toolhelp_get_dll_name): Idem.
9468 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9469 Use uintptr_t typecast to avoid warning.
9470 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9471 (handle_exception): Use phex_nz to avoid warning.
9472 (win32_wait): Remove unused local variable `process'.
9474 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9476 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9479 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9481 * configure.ac: Use `ws2_32' library for srv_mingw.
9482 * configure: Regenerate.
9483 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9484 * remote-utils.c: Likewise.
9486 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9488 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9489 if __x86_64__ is defined.
9491 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9493 * configure: Regenerate.
9495 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9497 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9498 * target.h (target_ops): New get_tib_address field.
9499 * win32-low.h (win32_thread_info): Add thread_local_base field.
9500 * win32-low.c (child_add_thread): Add tlb argument.
9501 Set thread_local_base field to TLB.
9502 (get_child_debug_event): Adapt to child_add_thread change.
9503 (win32_get_tib_address): New function.
9504 (win32_target_ops): Set get_tib_address field to
9505 win32_get_tib_address.
9506 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9508 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9510 * linux-low.c (linux_mourn): Also remove the process.
9511 * server.c (handle_target_event): Don't remove the process here.
9512 * nto-low.c (nto_mourn): New.
9513 (nto_target_ops): Install it.
9514 * spu-low.c (spu_mourn): New.
9515 (spu_target_ops): Install it.
9516 * win32-low.c (win32_mourn): New.
9517 (win32_target_ops): Install it.
9519 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9521 * server.h (buffer_xml_printf): Remove redundant `;'.
9523 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9525 * regcache.c (set_register_cache): Invalidate regcaches before
9526 changing the register cache layout.
9527 (regcache_invalidate_one): Allow a NULL regcache.
9528 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9529 regcaches before changing the register cache layout or the target
9532 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9534 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9535 variable warning on Linux/x86-64.
9537 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9539 GDBserver disconnected tracing support.
9541 * linux-low.c (linux_remove_process): Delete.
9542 (add_lwp): Don't set last_resume_kind here.
9543 (linux_kill): Use `mourn'.
9544 (linux_detach): Use `thread_db_detach', and `mourn'.
9546 (linux_attach_lwp_1): Adjust comment.
9547 (linux_attach): last_resume_kind moved the thread_info; adjust.
9548 (status_pending_p_callback): Adjust.
9549 (linux_wait_for_event_1): Adjust.
9550 (count_events_callback, select_singlestep_lwp_callback)
9551 (select_event_lwp_callback, cancel_breakpoints_callback)
9552 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9553 (proceed_one_lwp): Adjust.
9554 (linux_async): Add debug output.
9555 (linux_thread_stopped): New.
9556 (linux_pause_all): New.
9557 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9559 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9560 (thread_db_free): Delete declaration.
9561 (thread_db_detach, thread_db_mourn): Declare.
9562 * thread-db.c (thread_db_init): Use thread_db_mourn.
9563 (thread_db_free): Delete, split in two.
9564 (disable_thread_event_reporting): New.
9565 (thread_db_detach): New.
9566 (thread_db_mourn): New.
9568 * server.h (struct thread_info) <last_resume_kind>: New field.
9569 <attached>: Add comment.
9570 <gdb_detached>: New field.
9571 (handler_func): Change return type to int.
9572 (handle_serial_event, handle_target_event): Ditto.
9573 (gdb_connected): Declare.
9575 (disconnected_tracing): Declare.
9576 (stop_tracing): Declare.
9578 * server.c (handle_query) <qSupported>: Report support for
9579 disconnected tracing.
9580 (queue_stop_reply_callback): Account for running threads.
9581 (gdb_wants_thread_stopped): New.
9582 (gdb_wants_all_threads_stopped): New.
9583 (gdb_reattached_process): New.
9584 (handle_status): Clear the `gdb_detached' flag of all processes.
9585 In all-stop, stop all threads.
9586 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9587 (process_serial_event): If the remote connection breaks, or if an
9588 exit was forced with "monitor exit", force an event loop exit.
9589 Handle disconnected tracing on detach.
9590 (handle_serial_event): Adjust.
9591 (handle_target_event): If GDB isn't connected, forward events back
9592 to the inferior, unless the last process exited, in which case,
9593 exit gdbserver. Adjust interface.
9595 * remote-utils.c (remote_open): Don't block in accept. Instead
9596 register an event loop source on the listen socket file
9597 descriptor. Refactor bits into ...
9598 (listen_desc): ... this new global.
9599 (gdb_connected): ... this new function.
9600 (enable_async_notification): ... this new function.
9601 (handle_accept_event): ... this new function.
9602 (remote_close): Clear remote_desc.
9604 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9606 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9608 (mourn_inferior): Define.
9609 (target_process_qsupported): Avoid the dangling else problem.
9610 (thread_stopped): Define.
9611 (pause_all): Define.
9612 (target_waitstatus_to_string): Declare.
9613 * target.c (target_waitstatus_to_string): New.
9615 * tracepoint.c (tracing): Make extern.
9616 (disconnected_tracing): New.
9617 (stop_tracing): Make extern. Handle tracing stops due to GDB
9619 (cmd_qtdisconnected): New.
9620 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9621 (handle_tracepoint_general_set): Handle QTDisconnected.
9623 * event-loop.c (event_handler_func): Change return type to int.
9624 (process_event): Bail out if the event handler wants the event
9626 (handle_file_event): Ditto.
9627 (start_event_loop): Bail out if the event handler wants the event
9630 * nto-low.c (nto_target_ops): Adjust.
9631 * spu-low.c (spu_wait): Don't remove the process here.
9632 (spu_target_ops): Adjust.
9633 * win32-low.c (win32_wait): Don't remove the process here.
9634 (win32_target_ops): Adjust.
9636 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9638 * regcache.c (realloc_register_cache): Invalidate inferior's
9639 regcache before recreating it.
9641 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9643 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9645 2010-04-09 Stan Shebs <stan@codesourcery.com>
9646 Pedro Alves <pedro@codesourcery.com>
9648 * server.h (LONGEST): New.
9649 (struct thread_info) <while_stepping>: New field.
9650 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9652 (initialize_tracepoint, handle_tracepoint_general_set)
9653 (handle_tracepoint_query, tracepoint_finished_step)
9654 (tracepoint_was_hit, release_while_stepping_state_list):
9655 (current_traceframe): Declare.
9656 * server.c (handle_general_set): Handle tracepoint packets.
9658 (write_memory): New.
9659 (handle_search_memory_1): Use read_memory.
9660 (handle_query): Report support for conditional tracepoints, trace
9661 state variables, and tracepoint sources. Handle tracepoint
9663 (main): Initialize the tracepoints module.
9664 (process_serial_event): Handle traceframe reads/writes.
9666 * linux-low.c (handle_tracepoints): New.
9667 (linux_wait_1): Call it.
9668 (linux_resume_one_lwp): Handle while-stepping.
9669 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9670 (linux_target_ops): Install them.
9671 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9673 * linux-x86-low.c (x86_supports_tracepoints): New.
9674 (the_low_target). Install it.
9676 * mem-break.h (delete_breakpoint): Declare.
9677 * mem-break.c (delete_breakpoint): Make external.
9679 * target.h (struct target_ops): Add `supports_tracepoints',
9680 `read_pc', and `write_pc' fields.
9681 (target_supports_tracepoints): Define.
9682 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9685 * regcache.h (struct regcache) <registers_owned>: New field.
9686 (init_register_cache, regcache_cpy): Declare.
9687 (regcache_read_pc, regcache_write_pc): Declare.
9688 (register_cache_size): Declare.
9689 (supply_regblock): Declare.
9690 * regcache.c (init_register_cache): New.
9691 (new_register_cache): Use it.
9692 (regcache_cpy): New.
9693 (register_cache_size): New.
9694 (supply_regblock): New.
9695 (regcache_read_pc, regcache_write_pc): New.
9697 * tracepoint.c: New.
9699 * Makefile.in (OBS): Add tracepoint.o.
9700 (tracepoint.o): New rule.
9702 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9704 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9706 (i386-mmx.c): Likewise.
9707 (i386-mmx-linux.o): Likewise.
9708 (i386-mmx-linux.c): Likewise.
9710 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9711 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9712 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9713 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9715 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9716 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9717 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9719 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9721 * Makefile.in (clean): Updated.
9723 (i386-avx.c): Likewise.
9724 (i386-avx-linux.o): Likewise.
9725 (i386-avx-linux.c): Likewise.
9726 (amd64-avx.o): Likewise.
9727 (amd64-avx.c): Likewise.
9728 (amd64-avx-linux.o): Likewise.
9729 (amd64-avx-linux.c): Likewise.
9731 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9732 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9733 (srv_amd64_regobj): Add amd64-avx.o.
9734 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9735 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9736 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9737 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9738 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9739 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9740 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9742 * i387-fp.c: Include "i386-xstate.h".
9744 (i387_cache_to_xsave): Likewise.
9745 (i387_xsave_to_cache): Likewise.
9746 (x86_xcr0): Likewise.
9748 * i387-fp.h (i387_cache_to_xsave): Likewise.
9749 (i387_xsave_to_cache): Likewise.
9750 (x86_xcr0): Likewise.
9752 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9753 * linux-crisv32-low.c (target_regsets): Likewise.
9754 * linux-m68k-low.c (target_regsets): Likewise.
9755 * linux-mips-low.c (target_regsets): Likewise.
9756 * linux-ppc-low.c (target_regsets): Likewise.
9757 * linux-s390-low.c (target_regsets): Likewise.
9758 * linux-sh-low.c (target_regsets): Likewise.
9759 * linux-sparc-low.c (target_regsets): Likewise.
9760 * linux-xtensa-low.c (target_regsets): Likewise.
9762 * linux-low.c: Include <sys/uio.h>.
9763 (regsets_fetch_inferior_registers): Support nt_type.
9764 (regsets_store_inferior_registers): Likewise.
9765 (linux_process_qsupported): New.
9766 (linux_target_ops): Add linux_process_qsupported.
9768 * linux-low.h (regset_info): Add nt_type.
9769 (linux_target_ops): Add process_qsupported.
9771 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9773 (init_registers_i386_avx_linux): New.
9774 (init_registers_amd64_avx_linux): Likewise.
9775 (xmltarget_i386_linux_no_xml): Likewise.
9776 (xmltarget_amd64_linux_no_xml): Likewise.
9777 (PTRACE_GETREGSET): Likewise.
9778 (PTRACE_SETREGSET): Likewise.
9779 (x86_fill_xstateregset): Likewise.
9780 (x86_store_xstateregset): Likewise.
9781 (use_xml): Likewise.
9782 (x86_linux_update_xmltarget): Likewise.
9783 (x86_linux_process_qsupported): Likewise.
9784 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9785 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9786 init_registers_i386_linux here. Call
9787 x86_linux_update_xmltarget.
9788 (the_low_target): Add x86_linux_process_qsupported.
9790 * server.c (handle_query): Call target_process_qsupported.
9792 * target.h (target_ops): Add process_qsupported.
9793 (target_process_qsupported): New.
9795 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9797 * inferiors.c (add_thread): Set last_status kind to
9798 TARGET_WAITKIND_IGNORE.
9799 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9800 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9801 (linux_wait_1): Move `thread' local definition to block that uses
9802 it. Don't NULL initialize `event_child'.
9803 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9804 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9805 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9807 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9809 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9810 an extended waitstatus, or by a watchpoint.
9811 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9812 thread was stepping or has been stopped by a watchpoint.
9814 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9816 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9817 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9818 of another, then delete the previous, and validate all
9820 (validate_inserted_breakpoint): New.
9821 (delete_disabled_breakpoints): New.
9822 (validate_breakpoints): New.
9823 (check_mem_read): Validate breakpoints before trusting their
9824 shadow. Delete disabled breakpoints.
9825 (check_mem_write): Validate breakpoints before trusting they
9826 should be inserted. Delete disabled breakpoints.
9827 * mem-break.h (validate_breakpoints):
9828 * server.c (handle_query): Validate breakpoints when we see a
9831 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9833 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9834 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9835 if we could tell there's a GDB breakpoint at stop_pc.
9836 (need_step_over_p): Don't do a step over if we find a GDB
9837 breakpoint at the resume PC.
9839 * mem-break.c (struct raw_breakpoint): New.
9840 (enum bkpt_type): New type `gdb_breakpoint'.
9841 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9842 fields. New field `raw'.
9843 (find_raw_breakpoint_at): New.
9844 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9846 (set_breakpoint_at): Adjust.
9847 (delete_raw_breakpoint): New.
9848 (release_breakpoint): New.
9849 (delete_breakpoint): Rename to...
9850 (delete_breakpoint_1): ... this. Add proc parameter. Use
9851 release_breakpoint. Return ENOENT.
9852 (delete_breakpoint): Reimplement.
9853 (find_breakpoint_at): Delete.
9854 (find_gdb_breakpoint_at): New.
9855 (delete_breakpoint_at): Delete.
9856 (set_gdb_breakpoint_at): New.
9857 (delete_gdb_breakpoint_at): New.
9858 (gdb_breakpoint_here): New.
9859 (set_reinsert_breakpoint): Use release_breakpoint.
9860 (uninsert_breakpoint): Rename to ...
9861 (uninsert_raw_breakpoint): ... this.
9862 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9863 (reinsert_raw_breakpoint): Change parameter type to
9865 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9867 (check_breakpoints): Adjust. Use release_breakpoint.
9868 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9869 (breakpoint_inserted_here): Ditto.
9870 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9871 Don't trust the breakpoint's shadow if it is not inserted.
9872 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9873 (delete_all_breakpoints): Adjust.
9874 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9875 use delete_breakpoint_1.
9877 * mem-break.h (breakpoints_supported): Delete declaration.
9878 (set_gdb_breakpoint_at): Declare.
9879 (gdb_breakpoint_here): Declare.
9880 (delete_breakpoint_at): Delete.
9881 (delete_gdb_breakpoint_at): Declare.
9883 * server.h (struct raw_breakpoint): Forward declare.
9884 (struct process_info): New field `raw_breakpoints'.
9886 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9889 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9891 * linux-low.c (status_pending_p_callback): Fix comment.
9892 (linux_wait_for_event_1): Move most of the internal breakpoint
9893 handling from here...
9894 (linux_wait_1): ... to here.
9895 (count_events_callback): New.
9896 (select_singlestep_lwp_callback): New.
9897 (select_event_lwp_callback): New.
9898 (cancel_breakpoints_callback): New.
9899 (select_event_lwp): New.
9900 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9901 priority to all LWPs that have had events that should be reported
9902 to the client. Cancel breakpoints when about to reporting the
9903 event to the client, not while stopping lwps. No longer cancel
9904 finished single-steps here.
9905 (cancel_finished_single_step): Delete.
9906 (cancel_finished_single_steps): Delete.
9908 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9910 * mem-break.c (enum bkpt_type): New.
9911 (struct breakpoint): New field `type'.
9912 (set_breakpoint_at): Change return type to struct breakpoint
9913 pointer. Set type to `other_breakpoint' by default.
9914 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9915 in the breakpoint list.
9916 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9917 (reinsert_breakpoint): Rename to ...
9918 (reinsert_raw_breakpoint): ... this.
9919 (reinsert_breakpoints_at): Adjust.
9920 * mem-break.h (struct breakpoint): Declare.
9921 (set_breakpoint_at): Change return type to struct breakpoint
9924 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9926 * server.c (handle_query): Assign, not compare.
9928 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9930 Teach linux gdbserver to step-over-breakpoints.
9932 * linux-low.c (can_hardware_single_step): New.
9933 (supports_breakpoints): New.
9934 (handle_extended_wait): If stopping threads, read the stop pc of
9937 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9938 low target doesn't support retrieving the PC.
9939 (add_lwp): Set last_resume_kind to resume_continue.
9940 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9941 (linux_attach): Don't clear stop_expected. Set the lwp's
9942 last_resume_kind to resume_stop.
9943 (linux_detach_one_lwp): Don't check for removed breakpoints.
9944 (check_removed_breakpoint): Delete.
9945 (status_pending_p): Rename to ...
9946 (status_pending_p_callback): ... this. Don't check for removed
9947 breakpoints. Don't consider threads that are stopped from GDB's
9949 (linux_wait_for_lwp): Always read the stop_pc here.
9950 (cancel_breakpoint): New.
9951 (step_over_bkpt): New global.
9952 (linux_wait_for_event_1): Implement stepping over breakpoints.
9953 (gdb_wants_lwp_stopped): New.
9954 (gdb_wants_all_stopped): New.
9955 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9956 single-step traps here. Store the thread's last reported target
9958 (send_sigstop): Don't clear stop_expected. Always set it,
9960 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9961 (cancel_finished_single_step): New.
9962 (cancel_finished_single_steps): New.
9963 (wait_for_sigstop): Don't cancel finished single-step traps here.
9964 (linux_resume_one_lwp): Don't check for removed breakpoints.
9965 Don't set `step' on non-hardware step archs.
9966 (linux_set_resume_request): Ignore resume_stop requests if already
9967 stopping or stopped. Set the lwp's last_resume_kind.
9968 (resume_status_pending_p): Don't check for removed breakpoints.
9969 (need_step_over_p): New.
9970 (start_step_over): New.
9971 (finish_step_over): New.
9972 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9973 requests. Clear the thread's last reported target waitstatus.
9974 Don't use the `suspended' flag. Don't consider pending breakpoints.
9975 (linux_resume): Start a step-over if necessary.
9976 (proceed_one_lwp): New.
9977 (proceed_all_lwps): New.
9978 (unstop_all_lwps): New.
9979 * linux-low.h (struct lwp_info): Rewrite comment for the
9980 `suspended' flag. Add the `stop_pc' field. Delete the
9981 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9982 Add `'last_resume_kind' and `need_step_over' fields.
9983 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9984 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9985 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9986 (set_raw_breakpoint_at): New.
9987 (set_breakpoint_at): Rewrite to use it.
9988 (reinsert_breakpoint_handler): Delete.
9989 (set_reinsert_breakpoint): New.
9990 (reinsert_breakpoint_by_bp): Delete.
9991 (delete_reinsert_breakpoints): New.
9992 (uninsert_breakpoint): Rewrite.
9993 (uninsert_breakpoints_at): New.
9994 (reinsert_breakpoint): Rewrite.
9995 (reinsert_breakpoints_at): New.
9996 (check_breakpoints): Rewrite.
9997 (breakpoint_here): New.
9998 (breakpoint_inserted_here): New.
9999 (check_mem_read): Adjust.
10000 * mem-break.h (breakpoints_supported, breakpoint_here)
10001 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10002 (reinsert_breakpoint_by_bp): Delete declaration.
10003 (delete_reinsert_breakpoints): Declare.
10004 (reinsert_breakpoint): Delete declaration.
10005 (reinsert_breakpoints_at): Declare.
10006 (uninsert_breakpoint): Delete declaration.
10007 (uninsert_breakpoints_at): Declare.
10008 (check_breakpoints): Adjust prototype.
10009 * server.h: Adjust include order.
10010 (struct thread_info): Declare here. Add a `last_status' field.
10012 2010-03-23 Michael Snyder <msnyder@vmware.com>
10014 * server.c (crc32): New function.
10015 (handle_query): Add handling for 'qCRC:' request.
10017 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10019 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10020 lwp had been stopped by a watchpoint.
10022 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10024 * server.h (internal_error): Declare.
10025 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10026 * utils.c (internal_error): New function.
10028 2010-03-15 Andreas Schwab <schwab@redhat.com>
10030 * configure.srv: Fix typo setting srv_regobj.
10032 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10034 * linux-low.c (fetch_register): Avoid passing a non string literal
10036 (usr_store_inferior_registers): Ditto.
10038 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10040 * linux-low.c (linux_write_memory): Bail out early if peeking
10043 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10045 * linux-low.h (struct lwp_info): New fields
10046 `stopped_by_watchpoint' and `stopped_data_address'.
10047 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10048 here, and cache them in the lwp object.
10049 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10051 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10053 (linux_stopped_by_watchpoint): Rewrite.
10054 (linux_stopped_data_address): Rewrite.
10056 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10058 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10059 switching the current inferior, not before.
10061 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10063 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10064 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10065 i386-linux.c and amd64-linux.c.
10066 (reg-i386.o): Removed.
10067 (reg-i386.c): Likewise.
10068 (reg-i386-linux.o): Likewise.
10069 (reg-i386-linux.c): Likewise.
10070 (reg-x86-64.o): Likewise.
10071 (reg-x86-64.c): Likewise.
10072 (reg-x86-64-linux.o): Likewise.
10073 (reg-x86-64-linux.c): Likewise.
10075 (i386.c): Likewise.
10076 (i386-linux.o): Likewise.
10077 (i386-linux.c): Likewise.
10078 (amd64.o): Likewise.
10079 (amd64.c): Likewise.
10080 (amd64-linux.o): Likewise.
10081 (amd64-linux.c): Likewise.
10083 * configure.srv (srv_i386_regobj): New.
10084 (srv_i386_linux_regobj): Likewise.
10085 (srv_amd64_regobj): Likewise.
10086 (srv_amd64_linux_regobj): Likewise.
10087 (srv_i386_32bit_xmlfiles): Likewise.
10088 (srv_i386_64bit_xmlfiles): Likewise.
10089 (srv_i386_xmlfiles): Likewise.
10090 (srv_amd64_xmlfiles): Likewise.
10091 (srv_i386_linux_xmlfiles): Likewise.
10092 (srv_amd64_linux_xmlfiles): Likewise.
10093 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10094 srv_xmlfiles to $srv_i386_xmlfiles.
10095 (i[34567]86-*-mingw32ce*): Likewise.
10096 (i[34567]86-*-mingw*): Likewise.
10097 (i[34567]86-*-nto*): Likewise.
10098 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10099 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10100 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10101 (x86_64-*-linux*): Likewise.
10103 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10104 (init_registers_amd64_linux): New.
10105 (x86_arch_setup): Replace init_registers_x86_64_linux with
10106 init_registers_amd64_linux.
10108 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10110 * configure.ac: Check for libdl. If it is not available link against
10111 static libthread_db.
10112 * configure: Regenerate.
10114 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10118 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10119 handing a read watchpoint.
10120 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10122 2010-02-12 Doug Evans <dje@google.com>
10124 * linux-low.c (linux_supports_tracefork_flag): Document.
10125 (linux_look_up_symbols): Add comment.
10127 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10129 * regcache.c (supply_register): Clear regcache if buf is NULL.
10131 2010-02-02 Nicolas Roche <roche@sourceware.org>
10132 Joel Brobecker <brobecker@adacore.com>
10134 * inferiors.c (find_inferior): Add function documentation.
10135 (unloaded_dll): Handle the case where the unloaded dll has not
10136 been previously registered in the dll list.
10138 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10140 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10141 (thumb2_breakpoint): New.
10142 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10144 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10146 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10147 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10150 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10152 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10154 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10156 * linux-s390-low.c (s390_collect_ptrace_register)
10157 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10159 2010-01-21 Doug Evans <dje@google.com>
10161 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10162 (PTRACE_ARG4_TYPE): New macro.
10163 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10164 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10165 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10166 (usr_store_inferior_registers): Ditto.
10167 (linux_read_memory, linux_write_memory): Ditto.
10168 (linux_test_for_tracefork): Ditto.
10170 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10171 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10173 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10175 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10178 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10180 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10181 prototype to take a regcache. Adjust.
10183 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10185 * regcache.h (struct thread_info): Forward declare.
10186 (struct regcache): New.
10187 (new_register_cache): Adjust prototype.
10188 (get_thread_regcache): Declare.
10189 (free_register_cache): Adjust prototype.
10190 (registers_to_string, registers_from_string): Ditto.
10191 (supply_register, supply_register_by_name, collect_register)
10192 (collect_register_as_string, collect_register_by_name): Ditto.
10193 * regcache.c (struct inferior_regcache_data): Delete.
10194 (get_regcache): Rename to ...
10195 (get_thread_regcache): ... this. Adjust. Switch inferior before
10196 fetching registers.
10197 (regcache_invalidate_one): Adjust.
10198 (regcache_invalidate): Fix prototype.
10199 (new_register_cache): Return the new register cache.
10200 (free_register_cache): Change prototype.
10201 (realloc_register_cache): Adjust.
10202 (registers_to_string): Change prototype to take a regcache. Adjust.
10203 (registers_from_string): Ditto.
10204 (register_data): Ditto.
10205 (supply_register): Ditto.
10206 (supply_register_by_name): Ditto.
10207 (collect_register): Ditto.
10208 (collect_register_as_string): Ditto.
10209 (collect_register_by_name): Ditto.
10210 * server.c (process_serial_event): Adjust.
10211 * linux-low.h (regset_fill_func, regset_store_func): Change
10213 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10215 * linux-low.c (get_stop_pc): Adjust.
10216 (check_removed_breakpoint): Adjust.
10217 (linux_wait_for_event): Adjust.
10218 (linux_resume_one_lwp): Adjust.
10219 (fetch_register): Add regcache parameter. Adjust.
10220 (usr_store_inferior_registers): Ditto.
10221 (regsets_fetch_inferior_registers): Ditto.
10222 (regsets_store_inferior_registers): Ditto.
10223 (linux_fetch_registers, linux_store_registers): Ditto.
10224 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10226 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10228 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10229 prototype to take a regcache.
10230 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10231 * remote-utils.c (convert_ascii_to_int, outreg)
10232 (prepare_resume_reply): Change prototype to take a regcache.
10234 * target.h (struct target_ops) <fetch_registers, store_registers>:
10235 Change prototype to take a regcache.
10236 (fetch_inferior_registers, store_inferior_registers): Change
10237 prototype to take a regcache. Adjust.
10238 * proc-service.c (ps_lgetregs): Adjust.
10239 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10240 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10241 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10242 take a regcache. Adjust.
10243 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10244 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10245 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10246 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10247 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10248 (cris_cannot_fetch_register):
10249 (cris_breakpoint_at): Change prototype to take a regcache.
10251 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10252 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10253 to take a regcache. Adjust.
10254 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10256 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10257 take a regcache. Adjust.
10258 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10259 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10260 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10261 * linux-mips-low.c (mips_get_pc):
10262 (mips_set_pc): Change prototype to take a regcache. Adjust.
10263 (mips_reinsert_addr): Adjust.
10264 (mips_collect_register): Change prototype to take a regcache.
10266 (mips_supply_register):
10267 (mips_collect_register_32bit, mips_supply_register_32bit)
10268 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10269 (mips_store_fpregset): Ditto.
10270 * linux-ppc-low.c (ppc_supply_ptrace_register)
10271 (ppc_supply_ptrace_register): Ditto.
10272 (parse_spufs_run): Adjust.
10273 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10274 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10275 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10276 take a regcache. Adjust.
10277 * linux-s390-low.c (s390_collect_ptrace_register)
10278 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10279 (s390_set_pc): Change prototype to take a regcache. Adjust.
10280 (s390_arch_setup): Adjust.
10281 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10282 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10283 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10284 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10285 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10287 (sparc_breakpoint_at): Adjust.
10288 * linux-xtensa-low.c (xtensa_fill_gregset):
10289 (xtensa_store_gregset):
10290 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10291 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10292 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10293 prototype to take a regcache. Adjust.
10294 * win32-arm-low.c (arm_fetch_inferior_register)
10295 (arm_store_inferior_register): Change prototype to take a
10297 * win32-i386-low.c (i386_fetch_inferior_register)
10298 (i386_store_inferior_register): Change prototype to take a
10300 * win32-low.c (child_fetch_inferior_registers)
10301 (child_store_inferior_registers): Change prototype to take a
10303 (win32_wait): Adjust.
10304 (win32_fetch_inferior_registers): Change prototype to take a
10306 (win32_store_inferior_registers): Adjust.
10307 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10308 store_inferior_register>: Change prototype to take a regcache.
10310 2010-01-20 Doug Evans <dje@google.com>
10312 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10314 (linux_wait_for_event1, linux_init_signals): Ditto.
10315 (W_STOPCODE): Provide definition if missing.
10317 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10319 * linux-low.c (linux_core_of_thread): New.
10320 (compare_ints, show_process, list_threads): New.
10321 (linux_qxfer_osdata): Report threads and cores.
10322 (linux_target_op): Register linux_core_of_thread.
10323 * remote-utils.c (prepare_resume_reply): Report the core.
10324 (buffer_xml_printf): Support %d specifier.
10325 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10327 (handle_query): Handle qXfer:threads. Announce availability
10329 * target.h (struct target_ops): New field core_of_thread.
10331 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10333 * Makefile.in (clean): Remove new generated files.
10334 (reg-s390.o, reg-s390.c): Remove rules.
10335 (reg-s390x.o, reg-s390x.c): Likewise.
10336 (s390-linux32.o, s390-linux32.c): Add rules.
10337 (s390-linux64.o, s390-linux64.c): Likewise.
10338 (s390x-linux64.o, s390x-linux64.c): Likewise.
10339 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10340 * linux-s390-low.c: Include <elf.h>.
10341 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10342 (init_registers_s390): Remove prototype.
10343 (init_registers_s390x): Likewise.
10344 (init_registers_s390_linux32): Add prototype.
10345 (init_registers_s390_linux64): Likewise.
10346 (init_registers_s390x_linux64): Likewise.
10347 (s390_num_regs_3264): New define.
10348 (s390_regmap_3264): New global variable.
10349 (s390_cannot_fetch_register): Remove obsolete check.
10350 (s390_cannot_store_register): Likewise.
10351 (s390_collect_ptrace_register): Handle upper/lower register halves.
10352 (s390_supply_ptrace_register): Likewise.
10353 (s390_fill_gregset): Update to register number changes.
10354 (s390_get_hwcap): New routine.
10355 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10356 Install appropriate regmap and register set.
10358 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10360 * server.c (gdbserver_version): Update copyright year to 2010.
10361 * gdbreplay.c (gdbreplay_version): Likewise.
10363 2009-12-28 Doug Evans <dje@google.com>
10365 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10366 elf/external.h. Include <elf.h> instead but only if necessary.
10368 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10370 * linux-low.c (linux_remove_process): Remove `detaching'
10371 parameter. Don't release/detach from thread_db here.
10372 (linux_kill): Release/detach from thread_db here, ...
10373 (linux_detach): ... and here, before actually detaching.
10374 (linux_wait_1): ... and here, when a process exits.
10375 * thread-db.c (any_thread_of): New.
10376 (thread_db_free): Switch the current inferior to a thread of the
10379 2009-12-21 Doug Evans <dje@google.com>
10381 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10383 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10384 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10385 warning ifndef __NR_tkill. Move setting of errno there too.
10386 Delete unnecessary resetting of errno after syscall.
10387 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10389 * configure.ac: Check for dladdr.
10390 * config.in: Regenerate.
10391 * configure: Regenerate.
10392 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10393 (try_thread_db_load): Update.
10395 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10397 2009-12-18 Doug Evans <dje@google.com>
10399 * event-loop.c: Include unistd.h if it exists.
10401 * linux-low.c (my_waitpid): Move definition away from being in
10402 between linux_tracefork_child/linux_test_for_tracefork.
10404 * gdb_proc_service.h (psaddr_t): Fix type.
10405 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10406 signature to match glibc.
10408 2009-12-16 Doug Evans <dje@google.com>
10410 * linux-low.c (linux_read_memory): Fix argument to read.
10412 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10414 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10415 events, don't leave current_inferior pointing at null.
10417 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10419 * win32-low.c (LOG): Delete.
10420 (OUTMSG): Output to stderr.
10421 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10422 on compile time LOG macro.
10423 (win32_wait): Fix debug output.
10425 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10427 * win32-low.c (win32_add_one_solib): If the dll name is
10428 "ntdll.dll", prepend the system directory to the dll path.
10430 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10432 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10434 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10435 Vladimir Prus <vladimir@codesourcery.com>
10437 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10438 * configure.ac: Check for __mcoldfire__ and set
10439 gdb_cv_m68k_is_coldfire.
10440 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10441 reg-cf.o and reg-m68k.o.
10442 * configure: Regenerated.
10444 2009-11-16 Pedro Alves <pedro@codesourcery.com>
10446 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10447 Pass it to thread_db_free.
10448 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10449 proper `detaching' argument to linux_remove_process.
10450 * linux-low.h (thread_db_free): Add `detaching' parameter.
10451 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10453 (thread_db_free): Add `detaching' parameter. Only
10454 call td_ta_clear_event if detaching from process.
10456 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10458 * thread-db.c (thread_db_free): Fix typo.
10460 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10463 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10465 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10467 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10468 with an i686 compiler.
10469 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10471 * configure: Rebuilt.
10473 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10477 * server.c (handle_search_memory_1): Correct read_addr initialization
10478 in loop for searching subsequent chunks.
10480 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10482 * configure.ac: New --with-libthread-db option.
10483 * thread-db.c: Allow direct dependence on libthread_db.
10484 (thread_db_free): Adjust.
10485 * config.in: Regenerate.
10486 * configure: Likewise.
10488 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10491 * thread-db.c (attach_thread): New function.
10492 (maybe_attach_thread): Return success/failure.
10493 (find_new_threads_callback): Adjust.
10494 (thread_db_find_new_threads): Loop until no new threads.
10496 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10498 * proc-service.c (ps_lgetregs): Formatting.
10500 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10502 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10503 * configure.ac: Adjust.
10504 * linux-low.h (struct process_info_private): Move members to struct
10506 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10507 * linux-low.c (linux_remove_process): Adjust.
10508 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10509 * server.c (handle_query): Move code ...
10510 (handle_monitor_command): ... here. New function.
10511 * target.h (struct target_ops): New member.
10512 * thread-db.c (struct thread_db): New.
10513 (libthread_db_search_path): New variable.
10514 (thread_db_create_event, thread_db_enable_reporting)
10515 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10516 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10517 (try_thread_db_load_1, dladdr_to_soname): New functions.
10518 (try_thread_db_load, thread_db_load_search): New functions.
10519 (thread_db_init): Search for libthread_db.
10520 (thread_db_free): New function.
10521 (thread_db_handle_monitor_command): Likewise.
10522 * config.in: Regenerate.
10523 * configure: Regenerate.
10525 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10527 * spu-low.c (spu_kill): Wait for inferior to terminate.
10528 Call clear_inferiors.
10529 (spu_detach): Call clear_inferiors.
10531 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10533 * aclocal.m4: Regenerate.
10534 * config.in: Likewise.
10535 * configure: Likewise.
10537 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10539 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10540 (parse_spufs_run): New function.
10541 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10542 (ppc_breakpoint_at): Handle SPU breakpoints.
10544 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10546 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10547 (SPUFS_MAGIC): Define.
10548 (spu_enumerate_spu_ids): New function.
10549 (linux_qxfer_spu): New function.
10550 (linux_target_ops): Install linux_qxfer_spu.
10552 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10554 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10555 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10556 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10557 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10558 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10559 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10560 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10561 (init_registers_powerpc_cell32l): Add prototype.
10562 (init_registers_powerpc_cell64l): Likewise.
10563 (ppc_arch_setup): Detect Cell/B.E. architecture.
10565 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10567 * Makefile.in (datarootdir): New variable.
10569 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10571 * linux-low.c (linux_write_memory): Update debugging output.
10572 * Makefile.in (clean): Add new descriptions.
10573 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10574 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10575 * configure.srv: Add new files for arm*-*-linux*.
10576 * linux-arm-low.c: Add new declarations.
10577 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10578 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10579 (HWCAP_VFPv3D16): New.
10580 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10581 instead of __IWMMXT__.
10582 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10583 (arm_arch_setup): New.
10584 (target_regsets): Remove #ifdef. Add VFP regset.
10585 (the_low_target): Use arm_arch_setup.
10587 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10589 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10590 the main thread again.
10592 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10594 Adding Neutrino gdbserver.
10595 * configure: Regenerated.
10596 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10597 * configure.srv (i[34567]86-*-nto*): New target.
10598 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10599 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10600 (nto_comctrl) [__QNX__]: New function.
10601 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10603 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10605 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10608 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10609 Pedro Alves <pedro@codesourcery.com>
10611 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10612 don't support CONTEXT_EXTENDED_REGISTERS.
10613 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10614 (the_low_target): Install them.
10615 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10616 failing with ERROR_PIPE_NOT_CONNECTED.
10618 2009-06-30 Doug Evans <dje@google.com>
10619 Pierre Muller <muller@ics.u-strasbg.fr>
10621 Add h/w watchpoint support to x86-linux, win32-i386.
10622 * Makefile.in (SFILES): Add i386-low.c
10623 (i386_low_h): Define.
10624 (i386-low.o): Add dependencies.
10625 (linux-x86-low.o): Add i386-low.h dependency.
10626 (win32-i386-low.o): Ditto.
10627 * i386-low.c: New file.
10628 * i386-low.h: New file.
10629 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10630 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10631 * linux-low.c (linux_add_process): Initialize arch_private.
10632 (linux_remove_process): Free arch_private.
10633 (add_lwp): Initialize arch_private.
10634 (delete_lwp): Free arch_private.
10635 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10637 * linux-low.h (process_info_private): New member arch_private.
10638 (lwp_info): New member arch_private.
10639 (linux_target_ops): New members new_process, new_thread,
10641 (ptid_of): New macro.
10642 * linux-x86-low.c: Include stddef.h, i386-low.h.
10643 (arch_process_info): New struct.
10644 (arch_lwp_info): New struct.
10645 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10646 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10647 (i386_dr_low_get_status): New function.
10648 (x86_insert_point, x86_remove_point): New functions.
10649 (x86_stopped_by_watchpoint): New function.
10650 (x86_stopped_data_address): New function.
10651 (x86_linux_new_process, x86_linux_new_thread): New functions.
10652 (x86_linux_prepare_to_resume): New function.
10653 (the_low_target): Add entries for insert_point, remove_point,
10654 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10656 * server.c (debug_hw_points): New global.
10657 (monitor_show_help): Document set debug-hw-points.
10658 (handle_query): Process "set debug-hw-points".
10659 * server.h (debug_hw_points): Declare.
10660 (paddress): Declare.
10661 * utils.c (NUMCELLS, CELLSIZE): New macros.
10662 (get_sell, xsnprintf, paddress): New functions.
10663 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10664 remove_point, stopped_by_watchpoint, stopped_data_address.
10665 * win32-i386-low.c: Include i386-low.h.
10666 (debug_reg_state): Replaces dr.
10667 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10668 (i386_dr_low_get_status): New function.
10669 (i386_insert_point, i386_remove_point): New functions.
10670 (i386_stopped_by_watchpoint): New function.
10671 (i386_stopped_data_address): New function.
10672 (i386_initial_stuff): Update.
10673 (get_thread_context,set_thread_context,i386_thread_added): Update.
10674 (the_low_target): Add entries for insert_point,
10675 remove_point, stopped_by_watchpoint, stopped_data_address.
10676 * win32-low.c (win32_insert_watchpoint): New function.
10677 (win32_remove_watchpoint): New function.
10678 (win32_stopped_by_watchpoint): New function.
10679 (win32_stopped_data_address): New function.
10680 (win32_target_ops): Add entries for insert_watchpoint,
10681 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10682 * win32-low.h (win32_target_ops): New members insert_point,
10683 remove_point, stopped_by_watchpoint, stopped_data_address.
10685 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10687 * server.c (process_serial_event): Re-return unsupported, not
10688 error, if the type isn't recognized. Re-allow supporting only
10689 insert or remove packets. Also call require_running for
10690 breakpoints. Add missing break statement to default case. Tidy.
10691 * target.h (struct target_ops): Rename insert_watchpoint to
10692 insert_point, and remove_watchpoint to remove_point.
10694 * linux-low.h (struct linux_target_ops): Likewise.
10695 * linux-low.c (linux_insert_watchpoint): Rename to ...
10696 (linux_insert_point): ... this. Adjust.
10697 (linux_remove_watchpoint): Rename to ...
10698 (linux_remove_point): ... this. Adjust.
10699 (linux_target_ops): Adjust.
10700 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10701 (cris_insert_point): ... this.
10702 (cris_remove_watchpoint): Rename to ...
10703 (cris_remove_point): ... this.
10704 (the_low_target): Adjust.
10706 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10708 * server.c (handle_v_kill): Pass signal_pid to
10709 kill_inferior if multi_process is zero.
10711 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10713 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10714 * target.h (target_ops): Comment for *_watchpoint to make it clear
10715 the functions can get types '0' and '1'.
10717 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10719 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10720 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10721 * regcache.c (get_regcache): Likewise.
10722 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10723 * win32-low.c (child_fetch_inferior_registers): Remove check for
10726 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10727 Pedro Alves <pedro@codesourcery.com>
10729 * target.h (struct target_ops) <supports_multi_process>: New
10731 (target_supports_multi_process): New.
10732 * server.c (handle_query): Even if GDB reports support, only
10733 enable multi-process if the target also supports it. Report
10734 multi-process support only if the target backend supports it.
10735 * linux-low.c (linux_supports_multi_process): New function.
10736 (linux_target_ops): Install it as target_supports_multi_process
10739 2009-05-24 Doug Evans <dje@google.com>
10741 Global renaming of find_thread_pid to find_thread_ptid.
10742 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10743 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10744 All callers updated.
10746 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10747 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10750 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10751 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10752 (linux_resume_one_lwp): Ditto.
10754 2009-05-23 Doug Evans <dje@google.com>
10756 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10757 from struct inferior_list_entry * to struct lwp_info *.
10758 All callers updated.
10760 2009-05-13 Doug Evans <dje@google.com>
10762 * linux-x86-low.c: Don't include assert.h.
10763 (x86_siginfo_fixup): Use fatal, not assert.
10764 (x86_arch_setup): Fix comment.
10766 2009-05-12 Doug Evans <dje@google.com>
10768 Biarch support for i386/amd64 gdbserver.
10769 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10770 Add linux-x86-low.c.
10771 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10772 (linux-x86-low.o): Add.
10773 * linux-x86-64-low.c: Delete.
10774 * linux-i386-low.c: Delete.
10775 * linux-x86-low.c: New file.
10776 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10778 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10780 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10781 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10782 (linux_child_pid_to_exec_file): New function.
10783 (elf_64_header_p, elf_64_file_p): New functions.
10784 (siginfo_fixup): New function.
10785 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10786 give target a chance to convert layout.
10787 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10788 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10790 2009-05-07 Doug Evans <dje@google.com>
10792 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10793 (regsets_store_inferior_registers): Ditto.
10795 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10799 * linux-low.c (must_set_ptrace_flags): Delete.
10800 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10802 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10803 `lwp->must_set_ptrace_flags' instead.
10804 (linux_wait_for_event_1): Set ptrace options here.
10805 (linux_wait_1): ... not here.
10807 2009-04-30 Doug Evans <dje@google.com>
10809 * inferiors.c (started_inferior_callback): New function.
10810 (attached_inferior_callback): New function.
10811 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10812 * server.c (print_started_pid, print_attached_pid): New functions.
10813 (detach_or_kill_for_exit): New function.
10814 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10815 * server.h (have_started_inferiors_p): Declare.
10816 (have_attached_inferiors_p): Declare.
10818 * inferiors.c (remove_process): Fix memory leak, free process.
10819 * linux-low.c (linux_remove_process): New function.
10820 (linux_kill): Call it instead of remove_process.
10821 (linux_detach, linux_wait_1): Ditto.
10823 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10825 * configure.srv: Add x86 Windows CE target.
10827 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10829 * inferiors.c (get_thread_process): Make global.
10830 * server.h (get_thread_process): Add prototype.
10831 * thread-db.c (find_one_thread): Use get_thread_process
10832 instead of current_process.
10833 (thread_db_get_tls_address): Do not crash if called when
10834 thread layer is not yet initialized.
10836 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10838 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10839 * spu-low.c (current_tid): Rename to ...
10840 (current_ptid): ... this.
10841 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10842 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10843 ptid_get_lwp (current_ptid) instead of current_tid.
10844 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10845 instead of current_tid. Use find_process_pid to verify pid
10846 argument is valid. Pass proper argument to remove_process.
10847 (spu_thread_alive): Compare current_ptid instead of current_tid.
10848 (spu_resume): Likewise.
10850 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10852 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10855 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10857 Implement the multiprocess extensions, and add linux multiprocess
10860 * server.h (ULONGEST): Declare.
10861 (struct ptid, ptid_t): New.
10862 (minus_one_ptid, null_ptid): Declare.
10863 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10864 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10865 (struct inferior_list_entry): Change `id' type from unsigned from
10867 (struct sym_cache, struct breakpoint, struct
10868 process_info_private): Forward declare.
10869 (struct process_info): Declare.
10870 (current_process): Declare.
10871 (all_processes): Declare.
10872 (initialize_inferiors): Declare.
10873 (add_thread): Adjust to use ptid_t.
10874 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10875 (add_process, remove_process, find_thread_pid): Declare.
10876 (find_inferior_id): Adjust to use ptid_t.
10877 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10878 (multi_process): Declare.
10879 (push_event): Adjust to use ptid_t.
10880 (read_ptid, write_ptid): Declare.
10881 (prepare_resume_reply): Adjust to use ptid_t.
10882 (clear_symbol_cache): Declare.
10883 * inferiors.c (all_processes): New.
10884 (null_ptid, minus_one_ptid): New.
10885 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10886 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10887 (add_thread): Change unsigned long to ptid. Remove gdb_id
10889 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10890 (gdb_id_to_thread): Rename to ...
10891 (find_thread_pid): ... this. Change unsigned long to ptid.
10892 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10893 (loaded_dll, pull_pid_from_list): Adjust.
10894 (add_process, remove_process, find_process_pid)
10895 (get_thread_process, current_process, initialize_inferiors): New.
10896 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10897 (struct target_waitstatus) <related_pid>: Ditto.
10898 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10899 return type to int.
10900 (struct target_ops) <join>: Add `pid' argument.
10901 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10902 (struct target_ops) <wait>: Add `ptid' field. Change return type
10904 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10905 (mywait): Add `ptid' argument. Change return type to ptid_t.
10906 (target_pid_to_str): Declare.
10907 * target.c (set_desired_inferior): Adjust to use ptids.
10908 (mywait): Add new `ptid' argument. Adjust.
10909 (target_pid_to_str): New.
10910 * mem-break.h (free_all_breakpoints): Declare.
10911 * mem-break.c (breakpoints): Delelete.
10912 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10913 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10914 to use per-process breakpoint list.
10915 (free_all_breakpoints): New.
10916 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10917 (symbol_cache, all_symbols_looked_up): Delete.
10919 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10921 (prepare_resume_reply): Change ptid argument's type from unsigned
10922 long to ptid_t. Adjust. Implement W;process and X;process.
10923 (free_sym_cache, clear_symbol_cache): New.
10924 (look_up_one_symbol): Adjust to per-process symbol cache. *
10925 * server.c (cont_thread, general_thread, step_thread): Change type
10927 (attached): Delete.
10928 (multi_process): New.
10929 (last_ptid): Change type to ptid_t.
10930 (struct vstop_notif) <ptid>: Change type to ptid_t.
10931 (queue_stop_reply, push_event): Change `ptid' argument's type to
10933 (discard_queued_stop_replies): Add `pid' argument.
10934 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10935 changes. Don't reference the `attached' global.
10936 (attach_inferior): Adjust to mywait interface changes.
10937 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10938 features. Handle and report "multiprocess+". Handle
10940 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10942 (handle_v_kill): New.
10943 (handle_v_stopped): Adjust to use target_pid_to_str.
10944 (handle_v_requests): Allow multiple attaches and runs when
10945 multiprocess extensions are in effect. Handle "vKill".
10946 (myresume): Adjust to use ptids.
10947 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10948 (handle_status): Adjust to discard_queued_stop_replies interface
10950 (first_thread_of, kill_inferior_callback)
10951 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10952 (main): Call initialize_inferiors. Adjust to use ptids, killing
10953 and detaching from all inferiors. Handle multiprocess packet
10955 * linux-low.h: Include gdb_proc_service.h.
10956 (struct process_info_private): New.
10957 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10958 <lwpid_of>: Use ptid_get_lwp.
10959 (get_lwp_thread): Adjust.
10960 (struct lwp_info): Add `dead' member.
10961 (find_lwp_pid): Declare.
10962 * linux-low.c (thread_db_active): Delete.
10963 (new_inferior): Adjust comment.
10964 (inferior_pid): Delete.
10965 (linux_add_process): New.
10966 (handle_extended_wait): Adjust.
10967 (add_lwp): Change unsigned long to ptid.
10968 (linux_create_inferior): Add process to processes table. Adjust
10969 to use ptids. Don't set new_inferior here.
10970 (linux_attach_lwp): Rename to ...
10971 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10972 it. Adjust to use ptids.
10973 (linux_attach_lwp): New.
10974 (linux_attach): Add process to processes table. Don't set
10976 (struct counter): New.
10977 (second_thread_of_pid_p, last_thread_of_process_p): New.
10978 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10979 multiple processes.
10980 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10981 processes. Remove process from process table.
10982 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10983 to multiple processes.
10984 (any_thread_of): New.
10985 (linux_detach): Add `pid' argument, and handle it. Remove process
10986 from processes table.
10987 (linux_join): Add `pid' argument. Handle it.
10988 (linux_thread_alive): Change unsighed long argument to ptid_t.
10989 Consider dead lwps as not being alive.
10990 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10991 threads we're not interested in.
10992 (same_lwp, find_lwp_pid): New.
10993 (linux_wait_for_lwp): Change `pid' argument's type from int to
10995 (linux_wait_for_event): Rename to ...
10996 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10997 from int to ptid_t. Adjust.
10998 (linux_wait_for_event): New.
10999 (linux_wait_1): Add `ptid' argument. Change return type to
11000 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11001 that exit from the process table.
11002 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11004 (mark_lwp_dead): New.
11005 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11006 stopping all threads, mark its main lwp as dead.
11007 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11009 (fetch_register, usr_store_inferior_registers)
11010 (regsets_fetch_inferior_registers)
11011 (regsets_store_inferior_registers, linux_read_memory)
11012 (linux_write_memory): Inline `inferior_pid'.
11013 (linux_look_up_symbols): Adjust to use per-process
11014 `thread_db_active'.
11015 (linux_request_interrupt): Adjust to use ptids.
11016 (linux_read_auxv): Inline `inferior_pid'.
11017 (initialize_low): Don't reference thread_db_active.
11018 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11019 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11020 (ps_getpid): Return the pid of the current inferior.
11021 * thread-db.c (proc_handle, thread_agent): Delete.
11022 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11024 (find_one_thread): Change argument type to ptid_t. Adjust to
11026 (maybe_attach_thread): Adjust to per-process data and ptids.
11027 (thread_db_find_new_threads): Ditto.
11028 (thread_db_init): Ditto.
11029 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11030 processes table. Adjust to use ptids.
11031 (spu_kill, spu_detach): Adjust interface. Remove process from
11033 (spu_join, spu_thread_alive): Adjust interface.
11034 (spu_wait): Adjust interface. Remove process from processes
11035 table. Adjust to use ptids.
11036 * win32-low.c (current_inferior_tid): Delete.
11037 (current_inferior_ptid): New.
11038 (debug_event_ptid): New.
11039 (thread_rec): Take a ptid. Adjust.
11040 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11041 (child_delete_thread): Ditto.
11042 (do_initial_child_stuff): Add `attached' argument. Add process to
11044 (child_fetch_inferior_registers, child_store_inferior_registers):
11046 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11047 (win32_attach): Pass 1 to do_initial_child_stuff.
11048 (win32_kill): Adjust interface. Remove process from processes
11050 (win32_detach): Ditto.
11051 (win32_join): Adjust interface.
11052 (win32_thread_alive): Take a ptid.
11053 (win32_resume): Adjust to use ptids.
11054 (get_child_debug_event): Ditto.
11055 (win32_wait): Adjust interface. Remove exiting process from
11058 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11060 Non-stop mode support.
11062 * server.h (non_stop): Declare.
11063 (gdb_client_data, handler_func): Declare.
11064 (delete_file_handler, add_file_handler, start_event_loop):
11066 (handle_serial_event, handle_target_event, push_event)
11067 (putpkt_notif): Declare.
11068 * target.h (enum resume_kind): New.
11069 (struct thread_resume): Replace `step' field by `kind' field.
11070 (TARGET_WNOHANG): Define.
11071 (struct target_ops) <wait>: Add `options' argument.
11072 <supports_non_stop, async, start_non_stop>: New fields.
11073 (target_supports_non_stop, target_async): New.
11074 (start_non_stop): Declare.
11075 (mywait): Add `options' argument.
11076 * target.c (mywait): Add `options' argument. Print child exit
11077 notifications here.
11078 (start_non_stop): New.
11079 * server.c (non_stop, own_buf, mem_buf): New globals.
11080 (struct vstop_notif): New.
11081 (notif_queue): New global.
11082 (queue_stop_reply, push_event, discard_queued_stop_replies)
11083 (send_next_stop_reply): New.
11084 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11086 (attach_inferior): In non-stop mode, don't wait for the target
11088 (handle_general_set): Handle QNonStop.
11089 (handle_query): When handling qC, return the current general
11090 thread, instead of the first thread of the list.
11091 (handle_query): If the backend supports non-stop mode, include
11092 QNonStop+ in the qSupported query response.
11093 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11095 (handle_v_attach, handle_v_run): Handle non-stop mode.
11096 (handle_v_stopped): New.
11097 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11098 (myresume): Adjust to use resume_kind. Handle non-stop.
11099 (queue_stop_reply_callback): New.
11100 (handle_status): Handle non-stop mode.
11101 (main): Clear non_stop flag on reconnection. Use the event-loop.
11102 Refactor serial protocol handling from here ...
11103 (process_serial_event): ... to this new function. When GDB
11104 selects any thread, select one here. In non-stop mode, wait until
11105 GDB acks all pending events before exiting.
11106 (handle_serial_event, handle_target_event): New.
11107 * remote-utils.c (remote_open): Install remote_desc in the event
11109 (remote_close): Remove remote_desc from the event loop.
11110 (putpkt_binary): Rename to...
11111 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11112 (putpkt_binary): New as wrapper around putpkt_binary_1.
11113 (putpkt_notif): New.
11114 (prepare_resume_reply): In non-stop mode, don't change the
11116 * event-loop.c: New.
11117 * Makefile.in (OBJ): Add event-loop.o.
11118 (event-loop.o): New rule.
11120 * linux-low.h (pid_of): Moved here.
11122 (get_lwp_thread): Use lwpid_of.
11123 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11124 * linux-low.c (pid_of): Delete.
11125 (inferior_pid): Use lwpid_of.
11126 (linux_event_pipe): New.
11127 (target_is_async_p): New.
11129 (handle_extended_wait): Use lwpid_of.
11130 (add_lwp): Don't set lwpid field.
11131 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11132 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11133 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11134 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11135 first. Adjust to linux_wait_for_event interface changes. Use
11137 (linux_detach): Don't delete the main lwp here.
11138 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11139 (status_pending_p): Don't consider explicitly suspended lwps.
11140 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11141 pointer. Add OPTIONS argument. Change return type to int. Use
11142 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11143 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11144 pointer. Add status pointer argument. Return a pid instead of a
11145 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11146 changes. In non-stop mode, don't switch to a random thread.
11147 (linux_wait): Rename to...
11148 (linux_wait_1): ... this. Add target_options argument, and handle
11149 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11150 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11151 clean exit and signal exit code. Don't stop all threads in
11152 non-stop mode. In all-stop mode, only stop all threads when
11153 reporting a stop to GDB. Handle explicit thread stop requests.
11154 (async_file_flush, async_file_mark): New.
11156 (send_sigstop): Use lwpid_of.
11157 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11158 interface changes. In non-stop mode, don't switch to a random
11160 (linux_resume_one_lwp): Use lwpid_of.
11161 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11162 (linux_resume_one_thread): ... this. Handle resume_stop. In
11163 non-stop mode, don't look for pending flag in all threads.
11164 (resume_status_pending_p): Don't consider explicitly suspended
11166 (my_waitpid): Reimplement. Emulate __WALL.
11167 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11169 (sigchld_handler, linux_supports_non_stop, linux_async)
11170 (linux_start_non_stop): New.
11171 (linux_target_ops): Register linux_supports_non_stop, linux_async
11172 and linux_start_non_stop.
11173 (initialize_low): Install SIGCHLD handler.
11174 * thread-db.c (thread_db_create_event, find_one_thread)
11175 (thread_db_get_tls_address): Use lwpid_of.
11176 * win32-low.c (win32_detach): Adjust to use resume_kind.
11177 (win32_wait): Add `options' argument.
11178 * spu-low.c (spu_resume): Adjust to use resume_kind.
11179 (spu_wait): Add `options' argument.
11181 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11183 Decouple target code from remote protocol.
11185 * target.h (enum target_waitkind): New.
11186 (struct target_waitstatus): New.
11187 (struct target_ops) <wait>: Return an unsigned long. Take a
11188 target_waitstatus pointer instead of a char pointer.
11189 (mywait): Likewise.
11190 * target.c (mywait): Change prototype to return an unsigned long.
11191 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11192 * server.h (thread_from_wait, old_thread_from_wait): Delete
11194 (prepare_resume_reply): Change prototype to take a
11196 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11197 (last_status, last_ptid): New.
11198 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11199 pid instead of a signal.
11200 (attach_inferior): Remove "status" and "signal" parameters.
11202 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11204 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11205 (handle_v_requests, myresume): Remove "status" and "signal"
11206 parameters. Adjust.
11207 (handle_status): New.
11208 (main): Delete local `status'. Adjust.
11209 * remote-utils.c: Include target.h.
11210 (prepare_resume_reply): Change prototype to take a
11211 target_waitstatus. Adjust.
11213 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11215 * spu-low.c (spu_wait): Adjust.
11216 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11218 (win32_wait): Adjust.
11220 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11222 * target.h (struct thread_resume): Delete leave_stopped member.
11223 (struct target_ops): Add a `n' argument to the `resume' callback.
11224 * server.c (start_inferior): Adjust.
11225 (handle_v_cont, myresume): Adjust.
11226 * linux-low.c (check_removed_breakpoint): Adjust to resume
11227 interface change, and to removed leave_stopped field.
11228 (resume_ptr): Delete.
11229 (struct thread_resume_array): New.
11230 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11231 resume interface change.
11232 (linux_continue_one_thread, linux_queue_one_thread)
11233 (resume_status_pending_p): Check if the resume field is NULL
11234 instead of checking the leave_stopped member.
11235 (linux_resume): Adjust to the target resume interface change.
11236 * spu-low.c (spu_resume): Adjust to the target resume interface
11238 * win32-low.c (win32_detach, win32_resume): Ditto.
11240 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11242 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11244 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11246 (linux_continue_one_thread): Only preserve the stepping flag if
11247 there's a pending breakpoint.
11249 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11251 * server.c (main): After the inferior having exited, call
11252 remote_close before exiting gdbserver.
11254 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11256 Fix size of FPSCR in Power 7 processors.
11257 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11258 (PPC_FEATURE_HAS_DFP): New #define.
11259 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11262 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11264 * server.c (handle_query) Whitespace and formatting.
11266 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11268 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11269 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11270 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11271 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11272 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11273 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11274 Makefile.in, configure.ac: Fix whitespace throughout.
11275 * configure: Regenerate.
11277 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11279 * inferiors.c (find_inferior): Make it safe for the callback
11280 function to delete the currently iterated inferior.
11282 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11284 * Makefile.in (linuw_low_h): Move higher.
11285 (thread-db.o): Depend on $(linux_low_h).
11287 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11289 Rename "process" to "lwp" throughout.
11291 * linux-low.c (all_processes): Rename to...
11292 (all_lwps): ... this.
11293 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11294 (add_process): Rename to ...
11295 (add_lwp): ... this. Adjust.
11296 (linux_create_inferior): Adjust.
11297 (linux_attach_lwp): Adjust.
11298 (linux_attach): Adjust.
11299 (linux_kill_one_process): Rename to ...
11300 (linux_kill_one_lwp): ... this. Adjust.
11301 (linux_kill): Adjust.
11302 (linux_detach_one_process): Rename to ...
11303 (linux_detach_one_lwp): ... this. Adjust.
11304 (linux_detach): Adjust.
11305 (check_removed_breakpoint): Adjust.
11306 (status_pending_p): Adjust.
11307 (linux_wait_for_process): Rename to ...
11308 (linux_wait_for_lwp): ... this. Adjust.
11309 (linux_wait_for_event): Adjust.
11310 (send_sigstop): Adjust.
11311 (wait_for_sigstop): Adjust.
11312 (stop_all_processes): Rename to ...
11313 (stop_all_lwps): ... this.
11314 (linux_resume_one_process): Rename to ...
11315 (linux_resume_one_lwp): ... this. Adjust.
11316 (linux_set_resume_request, linux_continue_one_thread)
11317 (linux_queue_one_thread, resume_status_pending_p)
11318 (usr_store_inferior_registers, regsets_store_inferior_registers)
11319 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11321 * linux-low.h (get_process): Rename to ...
11322 (get_lwp): ... this. Adjust.
11323 (get_thread_process): Rename to ...
11324 (get_thread_lwp): ... this. Adjust.
11325 (get_process_thread): Rename to ...
11326 (get_lwp_thread): ... this. Adjust.
11327 (struct process_info): Rename to ...
11328 (struct lwp_info): ... this.
11329 (all_processes): Rename to ...
11330 (all_lwps): ... this.
11331 * proc-service.c (ps_lgetregs): Adjust.
11332 * thread-db.c (thread_db_create_event, find_one_thread)
11333 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11335 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11337 * server.c (handle_query): Handle "qAttached".
11339 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11341 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11342 GPLv3, update license URL.
11344 2009-03-01 Doug Evans <dje@google.com>
11346 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11347 (server_h): Add gdb_signals.h.
11348 (signals.o): Update.
11349 * server.h (target_signal_from_host,target_signal_to_host_p)
11350 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11352 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11354 * remote-utils.c (getpkt): Also generate remote-debug
11355 information if noack_mode is set.
11357 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11359 * server.c (handle_query): Report qXfer:siginfo:read and
11360 qXfer:siginfo:write as supported and handle them.
11361 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11362 * linux-low.c (linux_xfer_siginfo): New.
11363 (linux_target_ops): Set it.
11365 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11367 * server.c (gdbserver_usage): Mention --remote-debug.
11368 (main): Accept '--remote-debug' switch.
11370 2009-01-18 Doug Evans <dje@google.com>
11372 * regcache.c (new_register_cache): No need to check result of xcalloc.
11373 * server.c (handle_search_memory): Back out calls to xmalloc,
11374 result is checked and error is returned to user upon failure.
11375 (handle_query): Ditto. Add more checks for result of malloc.
11376 (handle_v_cont): Check result of malloc, report error back to
11378 (handle_v_run): Ditto. Call freeargv.
11379 * server.h (freeargv): Declare.
11380 * utils.c (freeargv): New fn.
11382 2009-01-15 Doug Evans <dje@google.com>
11384 * gdbreplay.c (perror_with_name): Make arg const char *.
11385 * server.h (target_signal_to_name): Make return type const char *.
11386 * thread-db.c (thread_db_err_str): Make return type const char *.
11387 * utils.c (perror_with_name): Make arg const char *.
11389 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11391 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11392 when handling a EXIT_PROCESS_DEBUG_EVENT.
11394 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11396 * gdbreplay.c (gdbreplay_version): Update copyright year.
11397 * server.c (gdbserver_version): Likewise.
11399 2009-01-05 Doug Evans <dje@google.com>
11401 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11402 (handle_extended_wait): Improve comment.
11404 2008-12-13 Doug Evans <dje@google.com>
11406 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11407 * server.h (ATTR_MALLOC): New macro.
11408 (xmalloc,xcalloc,xstrdup): Declare.
11409 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11410 * inferiors.c: Ditto.
11411 * linux-low.c: Ditto.
11412 * mem-break.c: Ditto.
11413 * regcache.c: Ditto.
11414 * remote-utils.c: Ditto.
11417 * win32-low.c: Ditto.
11419 2008-12-12 Doug Evans <dje@google.com>
11421 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11422 in debugging printf.
11424 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11426 2008-12-09 Doug Evans <dje@google.com>
11428 * linux-low.h (struct process_info): Delete member tid, unused.
11429 * thread-db.c (find_one_thread): Update.
11430 (maybe_attach_thread): Update.
11432 2008-12-02 Pedro Alves <pedro@codesourcery.com>
11434 * target.h (struct target_ops): Add qxfer_osdata member.
11435 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11437 (linux_qxfer_osdata): New functions.
11438 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11440 * server.c (handle_query): Handle "qXfer:osdata:read:".
11441 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11442 (buffer_xml_printf): New functions.
11443 * server.h (struct buffer): New.
11444 (buffer_grow_str, buffer_grow_str0): New macros.
11445 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11446 (buffer_xml_printf): Declare.
11448 2008-11-24 Doug Evans <dje@google.com>
11450 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11452 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11454 * server.c (handle_v_run): Always use the supplied argument list.
11456 2008-11-19 Bob Wilson <bob.wilson@acm.org>
11458 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11459 (xtensa_regmap_table): Add entry for scompare1.
11461 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11463 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11464 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11465 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11466 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11467 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11468 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11469 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11470 XML target descriptions.
11471 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11472 when inferior is running on an ISA 2.05 or later processor. Add
11473 special case to return offset for full 64-bit slot of FPSCR when
11476 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11478 * Makefile.in (SFILES, clean): Added sparc64 files.
11479 (reg-sparc64.o, reg-sparc64.c): New.
11480 * configure.srv (sparc*-*-linux*): New configuration.
11481 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11482 syscall arguments for SPARC.
11483 (regsets_store_inferior_registers): Likewise.
11484 * linux-sparc-low.c: New file.
11486 2008-10-21 Doug Evans <dje@google.com>
11488 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11489 (READLINE_DIR,READLINE_DEP): Delete.
11490 (INTERNAL_CFLAGS): Update.
11491 (LINTFLAGS): Update.
11493 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11495 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11496 whole argv from the last run, not just argv[0].
11498 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11500 * regcache.c (new_register_cache): Return NULL if the register
11501 cache size isn't known yet.
11502 (free_register_cache): Avoid dereferencing a NULL regcache.
11504 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11506 * configure.srv: Merge MIPS and MIPS64.
11508 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11510 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11512 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11514 * Makefile.in: Add required vsx dependencies.
11516 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11517 Declare init_registers_powerpc_vsx32l.
11518 Declare init_registers_powerpc_vsx64l.
11519 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11520 (ppc_arch_setup): Check for VSX in hwcap.
11521 (ppc_fill_vsxregset): New function.
11522 (ppc_store_vsxregset): New function.
11523 Add new VSX entry in regset_info target_regsets.
11525 * configure.srv: Add new VSX dependencies.
11527 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11529 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11530 (remote_open): Set or clear transport_is_reliable.
11531 (putpkt_binary): Don't expect acks in noack mode.
11532 (getpkt): Don't send ack/nac in noack mode.
11533 * server.c (handle_general_set): Handle QStartNoAckMode.
11534 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11536 (main): Reset noack_mode on every connection.
11537 * server.h (noack_mode): Declare.
11539 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11541 * Makefile.in (GDBREPLAY_OBS): New variable.
11542 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11544 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11545 Daniel Jacobowitz <dan@codesourcery.com>
11547 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11548 (usr_store_inferior_registers): Likewise.
11549 (regsets_store_inferior_registers): Likewise.
11551 2008-07-31 Rolf Jansen <rj@surtec.com>
11552 Pedro Alves <pedro@codesourcery.com>
11554 * configure.ac: Check for memmem declaration.
11555 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11556 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11557 (disable_packet_qfThreadInfo): Unconditionally compile.
11558 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11559 * configure, config.in: Regenerate.
11561 2008-07-28 Doug Kwan <dougkwan@google.com>
11563 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11564 (linux_write_memory): Remove declaration of errno.
11566 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11568 * linux-low.c (handle_extended_wait): Do not use "status"
11569 variable uninitialized.
11571 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11573 * server.c (handle_v_attach): Inhibit reporting dll changes.
11575 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11577 * remote-utils.c (prepare_resume_reply): If requested, don't
11578 output "thread:TID" in the T stop reply.
11580 * server.c (disable_packet_vCont, disable_packet_Tthread)
11581 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11582 (handle_query): If requested, disable support for qC, qfThreadInfo
11584 (handle_v_requests): If requested, disable support for vCont.
11585 (gdbserver_show_disableable): New.
11586 (main): Handle --disable-packet and --disable-packet=LIST.
11588 * server.h (disable_packet_vCont, disable_packet_Tthread)
11589 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11591 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11593 * server.c (gdbserver_usage): Mention --version.
11595 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11597 * Makefile.in (gdbreplay.o): New rule.
11599 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11601 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11602 message, not gdbserver.
11604 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11605 Nathan Sidwell <nathan@codesourcery.com>
11606 Joseph Myers <joseph@codesourcery.com>
11608 * acinclude.m4: Include ../../config/acx.m4.
11609 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11610 * configure, config.in: Regenerate.
11611 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11612 * server.c (gdbserver_version): Print PKGVERSION.
11613 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11614 (main): Adjust gdbserver_usage calls.
11615 * gdbreplay.c (version, host_name): Add declarations.
11616 (gdbreplay_version, gdbreplay_usage): New.
11617 (main): Accept --version and --help options.
11619 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11621 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11622 (arm_breakpoint_at): Handle Thumb.
11623 (the_low_target): Add comment.
11625 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11627 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11629 2008-05-09 Doug Evans <dje@google.com>
11631 * server.h (decode_search_memory_packet): Declare.
11632 * remote-utils.c (decode_search_memory_packet): New fn.
11633 * server.c (handle_search_memory_1): New fn.
11634 (handle_search_memory): New fn.
11635 (handle_query): Process qSearch:memory packets.
11637 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11639 * regcache.c (registers_length): Remove.
11640 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11641 full register packet.
11642 * regcache.h (registers_length): Remove prototype.
11643 * server.h (PBUFSIZ): Define to 16384.
11645 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11647 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11648 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11649 powerpc-64l.o, and powerpc-altivec64l.o.
11650 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11651 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11652 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11653 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11654 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11657 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11658 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11659 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11660 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11661 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11662 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11663 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11664 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11665 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11666 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11669 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11670 (init_registers_powerpc_32l): ... this new prototype.
11671 (init_registers_powerpc_32): Remove, replace by ...
11672 (init_registers_powerpc_altivec32l): ... this new prototype.
11673 (init_registers_powerpc_e500): Remove, replace by ...
11674 (init_registers_powerpc_e500l): ... this new prototype.
11675 (init_registers_ppc64): Remove, replace by ...
11676 (init_registers_powerpc_64l): ... this new prototype.
11677 (init_registers_powerpc_64): Remove, replace by ...
11678 (init_registers_powerpc_altivec64l): ... this new prototype.
11679 (ppc_num_regs): Set to 73.
11680 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11681 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11682 (ppc_cannot_store_register): Handle orig_r3 and trap.
11683 (ppc_arch_setup): Update init_registers_... calls.
11684 (ppc_fill_gregset): Handle orig_r3 and trap.
11686 * inferiors.c (clear_inferiors): Reset current_inferior.
11688 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11690 * acinclude.m4: Add override.m4.
11691 * configure: Regenerate.
11693 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11695 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11696 initial call to init_register_ppc64.
11698 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11700 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11701 single powerpc*-*-linux* case.
11702 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11704 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11706 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11707 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11709 * linux-ppc-low.c: Include <elf.h>.
11710 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11711 (ppc_hwcap): New global variable.
11712 (ppc_regmap): Remove __SPE__ #ifdef sections.
11713 (ppc_regmap_e500): New global variable.
11714 (ppc_cannot_store_register): Update __SPE__ special case.
11715 (ppc_get_hwcap): New function.
11716 (ppc_arch_setup): Use it to determine whether inferior supports
11717 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11718 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11719 Do not access registers if target does not support AltiVec.
11720 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11721 Do not access registers if target does not support SPE.
11722 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11724 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11726 * linux-low.c (disabled_regsets, num_regsets): New.
11727 (use_regsets_p): Delete.
11728 (linux_wait_for_process): Clear disabled_regsets.
11729 (regsets_fetch_inferior_registers): Check and set it.
11730 (regsets_store_inferior_registers): Likewise.
11731 (linux_fetch_registers, linux_store_registers): Do not use
11733 (initialize_low): Allocate disabled_regsets.
11735 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11737 * Makefile.in (LIBOBJS): New.
11738 (OBS): Use LIBOBJS.
11739 (memmem.o): New rule.
11740 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11741 * configure: Regenerated.
11743 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11745 * server.c (handle_query): Never return "unsupported" for
11746 qXfer:features:read queries.
11748 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11750 * server.c (get_features_xml): Fix inverted condition.
11751 (handle_query): Always support qXfer:feature:read.
11753 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11755 * server.c (wrapper_argv): New.
11756 (start_inferior): Handle wrapper_argv. If set, expect an extra
11758 (gdbserver_usage): Document --wrapper.
11759 (main): Parse --wrapper.
11761 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11763 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11764 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11765 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11766 (ppc_set_pc): Likewise.
11767 (ppc_arch_setup): New function.
11768 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11769 of collect_register.
11770 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11772 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11774 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11775 instead of linux-ppc64-low.o.
11776 * linux-ppc64-low.c: Remove file.
11777 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11778 (linux-ppc64-low.o): Remove rule.
11780 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11781 (init_registers_powerpc_64): Likewise.
11782 (ppc_regmap): Conditionally define depending on __powerpc64__.
11783 (ppc_cannot_store_register): Do not special-case "fpscr" when
11784 compiled on __powerpc64__.
11785 (ppc_collect_ptrace_register): New function.
11786 (ppc_supply_ptrace_register): New function.
11787 (ppc_breakpoint): Change type to "unsigned int".
11788 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11789 (the_low_target): Conditionally provide initializers for the
11790 arch_setup member depending on __powerpc64__. Install
11791 collect_ptrace_register and supply_ptrace_register members.
11793 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11795 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11796 * server.c (gdbserver_xmltarget): Define.
11797 (get_features_xml): Use it to replace "target.xml" and arch_string.
11799 * configure.srv: Remove srv_xmltarget. Add XML files that were
11800 mentioned there to srv_xmlfiles instead. Remove conditional tests
11801 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11802 srv_xmlfiles and srv_regobj to include all possible choices.
11803 * configure.ac (srv_xmltarget): Remove.
11804 (srv_xmlfiles): Do not add "target.xml".
11805 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11806 checks for supplementary target information.
11807 * configure: Regenerate.
11808 * Makefile.in (XML_TARGET): Remove.
11809 (target.xml): Remove rule.
11810 (clean): Do not clean up target.xml.
11811 (.PRECIOUS): Do not mention target.xml.
11813 * target.h (struct target_ops): Remove arch_string member.
11814 * linux-low.c (linux_arch_string): Remove.
11815 (linux_target_ops): Remove arch_string initializer.
11816 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11817 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11818 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11819 * spu-low.c (spu_arch_string): Remove.
11820 (spu_target_ops): Remove arch_string initializer.
11821 * win32-low.c (win32_arch_string): Remove.
11822 (win32_target_ops): Remove arch_string initializer.
11823 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11824 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11825 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11827 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11829 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11830 by collect_ptrace_register and supply_ptrace_register hooks.
11831 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11832 instead of checking for the_low_target.left_pad_xfer.
11833 (usr_store_inferior_registers): Use collect_ptrace_register callback
11834 instead of checking for the_low_target.left_pad_xfer.
11836 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11837 (s390_supply_ptrace_register): Likewise.
11838 (s390_fill_gregset): Call s390_collect_ptrace_register.
11839 (the_low_target): Update.
11841 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11842 (ppc_supply_ptrace_register): Likewise.
11843 (the_low_target): Update.
11845 * linux-i386-low.c (the_low_target): Update.
11846 * linux-x86-64-low.c (the_low_target): Update.
11848 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11850 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11851 reg-s390.o and reg-s390x.o.
11853 * linux-low.c (new_inferior): New global variable.
11854 (linux_create_inferior, linux_attach): Set it.
11855 (linux_wait_for_process): Call the_low_target.arch_setup after the
11856 target has stopped for the first time.
11857 (initialize_low): Do not call the_low_target.arch_setup.
11859 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11860 (s390_set_pc): Likewise.
11861 (s390_arch_setup): New function.
11862 (the_low_target): Use s390_arch_setup as arch_setup routine.
11864 * regcache.c (realloc_register_cache): New function.
11865 (set_register_cache): Call it for each existing regcache.
11867 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11869 * server.h (init_registers): Remove prototype.
11871 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11872 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11873 instead of init_registers ().
11874 * linux-arm-low.c (init_registers_arm): Add prototype.
11875 (init_registers_arm_with_iwmmxt): Likewise.
11876 (the_low_target): Add initializer for arch_setup field.
11877 * linux-cris-low.c (init_registers_cris): Add prototype.
11878 (the_low_target): Add initializer for arch_setup field.
11879 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11880 (the_low_target): Add initializer for arch_setup field.
11881 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11882 (the_low_target): Add initializer for arch_setup field.
11883 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11884 (the_low_target): Add initializer for arch_setup field.
11885 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11886 (the_low_target): Add initializer for arch_setup field.
11887 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11888 (the_low_target): Add initializer for arch_setup field.
11889 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11890 (init_registers_mips64_linux): Likewise.
11891 (the_low_target): Add initializer for arch_setup field.
11892 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11893 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11894 (the_low_target): Add initializer for arch_setup field.
11895 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11896 (init_registers_powerpc_64): Likewise.
11897 (the_low_target): Add initializer for arch_setup field.
11898 * linux-s390-low.c (init_registers_s390): Add prototype.
11899 (init_registers_s390x): Likewise.
11900 (the_low_target): Add initializer for arch_setup field.
11901 * linux-sh-low.c (init_registers_sh): Add prototype.
11902 (the_low_target): Add initializer for arch_setup field.
11903 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11904 (the_low_target): Add initializer for arch_setup field.
11905 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11906 (the_low_target): Add initializer for arch_setup field.
11908 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11909 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11910 instead of init_registers ().
11911 * win32-arm-low.c (init_registers_arm): Add prototype.
11912 (the_low_target): Add initializer for arch_setup field.
11913 * win32-i386-low.c (init_registers_i386): Add prototype.
11914 (the_low_target): Add initializer for arch_setup field.
11916 * spu-low.c (init_registers_spu): Add prototype.
11917 (initialize_low): Call initialie_registers_spu () instead of
11918 initialize_registers ().
11920 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11922 * server.c (handle_v_requests): When handling the vRun and vAttach
11923 packets, if already debugging a process, don't kill it. Return an
11926 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11928 * server.c (handle_query): Correct length check.
11930 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11932 * win32-low.c (do_initial_child_stuff): Add process handle
11933 parameter. Set current_process_handle and current_process_id from the
11934 parameters. Clear globals.
11935 (win32_create_inferior): Don't set current_process_handle and
11936 current_process_id here. Instead pass them on the call to
11937 do_initial_child_stuff.
11938 (win32_attach): Likewise.
11939 (win32_clear_inferiors): New.
11940 (win32_kill): Don't close the current process handle or the
11941 current thread handle here. Instead call win32_clear_inferiors.
11942 (win32_detach): Don't open a new handle to the process. Call
11943 win32_clear_inferiors.
11944 (win32_join): Don't rely on current_process_handle; open a new
11945 handle using the process id.
11946 (win32_wait): Call win32_clear_inferiors when the inferior process
11949 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11951 * server.c (monitor_show_help): Add "exit".
11953 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11955 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11956 (clean): Add reg-xtensa.c.
11957 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11958 * configure.srv (xtensa*-*-linux*) New target.
11959 * linux-xtensa-low.c: New.
11960 * xtensa-xtregs.c: New.
11962 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11964 * hostio.c: Don't include errno.h.
11965 (errno_to_fileio_errno): Move to hostio-errno.
11966 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11967 error number outputting to the target->hostio_last_error callback.
11968 (hostio_packet_error): Use FILEIO_EINVAL directly.
11969 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11970 calls to hostio_error.
11971 * hostio-errno.c: New.
11972 * server.h (hostio_last_error_from_errno): Declare.
11973 * target.h (target_ops): Add hostio_last_error member.
11974 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11975 as hostio_last_error handler.
11976 * spu-low.c (spu_target_ops): Likewise.
11977 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11978 (wince_hostio_last_error): New functions.
11979 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11980 as hostio_last_error handler.
11981 (win32_target_ops) [!_WIN32_WCE]: Register
11982 hostio_last_error_from_errno as hostio_last_error handler.
11983 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11984 (hostio-errno.o): New rule.
11985 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11986 * configure.srv (srv_hostio_err_objs): New variable. Default to
11988 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11989 * configure: Regenerate.
11991 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11993 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11994 (linux_kill, linux_detach): Clean up the process list.
11995 * remote-utils.c (remote_open): Improve port number parsing.
11996 (putpkt_binary, input_interrupt): Only send interrupts if the target
11998 * server.c (extended_protocol): Make static.
11999 (attached): Define earlier.
12000 (exit_requested, response_needed, program_argv): New variables.
12001 (target_running): New.
12002 (start_inferior): Clear attached here.
12003 (attach_inferior): Set attached here.
12004 (require_running): Define.
12005 (handle_query): Use require_running and target_running. Implement
12007 (handle_v_attach, handle_v_run): New.
12008 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12009 (gdbserver_usage): Update.
12010 (main): Redo argument parsing. Handle --debug and --multi. Handle
12011 --attach along with other options or after the port. Save
12012 program_argv. Support no initial program. Resynchronize
12013 communication with GDB after an error. Handle "monitor exit".
12014 Use require_running and target_running. Always allow the extended
12015 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12016 restart in extended mode.
12017 * README: Refer to the GDB manual. Update --attach usage.
12019 2007-12-20 Andreas Schwab <schwab@suse.de>
12021 * linux-low.c (STACK_SIZE): Define.
12022 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12023 (linux_test_for_tracefork): Likewise.
12025 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12027 * linux-low.c (linux_wait_for_event): Update messages. Do not
12028 reinsert auto-delete breakpoints.
12029 * mem-break.c (struct breakpoint): Change return type of handler to
12031 (set_breakpoint_at): Update handler type.
12032 (reinsert_breakpoint_handler): Return 1 instead of calling
12034 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12036 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12037 * mem-break.h (set_breakpoint_at): Update handler type.
12038 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12039 * win32-low.c (auto_delete_breakpoint): New.
12040 (get_child_debug_event): Use it.
12042 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12044 * configure.ac: Check for pread and pwrite.
12045 * hostio.c (handle_pread): Fall back to lseek and read.
12046 (handle_pwrite): Fall back to lseek and write.
12047 * config.in, configure: Regenerated.
12049 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12051 * server.c (myresume): Add own_buf argument.
12052 (main): Update calls.
12054 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12056 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12057 * remote-utils.c (remote_open): Do not call disable_async_io.
12058 (block_async_io): Delete.
12059 (unblock_async_io): Make static.
12060 (initialize_async_io): New.
12061 * server.c (handle_v_cont): Handle async I/O here.
12062 (myresume): Likewise. Move other common resume tasks here...
12063 (main): ... from here. Call initialize_async_io. Disable async
12064 I/O before the main loop.
12065 * server.h (initialize_async_io): Declare.
12066 (block_async_io, unblock_async_io): Delete prototypes.
12067 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12069 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12071 * remote-utils.c (readchar): Allow binary data in received messages.
12073 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12075 * win32-low.c (attaching): New global.
12076 (win32_create_inferior): Clear the `attaching' global.
12077 (win32_attach): Set the `attaching' global.
12078 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12079 attaching. Only set a breakpoint at the entry point if not
12082 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12084 * server.c (main): Don't report dll events on the initial
12085 connection on attaches.
12087 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12089 * server.c (main): Relax numerical bases supported for the pid of
12090 the --attach command line argument.
12092 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12094 * win32-low.c (win32_attach): Call OpenProcess before
12095 DebugActiveProcess, not after. Add last error output to error
12098 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12100 * win32-low.c (win32_get_thread_context)
12101 (win32_set_thread_context): New functions.
12102 (thread_rec): Use win32_get_thread_context.
12103 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12104 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12107 2007-12-03 Leo Zayas
12108 Pedro Alves <pedro_alves@portugalmail.pt>
12110 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12112 (child_add_thread): Minor cleanup.
12113 (child_continue): Resume artificially suspended threads before
12114 calling ContinueDebugEvent.
12115 (suspend_one_thread): New.
12116 (fake_breakpoint_event): New.
12117 (get_child_debug_event): Change return type to int. Check here if
12118 gdb sent an interrupt request. If a soft interrupt was requested,
12119 fake a breakpoint event. Return 0 if there is no event to handle,
12121 (win32_wait): Don't check here if gdb sent an interrupt request.
12122 Ensure there is a valid event to handle.
12123 (win32_request_interrupt): Add soft interruption method as last
12126 2007-12-03 Leo Zayas
12127 Pedro Alves <pedro_alves@portugalmail.pt>
12129 * win32-low.h (win32_thread_info): Add descriptions to the
12130 structure members. Replace `suspend_count' counter by a
12132 * win32-low.c (thread_rec): Update condition of when to get the
12133 context from the inferior. Rely on ContextFlags being set if it
12134 has already been retrieved. Only suspend the inferior thread if
12135 we haven't already. Warn if that fails.
12136 (continue_one_thread): s/suspend_count/suspended/. Only call
12137 ResumeThread once. Warn if that fails.
12139 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12141 * win32-low.c (win32_wait): Don't read from the inferior when it
12142 has already exited.
12144 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12146 * Makefile.in (win32_low_h): New variable.
12147 (win32-low.o): Add dependency on $(win32_low_h).
12148 (win32-arm-low.o, win32-i386-low.o): New rules.
12150 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12152 * hostio.c: Correct copyright year.
12154 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12156 * Makefile.in (OBS): Add hostio.o.
12157 (hostio.o): New rule.
12158 * server.h (handle_vFile): Declare.
12159 * hostio.c: New file.
12160 * server.c (handle_v_requests): Take packet_len and new_packet_len
12161 for binary packets. Call handle_vFile.
12162 (main): Update call to handle_v_requests.
12164 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12166 * linux-low.c: Include <sched.h>.
12168 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12170 * linux-low.c (linux_tracefork_grandchild): New.
12171 (linux_tracefork_child): Use clone.
12172 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12174 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12176 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12178 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12180 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12182 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12184 * inferiors.c (change_inferior_id): Delete.
12185 (add_pid_to_list, pull_pid_from_list): New.
12186 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12187 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12188 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12189 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12190 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12191 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12192 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12193 (using_threads): Always set to 1.
12194 (handle_extended_wait): New.
12195 (add_process): Do not set TID.
12196 (linux_create_inferior): Set must_set_ptrace_flags.
12197 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12198 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12199 (linux_thread_alive): Rename TID argument to LWPID.
12200 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12201 (linux_wait_for_event): Do not use TID or check using_threads. Update
12202 call to dead_thread_notify. Call handle_extended_wait.
12203 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12204 (send_sigstop): Delete sigstop_sent.
12205 (wait_for_sigstop): Avoid TID.
12206 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12207 (linux_test_for_tracefork): New.
12208 (linux_lookup_signals): Use thread_db_active and
12209 linux_supports_tracefork_flag.
12210 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12211 * linux-low.h (get_process_thread): Avoid TID.
12212 (struct process_ifo): Move thread_known and tid to the end. Remove
12214 (linux_attach_lwp, thread_db_init): Update prototypes.
12215 * server.h (change_inferior_id): Delete prototype.
12216 (add_pid_to_list, pull_pid_from_list): New prototypes.
12217 * thread-db.c (thread_db_use_events): New.
12218 (find_first_thread): Rename to...
12219 (find_one_thread): ...this. Update callers and messages. Do not
12220 call fatal. Check thread_db_use_events. Do not call
12221 change_inferior_id or new_thread_notify.
12222 (maybe_attach_thread): Update. Do not call new_thread_notify.
12223 (thread_db_init): Set thread_db_use_events. Check use_events.
12224 * utils.c (fatal, warning): Correct message prefix.
12226 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12228 * Makefile.in (clean): Remove new files.
12229 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12230 (powerpc-64.o, powerpc-64.c): New rules.
12231 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12232 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12234 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12236 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12237 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12238 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12239 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12240 (target_regsets): Add AltiVec and SPE register sets.
12241 * configure.ac: Check for AltiVec and SPE.
12242 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12243 (ppc_fill_vrregset, ppc_store_vrregset): New.
12244 (target_regsets): Add AltiVec register set.
12245 * configure: Regenerated.
12247 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12249 * linux-low.c (O_LARGEFILE): Define.
12250 (linux_read_memory): Use /proc/PID/mem.
12251 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12252 * configure, config.in: Regenerated.
12254 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12256 * linux-low.c (linux_wait_for_event): Do not pass signals while
12259 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12261 * win32-low.c (create_process): New.
12262 (win32_create_inferior): Use create_process instead of
12263 CreateProcess. If create_process failed retry appending an ".exe"
12264 suffix. Store the GetLastError result immediatelly after
12265 create_process calls and use it on the call to error.
12267 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12269 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12271 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12273 * configure.ac: Switch license to GPLv3.
12275 2007-08-01 Michael Snyder <msnyder@access-company.com>
12277 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12279 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12281 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12283 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12284 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12285 CloseToolhelp32Snapshot.
12286 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12287 CloseToolhelp32Snapshot.
12289 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12291 * server.c (main): Check for inferior exit before main loop.
12293 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12295 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12296 instead of on tmp_desc.
12298 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12299 Daniel Jacobowitz <dan@codesourcery.com>
12301 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12302 (add_thread): Minor cleanups.
12303 (clear_inferiors): Move lower in the file. Clear the DLL
12305 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12306 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12307 (xml_escape_text): New.
12308 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12310 (handle_v_cont): Report errors.
12311 (gdbserver_version): Update.
12312 (main): Correct size of own_buf. Do not report initial DLL events.
12313 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12314 (unloaded_dll, xml_escape_text): New.
12315 * win32-low.c (enum target_waitkind): Update comments.
12316 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12317 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12318 (win32_EnumProcessModules, win32_GetModuleInformation)
12319 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12320 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12321 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12322 (win32_Module32First, win32_Module32Next, load_toolhelp)
12323 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12324 (get_child_debug_event): Handle DLL events.
12325 (win32_wait): Likewise.
12327 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12329 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12330 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12332 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12334 * win32-low.c (handle_output_debug_string): Ignore event if not
12337 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12339 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12341 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12343 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12345 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12347 * inferiors.c (change_inferior_id): Add comment.
12348 * linux-low.c (check_removed_breakpoint): Add an early
12349 prototype. Improve debug output.
12350 (linux_attach): Doc update.
12351 (linux_detach_one_process, linux_detach): Clean up before releasing
12353 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12354 * linux-low.h (struct process_info): Doc improvement.
12355 * mem-break.c (delete_all_breakpoints): New.
12356 * mem-break.h (delete_all_breakpoints): New prototype.
12357 * thread-db.c (find_first_thread): New.
12358 (thread_db_create_event): Call it instead of
12359 thread_db_find_new_threads. Clean up unused variables.
12360 (maybe_attach_thread): Remove first thread handling.
12361 (thread_db_find_new_threads): Use find_first_thread.
12362 (thread_db_get_tls_address): Likewise.
12364 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12366 * thread-db.c (thread_db_find_new_threads): Add prototype.
12367 (thread_db_create_event): Check for the main thread before adding
12369 (maybe_attach_thread): Only enable event reporting if TID == 0.
12370 (thread_db_get_tls_address): Check for new threads.
12372 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12374 * linux-low.c (linux_create_inferior): Try execv before execvp.
12375 * spu-low.c (spu_create_inferior): Likewise.
12377 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12379 * linux-low.c (linux_create_inferior): Change execv to execvp.
12380 * spu-low.c (spu_create_inferior): Likewies.
12382 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12384 * Makefile.in (clean): Clean new files instead of deleted ones.
12385 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12386 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12388 * configure.srv: Specify XML files and new regformats for MIPS and
12390 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12391 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12392 an entry for the restart register.
12393 (mips_cannot_fetch_register, mips_cannot_store_register)
12394 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12395 register names to match the XML descriptions.
12396 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12397 restart register instead of $0.
12399 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12400 Markus Deuling <deuling@de.ibm.com>
12402 * remote-utils.c (decode_xfer_write): New function.
12403 * server.h (decode_xfer_write): Add prototype.
12404 * server.c (handle_query): Add PACKET_LEN argument. Support
12405 qXfer:spu:read and qXfer:spu:write packets.
12406 (main): Pass packet_len to handle_query.
12407 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12408 * target.h (target_ops): Add qxfer_spu.
12410 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12412 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12413 accessing non-seekable spufs files.
12415 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12417 * server.c (handle_query): Add reply for qC packet.
12419 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12420 Leo Zayas <lerele@champenstudios@com>
12422 * server.h (check_remote_input_interrupt_request): New function.
12423 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12424 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12425 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12426 (check_remote_input_interrupt_request): New function.
12427 * server.h (check_remote_input_interrupt_request): Declare.
12428 * win32-low.c (winapi_DebugBreakProcess,
12429 winapi_GenerateConsoleCtrlEvent): New typedefs.
12430 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12432 (win32_wait): Check for remote interrupt request
12433 with check_remote_input_interrupt_request.
12434 (win32_request_interrupt): New function.
12435 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12437 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12439 * win32-low.c (debug_registers_changed,
12440 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12441 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12442 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12443 (thread_rec): Get context using the low target.
12444 (child_add_thread): Call thread_added on the low target,
12445 which does the same thing.
12447 (do_initial_child_stuff): Remove debug registers references.
12448 Set context using the low target. Resume threads after
12449 setting the contexts.
12450 (child_continue): Remove dead variable. Remove debug
12451 registers references.
12452 (child_fetch_inferior_registers): Go through the low target.
12453 (do_child_store_inferior_registers): Remove.
12454 (child_store_inferior_registers): Go through the low target.
12455 (win32_resume): Remove debug registers references.
12456 Set context using the low target.
12457 (handle_exception): Change return type to void. Don't record
12458 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12459 first chance exception.
12460 (get_child_debug_event): Change return type to void. Remove
12461 goto loop. Always return after waiting for debug event.
12462 (win32_wait): Convert to switch statement. Handle spurious
12465 * win32-i386-low.c (debug_registers_changed,
12466 debug_registers_used): New.
12467 (initial_stuff): Rename to ...
12468 (i386_initial_stuff): ... this. Clear debug registers
12470 (store_debug_registers): Delete.
12471 (i386_get_thread_context): New.
12472 (load_debug_registers): Delete.
12473 (i386_set_thread_context): New.
12474 (i386_thread_added): New.
12475 (single_step): Rename to ...
12476 (i386_single_step): ... this.
12477 (do_fetch_inferior_registers): Rename to ...
12478 (i386_fetch_inferior_register): ... this.
12479 (i386_store_inferior_register): New.
12480 (the_low_target): Adapt to new interface.
12482 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12483 (arm_get_thread_context): New.
12484 (arm_set_thread_context): New.
12486 (do_fetch_inferior_registers): Rename to ...
12487 (arm_fetch_inferior_register): ... this.
12488 (arm_store_inferior_register): New.
12489 (arm_wince_breakpoint): Reimplement as unsigned long.
12490 (arm_wince_breakpoint_len): Define.
12491 (the_low_target): Adapt to new interface.
12493 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12494 load_debug_registers. Add get_thread_context, set_thread_context,
12495 thread_added and store_inferior_register. Rename
12496 fetch_inferior_registers to fetch_inferior_register.
12497 (regptr): Remove declaration.
12499 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12501 * linux-low.c (linux_detach): Change return type to int. Return 0.
12502 * spu-low.c (spu_detach): Likewise.
12504 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12506 * target.h (target_ops): Change return type of detach to int.
12508 (join_inferior): New.
12509 * server.c (main): Don't skip detach support on mingw32.
12510 If the inferior doesn't support detaching return error.
12511 Call join_inferior instead of using waitpid.
12512 * linux-low.c (linux_join): New.
12513 (linux_target_op): Add linux_join.
12514 * spu-low.c (spu_join): New.
12515 (spu_target_ops): Add spu_join.
12516 * win32-low.c (win32_detach): Adapt to new interface.
12517 Reopen current_process_handle before detaching. Issue a child
12518 resume before detaching.
12520 (win32_target_op): Add win32_join.
12522 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12524 * win32-low.c (win32-attach): Fix return value.
12525 * target.h (target_ops): Describe ATTACH return values.
12527 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12529 * win32-low.c (GETPROCADDRESS): Define.
12530 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12531 (winapi_DebugSetProcessKillOnExit): Likewise.
12532 (win32_create_inferior): Force usage of ansi CreateProcessA.
12533 (win32_attach): Use GETPROCADDRESS.
12534 (win32_detach): Likewise.
12536 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12538 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12540 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12542 * win32-low.c: Commit leftover changes from 2007-03-29.
12544 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12546 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12547 fields short instead of int. Add explicit padding.
12548 (i387_cache_to_fsave): Remove unnecessary casts.
12549 (i387_fsave_to_cache): Doc fix.
12550 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12552 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12554 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12555 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12557 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12559 * configure.srv (arm*-*-mingw32ce*): Move near the other
12562 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12564 * configure.ac: Add errno checking.
12565 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12566 sys/file.h and malloc.h.
12567 (AC_CHECK_DECLS): Add perror.
12568 (srv_mingwce): Handle.
12569 * configure.srv (i[34567]86-*-cygwin*): Add
12570 win32-i386-low.o to srv_tgtobj.
12571 (i[34567]86-*-mingw*): Likewise.
12572 (arm*-*-mingw32ce*): Add case.
12573 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12574 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12575 [__MINGW32CE__] (strerror): New function.
12576 [__MINGW32CE__] (errno): Define to GetLastError.
12577 [__MINGW32CE__] (COUNTOF): New macro.
12578 (remote_open): Remove extra close call.
12579 * mem-break.c (delete_breakpoint_at): New function.
12580 * mem-break.h (delete_breakpoint_at): Declare.
12581 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12582 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12583 [USE_WIN32API] (read, write): Add char* casts.
12584 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12585 * server.h: Include wincecompat.h on Windows CE.
12586 [HAVE_ERRNO_H]: Check.
12587 (perror): Declare if not declared.
12588 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12589 (perror_with_name): Remove errno declaration.
12590 * wincecompat.h: New.
12591 * wincecompat.c: New.
12592 * win32-low.h: New.
12593 * win32-arm-low.c: New.
12594 * win32-i386-low.c: New.
12595 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12596 (OUTMSG2): Make it safe.
12598 (COUNTOF): New macro.
12599 (NUM_REGS): Get it from the low target.
12600 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12601 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12602 (thread_rec): Let low target handle debug registers.
12603 (child_add_thread): Likewise.
12604 (child_init_thread_list): Likewise.
12605 (continue_one_thread): Likewise.
12607 (do_child_fetch_inferior_registers): Move to ...
12608 * win32-i386-low.c: ... here, and rename to ...
12609 (do_fetch_inferior_registers): ... this.
12610 * win32-low.c (child_fetch_inferior_registers):
12611 Go through the low target.
12612 (do_child_store_inferior_registers): Use regptr.
12613 (strwinerror): New function.
12614 (win32_create_inferior): Handle Windows CE.
12615 Use strwinerror instead of strerror on Windows error
12616 codes. Add program to the error output.
12617 Don't close the main thread handle on Windows CE.
12618 (win32_attach): Use coredll.dll on Windows CE.
12619 (win32_kill): Close current process and current
12621 (win32_detach): Use coredll.dll on Windows CE.
12622 (win32_resume): Let low target handle debug registers, and
12624 (handle_exception): Add/Remove initial breakpoint. Avoid
12625 non-existant WSTOPSIG on Windows CE.
12626 (win32_read_inferior_memory): Cast to remove warning.
12627 (win32_arch_string): Go through the low target.
12628 (initialize_low): Call set_breakpoint_data with the low
12629 target's breakpoint.
12630 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12631 FOP_REGNUM, mappings): Move to ...
12632 * win32-i386-low.c: ... here.
12633 * win32-low.c (win32_thread_info): Move to ...
12634 * win32-low.h: ... here.
12635 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12636 win32-arm-low.c and wincecompat.c.
12637 (all:): Add $EXEEXT.
12638 (install-only:): Likewise.
12639 (gdbserver:): Likewise.
12640 (gdbreplay:): Likewise.
12641 * config.in: Regenerate.
12642 * configure: Regenerate.
12644 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12646 * win32-low.c: Rename typedef thread_info to
12647 win32_thread_info throughout.
12649 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12651 * win32-i386-low.c: Rename to ...
12652 * win32-low.c: ... this.
12653 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12654 * Makefile.in: Likewise.
12656 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12658 * remote-utils.c (monitor_output): Constify msg parameter.
12659 * server.h (monitor_output): Likewise.
12660 * win32-i386-low.c (handle_output_debug_string): New.
12661 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12662 handle_output_debug_string.
12663 (get_child_debug_event): Likewise.
12665 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12667 * server.c (main): Correct strtoul check.
12669 2007-03-27 Jon Ringle <jon@ringle.org>
12671 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12673 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12675 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12677 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12679 * terminal.h: Check HAVE_SGTTY_H.
12681 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12683 * remote-utils.c (remote_open): Print out the assigned port number.
12685 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12687 * remote-utils.c (monitor_output): New function.
12688 * server.c (debug_threads): Define here.
12689 (monitor_show_help): New function.
12690 (handle_query): Handle qRcmd.
12691 (main): Do not handle 'd' packet.
12692 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12693 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12696 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12698 * Makefile.in (EXEEXT): New.
12699 (clean): Use $(EXEEXT).
12701 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12703 * target.h (target_ops): Rename send_signal to request_interrupt,
12704 and remove enum target_signal parameter.
12705 * linux-low.c (linux_request_interrupt): Rename from
12706 linux_send_signal, and always send SIGINT.
12707 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12708 and always send SIGINT.
12709 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12711 (input_interrupt): Likewise.
12713 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12715 * server.c (get_features_xml): Check if target implemented
12717 * win32-i386-low.c (win32_arch_string): New.
12718 (win32_target_ops): Add win32_arch_string as arch_string member.
12720 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12722 * spu-low.c (spu_arch_string): New.
12723 (spu_target_ops): Add spu_arch_string.
12725 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12727 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12728 * configure.ac: Do not check for terminal.h.
12729 * configure, config.in: Regenerated.
12731 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12733 * Makefile.in (OBS): Add $(XML_BUILTIN).
12734 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12736 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12737 (arm-with-iwmmxt.c): New.
12738 * config.in, configure: Regenerate.
12739 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12740 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12741 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12742 (arm*-*-linux*): Add iWMMXt and regset support.
12743 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12744 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12745 (arm_store_wmmxregset, target_regsets): New.
12746 * server.c (get_features_xml): Take annex argument. Check builtin
12748 (handle_query): Handle multiple annexes.
12750 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12752 * remote-utils.c [USE_WIN32API] (read, write): Define.
12753 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12756 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12758 * linux-i386-low.c (the_low_target): Set arch_string.
12759 * linux-x86-64-low.c (the_low_target): Likewise.
12760 * linux-low.c (linux_arch_string): New.
12761 (linux_target_ops): Add it.
12762 * linux-low.h (struct linux_target_ops): Add arch_string.
12763 * server.c (write_qxfer_response): Use const void * for DATA.
12764 (get_features_xml): New.
12765 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12766 * target.h (struct target_ops): Add arch_string method.
12768 2007-01-03 Denis Pilat <denis.pilat@st.com>
12769 Daniel Jacobowitz <dan@codesourcery.com>
12771 * linux-low.c (linux_kill): Handle being called with no threads.
12772 * win32-i386-low.c (win32_kill): Likewise.
12773 (get_child_debug_event): Clear current_process_handle.
12775 2006-12-30 Denis PILAT <denis.pilat@st.com>
12776 Daniel Jacobowitz <dan@codesourcery.com>
12778 * remote-utils.c (remote_open): Check the type of specified
12779 serial port devices before opening them.
12780 * server.c (main): Kill the inferior if an error occurs during
12781 the first remote_open.
12783 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12785 * README: Update supported targets.
12787 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12789 * Makefile.in (clean): Remove reg-mips64.c.
12790 (reg-mips64.c, reg-mips64.o): New rules.
12791 * configure.srv: Handle mips64. Include regset support for mips.
12792 * linux-mips-low.c (union mips_register): New.
12793 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12794 (mips_breakpoint, mips_breakpoint_at): Use int.
12795 (mips_collect_register, mips_supply_register)
12796 (mips_collect_register_32bit, mips_supply_register_32bit)
12797 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12798 (mips_store_fpregset, target_regsets): New.
12799 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12801 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12803 * configure.srv: Add target "spu*-*-*".
12804 * Makefile.in (clean): Remove reg-spu.c.
12805 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12806 * spu-low.c: New file.
12808 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12810 * configure.ac: Correct td_thr_tls_get_addr test.
12811 * configure: Regenerated.
12813 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12815 * linux-low.c (linux_wait_for_event): Reformat. Use the
12816 pass_signals array.
12817 * remote-utils.c (decode_address_to_semicolon): New.
12818 * server.c (pass_signals, handle_general_set): New.
12819 (handle_query): Mention QPassSignals for qSupported.
12820 (main): Call handle_general_set.
12821 * server.h (pass_signals, decode_address_to_semicolon): New.
12823 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12825 * server.c (handle_query): Correct error handling for read_auxv.
12827 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12829 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12830 and srv_linux_thread_db to yes.
12831 * linux-s390-low.c (s390_fill_gregset): New function.
12832 (target_regsets): Define data structure.
12834 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12836 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12837 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12838 * config.in, configure: Regenerated.
12839 * inferiors.c (gdb_id_to_thread): New function.
12840 (gdb_id_to_thread_id): Use it.
12841 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12842 * linux-low.h (struct process_info): Add th member.
12843 (thread_db_get_tls_address): New prototype.
12844 * remote-utils.c (decode_address): Make non-static.
12845 * server.c (handle_query): Handle qGetTLSAddr.
12846 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12847 * target.h (struct target_ops): Add get_tls_address.
12848 * thread-db.c (maybe_attach_thread): Save the thread handle.
12849 (thread_db_get_tls_address): New.
12851 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12853 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12854 (linux_resume_one_process): Take a siginfo_t *. Update all
12855 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12856 (struct pending_signals): Add a siginfo_t.
12857 (linux_wait_for_process): Always set last_status.
12858 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12859 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12860 * linux-low.h (struct process_info): Add last_status.
12862 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12864 * remote-utils.c (try_rle): New function.
12865 (putpkt_binary): Use it.
12867 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12869 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12870 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12871 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12872 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12873 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12876 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12878 * server.c (terminal_fd): New variable.
12879 (old_foreground_pgrp): Likewise.
12880 (restore_old_foreground_pgrp): New function.
12881 (start_inferior): Record the terminal file descriptor in terminal_fd
12882 and its original foreground group in old_foreground_pgrp. Register
12883 restore_old_foreground_pgrp with atexit().
12885 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12887 * server.c (handle_query): Correct qPart to qXfer.
12889 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12891 * configure.ac: Check for more headers which are missing on
12892 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12893 * configure.srv: Add Cygwin and mingw32.
12894 * remote-utils.c: Don't include headers unconditionally which
12895 are missing on mingw32. Include <winsock.h> for mingw32.
12896 (remote_open): Adjust for mingw32 support. Flush
12897 standard error after writing to it.
12898 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12899 (unblock_async_io, enable_async_io, disable_async_io)
12900 (readchar, getpkt): Update for Winsock support.
12901 (prepare_resume_reply): Expect a protocol signal number.
12902 * server.c: Disable <sys/wait.h> on mingw32.
12903 (start_inferior): Adjust for mingw32 support. Flush
12904 standard error after writing to it.
12905 (attach_inferior): Likewise. Use protocol signal
12907 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12909 * win32-i386-low.c: New file.
12910 * Makefile.in (XM_CLIBS): Set.
12911 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12912 (win32-i386-low.o): New dependency rule.
12913 * linux-low.c (linux_wait): Use target signal numbers.
12914 * target.h (struct target_ops): Doc fix.
12915 * server.h (target_signal_to_name): New prototype.
12916 * gdbreplay.c: Don't include headers unconditionally which
12917 are missing on mingw32. Include <winsock.h> for mingw32.
12918 (remote_close, remote_open): Adjust for Winsock support.
12919 * configure, config.in: Regenerated.
12921 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12923 * server.c (decode_xfer_read, write_qxfer_response): New.
12924 (handle_query): Take a packet length argument. Handle
12925 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12926 the qSupported response.
12927 (main): Update call to handle_query.
12929 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12931 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12932 (putpkt_binary): Renamed from putpkt and adjusted for binary
12934 (putpkt): New wrapper for putpkt_binary.
12935 (readchar): Don't mask off the high bit.
12936 (decode_X_packet): New function.
12937 * server.c (main): Call putpkt_binary if a handler sets the packet
12938 length. Save the length of the incoming packet. Handle 'X'.
12939 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12941 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12943 * server.c (handle_query): Handle qSupported.
12945 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12947 * remote-utils.c (all_symbols_looked_up): New variable.
12948 (look_up_one_symbol): Check it.
12949 * server.h (look_up_one_symbol): New declaration.
12950 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12952 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12954 * Makefile.in (linux-arm-low.o): Update dependencies.
12955 * linux-arm-low.c: Include "gdb_proc_service.h".
12956 (PTRACE_GET_THREAD_AREA): Define.
12957 (ps_get_thread_area): New function.
12959 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12961 * configure.srv (m68k*-*-uclinux*): New target.
12962 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12963 (linux_resume_one_process): Remove extraneous cast.
12964 (linux_read_offsets): New.
12965 (linux_target_op): Add linux_read_offsets on mmuless systems.
12966 * server.c (handle_query): Add qOffsets logic.
12967 * target.h (struct target_ops): Add read_offsets.
12969 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12971 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12972 (PTRACE_GET_THREAD_AREA): Define.
12973 (ps_get_thread_area): New function.
12974 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12975 (linux-x86-64-low.o): Update.
12977 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12979 * configure.ac: Remove checks for prfpregset_t.
12980 * gdb_proc_service.h: New file.
12981 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12982 new "gdb_proc_service.h".
12983 * proc-service.c: Likewise.
12984 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12985 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12986 * Makefile.in (gdb_proc_service_h): Updated.
12987 * configure, config.in: Regenerated.
12989 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12991 * remote-utils.c (prepare_resume_reply): Move declaration
12992 of gdb_id_from_wait to the top of the block.
12994 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12996 * linux-low.c (regsets_store_inferior_registers): Read the regset
12997 from the target before filling it.
12999 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13001 * server.c (attach_inferior): Return SIGTRAP for a successful
13004 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13006 * Makefile.in (OBS): Add version.o.
13007 (STAGESTUFF): Delete.
13008 (version.o): Add dependencies.
13009 (version.c): Replace rule.
13010 (clean): Remove version.c.
13011 * server.c (gdbserver_version): New.
13012 (gdbserver_usage): Use printf.
13013 (main): Handle --version and --help.
13014 * server.h (version, host_name): Add declarations.
13016 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13028 * linux-x86-64-low.c:
13030 * linux-s390-low.c:
13031 * linux-ppc64-low.c:
13033 * linux-mips-low.c:
13034 * linux-m68k-low.c:
13035 * linux-m32r-low.c:
13038 * linux-ia64-low.c:
13039 * linux-i386-low.c:
13040 * linux-crisv32-low.c:
13052 * gdbserver.1: Add (C) after Copyright. Update the FSF
13055 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13057 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13058 (arm_breakpoint_at): Recognize both breakpoints.
13059 (the_low_target): Use the correct breakpoint instruction.
13061 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13063 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13064 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13065 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13066 (the_low_target): Update.
13068 2005-10-25 Andreas Schwab <schwab@suse.de>
13070 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13072 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13073 (ia64_num_regs): Reduce to 462.
13075 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13077 * acinclude.m4: Correct quoting.
13078 * aclocal.m4: Regenerated.
13080 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13081 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13082 (thread_db_init): Call thread_db_err_str.
13083 * configure.ac: Check for TD_VERSION.
13084 * config.in, configure: Regenerated.
13086 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13088 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13090 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13092 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13093 is not available. Define HAVE_PTRACE_GETREGS if it is.
13094 * config.in, configure: Regenerated.
13095 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13096 * linux-i386-low.c, linux-m68k-low.c: Update to use
13097 HAVE_PTRACE_GETREGS.
13098 * linux-low.c (regsets_fetch_inferior_registers)
13099 (regsets_store_inferior_registers): Only return 0 if we processed
13101 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13102 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13104 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13106 * inferiors.c (struct thread_info): Add gdb_id.
13107 (add_thread): Add gdb_id argument.
13108 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13109 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13110 calls to add_thread.
13111 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13112 * server.c (handle_query): Use thread_to_gdb_id.
13113 (handle_v_cont, main): Use gdb_id_to_thread_id.
13114 * server.h (add_thread): Update prototype.
13115 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13118 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13120 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13121 left-padded registers.
13122 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13123 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13125 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13127 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13128 * configure: Regenerate.
13129 * config.in: Regenerate.
13130 * server.h (NEED_DECLARATION_STRERROR):
13131 Replace with !HAVE_DECL_STRERROR.
13133 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13135 * linux-low.c (linux_wait, linux_send_signal): Don't test
13136 an unsigned long variable for > 0 if it could be MAX_ULONG.
13137 * server.c (myresume): Likewise.
13138 * target.c (set_desired_inferior): Likewise.
13140 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13142 * configure.ac: Simplify and improve check for socklen_t.
13143 * configure, config.in: Regenerate.
13145 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13147 * acconfig.h: Remove.
13148 * configure.ac: Add a test for socklen_t. Use three-argument
13149 AC_DEFINE throughout.
13150 * config.in: Regenerated using autoheader 2.59.
13151 * configure: Regenerated.
13153 * gdbreplay.c (socklen_t): Provide a default.
13154 (remote_open): Use socklen_t.
13155 * remote-utils.c (socklen_t): Provide a default.
13156 (remote_open): Use socklen_t.
13157 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13160 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13162 * linux-low.c (linux_read_memory, linux_write_memory)
13163 (linux_read_auxv): Likewise.
13164 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13165 (check_mem_write): Likewise.
13166 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13168 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13169 (registers_from_string, register_data): Likewise.
13170 * server.c (handle_query, main): Likewise.
13171 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13172 (decode_M_packet): Likewise.
13173 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13174 * target.h (struct target_ops): Update read_memory, write_memory,
13176 (read_inferior_memory, write_inferior_memory): Update.
13177 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13178 to unsigned char *.
13179 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13180 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13181 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13182 linux-s390-low.c, linux-sh-low.c: Update for changes in
13183 read_inferior_memory and the_low_target->breakpoint.
13185 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13187 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13188 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13189 * configure.srv: Add powerpc64-*-linux*.
13190 * linux-ppc64-low.c: New file.
13192 2005-05-23 Orjan Friberg <orjanf@axis.com>
13194 * linux-cris-low.c: New file with support for CRIS.
13195 * linux-crisv32-low.c: Ditto for CRISv32.
13196 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13197 (clean): Add reg-cris.c and reg-crisv32.c.
13198 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13199 reg-crisv32.o, and reg-crisv32.c to make rules.
13200 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13201 recognized targets.
13203 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13205 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13206 of sizeof (PTRACE_XFER_TYPE).
13207 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13209 2005-05-12 Orjan Friberg <orjanf@axis.com>
13211 * target.h (struct target_ops): Add insert_watchpoint,
13212 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13213 pointers for hardware watchpoint support.
13214 * linux-low.h (struct linux_target_ops): Ditto.
13215 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13216 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13217 to linux_target_ops.
13218 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13220 * server.c (main): Recognize 'Z' and 'z' packets.
13222 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13224 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13225 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13226 (the_low_target): Add new members.
13228 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13230 * proc-service.c (ps_lgetregs): Search all_processes instead of
13233 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13235 * server.c (start_inferior): Change return type to int.
13236 (attach_inferior): Change sigptr to int *.
13237 (handle_v_cont, handle_v_requests): Change signal to int *.
13238 (main): Change signal to int.
13240 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13242 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13243 * configure.srv: Add m32r*-*-linux*.
13244 * linux-m32r-low.c: New file.
13246 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13248 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13250 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13252 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13253 Take unsigned long arguments for PIDs.
13254 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13255 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13256 (wait_for_sigstop, linux_resume_one_process)
13257 (regsets_fetch_inferior_registers, linux_send_signal)
13258 (linux_read_auxv): Likewise. Update the types of variables holding
13259 PIDs. Update format string specifiers.
13260 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13261 * remote-utils.c (prepare_resume_reply): Likewise.
13262 * server.c (cont_thread, general_thread, step_thread)
13263 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13265 (handle_query): Update format specifiers.
13266 (handle_v_cont, main): Use strtoul for thread IDs.
13267 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13268 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13269 (general_thread, step_thread, thread_from_wait)
13270 (old_thread_from_wait): Update.
13271 * target.h (struct thread_resume): Use unsigned long for THREAD.
13272 (struct target_ops): Use unsigned long for arguments to attach and
13275 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13277 * acinclude.m4: Include bfd/bfd.m4 directly.
13278 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13279 <agriffis@toolchain.org>.
13280 * aclocal.m4, configure: Regenerated.
13282 2005-01-07 Andrew Cagney <cagney@gnu.org>
13284 * configure.ac: Rename configure.in, require autoconf 2.59.
13285 * configure: Re-generate.
13287 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13289 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13290 LIBS when finished.
13291 * aclocal.m4: Regenerated.
13292 * configure: Regenerated.
13294 2004-11-21 Andreas Schwab <schwab@suse.de>
13296 * linux-m68k-low.c (m68k_num_gregs): Define.
13297 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13298 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13299 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13300 (m68k_breakpoint_at): New. Add to the_low_target.
13302 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13303 srv_linux_thread_db to yes.
13305 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13307 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13308 (ARCH_SET_FS): Likewise.
13309 (ARCH_GET_FS): Likewise.
13310 (ARCH_GET_GS): Likewise.
13312 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13314 * linux-i386-low.c (ps_get_thread_area): New.
13315 * linux-x86-64-low.c (ps_get_thread_area): New.
13316 * linux-low.c: Include <sys/syscall.h>.
13317 (linux_kill_one_process): Don't kill the first thread here.
13318 (linux_kill): Kill the first thread here.
13319 (kill_lwp): New function.
13320 (send_sigstop, linux_send_signal): Use it.
13321 * proc-service.c: Clean up #ifdefs.
13322 (fpregset_info): Delete.
13323 (ps_lgetregs): Update and enable implementation.
13324 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13326 * remote-utils.c (struct sym_cache, symbol_cache): New.
13327 (input_interrupt): Print a clearer message.
13328 (async_io_enabled): New variable.
13329 (enable_async_io, disable_async_io): Use it. Update comments.
13330 (look_up_one_symbol): Use the symbol cache.
13331 * thread-db.c (thread_db_look_up_symbols): New function.
13332 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13334 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13336 * configure.in: Test for -rdynamic.
13337 * configure: Regenerated.
13338 * Makefile (INTERNAL_LDFLAGS): New.
13339 (gdbserver, gdbreplay): Use it.
13341 2004-09-02 Andrew Cagney <cagney@gnu.org>
13343 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13345 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13347 * linux-low.c (linux_wait): Clear all_processes list also.
13349 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13351 * linux-low.c: Include <errno.h>. Remove extern declaration of
13354 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13356 * gdbreplay.c, server.h, utils.c: Update copyright years.
13358 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13360 * server.c (main): Print child status or termination signal from
13361 variable 'signal', not 'sig'.
13363 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13365 * linux-low.c (linux_read_memory): Change return type to
13366 int. Check for and return error from ptrace().
13367 * target.c (read_inferior_memory): Change return type to int. Pass
13368 back return status from the_target->read_memory().
13369 * target.h (struct target_ops): Adapt *read_memory() prototype.
13371 (read_inferior_memory): Adapt prototype.
13372 * server.c (main): Return an error packet if
13373 read_inferior_memory() returns an error.
13375 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13377 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13378 Unify with other clean targets.
13380 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13382 * server.c (handle_v_cont): Call set_desired_inferior.
13384 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13386 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13388 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13390 * linux-low.c (linux_wait): Unblock async I/O.
13391 (linux_resume): Block and enable async I/O.
13392 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13393 * server.h (block_async_io, unblock_async_io): Add prototypes.
13395 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13397 * remote-utils.c (remote_open): Print a status notice after
13398 opening a TCP port.
13399 * server.c (attach_inferior): Print a status notice after
13402 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13404 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13406 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13408 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13410 * server.c, target.h: Update copyright years.
13412 2004-02-25 Roland McGrath <roland@redhat.com>
13414 * target.h (struct target_ops): New member `read_auxv'.
13415 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13416 * linux-low.c (linux_read_auxv): New function.
13417 (linux_target_ops): Initialize `read_auxv' member to that.
13419 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13421 Committed by Jim Blandy <jimb@redhat.com>.
13423 * linux-s390-low.c (s390_num_regs): Update.
13424 (s390_regmap): Remove control registers. Use __s390x__ predefine
13425 instead of GPR_SIZE to distiguish s390 and s390x targets.
13427 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
13429 * linux-low.c: Update copyright year.
13430 (check_removed_breakpoint): Clear pending_is_breakpoint.
13431 (linux_set_resume_request, linux_queue_one_thread)
13432 (resume_status_pending_p): New functions.
13433 (linux_continue_one_thread): Use process->resume.
13434 (linux_resume): Only resume threads if there are no pending events.
13435 * linux-low.h (struct process_info): Add resume request
13438 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
13440 * regcache.c (new_register_cache): Clear the allocated register
13441 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13443 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
13445 * linux-low.c (linux_resume): Take a struct thread_resume *
13447 (linux_wait): Update call.
13448 (resume_ptr): New static variable.
13449 (linux_continue_one_thread): Renamed from
13450 linux_continue_one_process. Use resume_ptr.
13451 (linux_resume): Use linux_continue_one_thread.
13452 * server.c (handle_v_cont, handle_v_requests): New functions.
13453 (myresume): New function.
13454 (main): Handle 'v' case.
13455 * target.h (struct thread_resume): New type.
13456 (struct target_ops): Change argument of "resume" to struct
13458 (myresume): Delete macro.
13460 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13462 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13463 (uninstall): Support DESTDIR.
13465 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13467 * configure.srv: Add xscale*linux copy of arm*linux entry.
13469 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
13471 * linux-arm-low.c (arm_reinsert_addr): New function.
13472 (the_low_target): Add arm_reinsert_addr.
13474 2003-07-08 Mark Kettenis <kettenis@gnu.org>
13476 * mem-break.c: Remove whitespace at end of file.
13478 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13480 * configure.in: Check whether we need to prototype strerror.
13481 * server.h: Optionally prototype strerror.
13482 * gdbreplay.c (perror_with_name): Use strerror.
13483 * linux-low.c (linux_attach_lwp): Use strerror.
13484 * utils.c (perror_with_name): Use strerror.
13485 * config.in, configure: Regenerated.
13487 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13489 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13490 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13492 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13494 * Makefile.in (SFILES): Update.
13495 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13496 low-sun3.c: Remove files.
13498 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13500 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13501 (linux_detach_one_process, linux_detach): New functions.
13502 (linux_target_ops): Add linux_detach.
13503 * server.c (main): Handle 'D' packet.
13504 * target.h (struct target_ops): Add "detach" member.
13505 (detach_inferior): Define.
13507 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13509 From Kelley Cook <kelleycook@wideopenwest.com>:
13510 * configure.srv: Accept i[34567]86 variants.
13512 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13514 * linux-low.c (linux_wait_for_event): Correct comment typos.
13515 (linux_resume_one_process): Call check_removed_breakpoint.
13516 (linux_send_signal): New function.
13517 (linux_target_ops): Add linux_send_signal.
13518 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13520 * target.h (struct target_ops): Add send_signal.
13522 2003-05-29 Jim Blandy <jimb@redhat.com>
13524 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13525 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13526 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13527 away part of the register's value.
13529 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13531 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13532 (linux_wait_for_event, linux_init_signals): Likewise.
13534 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13536 * configure.in: Check for stdlib.h.
13537 * configure: Regenerated.
13538 * config.in: Regenerated.
13540 2003-01-04 Andreas Schwab <schwab@suse.de>
13542 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13544 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13546 * Makefile.in: Remove obsolete code.
13548 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13550 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13551 defined(PT_FPR0_HI).
13553 2002-11-17 Stuart Hughes <seh@zee2.com>
13555 * linux-arm-low.c (arm_num_regs): Increase.
13556 (arm_regmap): Include status register.
13558 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13560 * linux-low.c (register_addr): Remove incorrect -1 check.
13562 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13564 * linux-low.c (linux_create_inferior): Call setpgid. Return
13566 (unstopped_p, linux_signal_pid): Remove.
13567 (linux_target_ops): Remove linux_signal_pid.
13568 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13569 global instead of target method.
13570 * target.h (struct target_ops): Remove signal_pid. Update comment
13571 for create_inferior.
13572 * server.c (signal_pid): New variable.
13573 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13574 gdbserver. Set the child to be the foreground process group.
13575 (attach_inferior): Set signal_pid.
13577 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13579 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13581 2002-08-20 Jim Blandy <jimb@redhat.com>
13583 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13586 2002-08-01 Andrew Cagney <cagney@redhat.com>
13588 * Makefile.in: Make chill references obsolete.
13590 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13592 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13593 * configure: Regenerate.
13594 * config.in: Regenerate.
13596 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13598 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13599 (perror_with_name, remote_close, remote_open, expect, play): Static.
13601 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13603 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13604 byte offsets instead of an array of indexes.
13605 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13607 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13609 * regcache.c: Add comment.
13611 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13613 * thread-db.c: New file.
13614 * proc-service.c: New file.
13615 * acinclude.m4: New file.
13616 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13617 proc-service.o, and thread-db.o.
13618 (linux-low.o): Add USE_THREAD_DB.
13619 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13620 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13621 * aclocal.m4: Regenerated.
13622 * config.in: Regenerated.
13623 * configure: Regenerated.
13624 * configure.in: Check for proc_service.h, sys/procfs.h,
13625 thread_db.h, and linux/elf.h headrs.
13626 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13627 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13628 Check for -lthread_db and thread support.
13629 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13630 PowerPC, and SuperH.
13631 * i387-fp.c: Constify arguments.
13632 * i387-fp.h: Likewise.
13633 * inferiors.c: (struct thread_info): Renamed from
13634 `struct inferior_info'. Remove PID member. Use generic inferior
13635 list header. All uses updated.
13636 (inferiors, signal_pid): Removed.
13637 (all_threads): New variable.
13638 (get_thread): Define.
13639 (add_inferior_to_list): New function.
13640 (for_each_inferior): New function.
13641 (change_inferior_id): New function.
13642 (add_inferior): Removed.
13643 (remove_inferior): New function.
13644 (add_thread): New function.
13645 (free_one_thread): New function.
13646 (remove_thread): New function.
13647 (clear_inferiors): Use for_each_inferior and free_one_thread.
13648 (find_inferior): New function.
13649 (find_inferior_id): New function.
13650 (inferior_target_data): Update argument type.
13651 (set_inferior_target_data): Likewise.
13652 (inferior_regcache_data): Likewise.
13653 (set_inferior_regcache_data): Likewise.
13654 * linux-low.c (linux_bp_reinsert): Remove.
13655 (all_processes, stopping_threads, using_thrads)
13656 (struct pending_signals, debug_threads, pid_of): New.
13657 (inferior_pid): Replace with macro.
13658 (struct inferior_linux_data): Remove.
13659 (get_stop_pc, add_process): New functions.
13660 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13661 Use add_process and add_thread.
13662 (linux_attach_lwp): New function, based on old linux_attach. Use
13663 add_process and add_thread. Set stop_expected for new threads.
13664 (linux_attach): New function.
13665 (linux_kill_one_process): New function.
13666 (linux_kill): Kill all LWPs.
13667 (linux_thread_alive): Use find_inferior_id.
13668 (check_removed_breakpoints, status_pending_p): New functions.
13669 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13670 Update. Use WNOHANG. Wait for cloned processes also. Update process
13671 struct for the found process.
13672 (linux_wait_for_event): New function.
13673 (linux_wait): Use it. Support LWPs.
13674 (send_sigstop, wait_for_sigstop, stop_all_processes)
13675 (linux_resume_one_process, linux_continue_one_process): New functions.
13676 (linux_resume): Support LWPs.
13677 (REGISTER_RAW_SIZE): Remove.
13678 (fetch_register): Use register_size instead. Call supply_register.
13679 (usr_store_inferior_registers): Likewise. Call collect_register.
13680 Fix recursive case.
13681 (regsets_fetch_inferior_registers): Improve error message.
13682 (regsets_store_inferior_registers): Add debugging.
13683 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13684 (unstopped_p, linux_signal_pid): New functions.
13685 (linux_target_ops): Add linux_signal_pid.
13686 (linux_init_signals): New function.
13687 (initialize_low): Call it. Initialize using_threads.
13688 * regcache.c (inferior_regcache_data): Add valid
13690 (get_regcache): Fetch registers lazily. Add fetch argument
13691 and update all callers.
13692 (regcache_invalidate_one, regcache_invalidate): New
13694 (new_register_cache): Renamed from create_register_cache.
13695 Return the new regcache.
13696 (free_register_cache): Change argument to a void *.
13697 (registers_to_string, registers_from_string): Call get_regcache
13698 with fetch flag set.
13699 (register_data): Make static. Pass fetch flag to get_regcache.
13700 (supply_register): Call get_regcache with fetch flag clear.
13701 (collect_register): Call get_regcache with fetch flag set.
13702 (collect_register_as_string): New function.
13703 * regcache.h: Update.
13704 * remote-utils.c (putpkt): Flush after debug output and use
13706 Handle input interrupts while waiting for an ACK.
13707 (input_interrupt): Use signal_pid method.
13708 (getpkt): Flush after debug output and use stderr.
13709 (outreg): Use collect_register_as_string.
13710 (new_thread_notify, dead_thread_notify): New functions.
13711 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13712 and general_thread.
13713 (look_up_one_symbol): Flush after debug output.
13714 * server.c (step_thread, server_waiting): New variables.
13715 (start_inferior): Don't use signal_pid. Update call to mywait.
13716 (attach_inferior): Update call to mywait.
13717 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13718 (main): Don't fetch/store registers explicitly. Use
13719 set_desired_inferior. Support proposed ``Hs'' packet. Update
13721 * server.h: Update.
13722 (struct inferior_list, struct_inferior_list_entry): New.
13723 * target.c (set_desired_inferior): New.
13724 (write_inferior_memory): Constify.
13725 (mywait): New function.
13726 * target.h: Update.
13727 (struct target_ops): New signal_pid method.
13728 (mywait): Removed macro, added prototype.
13730 * linux-low.h (regset_func): Removed.
13731 (regset_fill_func, regset_store_func): New.
13732 (enum regset_type): New.
13733 (struct regset_info): Add type field. Use new operation types.
13734 (struct linux_target_ops): stop_pc renamed to get_pc.
13735 Add decr_pc_after_break and breakpoint_at.
13736 (get_process, get_thread_proess, get_process_thread)
13737 (strut process_info, all_processes, linux_attach_lwp)
13738 (thread_db_init): New.
13740 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13741 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13742 (the_low_target): Add new members.
13743 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13744 (i386_store_fpxregset): Constify.
13745 (target_regsets): Add new kind identifier.
13746 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13747 (i386_set_pc): Add debugging.
13748 (i386_breakpoint_at): New function.
13749 (the_low_target): Add new members.
13750 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13751 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13752 (mips_breakpoint_at): New.
13753 (the_low_target): Add new members.
13754 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13755 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13756 (the_low_target): Add new members.
13757 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13758 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13759 (the_low_target): Add new members.
13760 * linux-x86-64-low.c (target_regsets): Add new kind
13763 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13765 From Martin Pool <mbp@samba.org>:
13766 * server.c (gdbserver_usage): New function.
13769 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13771 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13772 stop_at -> stop_pc.
13774 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13776 * Makefile.in: Remove obsolete code.
13778 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13780 * linux-low.c (regsets_fetch_inferior_registers),
13781 (regsets_store_inferior_registers): Removed cast to int from
13783 * regcache.h: Added declaration of struct inferior_info.
13785 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13787 * inferiors.c (struct inferior_info): Add regcache_data.
13788 (add_inferior): Call create_register_cache.
13789 (clear_inferiors): Call free_register_cache.
13790 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13791 * regcache.c (struct inferior_regcache_data): New.
13792 (registers): Remove.
13793 (get_regcache): New function.
13794 (create_register_cache, free_register_cache): New functions.
13795 (set_register_cache): Don't initialize the register cache here.
13796 (registers_to_string, registers_from_string, register_data): Call
13798 * regcache.h: Add prototypes.
13799 * server.h: Likewise.
13801 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13803 * mem-break.c: New file.
13804 * mem-break.h: New file.
13805 * Makefile.in: Add mem-break.o rule; update server.h
13807 * inferiors.c (struct inferior_info): Add target_data
13809 (clear_inferiors): Free target_data member if set.
13810 (inferior_target_data, set_inferior_target_data): New functions.
13811 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13812 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13813 * linux-low.c (linux_bp_reinsert): New variable.
13814 (struct inferior_linux_data): New.
13815 (linux_create_inferior): Use set_inferior_target_data.
13816 (linux_attach): Likewise. Call add_inferior.
13817 (linux_wait_for_one_inferior): New function.
13818 (linux_wait): Call it.
13819 (linux_write_memory): Add const.
13820 (initialize_low): Call set_breakpoint_data.
13821 * linux-low.h (struct linux_target_ops): Add breakpoint
13823 * server.c (attach_inferior): Remove extra add_inferior
13825 * server.h: Include mem-break.h. Update inferior.c
13827 * target.c (read_inferior_memory)
13828 (write_inferior_memory): New functions.
13829 * target.h (read_inferior_memory)
13830 (write_inferior_memory): Change macros to prototypes.
13831 (struct target_ops): Update comments. Add const to write_memory
13834 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13836 * linux-low.c (usr_store_inferior_registers): Support
13837 registers which are allowed to fail to store.
13838 * linux-low.h (linux_target_ops): Likewise.
13839 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13840 (ppc_cannot_store_register): FPSCR may not be storable.
13842 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13844 * server.h: Include <string.h> if HAVE_STRING_H.
13845 * ChangeLog: Correct paths in last ChangeLog entry.
13847 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13849 * linux-low.h: Remove obsolete prototypes.
13850 (struct linux_target_ops): New.
13851 (extern the_low_target): New.
13852 * linux-low.c (num_regs, regmap): Remove declarations.
13853 (register_addr): Use the_low_target explicitly.
13854 (fetch_register): Likewise.
13855 (usr_fetch_inferior_registers): Likewise.
13856 (usr_store_inferior_registers): Likewise.
13857 * linux-arm-low.c (num_regs): Remove.
13858 (arm_num_regs): Define.
13859 (arm_regmap): Renamed from regmap, made static.
13860 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13862 (arm_cannot_store_register): Renamed from cannot_store_register,
13864 (the_low_target): New.
13865 * linux-i386-low.c (num_regs): Remove.
13866 (i386_num_regs): Define.
13867 (i386_regmap): Renamed from regmap, made static.
13868 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13870 (i386_cannot_store_register): Renamed from cannot_store_register,
13872 (the_low_target): New.
13873 * linux-ia64-low.c (num_regs): Remove.
13874 (ia64_num_regs): Define.
13875 (ia64_regmap): Renamed from regmap, made static.
13876 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13878 (ia64_cannot_store_register): Renamed from cannot_store_register,
13880 (the_low_target): New.
13881 * linux-m68k-low.c (num_regs): Remove.
13882 (m68k_num_regs): Define.
13883 (m68k_regmap): Renamed from regmap, made static.
13884 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13886 (m68k_cannot_store_register): Renamed from cannot_store_register,
13888 (the_low_target): New.
13889 * linux-mips-low.c (num_regs): Remove.
13890 (mips_num_regs): Define.
13891 (mips_regmap): Renamed from regmap, made static.
13892 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13894 (mips_cannot_store_register): Renamed from cannot_store_register,
13896 (the_low_target): New.
13897 * linux-ppc-low.c (num_regs): Remove.
13898 (ppc_num_regs): Define.
13899 (ppc_regmap): Renamed from regmap, made static.
13900 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13902 (ppc_cannot_store_register): Renamed from cannot_store_register,
13904 (the_low_target): New.
13905 * linux-s390-low.c (num_regs): Remove.
13906 (s390_num_regs): Define.
13907 (s390_regmap): Renamed from regmap, made static.
13908 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13910 (s390_cannot_store_register): Renamed from cannot_store_register,
13912 (the_low_target): New.
13913 * linux-sh-low.c (num_regs): Remove.
13914 (sh_num_regs): Define.
13915 (sh_regmap): Renamed from regmap, made static.
13916 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13918 (sh_cannot_store_register): Renamed from cannot_store_register,
13920 (the_low_target): New.
13921 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13922 (the_low_target): New.
13924 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13926 * Makefile.in: Add stamp-h target.
13927 * configure.in: Create stamp-h.
13928 * configure: Regenerated.
13930 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13932 * inferiors.c: New file.
13933 * target.c: New file.
13934 * target.h: New file.
13935 * Makefile.in: Add target.o and inferiors.o. Update
13937 * linux-low.c (inferior_pid): New static variable,
13938 moved from server.c.
13939 (linux_create_inferior): Renamed from create_inferior.
13940 Call add_inferior. Return 0 on success instead of a PID.
13941 (linux_attach): Renamed from myattach.
13942 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13943 (linux_thread_alive): Renamed from mythread_alive.
13944 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13946 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13947 (regsets_store_inferior_registers): Correct error message.
13948 Add missing ``return 0''.
13949 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13950 (linux_store_registers): Renamed from store_inferior_registers.
13951 (linux_read_memory): Renamed from read_inferior_memory.
13952 (linux_write_memory): Renamed from write_inferior_memory.
13953 (linux_target_ops): New structure.
13954 (initialize_low): Call set_target_ops ().
13955 * remote-utils.c (unhexify): New function.
13956 (hexify): New function.
13957 (input_interrupt): Send signals to ``signal_pid''.
13958 * server.c (inferior_pid): Remove.
13959 (start_inferior): Update create_inferior call.
13960 (attach_inferior): Call add_inferior.
13961 (handle_query): New function.
13962 (main): Call handle_query for `q' packets.
13963 * server.h: Include "target.h". Remove obsolete prototypes.
13964 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13966 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13968 * Makefile.in: Add WARN_CFLAGS. Update configury
13970 * configure.in: Check for <string.h>
13971 * configure: Regenerate.
13972 * config.in: Regenerate.
13973 * gdbreplay.c: Include needed system headers.
13974 (remote_open): Remove strchr prototype.
13975 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13976 * regcache.c (supply_register): Change buf argument to const void *.
13977 (supply_register_by_name): Likewise.
13978 (collect_register): Change buf argument to void *.
13979 (collect_register_by_name): Likewise.
13980 * regcache.h: Add missing prototypes.
13981 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13982 * server.c (handle_query): New function.
13983 (attached): New static variable, moved out of main.
13984 (main): Quiet longjmp clobber warnings.
13985 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13986 * utils.c (error): Remove NORETURN.