1 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2 Marcin Kościelnicki <koriakin@0x04.net>
5 * linux-ppc-low.c (emit_insns): New function.
6 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7 (ppc_emit_prologue): New function.
8 (ppc_emit_epilogue): New function.
9 (ppc_emit_add): New function.
10 (ppc_emit_sub): New function.
11 (ppc_emit_mul): New function.
12 (ppc_emit_lsh): New function.
13 (ppc_emit_rsh_signed): New function.
14 (ppc_emit_rsh_unsigned): New function.
15 (ppc_emit_ext): New function.
16 (ppc_emit_zero_ext): New function.
17 (ppc_emit_log_not): New function.
18 (ppc_emit_bit_and): New function.
19 (ppc_emit_bit_or): New function.
20 (ppc_emit_bit_xor): New function.
21 (ppc_emit_bit_not): New function.
22 (ppc_emit_equal): New function.
23 (ppc_emit_less_signed): New function.
24 (ppc_emit_less_unsigned): New function.
25 (ppc_emit_ref): New function.
26 (ppc_emit_const): New function.
27 (ppc_emit_reg): New function.
28 (ppc_emit_pop): New function.
29 (ppc_emit_stack_flush): New function.
30 (ppc_emit_swap): New function.
31 (ppc_emit_stack_adjust): New function.
32 (ppc_emit_call): New function.
33 (ppc_emit_int_call_1): New function.
34 (ppc_emit_void_call_2): New function.
35 (ppc_emit_if_goto): New function.
36 (ppc_emit_goto): New function.
37 (ppc_emit_eq_goto): New function.
38 (ppc_emit_ne_goto): New function.
39 (ppc_emit_lt_goto): New function.
40 (ppc_emit_le_goto): New function.
41 (ppc_emit_gt_goto): New function.
42 (ppc_emit_ge_goto): New function.
43 (ppc_write_goto_address): New function.
44 (ppc_emit_ops_impl): New static variable.
45 (ppc64v1_emit_prologue): New function.
46 (ppc64v2_emit_prologue): New function.
47 (ppc64_emit_epilogue): New function.
48 (ppc64_emit_add): New function.
49 (ppc64_emit_sub): New function.
50 (ppc64_emit_mul): New function.
51 (ppc64_emit_lsh): New function.
52 (ppc64_emit_rsh_signed): New function.
53 (ppc64_emit_rsh_unsigned): New function.
54 (ppc64_emit_ext): New function.
55 (ppc64_emit_zero_ext): New function.
56 (ppc64_emit_log_not): New function.
57 (ppc64_emit_bit_and): New function.
58 (ppc64_emit_bit_or): New function.
59 (ppc64_emit_bit_xor): New function.
60 (ppc64_emit_bit_not): New function.
61 (ppc64_emit_equal): New function.
62 (ppc64_emit_less_signed): New function.
63 (ppc64_emit_less_unsigned): New function.
64 (ppc64_emit_ref): New function.
65 (ppc64_emit_const): New function.
66 (ppc64v1_emit_reg): New function.
67 (ppc64v2_emit_reg): New function.
68 (ppc64_emit_pop): New function.
69 (ppc64_emit_stack_flush): New function.
70 (ppc64_emit_swap): New function.
71 (ppc64v1_emit_call): New function.
72 (ppc64v2_emit_call): New function.
73 (ppc64v1_emit_int_call_1): New function.
74 (ppc64v2_emit_int_call_1): New function.
75 (ppc64v1_emit_void_call_2): New function.
76 (ppc64v2_emit_void_call_2): New function.
77 (ppc64_emit_if_goto): New function.
78 (ppc64_emit_eq_goto): New function.
79 (ppc64_emit_ne_goto): New function.
80 (ppc64_emit_lt_goto): New function.
81 (ppc64_emit_le_goto): New function.
82 (ppc64_emit_gt_goto): New function.
83 (ppc64_emit_ge_goto): New function.
84 (ppc64v1_emit_ops_impl): New static variable.
85 (ppc64v2_emit_ops_impl): New static variable.
86 (ppc_emit_ops): New function.
87 (linux_low_target): Wire in ppc_emit_ops.
89 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
90 Marcin Kościelnicki <koriakin@0x04.net>
93 * Makefile.in: Add powerpc-*-ipa.o
94 * configure.srv: Add ipa_obj for powerpc*-linux.
95 * linux-ppc-ipa.c: New file.
96 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
98 (PPC_FIELD): New macro.
99 (PPC_SEXT): New macro.
100 (PPC_OP6): New macro.
104 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
105 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
106 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
107 (ppc_get_thread_area): New function.
108 (is_elfv2_inferior): New function.
109 (gen_ds_form): New function.
110 (GEN_STD): New macro.
111 (GEN_STDU): New macro.
113 (GEN_LDU): New macro.
114 (gen_d_form): New function.
115 (GEN_ADDI): New macro.
116 (GEN_ADDIS): New macro.
118 (GEN_LIS): New macro.
119 (GEN_ORI): New macro.
120 (GEN_ORIS): New macro.
121 (GEN_LWZ): New macro.
122 (GEN_STW): New macro.
123 (GEN_STWU): New macro.
124 (gen_xfx_form): New function.
125 (GEN_MFSPR): New macro.
126 (GEN_MTSPR): New macro.
127 (GEN_MFCR): New macro.
128 (GEN_MTCR): New macro.
129 (GEN_SYNC): New macro.
130 (GEN_LWSYNC): New macro.
131 (gen_x_form): New function.
134 (GEN_LWARX): New macro.
135 (GEN_STWCX): New macro.
136 (GEN_CMPW): New macro.
137 (gen_md_form): New function.
138 (GEN_RLDICL): New macro.
139 (GEN_RLDICR): New macro.
140 (gen_i_form): New function.
143 (gen_b_form): New function.
144 (GEN_BNE): New macro.
145 (GEN_LOAD): New macro.
146 (GEN_STORE): New macro.
147 (gen_limm): New function.
148 (gen_atomic_xchg): New function.
149 (gen_call): New function.
150 (ppc_relocate_instruction): New function.
151 (ppc_install_fast_tracepoint_jump_pad): New function.
152 (ppc_get_min_fast_tracepoint_insn_len): New function.
153 (ppc_get_ipa_tdesc_idx): New function.
154 (the_low_target): Wire in the new functions.
155 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
157 * linux-ppc-tdesc.h: New file.
159 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
161 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
162 (alloc_jump_pad_buffer): New function.
163 * linux-amd64-ipa.c: Add <sys/mman.h> include.
164 (alloc_jump_pad_buffer): New function.
165 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
166 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
167 (alloc_jump_pad_buffer): New function.
168 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
169 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
170 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
171 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
173 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
175 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
176 * linux-amd64-ipa.c: Likewise.
177 * linux-i386-ipa.c: Likewise.
178 * linux-s390-ipa.c: Likewise.
179 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
180 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
181 set_trace_state_variable_value_ptr.
182 (struct ipa_sym_addresses): Likewise.
183 (symbol_list): Likewise.
184 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
185 accessing gdb_collect directly.
186 (gdb_collect_ptr_type): New typedef.
187 (get_raw_reg_ptr_type): New typedef.
188 (get_trace_state_variable_value_ptr_type): New typedef.
189 (set_trace_state_variable_value_ptr_type): New typedef.
190 (gdb_collect_ptr): New global.
191 (get_raw_reg_ptr): New global.
192 (get_trace_state_variable_value_ptr): New global.
193 (set_trace_state_variable_value_ptr): New global.
194 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
195 accessing get_raw_reg directly.
196 (get_get_tsv_func_addr): Likewise for
197 get_trace_state_variable_value_ptr.
198 (get_set_tsv_func_addr): Likewise for
199 set_trace_state_variable_value_ptr.
200 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
202 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
204 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
206 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
208 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
210 (relocate_instruction): Remove own_buf.
211 * server.c (own_buf): Make global.
212 (handle_v_requests): Make global.
213 * server.h (own_buf): New declaration.
214 (handle_v_requests): New prototype.
216 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
219 * linux-s390-low.c (add_insns): New function.
220 (s390_emit_prologue): New function.
221 (s390_emit_epilogue): New function.
222 (s390_emit_add): New function.
223 (s390_emit_sub): New function.
224 (s390_emit_mul): New function.
225 (s390_emit_lsh): New function.
226 (s390_emit_rsh_signed): New function.
227 (s390_emit_rsh_unsigned): New function.
228 (s390_emit_ext): New function.
229 (s390_emit_log_not): New function.
230 (s390_emit_bit_and): New function.
231 (s390_emit_bit_or): New function.
232 (s390_emit_bit_xor): New function.
233 (s390_emit_bit_not): New function.
234 (s390_emit_equal): New function.
235 (s390_emit_less_signed): New function.
236 (s390_emit_less_unsigned): New function.
237 (s390_emit_ref): New function.
238 (s390_emit_if_goto): New function.
239 (s390_emit_goto): New function.
240 (s390_write_goto_address): New function.
241 (s390_emit_litpool): New function.
242 (s390_emit_const): New function.
243 (s390_emit_call): New function.
244 (s390_emit_reg): New function.
245 (s390_emit_pop): New function.
246 (s390_emit_stack_flush): New function.
247 (s390_emit_zero_ext): New function.
248 (s390_emit_swap): New function.
249 (s390_emit_stack_adjust): New function.
250 (s390_emit_set_r2): New function.
251 (s390_emit_int_call_1): New function.
252 (s390_emit_void_call_2): New function.
253 (s390_emit_eq_goto): New function.
254 (s390_emit_ne_goto): New function.
255 (s390_emit_lt_goto): New function.
256 (s390_emit_le_goto): New function.
257 (s390_emit_gt_goto): New function.
258 (s390_emit_ge_goto): New function.
259 (s390x_emit_prologue): New function.
260 (s390x_emit_epilogue): New function.
261 (s390x_emit_add): New function.
262 (s390x_emit_sub): New function.
263 (s390x_emit_mul): New function.
264 (s390x_emit_lsh): New function.
265 (s390x_emit_rsh_signed): New function.
266 (s390x_emit_rsh_unsigned): New function.
267 (s390x_emit_ext): New function.
268 (s390x_emit_log_not): New function.
269 (s390x_emit_bit_and): New function.
270 (s390x_emit_bit_or): New function.
271 (s390x_emit_bit_xor): New function.
272 (s390x_emit_bit_not): New function.
273 (s390x_emit_equal): New function.
274 (s390x_emit_less_signed): New function.
275 (s390x_emit_less_unsigned): New function.
276 (s390x_emit_ref): New function.
277 (s390x_emit_if_goto): New function.
278 (s390x_emit_const): New function.
279 (s390x_emit_call): New function.
280 (s390x_emit_reg): New function.
281 (s390x_emit_pop): New function.
282 (s390x_emit_stack_flush): New function.
283 (s390x_emit_zero_ext): New function.
284 (s390x_emit_swap): New function.
285 (s390x_emit_stack_adjust): New function.
286 (s390x_emit_int_call_1): New function.
287 (s390x_emit_void_call_2): New function.
288 (s390x_emit_eq_goto): New function.
289 (s390x_emit_ne_goto): New function.
290 (s390x_emit_lt_goto): New function.
291 (s390x_emit_le_goto): New function.
292 (s390x_emit_gt_goto): New function.
293 (s390x_emit_ge_goto): New function.
294 (s390_emit_ops): New function.
295 (struct linux_target_ops): Fill in emit_ops hook.
297 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
300 * Makefile.in: Add s390 IPA files.
301 * configure.srv: Build IPA for s390.
302 * linux-s390-ipa.c: New file.
303 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
304 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
305 (tdesc_s390_linux32): Likewise.
306 (init_registers_s390_linux32v1): Likewise.
307 (tdesc_s390_linux32v1): Likewise.
308 (init_registers_s390_linux32v2): Likewise.
309 (tdesc_s390_linux32v2): Likewise.
310 (init_registers_s390_linux64): Likewise.
311 (tdesc_s390_linux64): Likewise.
312 (init_registers_s390_linux64v1): Likewise.
313 (tdesc_s390_linux64v1): Likewise.
314 (init_registers_s390_linux64v2): Likewise.
315 (tdesc_s390_linux64v2): Likewise.
316 (init_registers_s390_te_linux64): Likewise.
317 (tdesc_s390_te_linux64): Likewise.
318 (init_registers_s390_vx_linux64): Likewise.
319 (tdesc_s390_vx_linux64): Likewise.
320 (init_registers_s390_tevx_linux64): Likewise.
321 (tdesc_s390_tevx_linux64): Likewise.
322 (init_registers_s390x_linux64): Likewise.
323 (tdesc_s390x_linux64): Likewise.
324 (init_registers_s390x_linux64v1): Likewise.
325 (tdesc_s390x_linux64v1): Likewise.
326 (init_registers_s390x_linux64v2): Likewise.
327 (tdesc_s390x_linux64v2): Likewise.
328 (init_registers_s390x_te_linux64): Likewise.
329 (tdesc_s390x_te_linux64): Likewise.
330 (init_registers_s390x_vx_linux64): Likewise.
331 (tdesc_s390x_vx_linux64): Likewise.
332 (init_registers_s390x_tevx_linux64): Likewise.
333 (tdesc_s390x_tevx_linux64): Likewise.
334 (have_hwcap_s390_vx): New static variable.
335 (s390_arch_setup): Fill have_hwcap_s390_vx.
336 (s390_get_thread_area): New function.
337 (s390_ft_entry_gpr_esa): New const.
338 (s390_ft_entry_gpr_zarch): New const.
339 (s390_ft_entry_misc): New const.
340 (s390_ft_entry_fr): New const.
341 (s390_ft_entry_vr): New const.
342 (s390_ft_main_31): New const.
343 (s390_ft_main_64): New const.
344 (s390_ft_exit_fr): New const.
345 (s390_ft_exit_vr): New const.
346 (s390_ft_exit_misc): New const.
347 (s390_ft_exit_gpr_esa): New const.
348 (s390_ft_exit_gpr_zarch): New const.
349 (append_insns): New function.
350 (s390_relocate_instruction): New function.
351 (s390_install_fast_tracepoint_jump_pad): New function.
352 (s390_get_min_fast_tracepoint_insn_len): New function.
353 (s390_get_ipa_tdesc_idx): New function.
354 (struct linux_target_ops): Wire in the above functions.
355 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
356 * linux-s390-tdesc.h: New file.
358 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
360 * linux-s390-low.c (s390_supports_tracepoints): New function.
361 (struct linux_target_ops): Fill supports_tracepoints hook.
363 2016-03-18 Yao Qi <yao.qi@linaro.org>
365 * linux-low.c (lwp_signal_can_be_delivered): New function.
366 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
368 2016-03-18 Yao Qi <yao.qi@linaro.org>
370 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
371 0 if signal is enqueued. Remove 'signal' from one debugging
372 message. Move one debugging message to some lines below.
373 Remove code setting 'signal' to 0.
375 2016-03-18 Yao Qi <yao.qi@linaro.org>
377 * linux-low.c (linux_low_filter_event): Remove redundant
378 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
380 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
382 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
383 (struct linux_target_ops): Wire in the above.
385 2016-03-03 Yao Qi <yao.qi@linaro.org>
387 * linux-low.c: Update comments to start_step_over.
389 2016-03-03 Yao Qi <yao.qi@linaro.org>
392 * linux-low.c (handle_extended_wait): Set child suspended
393 if event_lwp->bp_reinsert isn't zero.
395 2016-03-02 Yao Qi <yao.qi@linaro.org>
397 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
398 enqueue_pending_signal.
400 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
402 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
405 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
407 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
408 (s390_regmap_3264) [!__s390x__]: New global.
409 (s390_collect_ptrace_register): Skip map entries containing -1.
410 (s390_supply_ptrace_register): Ditto.
411 (s390_fill_gprs_high): New function.
412 (s390_store_gprs_high): New function.
413 (s390_regsets): Add NT_S390_HIGH_GPRS.
414 (s390_get_hwcap): Enable on 31-bit.
415 (have_hwcap_s390_high_gprs): Enable on 31-bit.
416 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
417 Detect NT_S390_HIGH_GPRS.
418 (s390_usrregs_info_3264): Enable on 31-bit.
419 (s390_regs_info): Enable regs_info_3264 on 31-bit.
420 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
422 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
425 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
426 * configure.srv: Ditto.
427 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
428 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
429 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
430 (init_registers_amd64_linux): Remove prototype.
431 (tdesc_amd64_linux): Remove declaration.
432 (get_ipa_tdesc): New function.
433 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
434 initialize remaining tdescs.
435 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
436 (init_registers_i386_linux): Remove prototype.
437 (tdesc_i386_linux): Remove declaration.
438 (get_ipa_tdesc): New function.
439 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
440 initialize remaining tdescs.
441 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
442 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
443 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
444 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
445 (x86_get_ipa_tdesc_idx): New function.
446 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
447 * linux-x86-tdesc.h: New file.
448 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
449 (target_get_ipa_tdesc_idx): New macro.
450 * tracepoint.c (ipa_tdesc_idx): New macro.
451 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
452 (symbol_list): Add ipa_tdesc_idx.
453 (cmd_qtstart): Write ipa_tdesc_idx in the target.
455 (ipa_tdesc_idx): New variable.
456 (get_context_regcache): Use get_ipa_tdesc.
457 (gdb_collect): Ditto.
459 * tracepoint.h (get_ipa_tdesc): New prototype.
462 2016-02-24 Pedro Alves <palves@redhat.com>
464 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
465 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
466 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
467 Factor out common code between the USE_SIGTRAP_SIGINFO and
468 !USE_SIGTRAP_SIGINFO blocks.
469 (linux_low_filter_event): Call save_stop_reason instead of
470 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
472 (linux_wait_1): Update comments.
474 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
476 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
477 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
478 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
479 ppc_insert_point, ppc_remove_point.
481 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
483 * linux-s390-low.c (s390_supports_z_point_type): New function.
484 (struct linux_target_ops): Wire s390_supports_z_point_type in.
486 2016-02-16 Yao Qi <yao.qi@linaro.org>
488 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
489 PC. Get pc from regcache_read_pc.
491 2016-02-12 Yao Qi <yao.qi@linaro.org>
493 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
494 or linux_get_pc_32bit.
495 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
497 2016-02-12 Yao Qi <yao.qi@linaro.org>
499 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
500 arm_linux_get_next_pcs_fixup.
502 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
504 * tracepoint.c (x_tracepoint_action_download): Change
505 write_inferior_data_ptr to write_inferior_data_pointer.
506 (cmd_qtstart): Likewise.
507 (write_inferior_data_ptr): Remove.
508 (download_agent_expr): Change write_inferior_data_ptr to
509 write_inferior_data_pointer.
510 (download_tracepoint_1): Likewise.
511 (download_tracepoint): Likewise.
512 (download_trace_state_variables): Likewise.
514 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
515 Marcin Kościelnicki <koriakin@0x04.net>
517 * tracepoint.c (struct tracepoint_action_ops): Remove.
518 (struct tracepoint_action): Remove ops.
519 (m_tracepoint_action_download, r_tracepoint_action_download)
520 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
521 size and offset accordingly.
522 (m_tracepoint_action_ops, r_tracepoint_action_ops)
523 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
524 (tracepoint_action_send, tracepoint_action_download): New functions.
525 Helpers for trace action handlers.
526 (add_tracepoint_action): Remove setup actions ops.
527 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
529 2016-02-10 Yao Qi <yao.qi@linaro.org>
531 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
533 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
535 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
537 * configure: Regenerate.
539 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
541 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
542 void * to gdb_byte *.
543 * linux-low.c (siginfo_fixup): Likewise.
544 (linux_xfer_siginfo): Likewise.
545 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
547 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
549 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
551 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
553 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
555 * linux-x86-low.c [__x86_64__]: Include
556 "nat/amd64-linux-siginfo.h".
557 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
558 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
559 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
560 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
561 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
562 (cpt_si_fd, si_timerid, si_overrun): Move from
563 nat/amd64-linux-siginfo.c.
564 * Makefile.in (amd64-linux-siginfo.o:): New rule.
566 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
568 * server.c (skip_to_semicolon): Remove.
569 (process_point_options): Use strchrnul instead of
572 2016-01-26 Yao Qi <yao.qi@linaro.org>
574 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
575 * linux-low.c (install_software_single_step_breakpoints): Don't
576 call regcache_read_pc.
577 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
580 2016-01-26 Yao Qi <yao.qi@linaro.org>
582 * linux-low.c (install_software_single_step_breakpoints): Call
583 regcache_read_pc instead of get_pc.
585 2016-01-26 Yao Qi <yao.qi@linaro.org>
587 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
588 (unblock_async_io): Rename to ...
589 (block_unblock_async_io): ... it. New function.
590 (enable_async_io): Don't install SIGIO handler. Unblock it
592 (disable_async_io): Don't ignore SIGIO. Block it instead.
593 (initialize_async_io): Install SIGIO handler. Don't call
596 2016-01-26 Yao Qi <yao.qi@linaro.org>
598 * remote-utils.c (getpkt): If the buffer isn't empty, and the
599 first character is '\003', call *the_target->request_interrupt.
601 2016-01-25 Yao Qi <yao.qi@linaro.org>
603 * remote-utils.c (new_thread_notify): Remove.
604 (dead_thread_notify): Likewise.
605 * remote-utils.h (new_thread_notify): Remove declaration.
606 (dead_thread_notify): Likewise.
608 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
610 * gdb.trace/pending.exp: Fix expected message on continue.
612 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
614 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
615 it works properly on big-endian machines where sizeof (CORE_ADDR)
618 2016-01-21 Pedro Alves <palves@redhat.com>
620 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
621 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
622 * configure: Regenerate.
624 2016-01-21 Yao Qi <yao.qi@linaro.org>
626 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
627 is_thumb and set it according to CPSR saved on the stack.
628 (get_next_pcs_syscall_next_pc): Pass is_thumb to
629 arm_sigreturn_next_pc.
631 2016-01-18 Yao Qi <yao.qi@linaro.org>
633 * linux-low.c (linux_set_pc_64bit): New function.
634 (linux_get_pc_64bit): New function.
635 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
637 * linux-sparc-low.c (debug_threads): Remove declaration.
638 (sparc_get_pc): Remove.
639 (the_low_target): Use linux_get_pc_64bit instead of
641 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
642 (the_low_target): Use linux_get_pc_64bit and
645 2016-01-18 Yao Qi <yao.qi@linaro.org>
647 * linux-arm-low.c (debug_threads): Remove declaration.
648 (arm_get_pc, arm_set_pc): Remove.
649 (the_low_target): Use linux_get_pc_32bit and
651 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
652 (the_low_target): Use linux_get_pc_32bit and
654 * linux-cris-low.c (debug_threads): Remove declaration.
655 (cris_get_pc, cris_set_pc,): Remove.
656 (the_low_target): Use linux_get_pc_32bit and
658 * linux-crisv32-low.c (debug_threads): Remove declaration.
659 (cris_get_pc, cris_set_pc): Remove.
660 (the_low_target): Use linux_get_pc_32bit and
662 * linux-low.c: Include inttypes.h.
663 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
664 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
665 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
666 (the_low_target): Use linux_get_pc_32bit and
668 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
669 (the_low_target): Use linux_get_pc_32bit and
671 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
672 (the_low_target): Use linux_get_pc_32bit and
674 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
675 (the_low_target): Use linux_get_pc_32bit and
677 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
678 (the_low_target): Use linux_get_pc_32bit and
681 2016-01-18 Gary Benson <gbenson@redhat.com>
683 * configure.ac (AC_FUNC_FORK): New check.
684 * config.in: Regenerate.
685 * configure: Likewise.
687 2016-01-14 Yao Qi <yao.qi@linaro.org>
689 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
690 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
691 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
692 arm_get_next_pcs_ctor.
694 2016-01-12 Josh Stone <jistone@redhat.com>
695 Philippe Waroquiers <philippe.waroquiers@skynet.be>
697 * inferiors.h: Include "gdb_vecs.h".
698 (struct process_info): Add syscalls_to_catch.
699 * inferiors.c (remove_process): Free syscalls_to_catch.
700 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
701 syscall_return stops.
702 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
703 * server.c (handle_general_set): Handle QCatchSyscalls.
704 (handle_query): Report support for QCatchSyscalls.
705 * target.h (struct target_ops): Add supports_catch_syscall.
706 (target_supports_catch_syscall): New macro.
707 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
708 (struct lwp_info): Add syscall_state.
709 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
710 Maintain syscall_state and syscalls_to_catch across exec.
711 (get_syscall_trapinfo): New function, proxy to the_low_target.
712 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
713 (linux_low_filter_event): Toggle syscall_state entry/return for
714 syscall traps, and set it ignored for all others.
715 (gdb_catching_syscalls_p): New function.
716 (gdb_catch_this_syscall_p): New function.
717 (linux_wait_1): Handle SYSCALL_SIGTRAP.
718 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
719 (linux_supports_catch_syscall): New function.
720 (linux_target_ops): Install it.
721 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
722 (the_low_target): Install it.
724 2016-01-12 Mike Frysinger <vapier@gentoo.org>
726 * acinclude.m4: Include new ../warning.m4 file.
727 * configure: Regenerated.
728 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
730 2016-01-12 Mike Frysinger <vapier@gentoo.org>
732 * ax.c (is_goto_target): Mark static.
733 * linux-low.c (register_addr): Likewise.
734 (linux_fetch_registers, linux_store_registers): Likewise.
735 * mem-break.c (any_persistent_commands): Fix old prototype.
736 (add_commands_to_breakpoint): Mark static.
737 * regcache.c (find_register_by_name): Delete unused func.
738 * remote-utils.c (hex_or_minus_one): Mark static.
739 * server.c (monitor_show_help): Mark static.
740 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
741 handle_v_requests): Likewise.
743 2016-01-12 Pedro Alves <palves@redhat.com>
745 Remove use of the registered trademark symbol throughout.
747 2016-01-08 Yao Qi <yao.qi@linaro.org>
749 * remote-utils.c (getpkt): If c is '\003', call target hook
752 2016-01-06 Yao Qi <yao.qi@linaro.org>
754 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
756 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
757 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
758 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
759 (thumb2_breakpoint): Declare.
760 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
762 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
763 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
764 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
766 2016-01-01 Joel Brobecker <brobecker@adacore.com>
768 * gdbreplay.c (gdbreplay_version): Change copyright year in
770 * server.c (gdbserver_version): Likewise.
772 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
774 * server.c (crc32_table): Delete.
775 (crc32): Use libiberty's xcrc32 function.
777 2015-12-22 Joel Brobecker <brobecker@adacore.com>
779 * lynx-low.c (lynx_delete_thread_callback): New function.
780 (lynx_mourn): Properly delete our process and all of its
781 threads. Remove call to clear_inferiors.
783 2015-12-22 Joel Brobecker <brobecker@adacore.com>
785 * target.c (thread_search_callback): Add check that
786 the thread_stopped target callback is not NULL before
789 2015-12-21 Yao Qi <yao.qi@linaro.org>
791 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
794 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
796 * server.c (handle_query): Call target_supports_software_single_step.
798 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
800 * linux-low.c (single_step): New function.
801 (linux_resume_one_lwp_throw): Call single_step.
802 (start_step_over): Likewise.
804 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
806 * Makefile.in (SFILES): Append arch/arm-linux.c,
807 arch/arm-get-next-pcs.c.
808 (arm-linux.o): New rule.
809 (arm-get-next-pcs.o): New rule.
810 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
812 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
813 to linux-aarch32-low.c.
814 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
815 (arm_breakpoint_len, thumb_breakpoint): Likewise.
816 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
817 (thumb2_breakpoint_len): Likewise.
818 (arm_is_thumb_mode): Make non-static.
819 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
820 from linux-aarch32-low.c.
821 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
822 (arm_breakpoint_len, thumb_breakpoint): Likewise.
823 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
824 (thumb2_breakpoint_len): Likewise.
825 (arm_is_thumb_mode): New declaration.
826 * linux-arm-low.c: Include arch/arm-linux.h
827 aarch/arm-get-next-pcs.h, sys/syscall.h.
828 (get_next_pcs_ops): New struct.
829 (get_next_pcs_addr_bits_remove): New function.
830 (get_next_pcs_is_thumb): New function.
831 (get_next_pcs_read_memory_unsigned_integer): Likewise.
832 (arm_sigreturn_next_pc): Likewise.
833 (get_next_pcs_syscall_next_pc): Likewise.
834 (arm_gdbserver_get_next_pcs): Likewise.
835 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
837 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
838 * server.h: Include gdb_vecs.h.
840 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
842 * Makefile.in (SFILES): Append common/common-regcache.c.
843 (OBS): Append common-regcache.o.
844 (common-regcache.o): New rule.
845 * regcache.c (init_register_cache): Initialize cache to
847 (regcache_raw_read_unsigned): New function.
848 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
849 register_status enum.
851 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
853 * linux-aarch64-low.c (the_low_targets): Rename
854 breakpoint_reinsert_addr to get_next_pcs.
855 * linux-arm-low.c (the_low_targets): Likewise.
856 * linux-bfin-low.c (the_low_targets): Likewise.
857 * linux-cris-low.c (the_low_targets): Likewise.
858 * linux-crisv32-low.c (the_low_targets): Likewise.
859 * linux-low.c (can_software_single_step): Likewise.
860 (install_software_single_step_breakpoints): New function.
861 (start_step_over): Use install_software_single_step_breakpoints.
862 * linux-low.h: New CORE_ADDR vector.
863 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
865 * linux-mips-low.c (the_low_targets): Likewise.
866 * linux-nios2-low.c (the_low_targets): Likewise.
867 * linux-sparc-low.c (the_low_targets): Likewise.
869 2015-12-17 Pedro Alves <palves@redhat.com>
871 * linux-low.c (linux_kill_one_lwp): Remove references to
873 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
875 (linux_init_signals): Delete.
876 (initialize_low): Adjust.
877 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
879 2015-12-16 Pedro Alves <palves@redhat.com>
881 * configure.ac (compiler warning flags): When testing a
882 -Wno-foo option, check whether -Wfoo works instead.
883 * configure: Regenerate.
885 2015-12-11 Don Breazeal <donb@codesourcery.com>
887 * server.c (process_serial_event): Don't exit from gdbserver
888 in remote mode if there are still active inferiors.
890 2015-12-11 Yao Qi <yao.qi@linaro.org>
892 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
893 arm_breakpoint_at if the process is 32-bit.
895 2015-12-11 Yao Qi <yao.qi@linaro.org>
897 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
900 2015-12-07 Yao Qi <yao.qi@linaro.org>
902 * configure.srv: Append arm.o to srv_tgtobj for
903 aarch64*-*-linux* target.
904 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
905 from linux-arm-low.c.
906 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
907 (arm_breakpoint_len, thumb_breakpoint): Likewise.
908 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
909 (thumb2_breakpoint_len): Likewise.
910 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
911 (arm_breakpoint_kinds): Likewise.
912 (arm_breakpoint_kind_from_pc): Likewise.
913 (arm_sw_breakpoint_from_kind): Likewise.
914 (arm_breakpoint_kind_from_current_state): Likewise.
915 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
916 (arm_sw_breakpoint_from_kind): Declare.
917 (arm_breakpoint_kind_from_current_state): Declare.
918 (arm_breakpoint_at): Declare.
919 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
920 arm_sw_breakpoint_from_kind if process is 32-bit.
921 (aarch64_breakpoint_kind_from_pc): New function.
922 (aarch64_breakpoint_kind_from_current_state): New function.
923 (the_low_target): Initialize fields breakpoint_kind_from_pc
924 and breakpoint_kind_from_current_state.
925 * linux-arm-low.c (arm_breakpoint_kinds): Move to
927 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
928 (arm_breakpoint, arm_breakpoint_len): Likewise.
929 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
930 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
931 (arm_is_thumb_mode): Likewise.
932 (arm_breakpoint_at): Likewise.
933 (arm_breakpoint_kind_from_pc): Likewise.
934 (arm_sw_breakpoint_from_kind): Likewise.
935 (arm_breakpoint_kind_from_current_state): Likewise.
938 2015-08-04 Yao Qi <yao.qi@linaro.org>
940 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
941 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
942 * server.c (extended_protocol): Remove "static".
943 * server.h (extended_protocol): Declare it.
945 2015-12-04 Josh Stone <jistone@redhat.com>
947 * target.h (struct target_ops) <arch_setup>: Rename to ...
948 (struct target_ops) <post_create_inferior>: ... this.
949 (target_arch_setup): Rename to ...
950 (target_post_create_inferior): ... this, calling post_create_inferior.
951 * server.c (start_inferior): Update target_arch_setup calls to
952 target_post_create_inferior.
953 * linux-low.c (linux_low_ptrace_options): Forward declare.
954 (linux_arch_setup): Update its comment for general use.
955 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
956 (struct linux_target_ops): Use linux_post_create_inferior.
957 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
958 to post_create_inferior.
959 * nto-low.c (struct nto_target_ops): Likewise.
960 * spu-low.c (struct spu_target_ops): Likewise.
961 * win32-low.c (struct win32_target_ops): Likewise.
963 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
965 * linux-arm-low.c: Remove duplicate arch/arm.h include.
967 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
969 * linux-arm-low.c (arm_reinsert_addr): Remove function.
970 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
971 * linux-cris-low.c (cris_reinsert_addr> Remove function.
972 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
973 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
974 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
975 * linux-mips-low.c (mips_reinsert_addr): Remove function.
976 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
977 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
978 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
979 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
980 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
982 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
984 * linux-low.c (linux_look_up_symbols): Don't call
985 linux_supports_traceclone.
986 * linux-low.h (thread_db_init): Remove use_events argument.
987 * thread-db.c (thread_db_use_event): Remove global variable.
988 (struct thread_db) <td_thr_event_enable_p>: Remove field.
989 (struct thread_db) <td_create_bp>: Remove field.
990 (thread_db_create_event): Remove function.
991 (thread_db_enable_reporting): Likewise.
992 (find_one_thread): Don't check for thread_db_use_events.
993 (attach_thread): Likewise.
994 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
995 (try_thread_db_load_1): Don't check for thread_db_use_events.
996 (thread_db_init): Remove use_events argument and thread events
998 (remove_thread_event_breakpoints): Remove function.
999 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1001 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1003 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1005 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1006 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1007 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1008 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1009 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1011 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1013 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1014 * linux-low.c (can_hardware_single_step): Use
1015 supports_hardware_single_step.
1016 (can_software_single_step): New function.
1017 (start_step_over): Call can_software_single_step.
1018 (linux_supports_hardware_single_step): New function.
1019 (struct target_ops) <supports_software_single_step>: Initialize.
1020 * linux-low.h (struct linux_target_ops)
1021 <supports_hardware_single_step>: Initialize.
1022 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1023 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1024 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1025 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1026 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1027 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1028 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1029 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1030 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1031 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1033 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1034 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1036 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1037 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1038 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1040 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1041 * target.h (struct target_ops): <supports_software_single_step>:
1043 (target_supports_software_single_step): New macro.
1045 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1047 * linux-low.c (linux_wait_1): Fix pc advance condition.
1048 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1049 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1051 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1053 * linux-arm-low.c (arm_is_thumb_mode): New function.
1054 (arm_breakpoint_at): Use arm_is_thumb_mode.
1055 (arm_breakpoint_kind_from_current_state): New function.
1056 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1058 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1059 (linux_breakpoint_kind_from_current_state): New function.
1060 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1061 * linux-low.h (struct linux_target_ops)
1062 <breakpoint_kind_from_current_state>: New field.
1063 * target.h (struct target_ops): Likewise.
1064 (target_breakpoint_kind_from_current_state): New macro.
1066 2015-11-30 Pedro Alves <palves@redhat.com>
1068 * linux-low.c (linux_resume): Wake up the event loop before
1071 2015-11-30 Pedro Alves <palves@redhat.com>
1073 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1075 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1077 * target.c (struct thread_search): New structure.
1078 (thread_search_callback): New function.
1079 (prev_general_thread): New global.
1080 (prepare_to_access_memory, done_accessing_memory): New functions.
1081 * target.h (prepare_to_access_memory, done_accessing_memory):
1082 Replace macros with function declarations.
1084 2015-11-30 Pedro Alves <palves@redhat.com>
1087 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1088 report TARGET_WAITKIND_NO_RESUMED.
1089 * remote-utils.c (prepare_resume_reply): Handle
1090 TARGET_WAITKIND_NO_RESUMED.
1091 * server.c (report_no_resumed): New global.
1092 (handle_query) <qSupported>: Handle "no-resumed+". Report
1093 "no-resumed+" support.
1094 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1095 return error if the client doesn't support no-resumed events.
1096 (push_stop_notification): New function.
1097 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1098 events if the client supports them.
1100 2015-11-30 Pedro Alves <palves@redhat.com>
1102 * linux-low.c (thread_still_has_status_pending_p): Don't check
1104 (lwp_resumed): New function.
1105 (status_pending_p_callback): Return early if the LWP is not
1106 supposed to be resumed.
1108 2015-11-30 Pedro Alves <palves@redhat.com>
1110 * linux-low.c (handle_extended_wait): Assert that the LWP's
1111 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1112 thread create events, leave the new child's status pending.
1113 (linux_low_filter_event): If GDB wants to hear about thread exit
1114 events, leave the LWP marked dead and don't delete it.
1115 (linux_wait_for_event_filtered): Don't check for thread exit.
1116 (filter_exit_event): New function.
1117 (linux_wait_1): Use it, when returning an exit event.
1118 (linux_resume_one_lwp_throw): Assert that the LWP's
1119 waitstatus is TARGET_WAITKIND_IGNORE.
1120 * remote-utils.c (prepare_resume_reply): Handle
1121 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1122 * server.c (report_thread_events): New global.
1123 (handle_general_set): Handle QThreadEvents.
1124 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1125 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1126 TARGET_WAITKIND_THREAD_EXITED.
1127 * server.h (report_thread_events): Declare.
1129 2015-11-30 Pedro Alves <palves@redhat.com>
1131 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1132 the thread's last_resume_kind was resume_stop.
1134 2015-11-30 Pedro Alves <palves@redhat.com>
1136 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1139 2015-11-30 Pedro Alves <palves@redhat.com>
1141 * server.c (handle_v_requests): Handle vCtrlC.
1143 2015-11-30 Pedro Alves <palves@redhat.com>
1145 * gdbthread.h (find_any_thread_of_pid): Declare.
1146 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1148 * server.c (handle_query): If current_thread is NULL, look for
1149 another thread of the selected process.
1151 2015-11-26 Daniel Colascione <dancol@dancol.org>
1152 Simon Marchi <simon.marchi@ericsson.com>
1154 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1155 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1157 * target.h (struct target_ops) <thread_name>: New field.
1158 (target_thread_name): New macro.
1160 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1162 * regcache.h (regcache_invalidate_pid): Add declaration.
1163 * regcache.c (regcache_invalidate_pid): New function, extracted
1164 from regcache_invalidate.
1165 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1166 Add trivial documentation comment.
1167 * lynx-low.c: Use regcache_invalidate_pid instead of
1168 regcache_invalidate.
1170 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1172 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1173 and Elf64_auxv_t if the target is Android.
1175 2015-11-22 Doug Evans <xdje42@gmail.com>
1177 * target.h: #include <sys/types.h>.
1179 2015-11-19 Pedro Alves <palves@redhat.com>
1181 * linux-low.c (linux_process_qsupported): Change prototype.
1183 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1185 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1186 and adjust to loop over all features.
1187 * server.c (handle_query) <qSupported>: Adjust to call
1188 target_process_qsupported once, passing it a vector of unprocessed
1190 * target.h (struct target_ops) <process_qsupported>: Change
1192 (target_process_qsupported): Adjust.
1194 2015-11-19 Pedro Alves <palves@redhat.com>
1196 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1198 * configure: Regenerate.
1200 2015-11-19 Pedro Alves <palves@redhat.com>
1202 * configure: Regenerate.
1204 2015-11-19 Yao Qi <yao.qi@linaro.org>
1206 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1209 2015-11-19 Yao Qi <yao.qi@linaro.org>
1211 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1212 (struct aarch64_operand): Move enum out.
1214 2015-11-19 Yao Qi <yao.qi@linaro.org>
1216 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1217 struct user_fpsimd_state *.
1218 (aarch64_store_fpregset): Likewise.
1220 2015-11-19 Yao Qi <yao.qi@linaro.org>
1222 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1223 struct user_pt_regs *.
1224 (aarch64_store_gregset): Likewise.
1226 2015-11-18 Pedro Alves <palves@redhat.com>
1228 * Makefile.in (all_object_files): Add $IPA_OBJS.
1230 2015-11-17 Pedro Alves <palves@redhat.com>
1232 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1233 GDB_SIGNAL_0 and gdb_signal_to_string.
1235 2015-11-17 Pedro Alves <palves@redhat.com>
1237 * win32-low.c (handle_output_debug_string): Remove parameter.
1238 (win32_kill): Remove our_status local and adjust call to
1239 handle_output_debug_string.
1240 (get_child_debug_event): Adjust call to
1241 handle_output_debug_string.
1243 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1245 * linux-mips-low.c (mips_fill_gregset): Add cast.
1246 (mips_store_gregset): Likewise.
1247 (mips_fill_fpregset): Likewise.
1248 (mips_store_fpregset): Likewise.
1250 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1252 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1255 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1257 * linux-mips-low.c (mips_linux_new_thread): Change type of
1258 watch_type to enum target_hw_bp_type.
1260 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1262 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1263 Change return type to arm_hwbp_type.
1265 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1267 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1268 (arm_store_gregset): Likewise.
1269 * linux-arm-low.c (arm_get_hwcap): Likewise.
1270 (arm_read_description): Likewise.
1272 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1274 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1276 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1278 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1279 (ppc_fill_vsxregset): Likewise.
1280 (ppc_store_vsxregset): Likewise.
1281 (ppc_fill_vrregset): Likewise.
1282 (ppc_store_vrregset): Likewise.
1283 (ppc_fill_evrregset): Likewise.
1284 (ppc_store_evrregset): Likewise.
1286 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1288 * linux-ppc-low.c (ppc_usrregs_info): Remove
1289 forward-declaration.
1290 (ppc_arch_setup): Move lower in file.
1292 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1294 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1295 (ps_pdwrite): Likewise.
1297 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1299 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1300 to after assert checks.
1302 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1304 * proc-service.c (ps_pdread): Add/adjust casts.
1305 (ps_pdwrite): Add/adjust casts.
1307 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1309 * server.c (handle_search_memory_1): Cast return value of
1312 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1314 * server.c (write_qxfer_response): Change type of data to
1317 2015-10-29 Pedro Alves <palves@redhat.com>
1319 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1321 2015-10-29 Pedro Alves <palves@redhat.com>
1323 * tracepoint.c (clear_installed_tracepoints): Add casts.
1325 2015-10-29 Pedro Alves <palves@redhat.com>
1327 * server.c (handle_v_cont, process_serial_event): Add enum
1328 gdb_signal casts to signal parsing code.
1330 2015-10-29 Pedro Alves <palves@redhat.com>
1332 * linux-low.h (NULL_REGSET): Define.
1333 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1334 * linux-arm-low.c (arm_regsets): Likewise.
1335 * linux-crisv32-low.c (cris_regsets): Likewise.
1336 * linux-m68k-low.c (m68k_regsets): Likewise.
1337 * linux-mips-low.c (mips_regsets): Likewise.
1338 * linux-nios2-low.c (nios2_regsets): Likewise.
1339 * linux-ppc-low.c (ppc_regsets): Likewise.
1340 * linux-s390-low.c (s390_regsets): Likewise.
1341 * linux-sh-low.c (sh_regsets): Likewise.
1342 * linux-sparc-low.c (sparc_regsets): Likewise.
1343 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1344 * linux-tile-low.c (tile_regsets): Likewise.
1345 * linux-x86-low.c (x86_regsets): Likewise.
1346 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1348 2015-10-29 Pedro Alves <palves@redhat.com>
1350 * linux-low.h (NULL_REGSET): Define.
1351 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1352 * linux-arm-low.c (arm_regsets): Likewise.
1353 * linux-crisv32-low.c (cris_regsets): Likewise.
1354 * linux-m68k-low.c (m68k_regsets): Likewise.
1355 * linux-mips-low.c (mips_regsets): Likewise.
1356 * linux-nios2-low.c (nios2_regsets): Likewise.
1357 * linux-ppc-low.c (ppc_regsets): Likewise.
1358 * linux-s390-low.c (s390_regsets): Likewise.
1359 * linux-sh-low.c (sh_regsets): Likewise.
1360 * linux-sparc-low.c (sparc_regsets): Likewise.
1361 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1362 * linux-tile-low.c (tile_regsets): Likewise.
1363 * linux-x86-low.c (x86_regsets): Likewise.
1364 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1366 2015-10-26 Doug Evans <dje@google.com>
1368 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1370 2015-10-26 Doug Evans <dje@google.com>
1372 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1374 2015-10-26 Doug Evans <dje@google.com>
1376 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1378 (attach_thread, find_new_threads_callback): Ditto.
1380 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1382 * mem-break.h (set_breakpoint_data): Remove.
1384 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1386 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1387 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1388 (initialize_low): Remove set_breakpoint_data call.
1389 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1390 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1391 (initialize_low): Remove set_breakpoint_data call.
1392 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1393 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1394 (initialize_low): Remove set_breakpoint_data call.
1396 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1398 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1399 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1400 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1401 * target.h (target_breakpoint_kind_from_pc): New macro.
1403 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1405 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1406 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1407 the default breakpoint kind.
1409 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1411 * linux-arm-low.c (arm_supports_z_point_type): Add software
1414 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1416 * linux-arm-low.c: Refactor breakpoint definitions.
1417 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1418 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1420 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1422 * Makefile.in: Add arm.c/o.
1423 * configure.srv: Likewise.
1424 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1425 (arm_breakpoint_kind_from_pc): New function.
1426 (arm_sw_breakpoint_from_kind): Return proper kind.
1427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1429 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1431 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1433 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1434 (struct raw_breakpoint) <size>: Remove.
1435 (struct raw_breakpoint) <kind>: Add.
1436 (bp_size): New function.
1437 (bp_opcode): Likewise.
1438 (find_raw_breakpoint_at): Adjust for kind.
1439 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1440 (remove_memory_breakpoint): Adjust for kind call bp_size.
1441 (set_raw_breakpoint_at): Adjust for kind.
1442 (set_breakpoint): Likewise.
1443 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1444 (delete_raw_breakpoint): Adjust for kind.
1445 (delete_breakpoint): Likewise.
1446 (find_gdb_breakpoint): Likewise.
1447 (set_gdb_breakpoint_1): Likewise.
1448 (set_gdb_breakpoint): Likewise.
1449 (delete_gdb_breakpoint_1): Likewise.
1450 (delete_gdb_breakpoint): Likewise.
1451 (uninsert_raw_breakpoint): Likewise.
1452 (reinsert_raw_breakpoint): Likewise.
1453 (set_breakpoint_data): Remove.
1454 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1455 (check_mem_read): Adjust for kind call bp_size.
1456 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1457 (clone_one_breakpoint): Adjust for kind.
1458 * mem-break.h (set_gdb_breakpoint): Likewise.
1459 (delete_gdb_breakpoint): Likewise.
1460 * server.c (process_serial_event): Likewise.
1462 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1464 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1465 (struct linux_target_ops) <breakpoint>: Remove.
1466 (struct linux_target_ops) <breakpoint_len>: Remove.
1467 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1468 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1469 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1470 (arm_sw_breakpoint_from_kind): New function.
1471 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1472 (struct linux_target_ops) <breakpoint>: Remove.
1473 (struct linux_target_ops) <breakpoint_len>: Remove.
1474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1476 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1477 (struct linux_target_ops) <breakpoint>: Remove.
1478 (struct linux_target_ops) <breakpoint_len>: Remove.
1479 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1480 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1481 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1482 (struct linux_target_ops) <breakpoint>: Remove.
1483 (struct linux_target_ops) <breakpoint_len>: Remove.
1484 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1485 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1486 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1487 and sw_breakpoint_from_kind to increment the pc.
1488 (linux_breakpoint_kind_from_pc): New function.
1489 (linux_sw_breakpoint_from_kind): New function.
1490 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1491 (initialize_low): Call breakpoint_kind_from_pc and
1492 sw_breakpoint_from_kind to replace breakpoint_data/len.
1493 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1495 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1496 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1497 (struct linux_target_ops) <breakpoint>: Remove.
1498 (struct linux_target_ops) <breakpoint_len>: Remove.
1499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1501 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1502 (struct linux_target_ops) <breakpoint>: Remove.
1503 (struct linux_target_ops) <breakpoint_len>: Remove.
1504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1506 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1507 (struct linux_target_ops) <breakpoint>: Remove.
1508 (struct linux_target_ops) <breakpoint_len>: Remove.
1509 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1510 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1511 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1512 (struct linux_target_ops) <breakpoint>: Remove.
1513 (struct linux_target_ops) <breakpoint_len>: Remove.
1514 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1515 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1516 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1517 (struct linux_target_ops) <breakpoint>: Remove.
1518 (struct linux_target_ops) <breakpoint_len>: Remove.
1519 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1520 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1521 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1522 (struct linux_target_ops) <breakpoint>: Remove.
1523 (struct linux_target_ops) <breakpoint_len>: Remove.
1524 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1525 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1526 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1527 (struct linux_target_ops) <breakpoint>: Remove.
1528 (struct linux_target_ops) <breakpoint_len>: Remove.
1529 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1530 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1531 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1532 (struct linux_target_ops) <breakpoint>: Remove.
1533 (struct linux_target_ops) <breakpoint_len>: Remove.
1534 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1535 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1536 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1537 (struct linux_target_ops) <breakpoint>: Remove.
1538 (struct linux_target_ops) <breakpoint_len>: Remove.
1539 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1540 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1541 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1542 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1543 (struct linux_target_ops) <breakpoint>: Remove.
1544 (struct linux_target_ops) <breakpoint_len>: Remove.
1545 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1546 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1547 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1548 (struct linux_target_ops) <breakpoint>: Remove.
1549 (struct linux_target_ops) <breakpoint_len>: Remove.
1550 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1551 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1553 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1555 * linux-cris-low.c (cris_get_pc): Remove void arg.
1557 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1559 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1562 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1564 * inferiors.c (thread_pid_matches_callback): New function.
1565 (find_thread_process): New function.
1566 (remove_thread): Reset current_thread.
1567 (remove_process): Assert threads have been removed first.
1569 2015-10-15 Yao Qi <yao.qi@linaro.org>
1571 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1573 (aarch64_remove_point): Likewise.
1574 * regcache.c (regcache_register_size): New function.
1576 2015-10-12 Yao Qi <yao.qi@linaro.org>
1578 * linux-aarch64-low.c: Update all callers as emit_load_store
1579 is renamed to aarch64_emit_load_store.
1581 2015-10-12 Yao Qi <yao.qi@linaro.org>
1583 * linux-aarch64-low.c: Update all callers of function renaming
1584 from emit_insn to aarch64_emit_insn.
1586 2015-10-12 Yao Qi <yao.qi@linaro.org>
1588 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1589 arch/aarch64-insn.h.
1590 (struct aarch64_memory_operand): Likewise.
1592 (emit_insn): Move to arch/aarch64-insn.c.
1593 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1594 (emit_load_store): Move to arch/aarch64-insn.c.
1595 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1596 (can_encode_int32): Remove.
1598 2015-10-12 Yao Qi <yao.qi@linaro.org>
1600 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1601 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1602 (aarch64_relocate_instruction): Likewise.
1603 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1604 (struct aarch64_insn_visitor): Likewise.
1606 2015-10-12 Yao Qi <yao.qi@linaro.org>
1608 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1609 (struct aarch64_insn_visitor): New.
1610 (struct aarch64_insn_relocation_data): New.
1611 (aarch64_ftrace_insn_reloc_b): New function.
1612 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1613 (aarch64_ftrace_insn_reloc_cb): Likewise.
1614 (aarch64_ftrace_insn_reloc_tb): Likewise.
1615 (aarch64_ftrace_insn_reloc_adr): Likewise.
1616 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1617 (aarch64_ftrace_insn_reloc_others): Likewise.
1619 (aarch64_relocate_instruction): Use visitor.
1621 2015-10-12 Yao Qi <yao.qi@linaro.org>
1623 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1624 int. Add argument buf.
1625 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1626 aarch64_relocate_instruction.
1628 2015-10-12 Yao Qi <yao.qi@linaro.org>
1630 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1631 argument insn. Remove local variable insn. Don't call
1633 (aarch64_install_fast_tracepoint_jump_pad): Call
1636 2015-09-30 Yao Qi <yao.qi@linaro.org>
1638 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1639 (emit_load_store_pair): Likewise.
1641 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1643 * dll.c (match_dll): Add cast(s).
1644 (unloaded_dll): Likewise.
1645 * linux-low.c (second_thread_of_pid_p): Likewise.
1646 (delete_lwp_callback): Likewise.
1647 (count_events_callback): Likewise.
1648 (select_event_lwp_callback): Likewise.
1649 (linux_set_resume_request): Likewise.
1650 * server.c (accumulate_file_name_length): Likewise.
1651 (emit_dll_description): Likewise.
1652 (handle_qxfer_threads_worker): Likewise.
1653 (visit_actioned_threads): Likewise.
1654 * thread-db.c (any_thread_of): Likewise.
1655 * tracepoint.c (same_process_p): Likewise.
1656 (match_blocktype): Likewise.
1657 (build_traceframe_info_xml): Likewise.
1659 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1661 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1663 (gdb_unparse_agent_expr): Likewise.
1664 * hostio.c (require_data): Likewise.
1665 (handle_pread): Likewise.
1666 * linux-low.c (disable_regset): Likewise.
1667 (fetch_register): Likewise.
1668 (store_register): Likewise.
1669 (get_dynamic): Likewise.
1670 (linux_qxfer_libraries_svr4): Likewise.
1671 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1672 (set_fast_tracepoint_jump): Likewise.
1673 (uninsert_fast_tracepoint_jumps_at): Likewise.
1674 (reinsert_fast_tracepoint_jumps_at): Likewise.
1675 (validate_inserted_breakpoint): Likewise.
1676 (clone_agent_expr): Likewise.
1677 * regcache.c (init_register_cache): Likewise.
1678 * remote-utils.c (putpkt_binary_1): Likewise.
1679 (decode_M_packet): Likewise.
1680 (decode_X_packet): Likewise.
1681 (look_up_one_symbol): Likewise.
1682 (relocate_instruction): Likewise.
1683 (monitor_output): Likewise.
1684 * server.c (handle_search_memory): Likewise.
1685 (handle_qxfer_exec_file): Likewise.
1686 (handle_qxfer_libraries): Likewise.
1687 (handle_qxfer): Likewise.
1688 (handle_query): Likewise.
1689 (handle_v_cont): Likewise.
1690 (handle_v_run): Likewise.
1691 (captured_main): Likewise.
1692 * target.c (write_inferior_memory): Likewise.
1693 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1694 * tracepoint.c (init_trace_buffer): Likewise.
1695 (add_tracepoint_action): Likewise.
1696 (add_traceframe): Likewise.
1697 (add_traceframe_block): Likewise.
1698 (cmd_qtdpsrc): Likewise.
1699 (cmd_qtdv): Likewise.
1700 (cmd_qtstatus): Likewise.
1701 (response_source): Likewise.
1702 (response_tsv): Likewise.
1703 (cmd_qtnotes): Likewise.
1704 (gdb_collect): Likewise.
1705 (initialize_tracepoint): Likewise.
1707 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1709 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1710 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1711 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1713 (enum aarch64_condition_codes): New enum.
1714 (w0): New static global.
1717 (struct aarch64_memory_operand) <type>: New
1718 MEMORY_OPERAND_POSTINDEX type.
1719 (postindex_memory_operand): New helper function.
1720 (emit_ret): New function.
1721 (emit_load_store_pair): New function, factored out of emit_stp
1722 with support for MEMORY_OPERAND_POSTINDEX.
1723 (emit_stp): Rewrite using emit_load_store_pair.
1724 (emit_ldp): New function.
1725 (emit_load_store): Likewise.
1726 (emit_ldr): Mention post-index instruction in comment.
1727 (emit_ldrh): New function.
1728 (emit_ldrb): New function.
1729 (emit_ldrsw): Mention post-index instruction in comment.
1730 (emit_str): Likewise.
1731 (emit_subs): New function.
1732 (emit_cmp): Likewise.
1733 (emit_and): Likewise.
1734 (emit_orr): Likewise.
1735 (emit_orn): Likewise.
1736 (emit_eor): Likewise.
1737 (emit_mvn): Likewise.
1738 (emit_lslv): Likewise.
1739 (emit_lsrv): Likewise.
1740 (emit_asrv): Likewise.
1741 (emit_mul): Likewise.
1742 (emit_sbfm): Likewise.
1743 (emit_sbfx): Likewise.
1744 (emit_ubfm): Likewise.
1745 (emit_ubfx): Likewise.
1746 (emit_csinc): Likewise.
1747 (emit_cset): Likewise.
1748 (emit_nop): Likewise.
1749 (emit_ops_insns): New helper function.
1750 (emit_pop): Likewise.
1751 (emit_push): Likewise.
1752 (aarch64_emit_prologue): New function.
1753 (aarch64_emit_epilogue): Likewise.
1754 (aarch64_emit_add): Likewise.
1755 (aarch64_emit_sub): Likewise.
1756 (aarch64_emit_mul): Likewise.
1757 (aarch64_emit_lsh): Likewise.
1758 (aarch64_emit_rsh_signed): Likewise.
1759 (aarch64_emit_rsh_unsigned): Likewise.
1760 (aarch64_emit_ext): Likewise.
1761 (aarch64_emit_log_not): Likewise.
1762 (aarch64_emit_bit_and): Likewise.
1763 (aarch64_emit_bit_or): Likewise.
1764 (aarch64_emit_bit_xor): Likewise.
1765 (aarch64_emit_bit_not): Likewise.
1766 (aarch64_emit_equal): Likewise.
1767 (aarch64_emit_less_signed): Likewise.
1768 (aarch64_emit_less_unsigned): Likewise.
1769 (aarch64_emit_ref): Likewise.
1770 (aarch64_emit_if_goto): Likewise.
1771 (aarch64_emit_goto): Likewise.
1772 (aarch64_write_goto_address): Likewise.
1773 (aarch64_emit_const): Likewise.
1774 (aarch64_emit_call): Likewise.
1775 (aarch64_emit_reg): Likewise.
1776 (aarch64_emit_pop): Likewise.
1777 (aarch64_emit_stack_flush): Likewise.
1778 (aarch64_emit_zero_ext): Likewise.
1779 (aarch64_emit_swap): Likewise.
1780 (aarch64_emit_stack_adjust): Likewise.
1781 (aarch64_emit_int_call_1): Likewise.
1782 (aarch64_emit_void_call_2): Likewise.
1783 (aarch64_emit_eq_goto): Likewise.
1784 (aarch64_emit_ne_goto): Likewise.
1785 (aarch64_emit_lt_goto): Likewise.
1786 (aarch64_emit_le_goto): Likewise.
1787 (aarch64_emit_gt_goto): Likewise.
1788 (aarch64_emit_ge_got): Likewise.
1789 (aarch64_emit_ops_impl): New static global variable.
1790 (aarch64_emit_ops): New target function, return
1791 &aarch64_emit_ops_impl.
1792 (struct linux_target_ops): Install it.
1794 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1796 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1797 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1799 * linux-aarch64-ipa.c: New file.
1800 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1802 (aarch64_get_thread_area): New target method.
1803 (extract_signed_bitfield): New helper function.
1804 (aarch64_decode_ldr_literal): New function.
1805 (enum aarch64_opcodes): New enum.
1806 (struct aarch64_register): New struct.
1807 (struct aarch64_operand): New struct.
1808 (x0): New static global.
1817 (aarch64_register): New helper function.
1818 (register_operand): Likewise.
1819 (immediate_operand): Likewise.
1820 (struct aarch64_memory_operand): New struct.
1821 (offset_memory_operand): New helper function.
1822 (preindex_memory_operand): Likewise.
1823 (enum aarch64_system_control_registers): New enum.
1824 (ENCODE): New macro.
1825 (emit_insn): New helper function.
1826 (emit_b): New function.
1827 (emit_bcond): Likewise.
1828 (emit_cb): Likewise.
1829 (emit_tb): Likewise.
1830 (emit_blr): Likewise.
1831 (emit_stp): Likewise.
1832 (emit_ldp_q_offset): Likewise.
1833 (emit_stp_q_offset): Likewise.
1834 (emit_load_store): Likewise.
1835 (emit_ldr): Likewise.
1836 (emit_ldrsw): Likewise.
1837 (emit_str): Likewise.
1838 (emit_ldaxr): Likewise.
1839 (emit_stxr): Likewise.
1840 (emit_stlr): Likewise.
1841 (emit_data_processing_reg): Likewise.
1842 (emit_data_processing): Likewise.
1843 (emit_add): Likewise.
1844 (emit_sub): Likewise.
1845 (emit_mov): Likewise.
1846 (emit_movk): Likewise.
1847 (emit_mov_addr): Likewise.
1848 (emit_mrs): Likewise.
1849 (emit_msr): Likewise.
1850 (emit_sevl): Likewise.
1851 (emit_wfe): Likewise.
1852 (append_insns): Likewise.
1853 (can_encode_int32_in): New helper function.
1854 (aarch64_relocate_instruction): New function.
1855 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1856 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1857 (struct linux_target_ops): Install aarch64_get_thread_area,
1858 aarch64_install_fast_tracepoint_jump_pad and
1859 aarch64_get_min_fast_tracepoint_insn_len.
1861 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1863 * Makefile.in (aarch64-insn.o): New rule.
1864 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1866 2015-09-21 Yao Qi <yao.qi@linaro.org>
1868 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1870 2015-09-21 Yao Qi <yao.qi@linaro.org>
1872 * tracepoint.c (max_jump_pad_size): Remove.
1874 2015-09-18 Yao Qi <yao.qi@linaro.org>
1876 * linux-aarch64-low.c: Don't include sys/uio.h.
1877 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1879 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1881 * tracepoint.c (eval_result_type): Change prototype.
1882 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1884 2015-09-15 Pedro Alves <palves@redhat.com>
1886 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1887 Check whether to report exec events instead of checking whether
1888 multiprocess is enabled.
1890 2015-09-15 Pedro Alves <palves@redhat.com>
1893 * remote-utils.c (prepare_resume_reply): Merge
1894 TARGET_WAITKIND_VFORK_DONE switch case with the
1895 TARGET_WAITKIND_FORKED case.
1897 2015-09-15 Yao Qi <yao.qi@linaro.org>
1899 * server.c (handle_query): Check string comparison using
1900 "else if" instead of "if".
1902 2015-09-15 Yao Qi <yao.qi@linaro.org>
1904 * server.c (vCont_supported): New global variable.
1905 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1906 matches. Append ";vContSupported+" to own_buf.
1907 (handle_v_requests): Append ";s;S" to own_buf if target supports
1908 hardware single step or vCont_supported is false.
1909 (capture_main): Set vCont_supported to zero.
1911 2015-09-15 Yao Qi <yao.qi@linaro.org>
1913 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1915 (linux_supports_hardware_single_step): ... New function.
1916 (linux_target_ops): Update.
1917 * lynx-low.c (lynx_target_ops): Set field
1918 supports_hardware_single_step to target_can_do_hardware_single_step.
1919 * nto-low.c (nto_target_ops): Likewise.
1920 * spu-low.c (spu_target_ops): Likewise.
1921 * win32-low.c (win32_target_ops): Likewise.
1922 * target.c (target_can_do_hardware_single_step): New function.
1923 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1924 Remove. <supports_hardware_single_step>: New field.
1925 (target_supports_conditional_breakpoints): Remove.
1926 (target_supports_hardware_single_step): New macro.
1927 (target_can_do_hardware_single_step): Declare.
1928 * server.c (handle_query): Use target_supports_hardware_single_step
1929 instead of target_supports_conditional_breakpoints.
1931 2015-09-15 Yao Qi <yao.qi@linaro.org>
1933 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1935 (struct linux_target_ops the_low_target): Install
1936 aarch64_linux_siginfo_fixup.
1938 2015-09-11 Don Breazeal <donb@codesourcery.com>
1939 Luis Machado <lgustavo@codesourcery.com>
1941 * linux-low.c (linux_mourn): Static declaration.
1942 (linux_arch_setup): Move in front of
1943 handle_extended_wait.
1944 (linux_arch_setup_thread): New function.
1945 (handle_extended_wait): Handle exec events. Call
1946 linux_arch_setup_thread. Make event_lwp argument a
1947 pointer-to-a-pointer.
1948 (check_zombie_leaders): Do not check stopped threads.
1949 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1950 (linux_low_filter_event): Add lwp and thread for exec'ing
1951 non-leader thread if leader thread has been deleted.
1952 Refactor code into linux_arch_setup_thread and call it.
1953 Pass child lwp pointer by reference to handle_extended_wait.
1954 (linux_wait_for_event_filtered): Update comment.
1955 (linux_wait_1): Prevent clobbering exec event status.
1956 (linux_supports_exec_events): New function.
1957 (linux_target_ops) <supports_exec_events>: Initialize new member.
1958 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1960 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1961 * server.c (report_exec_events): New global variable.
1962 (handle_query): Handle qSupported query for exec-events feature.
1963 (captured_main): Initialize report_exec_events.
1964 * server.h (report_exec_events): Declare new global variable.
1965 * target.h (struct target_ops) <supports_exec_events>: New
1967 (target_supports_exec_events): New macro.
1968 * win32-low.c (win32_target_ops) <supports_exec_events>:
1969 Initialize new member.
1971 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1973 * linux-low.c (linux_low_enable_btrace): Remove.
1974 (linux_target_ops): Replace linux_low_enable_btrace with
1975 linux_enable_btrace.
1977 2015-09-03 Yao Qi <yao.qi@linaro.org>
1979 * linux-aarch64-low.c (aarch64_insert_point): Call
1980 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1983 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1985 * linux-low.c (check_stopped_by_breakpoint): Use
1986 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1988 2015-08-27 Pedro Alves <palves@redhat.com>
1990 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1992 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1994 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1995 the XNEW-family equivalent.
1996 (compile_bytecodes): Likewise.
1997 * dll.c (loaded_dll): Likewise.
1998 * event-loop.c (append_callback_event): Likewise.
1999 (create_file_handler): Likewise.
2000 (create_file_event): Likewise.
2001 * hostio.c (handle_open): Likewise.
2002 * inferiors.c (add_thread): Likewise.
2003 (add_process): Likewise.
2004 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2005 * linux-arm-low.c (arm_new_process): Likewise.
2006 (arm_new_thread): Likewise.
2007 * linux-low.c (add_to_pid_list): Likewise.
2008 (linux_add_process): Likewise.
2009 (handle_extended_wait): Likewise.
2010 (add_lwp): Likewise.
2011 (enqueue_one_deferred_signal): Likewise.
2012 (enqueue_pending_signal): Likewise.
2013 (linux_resume_one_lwp_throw): Likewise.
2014 (linux_resume_one_thread): Likewise.
2015 (linux_read_memory): Likewise.
2016 (linux_write_memory): Likewise.
2017 * linux-mips-low.c (mips_linux_new_process): Likewise.
2018 (mips_linux_new_thread): Likewise.
2019 (mips_add_watchpoint): Likewise.
2020 * linux-x86-low.c (initialize_low_arch): Likewise.
2021 * lynx-low.c (lynx_add_process): Likewise.
2022 * mem-break.c (set_raw_breakpoint_at): Likewise.
2023 (set_breakpoint): Likewise.
2024 (add_condition_to_breakpoint): Likewise.
2025 (add_commands_to_breakpoint): Likewise.
2026 (clone_agent_expr): Likewise.
2027 (clone_one_breakpoint): Likewise.
2028 * regcache.c (new_register_cache): Likewise.
2029 * remote-utils.c (look_up_one_symbol): Likewise.
2030 * server.c (queue_stop_reply): Likewise.
2031 (start_inferior): Likewise.
2032 (queue_stop_reply_callback): Likewise.
2033 (handle_target_event): Likewise.
2034 * spu-low.c (fetch_ppc_memory): Likewise.
2035 (store_ppc_memory): Likewise.
2036 * target.c (set_target_ops): Likewise.
2037 * thread-db.c (thread_db_load_search): Likewise.
2038 (try_thread_db_load_1): Likewise.
2039 * tracepoint.c (add_tracepoint): Likewise.
2040 (add_tracepoint_action): Likewise.
2041 (create_trace_state_variable): Likewise.
2042 (cmd_qtdpsrc): Likewise.
2043 (cmd_qtro): Likewise.
2044 (add_while_stepping_state): Likewise.
2045 * win32-low.c (child_add_thread): Likewise.
2046 (get_image_name): Likewise.
2048 2015-08-25 Yao Qi <yao.qi@linaro.org>
2050 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2052 2015-08-25 Yao Qi <yao.qi@linaro.org>
2054 * Makefile.in (aarch64-linux.o): New rule.
2055 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2057 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2058 (aarch64_init_debug_reg_state): Make it extern.
2059 (aarch64_linux_prepare_to_resume): Remove.
2061 2015-08-25 Yao Qi <yao.qi@linaro.org>
2063 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2064 lwp_arch_private_info and ptid_of_lwp.
2066 2015-08-25 Yao Qi <yao.qi@linaro.org>
2068 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2069 Find proc_info by find_process_pid. All callers updated.
2071 2015-08-25 Yao Qi <yao.qi@linaro.org>
2073 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2075 (debug_reg_change_callback): Remove.
2076 (aarch64_notify_debug_reg_change): Remove.
2078 2015-08-25 Yao Qi <yao.qi@linaro.org>
2080 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2081 Call current_lwp_ptid.
2083 2015-08-25 Yao Qi <yao.qi@linaro.org>
2085 * linux-aarch64-low.c (debug_reg_change_callback): Use
2088 2015-08-25 Yao Qi <yao.qi@linaro.org>
2090 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2092 2015-08-25 Yao Qi <yao.qi@linaro.org>
2094 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2096 2015-08-25 Yao Qi <yao.qi@linaro.org>
2098 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2101 2015-08-25 Yao Qi <yao.qi@linaro.org>
2103 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2105 (debug_reg_change_callback): Remove argument entry and add argument
2106 lwp. Remove local variable thread. Don't print thread id in the
2107 debugging output. Don't check whether pid of thread equals to pid.
2108 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2109 iterate_over_lwps instead find_inferior.
2111 2015-08-24 Pedro Alves <palves@redhat.com>
2113 * inferiors.c (get_first_process): New function.
2114 * inferiors.h (get_first_process): New declaration.
2115 * remote-utils.c (read_ptid): Default to the first process in the
2116 list, instead of to the current thread's process.
2118 2015-08-24 Pedro Alves <palves@redhat.com>
2120 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2121 * event-loop.c: Likewise.
2122 * remote-utils.c: Likewise.
2123 * tracepoint.c: Likewise.
2125 2015-08-24 Pedro Alves <palves@redhat.com>
2127 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2130 2015-08-21 Pedro Alves <palves@redhat.com>
2132 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2133 instead of literal 1.
2135 2015-08-21 Pedro Alves <palves@redhat.com>
2137 * tdesc.c (default_description): Explicitly zero-initialize.
2139 2015-08-21 Pedro Alves <palves@redhat.com>
2142 * inferiors.c (remove_thread): Discard any pending stop reply for
2144 * server.c (remove_all_on_match_pid): Rename to ...
2145 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2147 (discard_queued_stop_replies): Change parameter to a ptid. Now
2149 (handle_v_kill, kill_inferior_callback, captured_main)
2150 (process_serial_event): Adjust.
2151 * server.h (discard_queued_stop_replies): Declare.
2153 2015-08-21 Pedro Alves <palves@redhat.com>
2155 * linux-low.c (wait_for_sigstop): Always switch to no thread
2156 selected if the previously current thread dies.
2157 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2158 process instead of the current thread's.
2159 * remote-utils.c (input_interrupt): Don't check if there's no
2161 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2162 current thread to the general thread fails, error out.
2163 (handle_qxfer_auxv, handle_qxfer_libraries)
2164 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2165 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2166 (handle_query): Check if there's a thread selected instead of
2167 checking whether there's any thread in the thread list.
2168 (handle_qxfer_threads, handle_qxfer_btrace)
2169 (handle_qxfer_btrace_conf): Don't error out early if there's no
2170 thread in the thread list.
2171 (handle_v_cont, myresume): Don't set the current thread to the
2173 (process_serial_event) <Hg handling>: Also set thread_id if the
2174 previous general thread is still alive.
2175 (process_serial_event) <g/G handling>: If setting the current
2176 thread to the general thread fails, error out.
2177 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2178 thread's lwp instead of the current thread's.
2179 * target.c (set_desired_thread): If the desired thread was not
2180 found, leave the current thread pointing to NULL. Return an int
2181 (boolean) indicating success.
2182 * target.h (set_desired_thread): Change return type to int.
2184 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2186 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2187 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2189 (ps_get_thread_area): New function.
2191 2015-08-19 Gary Benson <gbenson@redhat.com>
2193 * hostio.c (handle_pread): Do not attempt to read more data
2194 than hostio_reply_with_data can fit in a packet.
2196 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2198 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2200 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2202 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2204 2015-08-06 Pedro Alves <palves@redhat.com>
2206 * tracepoint.c (expr_eval_result): Now an int.
2208 2015-08-06 Pedro Alves <palves@redhat.com>
2210 * gdbthread.h (struct regcache): Forward declare.
2211 (struct thread_info) <regcache_data>: Now a struct regcache
2213 * inferiors.c (inferior_regcache_data)
2214 (set_inferior_regcache_data): Now work with struct regcache
2216 * inferiors.h (struct regcache): Forward declare.
2217 (inferior_regcache_data, set_inferior_regcache_data): Now work
2218 with struct regcache pointers.
2219 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2220 (free_register_cache_thread): Remove struct regcache pointer
2223 2015-08-06 Pedro Alves <palves@redhat.com>
2225 * server.c (captured_main): On error, print the exception message
2226 to stderr, and if run_once is set, throw a quit.
2228 2015-08-06 Pedro Alves <palves@redhat.com>
2230 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2233 2015-08-06 Pedro Alves <palves@redhat.com>
2235 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2236 reading beyond the passed in buffer length.
2238 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2240 * tracepoint.c (symbol_list) <required>: Remove.
2242 2015-08-06 Pedro Alves <palves@redhat.com>
2244 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2245 count if stopping and suspending threads.
2246 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2247 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2248 (linux_detach): Complete an ongoing step-over.
2249 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2251 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2252 (linux_wait_1): If passing a signal to the inferior after
2253 finishing a step-over, unsuspend and re-resume all lwps. If we
2254 see a single-step event but the thread should be continuing, don't
2255 pass the trap to gdb.
2256 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2257 internal_error instead of gdb_assert.
2258 (enqueue_pending_signal): New function.
2259 (check_ptrace_stopped_lwp_gone): Add debug output.
2260 (start_step_over): Use internal_error instead of gdb_assert.
2261 (complete_ongoing_step_over): New function.
2262 (linux_resume_one_thread): Don't resume a suspended thread.
2263 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2266 2015-08-06 Pedro Alves <palves@redhat.com>
2268 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2269 (linux_thread_alive): Use lwp_is_marked_dead.
2270 (extended_event_reported): Delete.
2271 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2272 instead of extended_event_reported.
2273 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2275 (lwp_is_marked_dead): New function.
2276 (lwp_running): Use lwp_is_marked_dead.
2277 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2280 2015-08-06 Pedro Alves <palves@redhat.com>
2282 * linux-low.c (linux_wait_1): Move fork event output out of the
2283 !report_to_gdb check. Pass event_child->waitstatus to
2284 target_waitstatus_to_string instead of ourstatus.
2286 2015-08-04 Yao Qi <yao.qi@linaro.org>
2288 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2289 if current_thread is 32 bit.
2291 2015-08-04 Yao Qi <yao.qi@linaro.org>
2293 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2294 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2295 * server.c (extended_protocol): Remove "static".
2296 * server.h (extended_protocol): Declare it.
2298 2015-08-04 Yao Qi <yao.qi@linaro.org>
2300 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2301 both aarch64 and aarch32.
2302 (aarch64_set_pc): Likewise.
2304 2015-08-04 Yao Qi <yao.qi@linaro.org>
2306 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2307 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2308 arm-with-neon.xml to srv_xmlfiles.
2309 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2310 (is_64bit_tdesc): New function.
2311 (aarch64_linux_read_description): New function.
2312 (aarch64_arch_setup): Call aarch64_linux_read_description.
2313 (regs_info): Rename to regs_info_aarch64.
2314 (aarch64_regs_info): Return right regs_info.
2315 (initialize_low_arch): Call initialize_low_arch_aarch32.
2317 2015-08-04 Yao Qi <yao.qi@linaro.org>
2319 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2320 * linux-aarch32-low.c: New file.
2321 * linux-aarch32-low.h: New file.
2322 * linux-arm-low.c (arm_fill_gregset): Move it to
2323 linux-aarch32-low.c.
2324 (arm_store_gregset): Likewise.
2325 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2326 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2327 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2328 (regs_info): Rename to regs_info_arm.
2329 (arm_regs_info): Return regs_info_aarch32 if
2330 have_ptrace_getregset is 1 and target description is
2331 arm_with_neon or arm_with_vfpv3.
2332 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2333 Call initialize_low_arch_aarch32 instead.
2335 2015-08-04 Yao Qi <yao.qi@linaro.org>
2337 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2338 * linux-low.c: ... here.
2339 * linux-low.h (have_ptrace_getregset): Declare it.
2341 2015-08-04 Pedro Alves <palves@redhat.com>
2343 * thread-db.c (struct thread_db): Use new typedefs.
2344 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2346 (disable_thread_event_reporting): Cast result of dlsym to
2347 destination function pointer type.
2348 (thread_db_mourn): Use td_ta_delete_ftype.
2350 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2352 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2354 (CDX_BREAKPOINT): Define for R2.
2355 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2356 (the_low_target): Add comments.
2358 2015-07-30 Yao Qi <yao.qi@linaro.org>
2360 * linux-arm-low.c (arm_hwcap): Remove it.
2361 (arm_read_description): New local variable arm_hwcap. Don't
2362 set arm_hwcap to zero.
2364 2015-07-30 Yao Qi <yao.qi@linaro.org>
2366 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2367 Use regcache->tdesc instead.
2368 (arm_store_wmmxregset): Likewise.
2369 (arm_fill_vfpregset): Likewise.
2370 (arm_store_vfpregset): Likewise.
2372 2015-07-30 Yao Qi <yao.qi@linaro.org>
2374 * linux-arm-low.c: Include arch/arm.h.
2375 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2376 (arm_store_gregset): Likewise.
2378 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2380 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2381 ptrace's 4th parameter.
2383 2015-07-27 Yao Qi <yao.qi@linaro.org>
2385 * configure.srv (case aarch64*-*-linux*): Don't set
2388 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2390 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2392 * linux-arm-low.c: Likewise.
2393 * linux-cris-low.c: Likewise.
2394 * linux-crisv32-low.c: Likewise.
2395 * linux-low.c: Likewise.
2396 * linux-m68k-low.c: Likewise.
2397 * linux-mips-low.c: Likewise.
2398 * linux-nios2-low.c: Likewise.
2399 * linux-s390-low.c: Likewise.
2400 * linux-sparc-low.c: Likewise.
2401 * linux-tic6x-low.c: Likewise.
2402 * linux-tile-low.c: Likewise.
2403 * linux-x86-low.c: Likewise.
2405 2015-07-24 Pedro Alves <palves@redhat.com>
2407 * config.in: Regenerate.
2408 * configure: Regenerate.
2410 2015-07-24 Pedro Alves <palves@redhat.com>
2412 * acinclude.m4: Include ../ptrace.m4.
2413 * configure.ac: Call GDB_AC_PTRACE.
2414 * config.in, configure: Regenerate.
2416 2015-07-24 Yao Qi <yao.qi@linaro.org>
2418 * linux-low.c (linux_create_inferior): Remove setting to
2419 proc->priv->new_inferior.
2420 (linux_attach): Likewise.
2421 (linux_low_filter_event): Likewise.
2422 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2424 2015-07-24 Yao Qi <yao.qi@linaro.org>
2426 * linux-low.c (linux_arch_setup): New function.
2427 (linux_low_filter_event): If proc->tdesc is NULL and
2428 proc->attached is true, call the_low_target.arch_setup.
2429 Otherwise, keep status pending, and return.
2430 (linux_resume_one_lwp_throw): Don't call get_pc if
2431 thread->while_stepping isn't NULL. Don't call
2432 get_thread_regcache if proc->tdesc is NULL.
2433 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2434 (linux_target_ops): Install arch_setup.
2435 * server.c (start_inferior): Call the_target->arch_setup.
2436 * target.h (struct target_ops) <arch_setup>: New field.
2437 (target_arch_setup): New marco.
2438 * lynx-low.c (lynx_target_ops): Update.
2439 * nto-low.c (nto_target_ops): Update.
2440 * spu-low.c (spu_target_ops): Update.
2441 * win32-low.c (win32_target_ops): Update.
2443 2015-07-24 Yao Qi <yao.qi@linaro.org>
2445 * linux-low.c (linux_add_process): Don't set
2446 proc->priv->new_inferior.
2447 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2448 (linux_attach): Likewise.
2450 2015-07-24 Yao Qi <yao.qi@linaro.org>
2452 * server.c (start_inferior): Code refactor.
2454 2015-07-24 Yao Qi <yao.qi@linaro.org>
2456 * server.c (process_serial_event): Set general_thread.
2458 2015-07-21 Yao Qi <yao.qi@linaro.org>
2460 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2461 aarch64_linux_get_debug_reg_capacity.
2463 2015-07-17 Yao Qi <yao.qi@linaro.org>
2465 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2466 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2467 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2468 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2469 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2470 (AARCH64_HWP_ALIGNMENT): Likewise.
2471 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2472 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2473 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2474 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2475 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2476 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2477 (struct aarch64_debug_reg_state): Likewise.
2478 (struct arch_lwp_info): Likewise.
2479 (aarch64_align_watchpoint): Likewise.
2480 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2481 (aarch64_watchpoint_length): Likewise.
2482 (aarch64_point_encode_ctrl_reg): Likewise
2483 (aarch64_point_is_aligned): Likewise.
2484 (aarch64_align_watchpoint): Likewise.
2485 (aarch64_linux_set_debug_regs):
2486 (aarch64_dr_state_insert_one_point): Likewise.
2487 (aarch64_dr_state_remove_one_point): Likewise.
2488 (aarch64_handle_breakpoint): Likewise.
2489 (aarch64_handle_aligned_watchpoint): Likewise.
2490 (aarch64_handle_unaligned_watchpoint): Likewise.
2491 (aarch64_handle_watchpoint): Likewise.
2493 2015-07-17 Yao Qi <yao.qi@linaro.org>
2495 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2496 and don't aarch64_get_debug_reg_state. All callers update.
2497 (aarch64_handle_aligned_watchpoint): Likewise.
2498 (aarch64_handle_unaligned_watchpoint): Likewise.
2499 (aarch64_handle_watchpoint): Likewise.
2500 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2501 (aarch64_remove_point): Likewise.
2503 2015-07-17 Yao Qi <yao.qi@linaro.org>
2505 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2507 (aarch64_handle_unaligned_watchpoint): Likewise.
2509 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2511 Revert the previous 3 commits:
2512 Move gdb_regex* to common/
2513 Move linux_find_memory_regions_full & co.
2514 gdbserver build-id attribute generator
2516 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2517 Jan Kratochvil <jan.kratochvil@redhat.com>
2519 gdbserver build-id attribute generator.
2520 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2521 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2522 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2524 (get_dynamic): Use find_pdhr to traverse program headers.
2525 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2526 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2527 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2528 (get_hex_build_id): New.
2529 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2530 to reply XML document.
2532 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2533 Jan Kratochvil <jan.kratochvil@redhat.com>
2535 * target.c: Include target/target-utils.h and fcntl.h.
2536 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2537 (target_fileio_read_stralloc): New functions.
2539 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2541 * Makefile.in (OBS): Add gdb_regex.o.
2543 * config.in: Rebuilt.
2544 * configure: Rebuilt.
2546 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2547 Jan Kratochvil <jan.kratochvil@redhat.com>
2549 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2550 * Makefile.in (OBS): Add target-utils.o.
2551 (linux-maps.o, target-utils.o): New.
2552 * configure.srv (srv_linux_obj): Add linux-maps.o.
2554 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2556 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2558 (the_low_target): Install it.
2560 2015-07-14 Pedro Alves <palves@redhat.com>
2562 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2563 Instead, ignore ECHILD, and throw an error for other errnos.
2565 2015-07-10 Pedro Alves <palves@redhat.com>
2567 * event-loop.c (struct callback_event) <data>: Change type to
2568 gdb_client_data instance instead of gdb_client_data pointer.
2569 (append_callback_event): Adjust.
2571 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2573 * linux-aarch64-low.c: Add comments for each linux_target_ops
2574 method. Remove comments already covered in target_ops and
2575 linux_target_ops definitions.
2576 (the_low_target): Add comments for each unimplemented method.
2578 2015-07-09 Yao Qi <yao.qi@linaro.org>
2580 * linux-aarch64-low.c (aarch64_regmap): Remove.
2581 (aarch64_usrregs_info): Remove.
2582 (regs_info): Set field usrregs to NULL.
2584 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2586 * linux-low.c: Include "rsp-low.h"
2587 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2588 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2589 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2590 (handle_btrace_enable_pt): New.
2591 (handle_btrace_general_set): Support "pt".
2592 (handle_btrace_conf_general_set): Support "pt:size".
2594 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2596 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2599 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2601 * linux-aarch64-low.c: Remove comment about endianness.
2602 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2603 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2606 2015-06-24 Gary Benson <gbenson@redhat.com>
2608 * linux-i386-ipa.c (stdint.h): Do not include.
2609 * lynx-i386-low.c (stdint.h): Likewise.
2610 * lynx-ppc-low.c (stdint.h): Likewise.
2611 * mem-break.c (stdint.h): Likewise.
2612 * thread-db.c (stdint.h): Likewise.
2613 * tracepoint.c (stdint.h): Likewise.
2614 * win32-low.c (stdint.h): Likewise.
2616 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2618 * server.c (write_qxfer_response): Update call to
2619 remote_escape_output.
2621 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2622 Jan Kratochvil <jan.kratochvil@redhat.com>
2624 Merge multiple hex conversions.
2625 * gdbreplay.c (tohex): Rename to 'fromhex'.
2626 (logchar): Use fromhex.
2628 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2630 * server.c (handle_qxfer_libraries): Set `version' attribute for
2633 2015-06-10 Gary Benson <gbenson@redhat.com>
2635 * target.h (struct target_ops) <multifs_open>: New field.
2636 <multifs_unlink>: Likewise.
2637 <multifs_readlink>: Likewise.
2638 * linux-low.c (nat/linux-namespaces.h): New include.
2639 (linux_target_ops): Initialize the_target->multifs_open,
2640 the_target->multifs_unlink and the_target->multifs_readlink.
2641 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2642 * hostio.c (hostio_fs_pid): New static variable.
2643 (hostio_handle_new_gdb_connection): New function.
2644 (handle_setfs): Likewise.
2645 (handle_open): Use the_target->multifs_open as appropriate.
2646 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2647 (handle_readlink): Use the_target->multifs_readlink as
2649 (handle_vFile): Handle vFile:setfs packets.
2650 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2651 after target_handle_new_gdb_connection.
2653 2015-06-10 Gary Benson <gbenson@redhat.com>
2655 * configure.ac (AC_CHECK_FUNCS): Add setns.
2656 * config.in: Regenerate.
2657 * configure: Likewise.
2658 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2659 (linux-namespaces.o): New rule.
2660 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2662 2015-06-09 Gary Benson <gbenson@redhat.com>
2664 * hostio.c (handle_open): Process mode argument with
2665 fileio_to_host_mode.
2667 2015-06-01 Yao Qi <yao.qi@linaro.org>
2669 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2670 * linux-x86-low.c: Likewise.
2672 2015-05-28 Don Breazeal <donb@codesourcery.com>
2674 * linux-low.c (handle_extended_wait): Initialize
2675 thread_info.last_resume_kind for new fork children.
2677 2015-05-15 Pedro Alves <palves@redhat.com>
2679 * target.h (target_handle_new_gdb_connection): Rewrite using if
2680 wrapped in do/while.
2682 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2684 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2685 * configure, config.in: Regenerate.
2686 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2689 2015-05-12 Don Breazeal <donb@codesourcery.com>
2691 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2692 PTRACE_EVENT_VFORK_DONE.
2693 (linux_low_ptrace_options, extended_event_reported): Add vfork
2695 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2696 and "vforkdone" for RSP 'T' Stop Reply Packet.
2697 * server.h (report_vfork_events): Declare
2700 2015-05-12 Don Breazeal <donb@codesourcery.com>
2702 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2703 (the_low_target) <new_fork>: Initialize new member.
2704 * linux-arm-low.c (arm_new_fork): New function.
2705 (the_low_target) <new_fork>: Initialize new member.
2706 * linux-low.c (handle_extended_wait): Call new target function
2708 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2709 * linux-mips-low.c (mips_add_watchpoint): New function
2710 extracted from mips_insert_point.
2711 (the_low_target) <new_fork>: Initialize new member.
2712 (mips_linux_new_fork): New function.
2713 (mips_insert_point): Call mips_add_watchpoint.
2714 * linux-x86-low.c (x86_linux_new_fork): New function.
2715 (the_low_target) <new_fork>: Initialize new member.
2717 2015-05-12 Don Breazeal <donb@codesourcery.com>
2719 * linux-low.c (handle_extended_wait): Implement return value,
2720 rename argument 'event_child' to 'event_lwp', handle
2721 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2722 (linux_low_ptrace_options): New function.
2723 (linux_low_filter_event): Call linux_low_ptrace_options,
2724 use different argument fo linux_enable_event_reporting,
2725 use return value from handle_extended_wait.
2726 (extended_event_reported): New function.
2727 (linux_wait_1): Call extended_event_reported and set
2728 status to report fork events.
2729 (linux_write_memory): Add pid to debug message.
2730 (reset_lwp_ptrace_options_callback): New function.
2731 (linux_handle_new_gdb_connection): New function.
2732 (linux_target_ops): Initialize new structure member.
2733 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2734 * lynx-low.c: Initialize new structure member.
2735 * remote-utils.c (prepare_resume_reply): Implement stop reason
2736 "fork" for "T" stop message.
2737 * server.c (handle_query): Call handle_new_gdb_connection.
2738 * server.h (report_fork_events): Declare global flag.
2739 * target.h (struct target_ops) <handle_new_gdb_connection>:
2741 (target_handle_new_gdb_connection): New macro.
2742 * win32-low.c: Initialize new structure member.
2744 2015-05-12 Don Breazeal <donb@codesourcery.com>
2746 * mem-break.c (APPEND_TO_LIST): Define macro.
2747 (clone_agent_expr): New function.
2748 (clone_one_breakpoint): New function.
2749 (clone_all_breakpoints): New function.
2750 * mem-break.h: Declare new functions.
2752 2015-05-12 Don Breazeal <donb@codesourcery.com>
2754 * linux-low.c (linux_supports_fork_events): New function.
2755 (linux_supports_vfork_events): New function.
2756 (linux_target_ops): Initialize new structure members.
2757 (initialize_low): Call linux_check_ptrace_features.
2758 * lynx-low.c (lynx_target_ops): Initialize new structure
2760 * server.c (report_fork_events, report_vfork_events):
2762 (handle_query): Add new features to qSupported packet and
2764 (captured_main): Initialize new global variables.
2765 * target.h (struct target_ops) <supports_fork_events>:
2767 <supports_vfork_events>: New member.
2768 (target_supports_fork_events): New macro.
2769 (target_supports_vfork_events): New macro.
2770 * win32-low.c (win32_target_ops): Initialize new structure
2773 2015-05-12 Gary Benson <gbenson@redhat.com>
2775 * server.c (handle_qxfer_exec_file): Use current process
2778 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2780 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2781 Remove HAVE_PTRACE_GETREGS conditionals.
2782 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2783 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2785 2015-05-08 Yao Qi <yao.qi@linaro.org>
2787 * linux-low.c (linux_supports_conditional_breakpoints): New
2789 (linux_target_ops): Install new target method.
2790 * lynx-low.c (lynx_target_ops): Install NULL hook for
2791 supports_conditional_breakpoints.
2792 * nto-low.c (nto_target_ops): Likewise.
2793 * spu-low.c (spu_target_ops): Likewise.
2794 * win32-low.c (win32_target_ops): Likewise.
2795 * server.c (handle_query): Check
2796 target_supports_conditional_breakpoints.
2797 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2799 (target_supports_conditional_breakpoints): New macro.
2801 2015-05-06 Pedro Alves <palves@redhat.com>
2804 * server.c (start_inferior): If the process exits, mourn it.
2806 2015-04-21 Gary Benson <gbenson@redhat.com>
2808 * hostio.c (fileio_open_flags_to_host): Factored out to
2809 fileio_to_host_openflags in common/fileio.c. Single use
2812 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2814 * linux-xtensa-low.c (xtensa_fill_gregset)
2815 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2818 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2820 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2821 (regs_info): Replace usrregs pointer with NULL.
2823 2015-04-17 Gary Benson <gbenson@redhat.com>
2825 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2826 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2827 * server.c (handle_qxfer_exec_file): New function.
2828 (qxfer_packets): Add exec-file entry.
2829 (handle_query): Report qXfer:exec-file:read as supported packet.
2831 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2833 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2835 2015-04-09 Gary Benson <gbenson@redhat.com>
2837 * hostio-errno.c (errno_to_fileio_error): Remove function.
2838 Update caller to use remote_fileio_to_fio_error.
2840 2015-04-09 Yao Qi <yao.qi@linaro.org>
2842 * linux-low.c (linux_insert_point): Call
2843 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2844 (linux_remove_point): Call remove_memory_breakpoint if type is
2846 * linux-x86-low.c (x86_insert_point): Don't call
2847 insert_memory_breakpoint.
2848 (x86_remove_point): Don't call remove_memory_breakpoint.
2850 2015-04-01 Pedro Alves <palves@redhat.com>
2851 Cleber Rosa <crosa@redhat.com>
2853 * server.c (gdbserver_usage): Reorganize and extend the usage
2856 2015-03-24 Pedro Alves <palves@redhat.com>
2858 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2859 output. Also dump TRAP_TRACE.
2860 (linux_low_filter_event): In debug output, distinguish a
2861 resume_stop SIGSTOP from a delayed SIGSTOP.
2863 2015-03-24 Gary Benson <gbenson@redhat.com>
2865 * linux-x86-low.c (x86_linux_new_thread): Moved to
2867 (x86_linux_prepare_to_resume): Likewise.
2869 2015-03-24 Gary Benson <gbenson@redhat.com>
2871 * Makefile.in (x86-linux-dregs.o): New rule.
2872 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2873 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2874 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2875 (x86_linux_dr_get): Likewise.
2876 (x86_linux_dr_set): Likewise.
2877 (update_debug_registers_callback): Likewise.
2878 (x86_linux_dr_set_addr): Likewise.
2879 (x86_linux_dr_get_addr): Likewise.
2880 (x86_linux_dr_set_control): Likewise.
2881 (x86_linux_dr_get_control): Likewise.
2882 (x86_linux_dr_get_status): Likewise.
2883 (x86_linux_update_debug_registers): Likewise.
2885 2015-03-24 Gary Benson <gbenson@redhat.com>
2887 * linux-x86-low.c (x86_linux_update_debug_registers):
2888 New function, factored out from...
2889 (x86_linux_prepare_to_resume): ...this.
2891 2015-03-24 Gary Benson <gbenson@redhat.com>
2893 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2894 (x86_linux_dr_set): Likewise.
2895 (update_debug_registers_callback): Likewise.
2896 (x86_linux_dr_set_addr): Likewise.
2897 (x86_linux_dr_get_addr): Likewise.
2898 (x86_linux_dr_set_control): Likewise.
2899 (x86_linux_dr_get_control): Likewise.
2900 (x86_linux_dr_get_status): Likewise.
2901 (x86_linux_prepare_to_resume): Likewise.
2903 2015-03-24 Gary Benson <gbenson@redhat.com>
2905 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2906 Use perror_with_name. Pass string through gettext.
2907 (x86_linux_dr_set): Likewise.
2909 2015-03-24 Gary Benson <gbenson@redhat.com>
2911 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2912 (x86_linux_dr_set_addr): ...this.
2913 (x86_dr_low_get_addr): Rename to...
2914 (x86_linux_dr_get_addr): ...this.
2915 (x86_dr_low_set_control): Rename to...
2916 (x86_linux_dr_set_control): ...this.
2917 (x86_dr_low_get_control): Rename to...
2918 (x86_linux_dr_get_control): ...this.
2919 (x86_dr_low_get_status): Rename to...
2920 (x86_linux_dr_get_status): ...this.
2921 (x86_dr_low): Update with new function names.
2923 2015-03-24 Gary Benson <gbenson@redhat.com>
2925 * Makefile.in (x86-linux.o): New rule.
2926 * configure.srv: Add x86-linux.o to relevant targets.
2927 * linux-low.c (lwp_set_arch_private_info): New function.
2928 (lwp_arch_private_info): Likewise.
2929 * linux-x86-low.c: Include nat/x86-linux.h.
2930 (arch_lwp_info): Removed structure.
2931 (update_debug_registers_callback):
2932 Use lwp_set_debug_registers_changed.
2933 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2934 and lwp_set_debug_registers_changed.
2935 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2937 2015-03-24 Gary Benson <gbenson@redhat.com>
2939 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2940 * linux-arm-low.c (arm_new_thread): Likewise.
2941 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2942 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2943 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2944 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2946 2015-03-24 Gary Benson <gbenson@redhat.com>
2948 * linux-low.c (ptid_of_lwp): New function.
2949 (lwp_is_stopped): Likewise.
2950 (lwp_stop_reason): Likewise.
2951 * linux-x86-low.c (update_debug_registers_callback):
2953 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2956 2015-03-24 Gary Benson <gbenson@redhat.com>
2958 * linux-low.h (linux_stop_lwp): Remove declaration.
2960 2015-03-24 Gary Benson <gbenson@redhat.com>
2962 * linux-low.h: Include nat/linux-nat.h.
2963 * linux-low.c (iterate_over_lwps_args): New structure.
2964 (iterate_over_lwps_filter): New function.
2965 (iterate_over_lwps): Likewise.
2966 * linux-x86-low.c (update_debug_registers_callback):
2967 Update signature to what iterate_over_lwps expects.
2968 Remove PID check that iterate_over_lwps now performs.
2969 (x86_dr_low_set_addr): Use iterate_over_lwps.
2970 (x86_dr_low_set_control): Likewise.
2972 2015-03-24 Gary Benson <gbenson@redhat.com>
2974 * linux-x86-low.c (x86_debug_reg_state): New function.
2975 (x86_linux_prepare_to_resume): Use the above.
2977 2015-03-24 Gary Benson <gbenson@redhat.com>
2979 * linux-low.c (current_lwp_ptid): New function.
2980 * linux-x86-low.c: Include nat/linux-nat.h.
2981 (x86_dr_low_get_addr): Use current_lwp_ptid.
2982 (x86_dr_low_get_control): Likewise.
2983 (x86_dr_low_get_status): Likewise.
2985 2015-03-20 Pedro Alves <palves@redhat.com>
2987 * tracepoint.c (cmd_qtstatus): Make "str" const.
2989 2015-03-20 Pedro Alves <palves@redhat.com>
2991 * server.c (handle_general_set): Make "req_str" const.
2993 2015-03-19 Pedro Alves <palves@redhat.com>
2995 * linux-low.c (linux_resume_one_lwp): Rename to ...
2996 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2997 instead call perror_with_name.
2998 (check_ptrace_stopped_lwp_gone): New function.
2999 (linux_resume_one_lwp): Reimplement as wrapper around
3000 linux_resume_one_lwp_throw that swallows errors if the LWP is
3003 2015-03-19 Pedro Alves <palves@redhat.com>
3005 * linux-low.c (count_events_callback, select_event_lwp_callback):
3006 No longer check whether the thread has resume_stop as last resume
3009 2015-03-19 Pedro Alves <palves@redhat.com>
3011 * linux-low.c (count_events_callback, select_event_lwp_callback):
3012 Use the lwp's status_pending_p field, not the thread's.
3014 2015-03-19 Pedro Alves <palves@redhat.com>
3016 * linux-low.c (select_event_lwp_callback): Update comments to
3017 no longer mention SIGTRAP.
3019 2015-03-18 Gary Benson <gbenson@redhat.com>
3021 * server.c (handle_query): Do not report vFile:fstat as supported.
3023 2015-03-11 Gary Benson <gbenson@redhat.com>
3025 * hostio.c (sys/types.h): New include.
3026 (sys/stat.h): Likewise.
3027 (common-remote-fileio.h): Likewise.
3028 (handle_fstat): New function.
3029 (handle_vFile): Handle vFile:fstat packets.
3031 2015-03-11 Gary Benson <gbenson@redhat.com>
3033 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3034 struct stat.st_blocks and struct stat.st_blksize.
3035 * configure: Regenerate.
3036 * config.in: Likewise.
3037 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3038 (OBS): Add common-remote-fileio.o.
3039 (common-remote-fileio.o): New rule.
3041 2015-03-09 Pedro Alves <palves@redhat.com>
3043 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3044 'struct sockaddr' pointer in 'accept' call.
3046 2015-03-09 Pedro Alves <palves@redhat.com>
3049 2015-03-07 Pedro Alves <palves@redhat.com>
3050 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3051 or <winsock2.h> here. Instead include "gdb_socket.h".
3052 (remote_open): Use union gdb_sockaddr_u.
3053 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3054 or <winsock2.h> here. Instead include "gdb_socket.h".
3055 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3056 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3058 (init_named_socket, gdb_agent_helper_thread): Use union
3061 2015-03-07 Pedro Alves <palves@redhat.com>
3063 * configure.ac (build_warnings): Move
3064 -Wdeclaration-after-statement to the C-specific set.
3065 * configure: Regenerate.
3067 2015-03-07 Pedro Alves <palves@redhat.com>
3069 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3070 or <winsock2.h> here. Instead include "gdb_socket.h".
3071 (remote_open): Use union gdb_sockaddr_u.
3072 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3073 or <winsock2.h> here. Instead include "gdb_socket.h".
3074 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3075 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3077 (init_named_socket, gdb_agent_helper_thread): Use union
3080 2015-03-07 Pedro Alves <palves@redhat.com>
3082 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3085 2015-03-06 Yao Qi <yao.qi@linaro.org>
3087 * linux-aarch64-low.c (aarch64_insert_point): Use
3088 show_debug_regs as a boolean.
3089 (aarch64_remove_point): Likewise.
3091 2015-03-05 Pedro Alves <palves@redhat.com>
3093 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3094 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3095 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3096 * nto-low.c (nto_target_ops): Likewise.
3097 * spu-low.c (spu_target_ops): Likewise.
3098 * win32-low.c (win32_target_ops): Likewise.
3100 2015-03-04 Pedro Alves <palves@redhat.com>
3102 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3103 Decide whether a breakpoint triggered based on the SIGTRAP's
3105 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3106 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3107 (linux_low_filter_event): Check for breakpoints before checking
3109 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3111 (linux_stopped_by_sw_breakpoint)
3112 (linux_supports_stopped_by_sw_breakpoint)
3113 (linux_stopped_by_hw_breakpoint)
3114 (linux_supports_stopped_by_hw_breakpoint): New functions.
3115 (linux_target_ops): Install new target methods.
3117 2015-03-04 Pedro Alves <palves@redhat.com>
3119 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3120 * server.c (swbreak_feature, hwbreak_feature): New globals.
3121 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3122 (captured_main): Clear swbreak_feature and hwbreak_feature.
3123 * server.h (swbreak_feature, hwbreak_feature): Declare.
3124 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3125 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3126 supports_stopped_by_hw_breakpoint>: New fields.
3127 (target_supports_stopped_by_sw_breakpoint)
3128 (target_stopped_by_sw_breakpoint)
3129 (target_supports_stopped_by_hw_breakpoint)
3130 (target_stopped_by_hw_breakpoint): Declare.
3132 2015-03-04 Pedro Alves <palves@redhat.com>
3134 enum lwp_stop_reason -> enum target_stop_reason
3135 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3136 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3137 (linux_wait_1, stuck_in_jump_pad_callback)
3138 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3139 (linux_stopped_by_watchpoint):
3140 * linux-low.h (enum lwp_stop_reason): Delete.
3141 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3142 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3144 2015-03-04 Yao Qi <yao.qi@linaro.org>
3146 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3148 2015-03-03 Gary Benson <gbenson@redhat.com>
3150 * hostio.c (handle_vFile): Fix prefix lengths.
3152 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3154 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3157 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3159 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3160 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3161 (clean): Add "rm -f" for above C files.
3162 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3163 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3164 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3165 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3166 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3167 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3168 (init_registers_s390x_vx_linux64)
3169 (init_registers_s390x_tevx_linux64)
3170 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3171 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3173 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3174 (s390_store_vxrs_high): New functions.
3175 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3177 (s390_arch_setup): Add logic for selecting one of the new target
3178 descriptions. Activate the new vector regsets if applicable.
3179 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3180 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3181 and init_registers_s390x_tevx_linux64.
3183 2015-03-01 Pedro Alves <palves@redhat.com>
3185 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3188 2015-02-27 Pedro Alves <palves@redhat.com>
3190 * linux-x86-low.c (u_debugreg_offset): New function.
3191 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3193 2015-02-27 Pedro Alves <palves@redhat.com>
3195 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3196 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3197 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3198 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3199 (ps_lsetfpregs, ps_getpid)
3200 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3201 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3202 (ps_lsetxregs, ps_plog): Declare.
3204 2015-02-27 Pedro Alves <palves@redhat.com>
3206 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3207 IP_AGENT_EXPORT_FUNC.
3208 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3209 IP_AGENT_EXPORT_FUNC.
3210 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3211 (IP_AGENT_EXPORT): Delete.
3212 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3213 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3214 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3215 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3216 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3217 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3218 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3219 (traceframe_read_count, traceframe_write_count)
3220 (traceframes_created, trace_state_variables, get_raw_reg)
3221 (get_trace_state_variable_value, set_trace_state_variable_value)
3222 (ust_loaded, helper_thread_id, cmd_buf): Use
3223 IPA_SYM_EXPORTED_NAME.
3224 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3225 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3226 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3227 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3228 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3229 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3230 EXTERN_C_PUSH/EXTERN_C_POP.
3231 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3232 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3233 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3234 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3235 (traceframe_write_count, traceframe_read_count)
3236 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3237 (about_to_request_buffer_space, get_trace_state_variable_value)
3238 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3239 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3240 EXTERN_C_PUSH/EXTERN_C_POP.
3241 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3242 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3243 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3244 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3245 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3246 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3247 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3248 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3250 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3251 (IP_AGENT_EXPORT_VAR_DECL): Define.
3253 (gdb_agent_get_raw_reg): Declare.
3255 2015-02-27 Tom Tromey <tromey@redhat.com>
3256 Pedro Alves <palves@redhat.com>
3258 Rename symbols whose names are reserved C++ keywords throughout.
3260 2015-02-27 Pedro Alves <palves@redhat.com>
3262 * Makefile.in (COMPILER): New, get it from autoconf.
3263 (CXX): Get from autoconf instead.
3264 (COMPILE.pre): Use COMPILER.
3265 (CC-LD): Rename to ...
3266 (CC_LD): ... this. Use COMPILER.
3267 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3268 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3269 * acinclude.m4: Include build-with-cxx.m4.
3270 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3271 Disable -Werror by default if building in C++ mode.
3272 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3273 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3274 the C++ compiler. Save/restore CXXFLAGS too.
3275 * configure: Regenerate.
3277 2015-02-27 Pedro Alves <palves@redhat.com>
3279 * acinclude.m4: Include libiberty.m4.
3280 * configure.ac: Call libiberty_INIT.
3281 * config.in, configure: Regenerate.
3283 2015-02-26 Pedro Alves <palves@redhat.com>
3285 * linux-low.c (linux_wait_1): When incrementing the PC past a
3286 program breakpoint always use the_low_target.breakpoint_len as
3287 increment, rather than the maximum between that and
3288 the_low_target.decr_pc_after_break.
3290 2015-02-23 Pedro Alves <palves@redhat.com>
3292 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3293 thread was doing a step-over; always adjust the PC if
3294 we stepped over a permanent breakpoint.
3295 (linux_wait_1): If we stepped over breakpoint that was on top of a
3296 permanent breakpoint, manually advance the PC past it.
3298 2015-02-23 Pedro Alves <palves@redhat.com>
3300 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3302 (x86_fill_gregset, x86_store_gregset): Use it when handling
3305 2015-02-20 Pedro Alves <palves@redhat.com>
3307 * thread-db.c: Include "nat/linux-procfs.h".
3308 (thread_db_init): Skip listing new threads if the kernel supports
3309 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3311 2015-02-20 Pedro Alves <palves@redhat.com>
3313 * linux-low.c (status_pending_p_callback): Use ptid_match.
3315 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3317 PR breakpoints/16812
3318 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3319 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3320 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3322 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3324 PR breakpoints/15956
3325 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3327 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3329 * linux-low.c (linux_low_btrace_conf): Print size.
3330 * server.c (handle_btrace_conf_general_set): New.
3331 (hanle_general_set): Call handle_btrace_conf_general_set.
3332 (handle_query): Report Qbtrace-conf:bts:size as supported.
3334 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3336 * linux-low.c (linux_low_enable_btrace): Update parameters.
3337 (linux_low_btrace_conf): New.
3338 (linux_target_ops)<to_btrace_conf>: Initialize.
3339 * server.c (current_btrace_conf): New.
3340 (handle_btrace_enable): Rename to ...
3341 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
3342 to target_enable_btrace. Update comment. Update users.
3343 (handle_qxfer_btrace_conf): New.
3344 (qxfer_packets): Add btrace-conf entry.
3345 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3346 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3347 (target_ops)<read_btrace_conf>: New.
3348 (target_enable_btrace): Update parameters.
3349 (target_read_btrace_conf): New.
3351 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3353 * server.c (handle_btrace_general_set): Remove call to
3354 target_supports_btrace.
3355 (supported_btrace_packets): New.
3356 (handle_query): Call supported_btrace_packets.
3357 * target.h: include btrace-common.h.
3358 (btrace_target_info): Removed.
3359 (supports_btrace, target_supports_btrace): Update parameters.
3361 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3363 * Makefile.in (SFILES): Add common/btrace-common.c.
3364 (OBS): Add common/btrace-common.o.
3365 (btrace-common.o): Add build rules.
3366 * linux-low: Include btrace-common.h.
3367 (linux_low_read_btrace): Use struct btrace_data. Call
3368 btrace_data_init and btrace_data_fini.
3370 2015-02-06 Pedro Alves <palves@redhat.com>
3372 * thread-db.c (find_new_threads_callback): Add debug output.
3374 2015-02-04 Pedro Alves <palves@redhat.com>
3376 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3377 (resume_stopped_resumed_lwps): New function.
3378 (linux_wait_for_event_filtered): Use it.
3380 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3382 * Makefile.in (SFILES): Add linux-personality.c.
3383 (linux-personality.o): New rule.
3384 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3385 list of objects to be built.
3386 * linux-low.c: Include nat/linux-personality.h.
3387 (linux_create_inferior): Remove code to disable address space
3388 randomization (moved to ../nat/linux-personality.c). Create
3389 cleanup to disable address space randomization.
3391 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3393 * Makefile.in (posix-strerror.o): New rule.
3394 (mingw-strerror.o): Likewise.
3395 * configure: Regenerated.
3396 * configure.ac: Source file ../common/common.host. Initialize new
3397 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3399 2015-01-14 Yao Qi <yao@codesourcery.com>
3401 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3402 (ppc-linux.o): New rule.
3403 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3404 * configure.ac: AC_CHECK_FUNCS(getauxval).
3405 * config.in: Re-generated.
3406 * configure: Re-generated.
3407 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3408 ppc64_64bit_inferior_p
3410 2015-01-14 Yao Qi <yao@codesourcery.com>
3412 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3413 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3414 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3415 (PT_ORIG_R3, PT_TRAP): Likewise.
3416 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3417 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3418 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3420 2015-01-10 Joel Brobecker <brobecker@adacore.com>
3422 * i387-fp.c (i387_cache_to_xsave): In look over
3423 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3424 zmmh_low_space field by use of zmmh_high_space.
3426 2015-01-09 Pedro Alves <palves@redhat.com>
3428 * linux-low.c (step_over_bkpt): Move higher up in the file.
3429 (handle_extended_wait): Don't store the stop_pc here.
3430 (get_stop_pc): Adjust comments and rename to ...
3431 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3432 stopped for a software breakpoint or hardware breakpoint.
3433 (thread_still_has_status_pending_p): New function.
3434 (status_pending_p_callback): Use
3435 thread_still_has_status_pending_p. If the event is no longer
3436 interesting, resume the LWP.
3437 (handle_tracepoints): Add assert.
3438 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3439 (wstatus_maybe_breakpoint): New function.
3440 (cancel_breakpoint): Delete function.
3441 (check_stopped_by_watchpoint): New function, factored out from
3442 linux_low_filter_event.
3443 (lp_status_maybe_breakpoint): Delete function.
3444 (linux_low_filter_event): Remove filter_ptid argument.
3445 Leave thread group exits pending here. Store the LWP's stop PC.
3446 Always leave events pending.
3447 (linux_wait_for_event_filtered): Pull all events out of the
3448 kernel, and leave them all pending.
3449 (count_events_callback, select_event_lwp_callback): Consider all
3451 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3452 (select_event_lwp): Only give preference to the stepping LWP in
3453 all-stop mode. Adjust comments.
3454 (ignore_event): New function.
3455 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3456 references to cancel_breakpoints. Adjust to renames. Also give
3457 equal priority to all LWPs that have had events in non-stop mode.
3458 If reporting a software breakpoint event, unadjust the LWP's PC.
3459 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3460 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3462 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3463 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3464 (linux_stopped_by_watchpoint): Adjust.
3465 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3466 * linux-low.h (enum lwp_stop_reason): New.
3467 (struct lwp_info) <stop_pc>: Adjust comment.
3468 <stopped_by_watchpoint>: Delete field.
3469 <stop_reason>: New field.
3470 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3471 * mem-break.c (software_breakpoint_inserted_here)
3472 (hardware_breakpoint_inserted_here): New function.
3473 * mem-break.h (software_breakpoint_inserted_here)
3474 (hardware_breakpoint_inserted_here): Declare.
3475 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3476 (cancel_breakpoints): Delete.
3477 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3478 (upload_fast_traceframes): Remove references to
3481 2015-01-09 Pedro Alves <palves@redhat.com>
3483 * thread-db.c (find_new_threads_callback): Ignore thread if the
3484 kernel thread ID is -1.
3486 2015-01-09 Pedro Alves <palves@redhat.com>
3488 * linux-low.c (linux_attach_fail_reason_string): Move to
3489 nat/linux-ptrace.c, and rename.
3490 (linux_attach_lwp): Update comment.
3491 (attach_proc_task_lwp_callback): New function.
3492 (linux_attach): Adjust to rename and use
3493 linux_proc_attach_tgid_threads.
3494 (linux_attach_fail_reason_string): Delete declaration.
3496 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3498 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3499 * server.c (gdbserver_version): Likewise.
3501 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3503 * remote-utils.c: Include ctype.h.
3504 (input_interrupt): Explicitly handle the case when the char
3505 received is the NUL byte. Improve the printing of non-ASCII
3508 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3510 * linux-low.c (linux_low_filter_event): Update call to
3511 linux_enable_event_reporting following the addition of
3512 a new parameter to that function.
3514 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3517 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3518 (AARCH64_FPCR_REGNO): Likewise.
3519 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3520 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3521 (aarch64_store_fpregset): Likewise.
3523 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3525 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3526 Remove FIXME comment about assumption about N.
3528 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3530 * configure.ac: If large-file support is disabled in GDBserver,
3531 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3532 * configure: Regenerate.
3534 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3536 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3537 warning upon ENODATA from ptrace.
3538 * linux-s390-low.c (s390_store_tdb): New.
3539 (s390_regsets): Add regset for NT_S390_TDB.
3541 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3543 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3544 without a fill_function.
3545 * linux-s390-low.c (s390_fill_last_break): Remove.
3546 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3547 (s390_arch_setup): Use regset's size instead of fill_function for
3550 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3552 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3553 the regset's store function when ptrace returned an error.
3554 * regcache.c (get_thread_regcache): Invalidate register cache
3555 before fetching inferior's registers.
3557 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3559 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3560 while-loop as for-loop.
3561 (regsets_store_inferior_registers): Likewise.
3563 2014-11-28 Yao Qi <yao@codesourcery.com>
3565 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3566 * config.in, configure: Re-generate.
3567 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3570 2014-11-21 Yao Qi <yao@codesourcery.com>
3572 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3573 (AC_CHECK_HEADERS): Remove malloc.h.
3574 * configure: Re-generated.
3575 * config.in: Re-generated.
3576 * server.h: Don't include alloca.h and malloc.h.
3577 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3578 Don't include malloc.h.
3580 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3582 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3583 corresponding ERRNO check in same block.
3585 2014-11-12 Pedro Alves <palves@redhat.com>
3587 * server.c (cont_thread): Update comment.
3588 (start_inferior, attach_inferior): No longer clear cont_thread.
3589 (handle_v_cont): No longer set cont_thread.
3590 (captured_main): Clear cont_thread each time a GDB connects.
3592 2014-11-12 Pedro Alves <palves@redhat.com>
3594 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3595 thread, and don't resume all threads if the Hc thread has exited.
3597 2014-11-12 Pedro Alves <palves@redhat.com>
3599 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3600 the process group instead of to a specific LWP.
3602 2014-10-15 Pedro Alves <palves@redhat.com>
3605 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3607 (arm_set_thread_context): Delete.
3608 (the_low_target): Adjust.
3609 * win32-i386-low.c (debug_registers_changed)
3610 (debug_registers_used): Delete.
3611 (update_debug_registers_callback): New function.
3612 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3613 needing to update their debug registers.
3614 (win32_get_current_dr): New function.
3615 (x86_dr_low_get_addr, x86_dr_low_get_control)
3616 (x86_dr_low_get_status): Fetch the debug register from the thread
3618 (i386_initial_stuff): Adjust.
3619 (i386_get_thread_context): Remove current_event parameter. Don't
3620 clear debug_registers_changed nor copy DR values to
3622 (i386_set_thread_context): Delete.
3623 (i386_prepare_to_resume): New function.
3624 (i386_thread_added): Mark the thread as needing to update irs
3626 (the_low_target): Remove i386_set_thread_context and install
3627 i386_prepare_to_resume.
3628 * win32-low.c (win32_get_thread_context): Adjust.
3629 (win32_set_thread_context): Use SetThreadContext
3631 (win32_prepare_to_resume): New function.
3632 (win32_require_context): New function, factored out from ...
3633 (thread_rec): ... this.
3634 (continue_one_thread): Call win32_prepare_to_resume on each thread
3635 we're about to continue.
3636 (win32_resume): Call win32_prepare_to_resume on the event thread.
3637 * win32-low.h (struct win32_thread_info)
3638 <debug_registers_changed>: New field.
3639 (struct win32_target_ops): Change prototype of set_thread_context,
3640 delete set_thread_context and add prepare_to_resume.
3641 (win32_require_context): New declaration.
3643 2014-10-08 Gary Benson <gbenson@redhat.com>
3645 * server.h: Do not include common-exceptions.h.
3647 2014-10-08 Gary Benson <gbenson@redhat.com>
3649 * server.h: Do not include cleanups.h.
3651 2014-09-30 James Hogan <james.hogan@imgtec.com>
3653 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3656 2014-09-23 Yao Qi <yao@codesourcery.com>
3658 * linux-low.c (lp_status_maybe_breakpoint): New function.
3659 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3660 (count_events_callback): Likewise.
3661 (select_event_lwp_callback): Likewise.
3662 (cancel_breakpoints_callback): Likewise.
3664 2014-09-19 Don Breazeal <donb@codesourcery.com>
3666 * linux-low.c (handle_extended_wait): Call
3667 linux_ptrace_get_extended_event.
3668 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3669 linux_is_extended_waitstatus.
3671 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3673 * Makefile.in (CPPFLAGS): Define.
3674 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3675 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3677 2014-09-16 Gary Benson <gbenson@redhat.com>
3679 * inferiors.h (current_inferior): Renamed as...
3680 (current_thread): New variable. All uses updated.
3681 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3682 (maybe_move_out_of_jump_pad): Likewise.
3683 (cancel_breakpoint): Likewise.
3684 (linux_low_filter_event): Likewise.
3685 (wait_for_sigstop): Likewise.
3686 (linux_resume_one_lwp): Likewise.
3687 (need_step_over_p): Likewise.
3688 (start_step_over): Likewise.
3689 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3690 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3691 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3692 and save_inferior as saved_thread.
3693 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3695 (regcache_invalidate_thread): Likewise.
3696 * remote-utils.c (prepare_resume_reply): Likewise.
3697 * thread-db.c (thread_db_get_tls_address): Likewise.
3698 (disable_thread_event_reporting): Likewise.
3699 (remove_thread_event_breakpoints): Likewise.
3700 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3702 * target.h (set_desired_inferior): Renamed as...
3703 (set_desired_thread): New declaration. All uses updated.
3704 * server.c (myresume): Updated comment to reference thread instead
3706 (handle_serial_event): Likewise.
3707 (handle_target_event): Likewise.
3709 2014-09-12 Tom Tromey <tromey@redhat.com>
3710 Gary Benson <gbenson@redhat.com>
3712 * regcache.h: Include common-regcache.h.
3713 (regcache_read_pc): Don't declare.
3714 * regcache.c (get_thread_regcache_for_ptid): New function.
3716 2014-09-11 Tom Tromey <tromey@redhat.com>
3717 Gary Benson <gbenson@redhat.com>
3719 * symbol.c: New file.
3720 * Makefile.in (SFILES): Add symbol.c.
3721 (OBS): Add symbol.o.
3723 2014-09-11 Gary Benson <gbenson@redhat.com>
3725 * target.c (target_stop_ptid, target_continue_ptid): New
3728 2014-09-11 Tom Tromey <tromey@redhat.com>
3729 Gary Benson <gbenson@redhat.com>
3731 * target.h: Include target/target.h.
3732 * target.c (target_read_memory, target_read_uint32)
3733 (target_write_memory): New functions.
3735 2014-09-11 Gary Benson <gbenson@redhat.com>
3737 * server.h (debug_hw_points): Don't declare.
3738 * server.c (debug_hw_points): Don't define. Replace all uses
3739 with show_debug_regs.
3740 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3741 all uses with show_debug_regs.
3743 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3745 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3746 endianness into account.
3747 (ppc_supply_ptrace_register): Likewise.
3749 2014-09-03 James Hogan <james.hogan@imgtec.com>
3751 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3752 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3754 2014-09-03 Gary Benson <gbenson@redhat.com>
3756 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3757 ALL_DEBUG_ADDRESS_REGISTERS.
3759 2014-09-02 Gary Benson <gbenson@redhat.com>
3761 * i386-low.h: Renamed as...
3762 * x86-low.h: New file. All type, function and variable name
3763 prefixes changed from "i386_" to "x86_". All references updated.
3764 * i386-low.c: Renamed as...
3765 * x86-low.c: New file. All type, function and variable name
3766 prefixes changed from "i386_" to "x86_". All references updated.
3768 2014-09-02 Gary Benson <gbenson@redhat.com>
3770 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3771 (x86_linux_new_thread): Likewise.
3773 2014-08-29 Gary Benson <gbenson@redhat.com>
3775 * server.h (setjmp.h): Do not include.
3776 (toplevel): Do not declare.
3777 (common-exceptions.h): Include.
3778 (cleanups.h): Likewise.
3779 * server.c (toplevel): Do not define.
3780 (exit_code): New static global.
3781 (detach_or_kill_for_exit_cleanup): New function.
3782 (main): New function. Original main renamed to...
3783 (captured_main): New function.
3784 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3786 2014-08-29 Gary Benson <gbenson@redhat.com>
3788 * Makefile.in (SFILES): Add common/common-exceptions.c.
3789 (OBS): Add common-exceptions.o.
3790 (common-exceptions.o): New rule.
3791 * utils.c (prepare_to_throw_exception): New function.
3793 2014-08-29 Gary Benson <gbenson@redhat.com>
3795 * config.in: Regenerate.
3796 * configure: Likewise.
3798 2014-08-29 Gary Benson <gbenson@redhat.com>
3800 * Makefile.in (SFILES): Add common/cleanups.c.
3802 (cleanups.o): New rule.
3804 2014-08-29 Gary Benson <gbenson@redhat.com>
3806 * utils.c (internal_vwarning): New function.
3808 2014-08-28 Gary Benson <gbenson@redhat.com>
3810 * utils.h (fatal): Remove declaration.
3811 * utils.c (fatal): Remove function.
3813 2014-08-28 Gary Benson <gbenson@redhat.com>
3815 * tracepoint.c (gdb_agent_init): Replace fatal with
3817 (initialize_tracepoint): Likewise.
3819 2014-08-28 Gary Benson <gbenson@redhat.com>
3821 * remote-utils.c (remote_prepare): Replace fatal with error.
3823 2014-08-28 Gary Benson <gbenson@redhat.com>
3825 * linux-low.c (linux_async): Replace fatal with warning.
3827 (linux_start_non_stop): Return -1 if linux_async failed.
3829 2014-08-28 Gary Benson <gbenson@redhat.com>
3831 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3833 (i386_dr_low_get_addr): Remove vague comment.
3834 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3837 2014-08-28 Gary Benson <gbenson@redhat.com>
3839 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3840 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3842 (linux_resume_one_lwp): Likewise.
3843 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3845 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3846 with internal_error.
3847 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3848 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3849 (find_register_by_name): Replace fatal with internal_error.
3850 (find_regno): Likewise.
3851 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3852 * thread-db.c (thread_db_create_event): Likewise.
3853 (thread_db_load_search): Likewise.
3854 (try_thread_db_load_1): Likewise.
3855 * tracepoint.c (get_jump_space_head): Replace fatal with
3857 (claim_trampoline_space): Likewise.
3858 (have_fast_tracepoint_trampoline_buffer): Likewise.
3859 (cmd_qtstart): Likewise.
3860 (stop_tracing): Likewise.
3861 (fast_tracepoint_collecting): Likewise.
3862 (target_malloc): Likewise.
3863 (download_tracepoint): Likewise.
3864 (download_trace_state_variables): Replace check with gdb_assert.
3865 (upload_fast_traceframes): Replace fatal with internal_error.
3867 2014-08-19 Tom Tromey <tromey@redhat.com>
3868 Gary Benson <gbenson@redhat.com>
3870 * Makefile.in (SFILES): Add common/common-debug.c.
3871 (OBS): Add common-debug.o.
3872 (common-debug.o): New rule.
3873 * debug.h (debug_printf): Don't declare.
3874 * debug.c (debug_printf): Renamed and rewritten as...
3875 (debug_vprintf): New function.
3877 2014-08-19 Gary Benson <gbenson@redhat.com>
3879 * utils.h: Do not include print-utils.h.
3881 2014-08-19 Tom Tromey <tromey@redhat.com>
3882 Gary Benson <gbenson@redhat.com>
3884 * server.h: Add static assertion.
3885 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3887 2014-08-19 Tom Tromey <tromey@redhat.com>
3888 Gary Benson <gbenson@redhat.com>
3890 * Makefile.in (SFILES): Add common/errors.c.
3891 (OBS): Add errors.o.
3892 (IPA_OBS): Add errors-ipa.o.
3893 (errors.o): New rule.
3894 (errors-ipa.o): Likewise.
3895 * utils.h (perror_with_name, error, warning): Don't declare.
3896 * utils.c (warning): Renamed and rewritten as...
3897 (vwarning): New function.
3898 (error): Renamed and rewritten as...
3899 (verror): New function.
3900 (internal_error): Renamed and rewritten as...
3901 (internal_verror): New function.
3903 2014-08-07 Gary Benson <gbenson@redhat.com>
3905 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3906 * configure: Regenerate.
3907 * config.in: Likewise.
3908 * server.h: Do not include errno.h.
3909 * event-loop.c: Likewise.
3910 * hostio-errno.c: Likewise.
3911 * linux-low.c: Likewise.
3912 * remote-utils.c: Likewise.
3913 * spu-low.c: Likewise.
3914 * utils.c: Likewise.
3915 * gdbreplay.c: Unconditionally include errno.h.
3917 2014-08-07 Gary Benson <gbenson@redhat.com>
3919 * server.h: Do not include string.h.
3920 * event-loop.c: Likewise.
3921 * linux-low.c: Likewise.
3922 * regcache.c: Likewise.
3923 * remote-utils.c: Likewise.
3924 * spu-low.c: Likewise.
3925 * utils.c: Likewise.
3927 2014-08-07 Gary Benson <gbenson@redhat.com>
3929 * server.h: Do not include gdb_assert.h.
3931 2014-08-07 Gary Benson <gbenson@redhat.com>
3933 * server.h: Do not include common-utils.h.
3935 2014-08-07 Gary Benson <gbenson@redhat.com>
3937 * server.h: Do not include ptid.h.
3938 * notif.h: Likewise.
3940 2014-08-07 Gary Benson <gbenson@redhat.com>
3942 * server.h: Do not include gdb_locale.h.
3944 2014-08-07 Gary Benson <gbenson@redhat.com>
3946 * server.h: Do not include gdb/signals.h.
3947 * win32-low.c: Likewise.
3949 2014-08-07 Gary Benson <gbenson@redhat.com>
3951 * server.h: Do not include pathmax.h.
3953 2014-08-07 Gary Benson <gbenson@redhat.com>
3955 * server.h: Do not include libiberty.h.
3956 * linux-bfin-low.c: Likewise.
3958 2014-08-07 Gary Benson <gbenson@redhat.com>
3960 * server.h: Do not include ansidecl.h.
3962 2014-08-07 Gary Benson <gbenson@redhat.com>
3964 * linux-x86-low.c: Do not include stddef.h.
3965 * lynx-ppc-low.c: Likewise.
3966 * tracepoint.c: Likewise.
3968 2014-08-07 Gary Benson <gbenson@redhat.com>
3970 * server.h: Do not include stdarg.h.
3971 * nto-low.c: Likewise.
3973 2014-08-07 Gary Benson <gbenson@redhat.com>
3975 * server.h: Do not include stdlib.h.
3976 * inferiors.c: Likewise.
3977 * linux-low.c: Likewise.
3978 * regcache.c: Likewise.
3979 * spu-low.c: Likewise.
3980 * tracepoint.c: Likewise.
3981 * utils.c: Likewise.
3983 2014-08-07 Gary Benson <gbenson@redhat.com>
3985 * server.h: Do not include stdio.h.
3986 * linux-low.c: Likewise.
3987 * remote-utils.c: Likewise.
3988 * spu-low.c: Likewise.
3989 * utils.c: Likewise.
3990 * wincecompat.c: Likewise.
3992 2014-08-06 Gary Benson <gbenson@redhat.com>
3994 * regcache.c (init_register_cache): Move conditionals inside if.
3996 2014-08-06 Gary Benson <gbenson@redhat.com>
3998 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4000 2014-07-31 Gary Benson <gbenson@redhat.com>
4002 * ax.h: Do not include server.h.
4003 * gdbthread.h: Likewise.
4004 * lynx-low.h: Likewise.
4005 * notif.h: Likewise.
4007 2014-07-30 Gary Benson <gbenson@redhat.com>
4009 * server.h: Include common-defs.h.
4010 Do not include config.h or build-gnulib-gdbserver/config.h.
4012 2014-07-30 Gary Benson <gbenson@redhat.com>
4014 * hostio-errno.c: Move server.h to top of includes list.
4015 * inferiors.c: Likewise.
4016 * linux-x86-low.c: Likewise.
4017 * notif.c: Include server.h.
4019 2014-07-24 Tom Tromey <tromey@redhat.com>
4020 Gary Benson <gbenson@redhat.com>
4022 * server.h (CORE_ADDR): Now unsigned.
4024 2014-07-16 Pedro Alves <palves@redhat.com>
4026 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4028 2014-07-15 Pedro Alves <palves@redhat.com>
4030 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4033 2014-07-11 Pedro Alves <palves@redhat.com>
4035 * linux-low.c (kill_wait_lwp): New function, based on
4036 kill_one_lwp_callback, but use my_waitpid directly.
4037 (kill_one_lwp_callback, linux_kill): Use it.
4039 2014-06-23 Pedro Alves <palves@redhat.com>
4041 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4042 before setting DR0..DR3.
4044 2014-06-20 Gary Benson <gbenson@redhat.com>
4046 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4047 * configure: Regenerated.
4048 * config.in: Likewise.
4050 2014-06-20 Gary Benson <gbenson@redhat.com>
4052 * Makefile.in (SFILES): Update locations for files moved
4054 (object file files): Reordered.
4056 2014-06-20 Gary Benson <gbenson@redhat.com>
4058 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4059 (i386_dr_low_set_addr): Likewise.
4060 (i386_dr_low_get_addr): Likewise.
4061 (i386_dr_low_can_set_control): Likewise.
4062 (i386_dr_low_set_control): Likewise.
4063 (i386_dr_low_get_control): Likewise.
4064 (i386_dr_low_get_status): Likewise.
4065 (i386_get_debug_register_length): Likewise.
4066 * linux-x86-low.c (i386_dr_low_set_addr):
4067 Changed signature. Made static.
4068 (i386_dr_low_get_addr): Likewise.
4069 (i386_dr_low_set_control): Likewise.
4070 (i386_dr_low_get_control): Likewise.
4071 (i386_dr_low_get_status): Likewise.
4072 (i386_dr_low): New global variable.
4073 * win32-i386-low.c (i386_dr_low_set_addr):
4074 Changed signature. Made static.
4075 (i386_dr_low_get_addr): Likewise.
4076 (i386_dr_low_set_control): Likewise.
4077 (i386_dr_low_get_control): Likewise.
4078 (i386_dr_low_get_status): Likewise.
4079 (i386_dr_low): New global variable.
4081 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4083 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4084 * Makefile.in (AR, AR_FLAGS): Define.
4085 * configure: Regenerate.
4087 2014-06-19 Gary Benson <gbenson@redhat.com>
4089 * Makefile.in (i386-dregs.o): New rule.
4090 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4091 * i386-low.c (target.h): Remove include.
4092 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4093 (DR_CONTROL_SHIFT): Likewise.
4094 (DR_CONTROL_SIZE): Likewise.
4095 (DR_RW_EXECUTE): Likewise.
4096 (DR_RW_WRITE): Likewise.
4097 (DR_RW_READ): Likewise.
4098 (DR_RW_IORW): Likewise.
4099 (DR_LEN_1): Likewise.
4100 (DR_LEN_2): Likewise.
4101 (DR_LEN_4): Likewise.
4102 (DR_LEN_8): Likewise.
4103 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4104 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4105 (DR_ENABLE_SIZE): Likewise.
4106 (DR_LOCAL_SLOWDOWN): Likewise.
4107 (DR_GLOBAL_SLOWDOWN): Likewise.
4108 (DR_CONTROL_RESERVED): Likewise.
4109 (I386_DR_CONTROL_MASK): Likewise.
4110 (I386_DR_VACANT): Likewise.
4111 (I386_DR_LOCAL_ENABLE): Likewise.
4112 (I386_DR_GLOBAL_ENABLE): Likewise.
4113 (I386_DR_DISABLE): Likewise.
4114 (I386_DR_SET_RW_LEN): Likewise.
4115 (I386_DR_GET_RW_LEN): Likewise.
4116 (I386_DR_WATCH_HIT): Likewise.
4117 (i386_wp_op_t): Likewise.
4118 (i386_show_dr): Likewise.
4119 (i386_length_and_rw_bits): Likewise.
4120 (i386_insert_aligned_watchpoint): Likewise.
4121 (i386_remove_aligned_watchpoint): Likewise.
4122 (i386_handle_nonaligned_watchpoint): Likewise.
4123 i386_update_inferior_debug_regs(): Likewise.
4124 (i386_dr_insert_watchpoint): Likewise.
4125 (i386_dr_remove_watchpoint): Likewise.
4126 (i386_dr_region_ok_for_watchpoint): Likewise.
4127 (i386_dr_stopped_data_address): Likewise.
4128 (i386_dr_stopped_by_watchpoint): Likewise.
4130 2014-06-19 Gary Benson <gbenson@redhat.com>
4132 * i386-low.c (i386_dr_show): Renamed to
4133 i386_show_dr and made static. All uses updated.
4134 (i386_dr_length_and_rw_bits): Renamed to
4135 i386_length_and_rw_bits and made static.
4137 (i386_dr_insert_aligned_watchpoint): Renamed to
4138 i386_insert_aligned_watchpoint and made static.
4140 (i386_dr_remove_aligned_watchpoint): Renamed to
4141 i386_remove_aligned_watchpoint and made static.
4143 (i386_dr_update_inferior_debug_regs): Renamed to
4144 i386_update_inferior_debug_regs and made static.
4147 2014-06-18 Gary Benson <gbenson@redhat.com>
4149 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4150 (i386_dr_low_can_set_control): Likewise.
4151 (i386_get_debug_register_length): Likewise.
4152 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4153 (i386_dr_low_can_set_control): Likewise.
4154 (i386_get_debug_register_length): Likewise.
4156 2014-06-17 Gary Benson <gbenson@redhat.com>
4158 * i386-low.h (i386-dregs.h): New include.
4159 (DR_FIRSTADDR): Now in i386-dregs.h.
4160 (DR_LASTADDR): Likewise.
4161 (DR_NADDR): Likewise.
4162 (DR_STATUS): Likewise.
4163 (DR_CONTROL): Likewise.
4164 (i386_debug_reg_state): Likewise.
4165 (i386_dr_insert_watchpoint): Likewise.
4166 (i386_dr_remove_watchpoint): Likewise.
4167 (i386_dr_region_ok_for_watchpoint): Likewise.
4168 (i386_dr_stopped_data_address): Likewise.
4169 (i386_dr_stopped_by_watchpoint): Likewise.
4170 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4172 2014-06-18 Gary Benson <gbenson@redhat.com>
4174 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4175 i386_dr_insert_watchpoint.
4176 (i386_low_remove_watchpoint): Renamed to
4177 i386_dr_remove_watchpoint.
4178 (i386_low_region_ok_for_watchpoint): Renamed to
4179 i386_dr_region_ok_for_watchpoint.
4180 (i386_low_stopped_data_address): Renamed to
4181 i386_dr_stopped_data_address.
4182 (i386_low_stopped_by_watchpoint): Renamed to
4183 i386_dr_stopped_by_watchpoint.
4184 * i386-low.c (i386_show_dr): Renamed to
4185 i386_dr_show and made nonstatic. All uses updated.
4186 (i386_length_and_rw_bits): Renamed to
4187 i386_dr_length_and_rw_bits and made nonstatic.
4189 (i386_insert_aligned_watchpoint): Renamed to
4190 i386_dr_insert_aligned_watchpoint and made nonstatic.
4192 (i386_remove_aligned_watchpoint): Renamed to
4193 i386_dr_remove_aligned_watchpoint and made nonstatic.
4195 (i386_update_inferior_debug_regs): Renamed to
4196 i386_dr_update_inferior_debug_regs and made nonstatic.
4198 (i386_low_insert_watchpoint): Renamed to
4199 i386_dr_insert_watchpoint. All uses updated.
4200 (i386_low_remove_watchpoint): Renamed to
4201 i386_dr_remove_watchpoint. All uses updated.
4202 (i386_low_region_ok_for_watchpoint): Renamed to
4203 i386_dr_region_ok_for_watchpoint. All uses updated.
4204 (i386_low_stopped_data_address): Renamed to
4205 i386_dr_stopped_data_address. All uses updated.
4206 (i386_low_stopped_by_watchpoint): Renamed to
4207 i386_dr_stopped_by_watchpoint. All uses updated.
4209 2014-06-18 Gary Benson <gbenson@redhat.com>
4211 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4212 (i386_dr_low_can_set_control): Likewise.
4213 (i386_insert_aligned_watchpoint): New check.
4215 2014-06-18 Gary Benson <gbenson@redhat.com>
4217 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4220 2014-06-18 Gary Benson <gbenson@redhat.com>
4222 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4223 instead of fatal and error.
4224 (i386_handle_nonaligned_watchpoint): Likewise.
4226 2014-06-18 Gary Benson <gbenson@redhat.com>
4228 * i386-low.c (i386_get_debug_register_length): New macro.
4229 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4230 (i386_show_dr): Use debug_printf instead of fprintf. Use
4231 phex to format values.
4233 2014-06-18 Gary Benson <gbenson@redhat.com>
4235 * i386-low.h: Comment changes.
4236 * i386-low.c: Likewise.
4238 2014-06-18 Gary Benson <gbenson@redhat.com>
4240 * i386-low.c: Whitespace changes.
4242 2014-06-12 Tom Tromey <tromey@redhat.com>
4244 * utils.c (freeargv): Remove.
4246 2014-06-12 Tom Tromey <tromey@redhat.com>
4248 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4249 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4250 (parse_debug_format_options): Likewise.
4251 (gdbserver_usage): Likewise.
4252 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4253 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4254 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4256 ($(LIBGNU)): Depend on libiberty.
4257 (all-lib): Recurse into all subdirs.
4258 (install-only): Invoke "install" target in subdirs.
4259 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4261 * configure: Rebuild.
4262 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4263 for vasprintf, vsnprintf, or gettimeofday.
4264 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4267 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4269 * development.sh: Delete.
4270 * Makefile.in (config.status): Adjust dependency on development.sh.
4271 * configure.ac: Adjust development.sh source call.
4272 * configure: Regenerate.
4274 2014-06-02 Pedro Alves <palves@redhat.com>
4276 * ax.c (gdb_free_agent_expr): New function.
4277 * ax.h (gdb_free_agent_expr): New declaration.
4278 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4280 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4282 (clear_breakpoint_conditions_and_commands): New function.
4283 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4284 (clear_breakpoint_conditions_and_commands): New declaration.
4286 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4288 * linux-aarch64-low.c (asm/ptrace.h): Include.
4290 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4292 Fix TLS access for -static -pthread.
4293 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4294 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4295 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4297 2014-05-20 Pedro Alves <palves@redhat.com>
4299 * linux-aarch64-low.c (aarch64_insert_point)
4300 (aarch64_remove_point): No longer check whether the type is
4301 supported here. Adjust to new interface.
4302 (the_low_target): Install aarch64_supports_z_point_type as
4303 supports_z_point_type method.
4304 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4305 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4306 instead of a Z packet char. Adjust.
4307 (arm_supports_z_point_type): New function.
4308 (arm_insert_point, arm_remove_point): Adjust to new interface.
4309 (the_low_target): Install arm_supports_z_point_type.
4310 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4311 (cris_insert_point, cris_remove_point): Adjust to new interface.
4312 Don't check whether the type is supported here.
4313 (the_low_target): Install cris_supports_z_point_type.
4314 * linux-low.c (linux_supports_z_point_type): New function.
4315 (linux_insert_point, linux_remove_point): Adjust to new interface.
4316 * linux-low.h (struct linux_target_ops) <insert_point,
4317 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4318 raw_breakpoint pointer parameter.
4319 <supports_z_point_type>: New method.
4320 * linux-mips-low.c (mips_supports_z_point_type): New function.
4321 (mips_insert_point, mips_remove_point): Adjust to new interface.
4322 Use mips_supports_z_point_type.
4323 (the_low_target): Install mips_supports_z_point_type.
4324 * linux-ppc-low.c (the_low_target): Install NULL as
4325 supports_z_point_type method.
4326 * linux-s390-low.c (the_low_target): Install NULL as
4327 supports_z_point_type method.
4328 * linux-sparc-low.c (the_low_target): Install NULL as
4329 supports_z_point_type method.
4330 * linux-x86-low.c (x86_supports_z_point_type): New function.
4331 (x86_insert_point): Adjust to new insert_point interface. Use
4332 insert_memory_breakpoint. Adjust to new
4333 i386_low_insert_watchpoint interface.
4334 (x86_remove_point): Adjust to remove_point interface. Use
4335 remove_memory_breakpoint. Adjust to new
4336 i386_low_remove_watchpoint interface.
4337 (the_low_target): Install x86_supports_z_point_type.
4338 * lynx-low.c (lynx_target_ops): Install NULL as
4339 supports_z_point_type callback.
4340 * nto-low.c (nto_supports_z_point_type): New.
4341 (nto_insert_point, nto_remove_point): Adjust to new interface.
4342 (nto_target_ops): Install nto_supports_z_point_type.
4343 * mem-break.c: Adjust intro comment.
4344 (struct raw_breakpoint) <raw_type, size>: New fields.
4345 <inserted>: Update comment.
4346 <shlib_disabled>: Delete field.
4347 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4348 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4349 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4350 (raw_bkpt_type_to_target_hw_bp_type): New function.
4351 (find_enabled_raw_code_breakpoint_at): New function.
4352 (find_raw_breakpoint_at): New type and size parameters. Use them.
4353 (insert_memory_breakpoint): New function, based off
4354 set_raw_breakpoint_at.
4355 (remove_memory_breakpoint): New function.
4356 (set_raw_breakpoint_at): Reimplement.
4357 (set_breakpoint): New, based on set_breakpoint_at.
4358 (set_breakpoint_at): Reimplement.
4359 (delete_raw_breakpoint): Go through the_target->remove_point
4360 instead of assuming memory breakpoints.
4361 (find_gdb_breakpoint_at): Delete.
4362 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4363 (find_gdb_breakpoint): New function.
4364 (set_gdb_breakpoint_at): Delete.
4365 (z_type_supported): New function.
4366 (set_gdb_breakpoint_1): New function, loosely based off
4367 set_gdb_breakpoint_at.
4368 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4369 (delete_gdb_breakpoint_at): Delete.
4370 (delete_gdb_breakpoint_1): New function, loosely based off
4371 delete_gdb_breakpoint_at.
4372 (delete_gdb_breakpoint): New function.
4373 (clear_gdb_breakpoint_conditions): Rename to ...
4374 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4376 (add_condition_to_breakpoint): Make static.
4377 (add_breakpoint_condition): Take a struct breakpoint pointer
4378 instead of an address. Adjust.
4379 (gdb_condition_true_at_breakpoint): Rename to ...
4380 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4382 (gdb_condition_true_at_breakpoint): Reimplement.
4383 (add_breakpoint_commands): Take a struct breakpoint pointer
4384 instead of an address. Adjust.
4385 (gdb_no_commands_at_breakpoint): Rename to ...
4386 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4387 parameter. Return true if no breakpoint was found. Change debug
4389 (gdb_no_commands_at_breakpoint): Reimplement.
4390 (run_breakpoint_commands): Rename to ...
4391 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4392 and change return type to boolean.
4393 (run_breakpoint_commands): New function.
4394 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4395 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4396 breakpoint. Go through the_target->remove_point instead of
4397 assuming memory breakpoint.
4398 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4399 software and hardware breakpoints.
4400 (reinsert_raw_breakpoint): Go through the_target->insert_point
4401 instead of assuming memory breakpoint.
4402 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4403 software and hardware breakpoints.
4404 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4405 Check both software and hardware breakpoints.
4406 (validate_inserted_breakpoint): Assert the breakpoint is a
4407 software breakpoint. Set the inserted flag to -1 instead of
4408 setting shlib_disabled.
4409 (delete_disabled_breakpoints): Adjust.
4410 (validate_breakpoints): Only validate software breakpoints.
4411 Adjust to inserted flag change.
4412 (check_mem_read, check_mem_write): Skip breakpoint types other
4413 than software breakpoints. Adjust to inserted flag change.
4414 * mem-break.h (enum raw_bkpt_type): New enum.
4415 (raw_breakpoint, struct process_info): Forward declare.
4416 (Z_packet_to_target_hw_bp_type): Delete declaration.
4417 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4418 (set_gdb_breakpoint, delete_gdb_breakpoint)
4419 (clear_breakpoint_conditions): New declarations.
4420 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4421 (breakpoint_inserted_here): Update comment.
4422 (add_breakpoint_condition, add_breakpoint_commands): Replace
4423 address parameter with a breakpoint pointer parameter.
4424 (gdb_breakpoint_here): Update comment.
4425 (delete_gdb_breakpoint_at): Delete.
4426 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4427 * server.c (process_point_options): Take a struct breakpoint
4428 pointer instead of an address. Adjust.
4429 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4430 delete_gdb_breakpoint.
4431 * spu-low.c (spu_target_ops): Install NULL as
4432 supports_z_point_type method.
4433 * target.h: Include mem-break.h.
4434 (struct target_ops) <prepare_to_access_memory>: Update comment.
4435 <supports_z_point_type>: New field.
4436 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4437 instead of a char. Also take a raw breakpoint pointer.
4438 * win32-arm-low.c (the_low_target): Install NULL as
4439 supports_z_point_type.
4440 * win32-i386-low.c (i386_supports_z_point_type): New function.
4441 (i386_insert_point, i386_remove_point): Adjust to new interface.
4442 (the_low_target): Install i386_supports_z_point_type.
4443 * win32-low.c (win32_supports_z_point_type): New function.
4444 (win32_insert_point, win32_remove_point): Adjust to new interface.
4445 (win32_target_ops): Install win32_supports_z_point_type.
4446 * win32-low.h (struct win32_target_ops):
4447 <supports_z_point_type>: New method.
4448 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4449 instead of a char. Also take a raw breakpoint pointer.
4451 2014-05-20 Pedro Alves <palves@redhat.com>
4453 * mem-break.h: Include break-common.h.
4454 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4455 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4456 (Z_packet_to_target_hw_bp_type): New declaration.
4457 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4458 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4459 (Z_PACKET_ACCESS_WP): Delete macros.
4460 (Z_packet_to_hw_type): Delete function.
4461 * i386-low.h: Don't include break-common.h here.
4462 (Z_packet_to_hw_type): Delete declaration.
4463 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4464 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4465 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4466 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4467 * linux-aarch64-low.c: Don't include break-common.h here.
4468 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4469 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4470 (Z_packet_to_target_hw_bp_type): Delete function.
4471 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4473 (mips_insert_point, mips_remove_point): Use
4474 Z_packet_to_target_hw_bp_type.
4476 2014-05-20 Pedro Alves <palves@redhat.com>
4478 * linux-aarch64-low.c: Include break-common.h.
4479 (enum target_point_type): Delete.
4480 (Z_packet_to_point_type): Rename to ...
4481 (Z_packet_to_target_hw_bp_type): ... this, and return a
4482 target_hw_bp_type instead.
4483 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4484 instead of an enum target_point_type.
4485 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4487 (aarch64_dr_state_insert_one_point)
4488 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4489 (aarch64_handle_aligned_watchpoint)
4490 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4491 Take an enum target_hw_bp_type instead of an enum
4493 (aarch64_supports_z_point_type): New function.
4494 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4495 use Z_packet_to_target_hw_bp_type.
4497 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4499 * configure.ac: Only use -Werror by default when DEVELOPMENT
4501 * configure: Regenerate.
4503 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4505 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4506 * linux-x86-low.c (X86_64_USER_REGS): New.
4507 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4509 2014-04-28 Yao Qi <yao@codesourcery.com>
4511 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4514 2014-04-25 Pedro Alves <palves@redhat.com>
4517 * linux-low.c (linux_attach_fail_reason_string): New function.
4518 (linux_attach_lwp): Delete.
4519 (linux_attach_lwp_1): Rename to ...
4520 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4521 argument. Remove "initial" parameter. Return int instead of
4522 void. Don't error or warn here.
4523 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4524 failure to attach to the tgid. Call warning when failing to
4526 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4527 argument. Remove "initial" parameter. Return int instead of
4528 void. Don't error or warn here.
4529 (linux_attach_fail_reason_string): New declaration.
4530 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4531 interface change. Use linux_attach_fail_reason_string.
4533 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4534 Walfred Tedeschi <walfred.tedeschi@intel.com>
4536 * Makefile.in: Added rules to handle new files
4537 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4538 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4539 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4540 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4541 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4542 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4544 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4545 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4546 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4547 i386/x32-avx512.xml.
4548 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4549 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4550 i386/x32-avx512-linux.xml.
4551 * i387-fp.c (num_avx512_k_registers): New constant for number
4553 (num_avx512_zmmh_low_registers): New constant for number of
4554 lower ZMM registers (0-15).
4555 (num_avx512_zmmh_high_registers): New constant for number of
4556 higher ZMM registers (16-31).
4557 (num_avx512_ymmh_registers): New contant for number of higher
4558 YMM registers (ymm16-31 added by avx521 on x86_64).
4559 (num_avx512_xmm_registers): New constant for number of higher
4560 XMM registers (xmm16-31 added by AVX512 on x86_64).
4561 (struct i387_xsave): Add space for AVX512 registers.
4562 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4563 Add code to handle AVX512 registers.
4564 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4565 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4566 prototypei from generated file.
4567 (tdesc_amd64_avx512_linux): Likewise.
4568 (init_registers_x32_avx512_linux): Likewise.
4569 (tdesc_x32_avx512_linux): Likewise.
4570 (init_registers_i386_avx512_linux): Likewise.
4571 (tdesc_i386_avx512_linux): Likewise.
4572 (x86_64_regmap): Add AVX512 registers.
4573 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4575 (initialize_low_arch): Add code to initialize AVX512 registers.
4577 2014-04-23 Pedro Alves <palves@redhat.com>
4579 * mem-break.c (find_gdb_breakpoint_at): Make static.
4580 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4582 2014-04-23 Pedro Alves <palves@redhat.com>
4584 * i386-low.c: Don't include break-common.h here.
4585 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4586 prototype to take target_hw_bp_type as argument instead of a Z
4588 * i386-low.h: Include break-common.h here.
4589 (Z_packet_to_hw_type): Declare.
4590 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4592 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4593 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4594 (x86_remove_point): Convert the packet number to a
4595 target_hw_bp_type before calling i386_low_remove_watchpoint.
4596 * win32-i386-low.c (i386_insert_point): Convert the packet number
4597 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4598 (i386_remove_point): Convert the packet number to a
4599 target_hw_bp_type before calling i386_low_remove_watchpoint.
4601 2014-04-23 Pedro Alves <palves@redhat.com>
4603 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4605 2014-04-10 Pedro Alves <palves@redhat.com>
4607 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4608 Check if the condition or command is NULL before checking if the
4609 breakpoint is known. On success, return true.
4610 * mem-break.h (add_breakpoint_condition): Document return.
4611 (add_breakpoint_commands): Add describing comment.
4612 * server.c (skip_to_semicolon): New function.
4613 (process_point_options): Use it.
4615 2014-04-09 Pedro Alves <palves@redhat.com>
4617 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4620 2014-02-27 Pedro Alves <palves@redhat.com>
4623 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4625 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4627 (last_thread_of_process_p): Take a PID argument instead of a
4629 (linux_wait_for_lwp): Delete.
4630 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4632 (linux_low_filter_event): New function, party factored out from
4633 linux_wait_for_event.
4634 (linux_wait_for_event): Rename to ...
4635 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4636 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4637 sigsuspend. Check for zombie leaders.
4638 (linux_wait_for_event): Reimplement as wrapper around
4639 linux_wait_for_event_filtered.
4640 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4641 a normal or signal exit is seen, it's the whole process exiting.
4642 (wait_for_sigstop): No longer a for_each_inferior callback.
4643 Rewrite on top of linux_wait_for_event_filtered.
4644 (stop_all_lwps): Call wait_for_sigstop directly.
4645 * server.c (resume, handle_target_event): Handle
4646 TARGET_WAITKIND_NO_RESUMED.
4648 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4650 * win32-low.c (psapi_get_dll_name,
4651 * win32_CreateToolhelp32Snapshot): Delete.
4652 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4653 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4655 (handle_load_dll): Add function description.
4656 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4658 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4660 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4662 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4663 base address when calling win32_add_one_solib.
4664 (handle_load_dll): Delete local variable load_addr.
4665 Remove 0x1000 offset applied to DLL base address when calling
4666 win32_add_one_solib.
4667 (handle_unload_dll): Add comment.
4669 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4671 * win32-low.c (win32_add_all_dlls): Renames
4672 win32_ensure_ntdll_loaded. Rewrite function documentation.
4673 Adjust implementation to always load all DLLs.
4674 Add 0x1000 offset to DLL base address when calling
4675 win32_add_one_solib.
4676 (child_initialization_done): New static global.
4677 (do_initial_child_stuff): Set child_initialization_done to
4678 zero during child initialization, and 1 after. Replace call
4679 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4681 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4682 (handle_unload_dll): Add function documentation.
4683 (get_child_debug_event): Ignore load and unload DLL events
4684 during child initialization.
4686 2014-02-20 Doug Evans <dje@google.com>
4688 Remove global all_lwps.
4689 * inferiors.h (ptid_of): Move here from linux-low.h.
4690 (pid_of, lwpid_of): Ditto.
4691 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4692 parameter is a struct thread_info * now.
4693 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4694 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4695 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4697 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4698 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4699 * linux-arm-low.c (update_registers_callback): Update, "entry"
4700 parameter is a struct thread_info * now.
4701 Fetch lwpid from current_inferior directly.
4702 (arm_insert_point): Pass &all_threads to find_inferior instead of
4704 (arm_remove_point): Ditto.
4705 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4706 (arm_prepare_to_resume): Fetch pid from thread.
4707 (arm_read_description): Fetch lwpid from current_inferior directly.
4708 * linux-low.c (all_lwps): Delete.
4709 (delete_lwp): Delete call to remove_inferior.
4710 (handle_extended_wait): Fetch lwpid from thread.
4711 (add_lwp): Don't set lwp->entry.id. Remove call to
4712 add_inferior_to_list.
4713 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4714 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4715 (kill_one_lwp_callback): Ditto.
4716 (linux_kill): Don't dereference NULL pointer.
4717 Fetch ptid,lwpid from thread.
4718 (get_detach_signal): Fetch ptid from thread.
4719 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4720 Simplify call to regcache_invalidate_thread.
4721 (delete_lwp_callback): Update, "entry" parameter is a
4722 struct thread_info * now. Fetch pid from thread.
4723 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4724 (status_pending_p_callback): Update, "entry" parameter is a
4725 struct thread_info * now. Fetch ptid from thread.
4726 (find_lwp_pid): Update, "entry" parameter is a
4727 struct thread_info * now.
4728 (linux_wait_for_lwp): Fetch pid from thread.
4729 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4730 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4731 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4732 (dequeue_one_deferred_signal): Ditto.
4733 (cancel_breakpoint): Fetch ptid from current_inferior.
4734 (linux_wait_for_event): Pass &all_threads to find_inferior,
4735 not &all_lwps. Fetch ptid, lwpid from thread.
4736 (count_events_callback): Update, "entry" parameter is a
4737 struct thread_info * now.
4738 (select_singlestep_lwp_callback): Ditto.
4739 (select_event_lwp_callback): Ditto.
4740 (cancel_breakpoints_callback): Ditto.
4741 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4743 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4744 (unsuspend_one_lwp): Update, "entry" parameter is a
4745 struct thread_info * now.
4746 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4748 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4749 Fetch lwpid from thread, not lwp.
4750 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4751 Pass &all_threads to find_inferior, not &all_lwps.
4752 (send_sigstop): Fetch lwpid from thread, not lwp.
4753 (send_sigstop_callback): Update, "entry" parameter is a
4754 struct thread_info * now.
4755 (suspend_and_send_sigstop_callback): Ditto.
4756 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4757 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4758 struct thread_info * now.
4759 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4761 (lwp_running): Update, "entry" parameter is a
4762 struct thread_info * now.
4763 (stop_all_lwps): Fetch ptid from thread.
4764 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4765 (linux_resume_one_lwp): Fetch lwpid from thread.
4766 (linux_set_resume_request): Update, "entry" parameter is a
4767 struct thread_info * now. Fetch pid, lwpid from thread.
4768 (resume_status_pending_p): Update, "entry" parameter is a
4769 struct thread_info * now.
4770 (need_step_over_p): Ditto. Fetch lwpid from thread.
4771 (start_step_over): Fetch lwpid from thread.
4772 (linux_resume_one_thread): Update, "entry" parameter is a
4773 struct thread_info * now. Fetch lwpid from thread.
4774 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4775 (proceed_one_lwp): Update, "entry" parameter is a
4776 struct thread_info * now. Fetch lwpid from thread.
4777 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4778 struct thread_info * now.
4779 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4780 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4781 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4783 (regsets_store_inferior_registers): Ditto.
4784 (fetch_register, store_register): Ditto.
4785 (linux_read_memory, linux_write_memory): Ditto.
4786 (linux_request_interrupt): Ditto.
4787 (linux_read_auxv): Ditto.
4788 (linux_xfer_siginfo): Ditto.
4789 (linux_qxfer_spu): Ditto.
4790 (linux_qxfer_libraries_svr4): Ditto.
4791 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4792 moved to inferiors.h.
4794 (get_thread_lwp): Update.
4795 (struct lwp_info): Delete member "entry". Simplify comment for
4798 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4799 current_inferior directly.
4800 (update_watch_registers_callback): Update, "entry" parameter is a
4801 struct thread_info * now. Fetch pid from thread.
4802 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4803 (mips_insert_point): Fetch lwpid from current_inferior.
4804 Pass &all_threads to find_inferior, not &all_lwps.
4805 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4806 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4808 (mips_stopped_data_address): Ditto.
4809 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4811 * linux-tile-low.c (tile_arch_setup): Ditto.
4812 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4813 (update_debug_registers_callback): Update, "entry" parameter is a
4814 struct thread_info * now. Fetch pid from thread.
4815 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4816 Pass &all_threads to find_inferior, not &all_lwps.
4817 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4818 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4819 Pass &all_threads to find_inferior, not &all_lwps.
4820 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4821 (i386_dr_low_get_status): Ditto.
4822 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4823 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4824 (x86_linux_read_description): Ditto.
4825 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4827 2014-02-20 Doug Evans <dje@google.com>
4829 * inferiors.c (get_first_inferior): Fix buglet.
4831 2014-02-19 Doug Evans <dje@google.com>
4833 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4834 * inferiors.c (add_thread): Change result type to struct thread_info *.
4835 All callers updated.
4836 (add_lwp): Call add_thread here instead of in callers.
4837 All callers updated.
4838 * linux-low.h (get_lwp_thread): Rewrite.
4839 (struct lwp_info): New member "thread".
4841 2014-02-19 Doug Evans <dje@google.com>
4843 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4844 All callers updated.
4846 2014-02-19 Doug Evans <dje@google.com>
4848 * inferiors.c (add_thread): Fix whitespace.
4850 2014-02-19 Doug Evans <dje@google.com>
4852 * dll.c (clear_dlls): Replace accessing list implemention details
4854 * gdbthread.h (get_first_thread): Declare.
4855 * inferiors.c (for_each_inferior_with_data): New function.
4856 (get_first_thread): New function.
4857 (find_thread_ptid): Simplify.
4858 (get_first_inferior): New function.
4859 (clear_list): Delete.
4860 (one_inferior_p): New function.
4861 (clear_inferior_list): New function.
4862 (clear_inferiors): Update.
4863 * inferiors.h (for_each_inferior_with_data): Declare.
4864 (clear_inferior_list): Declare.
4865 (one_inferior_p): Declare.
4866 (get_first_inferior): Declare.
4867 * linux-low.c (linux_wait_for_event): Replace accessing list
4868 implemention details with API function.
4869 * server.c (target_running): Ditto.
4870 (accumulate_file_name_length): New function.
4871 (emit_dll_description): New function.
4872 (handle_qxfer_libraries): Replace accessing list implemention
4873 details with API function.
4874 (handle_qxfer_threads_worker): New function.
4875 (handle_qxfer_threads_proper): Replace accessing list implemention
4876 details with API function.
4877 (handle_query): Ditto.
4878 (visit_actioned_threads_callback_ftype): New typedef.
4879 (visit_actioned_threads_data): New struct.
4880 (visit_actioned_threads): Rewrite to be find_inferior callback.
4881 (resume): Call find_inferior.
4882 (handle_status): Replace accessing list implemention
4883 details with API function.
4884 (process_serial_event): Replace accessing list implemention details
4886 * target.c (set_desired_inferior): Replace accessing list implemention
4887 details with API function.
4888 * tracepoint.c (same_process_p): New function.
4889 (gdb_agent_about_to_close): Replace accessing list implemention
4890 details with API function.
4891 * win32-low.c (child_delete_thread): Replace accessing list
4892 implemention details with API function.
4893 (match_dll_by_basename): New function.
4894 (dll_is_loaded_by_basename): New function.
4895 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4896 details call to dll_is_loaded_by_basename.
4898 2014-02-19 Doug Evans <dje@google.com>
4900 * dll.h (struct dll_info): Add comment.
4901 * gdbthread.h (struct thread_info): Add comment.
4902 (current_ptid): Simplify.
4903 * inferiors.c (add_process): Update.
4904 (remove_process): Update.
4905 * inferiors.h (struct process_info): Rename member "head" to "entry".
4906 * linux-low.c (delete_lwp): Update.
4908 (last_thread_of_process_p): Update.
4909 (kill_one_lwp_callback, linux_kill): Update.
4910 (status_pending_p_callback): Update.
4911 (wait_for_sigstop): Update. Simplify read of ptid.
4912 (start_step_over): Update.
4913 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4914 (get_lwp_thread): Update.
4915 (struct lwp_info): Rename member "head" to "entry".
4916 * regcache.h (inferior_list_entry): Delete.
4917 * server.c (kill_inferior_callback): Update.
4918 (detach_or_kill_inferior_callback): Update.
4919 (print_started_pid): Update.
4920 (print_attached_pid): Update.
4921 (process_serial_event): Simplify read of ptid.
4922 * thread-db.c (thread_db_create_event): Update.
4923 (thread_db_get_tls_address): Update.
4924 * win32-low.c (current_inferior_ptid): Simplify.
4926 2014-02-19 Tom Tromey <tromey@redhat.com>
4928 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4930 (target_supports_btrace): Update.
4932 2014-02-14 Yao Qi <yao@codesourcery.com>
4934 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4935 (rsp-low-ipa.o): New target.
4937 2014-02-12 Tom Tromey <tromey@redhat.com>
4939 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4940 convert_ascii_to_int.
4941 * regcache.c (registers_to_string): Likewise.
4942 * remote-utils.c (decode_M_packet): Likewise.
4943 * server.c (process_serial_event): Likewise.
4945 2014-02-12 Tom Tromey <tromey@redhat.com>
4947 * server.c (handle_query, handle_v_run): Use hex2bin, not
4949 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4951 2014-02-12 Tom Tromey <tromey@redhat.com>
4953 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4954 convert_int_to_ascii.
4955 * regcache.c (registers_to_string, collect_register_as_string):
4957 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4959 * server.c (process_serial_event): Likewise.
4960 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4961 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4963 2014-02-12 Tom Tromey <tromey@redhat.com>
4965 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4966 bin2hex, not hexify.
4967 * tracepoint.c (cmd_qtstatus): Likewise.
4969 2014-02-12 Tom Tromey <tromey@redhat.com>
4971 * remote-utils.c (monitor_output): Pass explicit length to
4974 2014-02-12 Tom Tromey <tromey@redhat.com>
4976 * tracepoint.c: Include rsp-low.h.
4977 * server.c: Include rsp-low.h.
4978 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4979 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4981 * remote-utils.c: Include rsp-low.h.
4982 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4983 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4984 (convert_int_to_ascii, convert_ascii_to_int): Move to
4986 * regcache.c: Include rsp-low.h.
4987 * ax.c: Include rsp-low.h.
4988 * Makefile.in (SFILES): Add common/rsp-low.c.
4989 (OBS): Add rsp-low.o.
4990 (rsp-low.o): New target.
4992 2014-02-12 Tom Tromey <tromey@redhat.com>
4994 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4995 Include print-utils.h.
4996 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4997 (plongest, thirty_two, phex_nz): Remove.
4998 * Makefile.in (SFILES): Add common/print-utils.c.
4999 (OBS): Add print-utils.o.
5000 (print-utils-ipa.o): New target.
5001 (print-utils.o): New target.
5002 (IPA_OBJS): Add print-utils-ipa.o.
5004 2014-02-06 Tom Tromey <tromey@redhat.com>
5006 * Makefile.in (SFILES): Fix indentation.
5008 2014-02-05 Doug Evans <dje@google.com>
5010 * linux-low.c (linux_wait_for_event): Improve comment.
5011 (linux_wait_1): Keep current_inferior in sync with event_child.
5013 2014-01-22 Doug Evans <dje@google.com>
5015 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5017 2014-01-22 Doug Evans <dje@google.com>
5019 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5020 * configure: Regenerate.
5021 * config.in: Regenerate.
5022 * Makefile.in (SFILES): Add debug.c.
5024 * debug.c: New file.
5025 * debug.h: New file.
5026 * linux-aarch64-low.c (*): Update all debugging printfs to use
5027 debug_printf instead of fprintf.
5028 * linux-arm-low.c (*): Ditto.
5029 * linux-cris-low.c (*): Ditto.
5030 * linux-crisv32-low.c (*): Ditto.
5031 * linux-m32r-low.c (*): Ditto.
5032 * linux-sparc-low.c (*): Ditto.
5033 * linux-x86.c (*): Ditto.
5034 * linux-low.c (*): Ditto.
5035 (linux_wait_1): Add calls to debug_enter, debug_exit.
5036 (linux_wait): Remove redundant debugging printf.
5037 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5038 (linux_resume, unstop_all_lwps): Ditto.
5039 * mem-break.c (*): Update all debugging printfs to use
5040 debug_printf instead of fprintf.
5041 * remote-utils.c (*): Ditto.
5042 * thread-db.c (*): Ditto.
5043 * server.c #include <ctype.h>, "gdb_vecs.h".
5044 (debug_threads): Moved to debug.c.
5045 (*): Update all debugging printfs to use debug_printf instead of
5047 (start_inferior): Replace call to fflush with call to debug_flush.
5048 (monitor_show_help): Mention set debug-format.
5049 (parse_debug_format_options): New function.
5050 (handle_monitor_command): Handle "monitor set debug-format".
5051 (gdbserver_usage): Mention --debug-format.
5052 (main): Parse --debug-format.
5053 * server.h (debug_threads): Declaration moved to debug.h.
5055 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5056 trace_debug_1 that uses debug_printf.
5057 (tracepoint_look_up_symbols): Update all debugging printfs to use
5058 debug_printf instead of fprintf.
5060 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5062 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5065 2014-01-17 Pedro Alves <palves@redhat.com>
5068 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5069 defined after including gdb_proc_service.h.
5071 2014-01-16 Doug Evans <dje@google.com>
5073 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5074 (match_dll): Use it.
5076 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5078 * target.h (target_ops) <read_btrace>: Change parameters and
5079 return type to allow error reporting.
5080 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5081 trace reading errors on.
5082 * linux-low.c (linux_low_read_btrace): Pass trace reading
5084 (linux_low_disable_btrace): New.
5086 2014-01-15 Doug Evans <dje@google.com>
5088 * inferiors.c (thread_id_to_gdb_id): Delete.
5089 * inferiors.h (thread_id_to_gdb_id): Delete.
5091 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5093 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5094 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5097 2014-01-08 Pedro Alves <palves@redhat.com>
5099 * server.c (handle_status): Don't discard previous queued stop
5100 replies or thread's pending status here.
5101 (main) <disconnection>: Do it here instead.
5103 2014-01-08 Pedro Alves <palves@redhat.com>
5105 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5106 * server.c (visit_actioned_threads, handle_pending_status): New
5108 (handle_v_cont): Factor out parts to ...
5109 (resume): ... this new function. If in all-stop, and a thread
5110 being resumed has a pending status, report it without actually
5112 (myresume): Adjust to use the new 'resume' function.
5113 (clear_pending_status_callback, set_pending_status_callback)
5114 (find_status_pending_thread_callback): New functions.
5115 (handle_status): Handle the case of multiple threads having
5116 interesting statuses to report. Report threads' real last signal
5117 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5118 with an interesting thread to report the status for, instead of
5119 always reporting the status of the first thread.
5121 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5123 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5124 * gdbreplay.c (gdbreplay_version): Likewise.
5126 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5128 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5129 iov.iov_len with the real length in use.
5131 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5133 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5134 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5135 for all targets that use win32-low.c.
5136 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5137 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5139 2013-12-13 Pedro Alves <palves@redhat.com>
5141 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5142 if equal to TARGET_WAITKIND_LOADED.
5143 * win32-low.c (cached_status): New static global.
5144 (win32_wait): Add declaration.
5145 (do_initial_child_stuff): Flush all initial pending debug events
5146 up to the initial breakpoint.
5147 (win32_wait): If CACHED_STATUS was set, return that instead
5148 of doing a real wait. Remove the code resuming the execution
5149 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5150 during the initial phase. Also remove the code changing
5151 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5152 TARGET_WAITKIND_STOPPED.
5154 2013-12-11 Yao Qi <yao@codesourcery.com>
5156 * notif.c (handle_notif_ack): Return 0 if no notification
5159 2013-11-20 Doug Evans <dje@google.com>
5161 * linux-low.c (linux_set_resume_request): Fix comment.
5163 2013-11-20 Doug Evans <dje@google.com>
5165 * linux-low.c (resume_status_pending_p): Tweak comment.
5167 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5169 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5170 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5171 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5172 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5173 (srv_amd64_regobj): Add amd64-mpx.o.
5174 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5175 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5176 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5177 * i387-fp.c (num_pl_bnd_register) Added constant.
5178 (num_pl_bnd_cfg_registers) Added constant.
5179 (struct i387_xsave) Added reserved area and MPX fields.
5180 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5181 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5183 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5184 (init_registers_amd64_mpx_linux): Declare new function.
5185 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5186 (x86_64_regmap): Add MPX registers.
5187 (x86_linux_read_description): Add MPX case.
5188 (initialize_low_arch): Initialize MPX targets.
5190 2013-11-18 Tom Tromey <tromey@redhat.com>
5192 * configure: Rebuild.
5193 * configure.ac: Don't check for stdlib.h.
5194 * gdbreplay.c: Unconditionally include stdlib.h.
5196 2013-11-18 Tom Tromey <tromey@redhat.com>
5198 * config.in: Rebuild.
5199 * configure: Rebuild.
5200 * configure.ac: Don't use AC_HEADER_DIRENT.
5202 2013-11-18 Tom Tromey <tromey@redhat.com>
5204 * server.h: Don't check HAVE_STRING_H.
5205 * gdbreplay.c: Don't check HAVE_STRING_H.
5206 * configure: Rebuild.
5208 2013-11-18 Tom Tromey <tromey@redhat.com>
5210 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5213 2013-11-08 Tom Tromey <tromey@redhat.com>
5215 * configure, config.in: Rebuild.
5216 * configure.ac: Remove unused configury.
5218 2013-11-08 Tom Tromey <tromey@redhat.com>
5220 * acinclude.m4: Include common.m4, codeset.m4.
5221 * configure, config.in: Rebuild.
5222 * configure.ac: Use GDB_AC_COMMON.
5224 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5226 * linux-s390-low.c (HWCAP_S390_TE): New define.
5227 (s390_arch_setup): Consider the TE field in the HWCAP for
5228 determining 'have_regset_tdb'.
5230 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5233 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5236 2013-10-02 Pedro Alves <palves@redhat.com>
5238 * server.c (process_serial_event): Don't output "GDBserver
5239 exiting" if GDB is connected through stdio.
5240 * target.c (mywait): Likewise, be silent if GDB is connected
5243 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5245 * lynx-low.c (lynx_add_threads_after_attach): New function.
5246 (lynx_attach): Remove call to add_thread. Add call to
5247 lynx_add_threads_after_attach instead.
5249 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5251 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5252 * config.in, configure: Regenerated.
5254 2013-09-18 Yao Qi <yao@codesourcery.com>
5257 * server.c (start_inferior): Clear 'resume_info'.
5259 2013-09-16 Jiong Wang <jiwang@tilera.com>
5261 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5264 2013-09-16 Jiong Wang <jiwang@tilera.com>
5266 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5267 linux-tile-low.o to srv_tgtobj.
5269 2013-09-16 Will Newton <will.newton@linaro.org>
5271 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5274 2013-09-06 Pedro Alves <palves@redhat.com>
5276 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5277 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5278 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5279 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5280 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5281 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5283 2013-09-06 Pedro Alves <palves@redhat.com>
5285 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5286 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5288 2013-09-06 Pedro Alves <palves@redhat.com>
5290 * linux-amd64-ipa.c: Include tracepoint.h.
5291 * linux-i386-ipa.c: Include tracepoint.h.
5293 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5295 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5296 (ps_get_thread_area): New function.
5298 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5300 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5301 (initialize_low_arch): Call init_registers_crisv32 rather than
5302 init_register_crisv32.
5304 2013-09-05 Pedro Alves <palves@redhat.com>
5306 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5308 * hostio.h: ... this new file.
5309 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5310 win32-low.c: Include hostio.h.
5312 2013-09-05 Pedro Alves <palves@redhat.com>
5314 * server.h (gdb_client_data, handler_func, callback_handler_func)
5315 (delete_file_handler, add_file_handler, append_callback_event)
5316 (delete_callback_event, start_event_loop, initialize_event_loop):
5317 Move to event-loop.h and include it.
5318 * event-loop.h: New file.
5320 2013-09-05 Pedro Alves <palves@redhat.com>
5322 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5323 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5324 (loaded_dll, unloaded_dll): Move to ...
5325 * dll.h: ... this new file.
5326 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5328 2013-09-05 Pedro Alves <palves@redhat.com>
5330 * server.h (current_process, get_thread_process, all_processes)
5331 (add_inferior_to_list, for_each_inferior, current_inferior)
5332 (remove_inferior, add_process, remove_process, find_process_pid)
5333 (have_started_inferiors_p, have_attached_inferiors_p)
5334 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5335 (clear_inferiors, find_inferior, find_inferior_id)
5336 (inferior_target_data, set_inferior_target_data)
5337 (inferior_regcache_data, set_inferior_regcache_data): Move to
5338 inferiors.h, and include it.
5339 * inferiors.h: New file.
5341 2013-09-05 Pedro Alves <palves@redhat.com>
5343 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5347 2013-09-05 Pedro Alves <palves@redhat.com>
5349 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5351 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5352 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5353 (handle_tracepoint_general_set, handle_tracepoint_query)
5354 (tracepoint_finished_step, tracepoint_was_hit)
5355 (release_while_stepping_state_list, current_traceframe)
5356 (in_readonly_region, traceframe_read_mem)
5357 (fetch_traceframe_registers, traceframe_read_sdata)
5358 (traceframe_read_info, struct fast_tpoint_collect_status)
5359 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5360 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5361 (supply_fast_tracepoint_registers)
5362 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5363 (ipa_tdesc, claim_trampoline_space)
5364 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5365 (agent_mem_read, agent_get_trace_state_variable_value)
5366 (agent_set_trace_state_variable_value, agent_tsv_read)
5367 (agent_mem_read_string, get_raw_reg_func_addr)
5368 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5369 * tracepoint.h: ... this new file.
5371 2013-09-05 Pedro Alves <palves@redhat.com>
5373 * server.h (perror_with_name, error, fatal, warning, paddress)
5374 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5376 * utils.h: New file.
5378 2013-09-05 Pedro Alves <palves@redhat.com>
5380 * server.h (remote_debug, noack_mode, transport_is_reliable)
5381 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5382 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5383 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5384 (write_enn, initialize_async_io, enable_async_io)
5385 (disable_async_io, check_remote_input_interrupt_request)
5386 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5387 (dead_thread_notify, prepare_resume_reply)
5388 (decode_address_to_semicolon, decode_address, decode_m_packet)
5389 (decode_M_packet, decode_X_packet, decode_xfer_write)
5390 (decode_search_memory_packet, unhexify, hexify)
5391 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5392 (look_up_one_symbol, relocate_instruction)
5393 (monitor_output): Move to remote-utils.h, and include it.
5394 * remote-utils.h: New file.
5396 2013-09-05 Pedro Alves <palves@redhat.com>
5398 * server.h (_): Delete.
5400 2013-09-02 Pedro Alves <palves@redhat.com>
5402 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5403 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5405 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5407 2013-09-02 Pierre Muller <muller@sourceware.org>
5409 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5410 or WriteProcessMemory complete successfully and handle
5411 ERROR_PARTIAL_COPY error.
5413 2013-09-02 Pedro Alves <palves@redhat.com>
5415 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5416 error instead of EIO.
5418 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5421 * linux-low.c: Include filestuff.h.
5422 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5423 * lynx-low.c: Include filestuff.h.
5424 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5425 * server.c: Include filestuff.h.
5426 (main): Call notice_open_fds.
5427 * spu-low.c: Include filestuff.h.
5428 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5430 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
5432 * Makefile.in: Explain why ../target and ../nat are not
5433 listed as include file search paths.
5434 (linux-waitpid.o): New object file rule.
5435 * configure.srv (srv_native_linux_obj): New variable.
5436 Replace all occurrences of linux native object files with
5437 $srv_native_linux_obj.
5438 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5439 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5440 (linux_enable_event_reporting): Remove declaration.
5441 (my_waitpid): Moved to common/linux-waitpid.c.
5442 (linux_wait_for_event): Pass ptid when calling
5443 linux_enable_event_reporting.
5444 (linux_supports_tracefork_flag): Remove.
5445 (linux_enable_event_reporting): Likewise.
5446 (linux_tracefork_grandchild): Remove.
5447 (STACK_SIZE): Moved to common/linux-ptrace.c.
5448 (linux_tracefork_child): Remove.
5449 (linux_test_for_tracefork): Remove.
5450 (linux_look_up_symbols): Call linux_supports_traceclone.
5451 (initialize_low): Remove call to linux_test_for_tracefork.
5452 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5453 common/linux-ptrace.h.
5454 (PTRACE_TYPE_ARG4): Likewise.
5455 Include linux-ptrace.h.
5457 2013-08-21 Pedro Alves <palves@redhat.com>
5459 * config.in: Renegerate.
5461 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5463 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5464 (SFILES): Remove $(srcdir)/common/target-common.c and
5465 add $(srcdir)/target/waitstatus.c.
5466 (OBS): Remove target-common.o and add waitstatus.o.
5467 (server_h): Remove $(srcdir)/../common/target-common.h and
5468 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5469 and $(srcdir)/../target/waitstatus.h.
5470 (target-common.o): Remove.
5471 (waitstatus.o): New target object file.
5472 * target.h: Do not include target-common.h and
5473 include target/resume.h, target/wait.h and
5474 target/waitstatus.h.
5476 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5478 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5479 to PTRACE_TYPE_ARG3.
5480 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5481 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5483 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5484 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5486 2013-07-27 Jie Zhang <jie@codesourcery.com>
5487 Daniel Jacobowitz <dan@codesourcery.com>
5488 Yao Qi <yao@codesourcery.com>
5490 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5491 (mips-linux-watch.o): New rule.
5492 (mips_linux_watch_h): New variable.
5493 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5495 * linux-mips-low.c: Include mips-linux-watch.h.
5496 (struct arch_process_info, struct arch_lwp_info): New.
5497 (update_watch_registers_callback): New function.
5498 (mips_linux_new_process, mips_linux_new_thread) New functions.
5499 (mips_linux_prepare_to_resume, mips_insert_point): New
5501 (mips_remove_point, mips_stopped_by_watchpoint): New
5503 (rsp_bp_type_to_target_hw_bp_type): New function.
5504 (mips_stopped_data_address): New function.
5505 (the_low_target): Add watchpoint support functions.
5507 2013-07-27 Yao Qi <yao@codesourcery.com>
5509 * i386-low.c: Include break-common.h.
5510 (enum target_hw_bp_type): Remove.
5512 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5514 * Makefile.in (SFILES): /common/target-common.c.
5515 (OBS): Add target-common.o.
5516 (server_h): Add $(srcdir)/../common/target-common.h.
5517 (target-common.o): New target.
5518 * server.c (queue_stop_reply_callback): Free
5519 status string after use.
5520 * target.c (target_waitstatus_to_string): Remove.
5521 * target.h: Include target-common.h.
5522 (resume_kind): Likewise.
5523 (target_waitkind): Likewise.
5524 (target_waitstatus): Likewise.
5525 (TARGET_WNOHANG): Likewise.
5527 2013-07-04 Yao Qi <yao@codesourcery.com>
5529 * Makefile.in (host_alias): Use @host_noncanonical@.
5530 (target_alias): Use @target_noncanonical@.
5531 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5532 ACX_NONCANONICAL_HOST.
5533 * configure: Regenerated.
5536 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5538 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5539 * configure: Rebuild.
5540 * Makefile.in (version_host, version_target): Get from configure.
5541 (version.c): Use $(version_host) and $(version_target).
5543 2013-07-03 Pedro Alves <palves@redhat.com>
5545 * Makefile.in (config.status): Depend on development.sh.
5546 * acinclude.m4: Include libmcheck.m4.
5547 * configure: Regenerate.
5549 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5551 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5552 attribute inside the parentheses.
5553 (winapi_DebugSetProcessKillOnExit): Ditto.
5554 (winapi_DebugBreakProcess): Ditto.
5555 (winapi_GenerateConsoleCtrlEvent): Ditto.
5557 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5559 * notif.h (notif_event): Add a dummy member to avoid compiler
5562 2013-07-01 Pedro Alves <palves@redhat.com>
5564 * hostio.c (HOSTIO_PATH_MAX): Define.
5565 (require_filename, handle_open, handle_unlink, handle_readlink):
5568 2013-07-01 Pedro Alves <palves@redhat.com>
5570 * server.h: Include "pathmax.h".
5571 * linux-low.c: Don't include sys/param.h.
5572 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5574 * win32-low.c: Don't include sys/param.h.
5575 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5577 2013-07-01 Pedro Alves <palves@redhat.com>
5579 * event-loop.c: Don't check HAVE_UNISTD_H before including
5581 * gdbreplay.c: Likewise.
5582 * remote-utils.c: Likewise.
5583 * server.c: Likewise.
5584 * configure.ac: Don't check for unistd.h.
5585 * configure: Regenerate.
5587 2013-06-28 Tom Tromey <tromey@redhat.com>
5589 * Makefile.in (version.c): Use version.in, not
5592 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5594 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5595 * configure: Rebuild.
5596 * Makefile.in (version_host, version_target): Get from configure.
5597 (version.c): Use $(version_host) and $(version_target).
5599 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5601 Fix trace-status to output user name without trailing colon.
5602 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5604 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5606 Fix trace-status to output proper start-time and stop-time.
5607 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5608 output start time and stop time in hex as gdb expects.
5610 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5612 * tracepoint.c (build_traceframe_info_xml): Output trace state
5613 variables present in the trace buffer.
5615 2013-06-24 Tom Tromey <tromey@redhat.com>
5617 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5619 (version.o): Remove.
5620 * gdbreplay.c: Include version.h.
5621 (version, host_name): Don't declare.
5622 * server.h: Include version.h.
5623 (version, host_name): Don't declare.
5625 2013-06-12 Pedro Alves <palves@redhat.com>
5627 * linux-x86-low.c (linux_is_elf64): Delete global.
5628 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5629 with local linux_pid_exe_is_elf_64_file use.
5631 2013-06-11 Pedro Alves <palves@redhat.com>
5633 * linux-low.c (regset_disabled, disable_regset): New functions.
5634 (regsets_fetch_inferior_registers)
5635 (regsets_store_inferior_registers): Use them.
5636 (initialize_regsets_info); Don't allocate the disabled_regsets
5638 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5641 2013-06-11 Pedro Alves <palves@redhat.com>
5643 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5646 2013-06-11 Pedro Alves <palves@redhat.com>
5648 * linux-x86-low.c (initialize_low_arch): Call
5649 init_registers_x32_avx_linux.
5651 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5653 Fix compatibility with Android Bionic.
5654 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5657 2013-06-07 Pedro Alves <palves@redhat.com>
5660 * Makefile.in (OBS): Add tdesc.o.
5661 (IPA_OBJS): Add tdesc-ipa.o.
5662 (tdesc-ipa.o): New rule.
5663 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5665 * linux-low.c (new_inferior): Delete.
5666 (disabled_regsets, num_regsets): Delete.
5667 (linux_add_process): Adjust to set the new per-process
5669 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5670 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5671 was a stop. When calling arch_setup, switch the current inferior
5672 to the thread that got an event.
5673 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5674 (regsets_fetch_inferior_registers)
5675 (regsets_store_inferior_registers): New regsets_info parameter.
5677 (linux_register_in_regsets): New regs_info parameter. Adjust to
5679 (register_addr, fetch_register, store_register): New usrregs_info
5680 parameter. Adjust to use it.
5681 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5682 parameter regs_info. Adjust to use it.
5683 (linux_fetch_registers): Get the current inferior's regs_info, and
5685 (linux_store_registers): Ditto.
5686 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5687 (initialize_low): Don't initialize the target_regsets here. Call
5688 initialize_low_arch.
5689 * linux-low.h (target_regsets): Delete declaration.
5690 (struct regsets_info): New.
5691 (struct usrregs_info): New.
5692 (struct regs_info): New.
5693 (struct process_info_private) <new_inferior>: New field.
5694 (struct linux_target_ops): Delete the num_regs, regmap, and
5695 regset_bitmap fields. New field regs_info.
5696 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5697 * i387-fp.c (num_xmm_registers): Delete.
5698 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5699 calls to new interface.
5700 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5701 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5702 Infer the number of xmm registers from the regcache's target
5704 * i387-fp.h (num_xmm_registers): Delete.
5705 * inferiors.c (add_thread): Don't install the thread's regcache
5707 * proc-service.c (gregset_info): Fetch the current inferior's
5708 regs_info. Adjust to use it.
5709 * regcache.c: Include tdesc.h.
5710 (register_bytes, reg_defs, num_registers)
5711 (gdbserver_expedite_regs): Delete.
5712 (get_thread_regcache): If the thread doesn't have a regcache yet,
5713 create one, instead of aborting gdbserver.
5714 (regcache_invalidate_one): Rename to ...
5715 (regcache_invalidate_thread): ... this.
5716 (regcache_invalidate_one): New.
5717 (regcache_invalidate): Only invalidate registers of the current
5719 (init_register_cache): Add target_desc parameter, and use it.
5720 (new_register_cache): Ditto. Assert the target description has a
5721 non zero registers_size.
5722 (regcache_cpy): Add assertions. Adjust.
5723 (realloc_register_cache, set_register_cache): Delete.
5724 (registers_to_string, registers_from_string): Adjust.
5725 (find_register_by_name, find_regno, find_register_by_number)
5726 (register_cache_size): Add target_desc parameter, and use it.
5727 (free_register_cache_thread, free_register_cache_thread_one)
5728 (regcache_release, register_cache_size): New.
5729 (register_size): Add target_desc parameter, and use it.
5730 (register_data, supply_register, supply_register_zeroed)
5731 (supply_regblock, supply_register_by_name, collect_register)
5732 (collect_register_as_string, collect_register_by_name): Adjust.
5733 * regcache.h (struct target_desc): Forward declare.
5734 (struct regcache) <tdesc>: New field.
5735 (init_register_cache, new_register_cache): Add target_desc
5737 (regcache_invalidate_thread): Declare.
5738 (regcache_invalidate_one): Delete declaration.
5739 (regcache_release): Declare.
5740 (find_register_by_number, register_cache_size, register_size)
5741 (find_regno): Add target_desc parameter.
5742 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5744 * remote-utils.c: Include tdesc.h.
5745 (outreg, prepare_resume_reply): Adjust.
5746 * server.c: Include tdesc.h.
5747 (gdbserver_xmltarget): Delete declaration.
5748 (get_features_xml, process_serial_event): Adjust.
5749 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5751 (struct process_info) <tdesc>: New field.
5752 (ipa_tdesc): Declare.
5753 * tdesc.c: New file.
5754 * tdesc.h: New file.
5755 * tracepoint.c: Include tdesc.h.
5756 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5757 (get_context_regcache): Adjust to pass ipa_tdesc down.
5758 (do_action_at_tracepoint): Adjust to get the register cache size
5759 from the context regcache's description.
5760 (traceframe_walk_blocks): Adjust to get the register cache size
5761 from the current trace frame's description.
5762 (traceframe_get_pc): Adjust to get current trace frame's
5763 description and pass it down.
5764 (gdb_collect): Adjust to get the register cache size from the
5766 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5767 (gdbserver_xmltarget): Delete.
5768 (initialize_low_tracepoint): Set the ipa's target description.
5769 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5770 (initialize_low_tracepoint): Set the ipa's target description.
5771 * linux-x86-low.c: Include tdesc.h.
5772 [__x86_64__] (is_64bit_tdesc): New.
5773 (ps_get_thread_area, x86_get_thread_area): Use it.
5774 (i386_cannot_store_register): Rename to ...
5775 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5776 (i386_cannot_fetch_register): Rename to ...
5777 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5778 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5780 (target_regsets): Rename to ...
5781 (x86_regsets): ... this.
5782 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5784 (x86_siginfo_fixup): Use is_64bit_tdesc.
5785 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5786 (tdesc_x32_avx_linux, tdesc_x32_linux)
5787 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5789 (x86_linux_update_xmltarget): Delete.
5790 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5791 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5792 (AMD64_LINUX_USER64_CS): New.
5793 (x86_linux_read_description): New, based on
5794 x86_linux_update_xmltarget.
5795 (same_process_callback): New.
5796 (x86_arch_setup_process_callback): New.
5797 (x86_linux_update_xmltarget): New.
5798 (x86_regsets_info): New.
5799 (amd64_linux_regs_info): New.
5800 (i386_linux_usrregs_info): New.
5801 (i386_linux_regs_info): New.
5802 (x86_linux_regs_info): New.
5803 (x86_arch_setup): Reimplement.
5804 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5805 (x86_emit_ops): Ditto.
5806 (the_low_target): Adjust. Install x86_linux_regs_info,
5807 x86_cannot_fetch_register, and x86_cannot_store_register.
5808 (initialize_low_arch): New.
5809 * linux-ia64-low.c (tdesc_ia64): Declare.
5810 (ia64_fetch_register): Adjust.
5811 (ia64_usrregs_info, regs_info): New globals.
5812 (ia64_regs_info): New function.
5813 (the_low_target): Adjust.
5814 (initialize_low_arch): New function.
5815 * linux-sparc-low.c (tdesc_sparc64): Declare.
5816 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5818 (sparc_arch_setup): New function.
5819 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5820 (the_low_target): Adjust.
5821 (initialize_low_arch): New function.
5822 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5823 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5824 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5825 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5826 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5827 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5828 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5829 (tdesc_powerpc_isa205_vsx64l): Declare.
5830 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5831 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5832 (ppc_set_pc, ppc_get_hwcap): Adjust.
5833 (ppc_usrregs_info): Forward declare.
5834 (!__powerpc64__) ppc_regmap_adjusted: New global.
5835 (ppc_arch_setup): Adjust to the current process'es target
5837 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5838 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5839 (ppc_store_evrregset): Adjust.
5840 (target_regsets): Rename to ...
5841 (ppc_regsets): ... this, and make static.
5842 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5843 (ppc_regs_info): New function.
5844 (the_low_target): Adjust.
5845 (initialize_low_arch): New function.
5846 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5847 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5848 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5849 (tdesc_s390x_linux64v2): Declare.
5850 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5851 (s390_fill_gregset, s390_store_last_break): Adjust.
5852 (target_regsets): Rename to ...
5853 (s390_regsets): ... this, and make static.
5854 (s390_get_pc, s390_set_pc): Adjust.
5855 (s390_get_hwcap): New target_desc parameter, and use it.
5856 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5857 (s390_arch_setup): Adjust to set the current process'es target
5858 description. Don't adjust the regmap.
5859 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5860 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5861 (regs_info_3264): New globals.
5862 (s390_regs_info): New function.
5863 (the_low_target): Adjust.
5864 (initialize_low_arch): New function.
5865 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5866 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5867 [__mips64] (init_registers_mips_linux)
5868 (init_registers_mips_dsp_linux): Delete defines.
5869 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5870 (have_dsp): New global.
5871 (mips_read_description): New, based on mips_arch_setup.
5872 (mips_arch_setup): Reimplement.
5873 (get_usrregs_info): New function.
5874 (mips_cannot_fetch_register, mips_cannot_store_register)
5875 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5876 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5877 (target_regsets): Rename to ...
5878 (mips_regsets): ... this, and make static.
5879 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5880 (dsp_regs_info, regs_info): New globals.
5881 (mips_regs_info): New function.
5882 (the_low_target): Adjust.
5883 (initialize_low_arch): New function.
5884 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5885 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5887 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5888 (arm_read_description): New, with bits factored from
5890 (arm_arch_setup): Reimplement.
5891 (target_regsets): Rename to ...
5892 (arm_regsets): ... this, and make static.
5893 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5894 (arm_regs_info): New function.
5895 (the_low_target): Adjust.
5896 (initialize_low_arch): New function.
5897 * linux-m68k-low.c (tdesc_m68k): Declare.
5898 (target_regsets): Rename to ...
5899 (m68k_regsets): ... this, and make static.
5900 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5901 (m68k_regs_info): New function.
5902 (m68k_arch_setup): New function.
5903 (the_low_target): Adjust.
5904 (initialize_low_arch): New function.
5905 * linux-sh-low.c (tdesc_sharch): Declare.
5906 (target_regsets): Rename to ...
5907 (sh_regsets): ... this, and make static.
5908 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5909 (sh_regs_info, sh_arch_setup): New functions.
5910 (the_low_target): Adjust.
5911 (initialize_low_arch): New function.
5912 * linux-bfin-low.c (tdesc_bfin): Declare.
5913 (bfin_arch_setup): New function.
5914 (bfin_usrregs_info, regs_info): New globals.
5915 (bfin_regs_info): New function.
5916 (the_low_target): Adjust.
5917 (initialize_low_arch): New function.
5918 * linux-cris-low.c (tdesc_cris): Declare.
5919 (cris_arch_setup): New function.
5920 (cris_usrregs_info, regs_info): New globals.
5921 (cris_regs_info): New function.
5922 (the_low_target): Adjust.
5923 (initialize_low_arch): New function.
5924 * linux-cris-low.c (tdesc_crisv32): Declare.
5925 (cris_arch_setup): New function.
5926 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5927 (cris_regs_info): New function.
5928 (the_low_target): Adjust.
5929 (initialize_low_arch): New function.
5930 * linux-m32r-low.c (tdesc_m32r): Declare.
5931 (m32r_arch_setup): New function.
5932 (m32r_usrregs_info, regs_info): New globals.
5933 (m32r_regs_info): Adjust.
5934 (initialize_low_arch): New function.
5935 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5936 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5937 (tic6x_usrregs_info): Forward declare.
5938 (tic6x_read_description): New function, based on ...
5939 (tic6x_arch_setup): ... this. Reimplement.
5940 (target_regsets): Rename to ...
5941 (tic6x_regsets): ... this, and make static.
5942 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5943 (tic6x_regs_info): New function.
5944 (the_low_target): Adjust.
5945 (initialize_low_arch): New function.
5946 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5947 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5948 (target_regsets): Rename to ...
5949 (xtensa_regsets): ... this, and make static.
5950 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5952 (xtensa_arch_setup, xtensa_regs_info): New functions.
5953 (the_low_target): Adjust.
5954 (initialize_low_arch): New function.
5955 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5956 (nios2_arch_setup): Set the current process'es tdesc.
5957 (target_regsets): Rename to ...
5958 (nios2_regsets): ... this.
5959 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5960 (nios2_regs_info): New function.
5961 (the_low_target): Adjust.
5962 (initialize_low_arch): New function.
5963 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5964 (aarch64_arch_setup): Set the current process'es tdesc.
5965 (target_regsets): Rename to ...
5966 (aarch64_regsets): ... this.
5967 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5968 (aarch64_regs_info): New function.
5969 (the_low_target): Adjust.
5970 (initialize_low_arch): New function.
5971 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5973 (target_regsets): Rename to ...
5974 (tile_regsets): ... this.
5975 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5976 (tile_regs_info): New function.
5977 (tile_arch_setup): Set the current process'es tdesc.
5978 (the_low_target): Adjust.
5979 (initialize_low_arch): New function.
5980 * spu-low.c (tdesc_spu): Declare.
5981 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5982 * win32-arm-low.c (tdesc_arm): Declare.
5983 (arm_arch_setup): New function.
5984 (the_low_target): Install arm_arch_setup instead of
5986 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5987 (init_windows_x86): Rename to ...
5988 (i386_arch_setup): ... this. Set `win32_tdesc'.
5989 (the_low_target): Adjust.
5990 * win32-low.c (win32_tdesc): New global.
5991 (child_add_thread): Don't create the thread cache here.
5992 (do_initial_child_stuff): Set the new process'es tdesc.
5993 * win32-low.h (struct target_desc): Forward declare.
5994 (win32_tdesc): Declare.
5995 * lynx-i386-low.c (tdesc_i386): Declare global.
5996 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5997 * lynx-low.c (lynx_tdesc): New global.
5998 (lynx_add_process): Set the new process'es tdesc.
5999 * lynx-low.h (struct target_desc): Forward declare.
6000 (lynx_tdesc): Declare global.
6001 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6002 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6003 * nto-low.c (nto_tdesc): New global.
6004 (do_attach): Set the new process'es tdesc.
6005 * nto-low.h (struct target_desc): Forward declare.
6006 (nto_tdesc): Declare.
6007 * nto-x86-low.c (tdesc_i386): Declare.
6008 (nto_x86_arch_setup): Set `nto_tdesc'.
6010 2013-06-04 Gary Benson <gbenson@redhat.com>
6012 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6013 to qSupported response when appropriate.
6014 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6015 with nonzero-length annex.
6016 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6017 arguments supplied in annex.
6019 2013-05-31 Doug Evans <dje@google.com>
6022 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6023 64 bits in 64-cross-32 environment.
6025 2013-05-28 Pedro Alves <palves@redhat.com>
6027 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6028 (aarch64-without-fpu.c): Delete rule.
6029 * configure.srv (aarch64*-*-linux*): Remove references to
6030 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6031 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6034 2013-05-24 Pedro Alves <palves@redhat.com>
6036 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6037 instead of strchr/decode_address. Error if the range isn't split
6038 with a ','. Don't assume there's be a ':' in the action.
6040 2013-05-23 Yao Qi <yao@codesourcery.com>
6041 Pedro Alves <palves@redhat.com>
6043 * linux-low.c (lwp_in_step_range): New function.
6044 (linux_wait_1): If the thread was range stepping and stopped
6045 outside the stepping range, report the stop to GDB. Otherwise,
6046 continue stepping. Add range stepping debug output.
6047 (linux_set_resume_request): Copy the step range from the resume
6049 (linux_supports_range_stepping): New.
6050 (linux_target_ops) <supports_range_stepping>: Set to
6051 linux_supports_range_stepping.
6052 * linux-low.h (struct linux_target_ops)
6053 <supports_range_stepping>: New field.
6054 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6055 * linux-x86-low.c (x86_supports_range_stepping): New.
6056 (the_low_target) <supports_range_stepping>: Set to
6057 x86_supports_range_stepping.
6058 * server.c (handle_v_cont): Handle 'r' action.
6059 (handle_v_requests): Append ";r" if the target supports range
6061 * target.h (struct thread_resume) <step_range_start,
6062 step_range_end>: New fields.
6063 (struct target_ops) <supports_range_stepping>:
6065 (target_supports_range_stepping): New macro.
6067 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6069 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6070 confusion in comment.
6072 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6074 * lynx-low.c (struct process_info_private): New type.
6075 (lynx_add_process): New function.
6076 (lynx_create_inferior, lynx_attach): Replace calls to
6077 add_process by calls to lynx_add_process.
6078 (lynx_resume): If PTID is null, then try using
6079 current_process()->private->last_wait_event_ptid.
6081 (lynx_clear_inferiors): Delete. The contents of that function
6082 has been inlined in lynx_mourn;
6083 (lynx_wait_1): Save the ptid in the process's private data.
6084 (lynx_mourn): Free the process' private data. Replace call
6085 to lynx_clear_inferiors by call to clear_inferiors.
6087 2013-05-17 Yao Qi <yao@codesourcery.com>
6089 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6092 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6094 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6095 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6096 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6097 PT_TEXT_END_ADDR guards. Update comments.
6098 (linux_target_op) <read_offsets>: Conditionally define to
6099 linux_read_offsets if the target is UCLIBC and if it defines
6100 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6102 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6103 Andrew Jenner <andrew@codesourcery.com>
6105 * Makefile.in (SFILES): Add linux-nios2-low.c.
6106 (clean): Add action to delete nios2-linux.c.
6107 (nios2-linux.c): New rule.
6108 * configure.srv: Add nios2*-*-linux*.
6109 * linux-nios2-low.c: New.
6111 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6113 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6115 2013-04-25 Hui Zhu <hui@codesourcery.com>
6118 * ax.c (ax_printf): Add fflush.
6120 2013-04-22 Tom Tromey <tromey@redhat.com>
6122 * Makefile.in (SFILES): Add filestuff.c.
6123 (OBS): Add filestuff.o.
6124 (filestuff.o): New target.
6125 * config.in, configure: Rebuild.
6126 * configure.ac: Check for fdwalk, pipe2.
6128 2013-04-17 Pedro Alves <palves@redhat.com>
6130 * configure.ac (USE_THREAD_DB): Delete variable.
6131 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6132 Don't AC_SUBST USE_THREAD_DB.
6133 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6134 * config.in, configure: Regenerate.
6136 2013-04-16 Pedro Alves <palves@redhat.com>
6138 * linux-low.h (struct lwp_info) <thread_known>: Move under
6139 the USE_THREAD_DB #ifdef.
6141 2013-04-16 Pedro Alves <palves@redhat.com>
6143 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6144 (linux-low.o): Delete rule.
6145 * linux-low.h: Always include "gdb_thread_db.h" instead of
6146 conditionally including thread_db.h.
6147 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6150 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6152 * Makefile.in (install-only): Fix make install regression.
6154 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6156 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6157 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6159 * gdbserver.1: Remove.
6161 2013-03-22 Pedro Alves <palves@redhat.com>
6163 * linux-low.c (handle_extended_wait): Don't call
6164 linux_enable_event_reporting.
6166 2013-03-15 Tony Theodore <tonyt@logyst.com>
6169 * Makefile.in (SHELL): Use @SHELL@.
6171 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6173 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6176 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6178 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6179 Remove extraneous NULL element.
6181 2013-03-13 Yao Qi <yao@codesourcery.com>
6183 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6184 'V' block in trace frame.
6186 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6188 * target.h (struct target_ops): Add btrace ops.
6189 (target_supports_btrace): New macro.
6190 (target_enable_btrace): New macro.
6191 (target_disable_btrace): New macro.
6192 (target_read_btrace): New macro.
6193 * gdbthread.h (struct thread_info): Add btrace field.
6194 * server.c: Include btrace-common.h.
6195 (handle_btrace_general_set): New function.
6196 (handle_btrace_enable): New function.
6197 (handle_btrace_disable): New function.
6198 (handle_general_set): Call handle_btrace_general_set.
6199 (handle_qxfer_btrace): New function.
6200 (struct qxfer qxfer_packets[]): Add btrace entry.
6201 * inferiors.c (remove_thread): Disable btrace.
6202 * linux-low: Include linux-btrace.h.
6203 (linux_low_enable_btrace): New function.
6204 (linux_low_read_btrace): New function.
6205 (linux_target_ops): Add btrace ops.
6206 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6207 Add srv_linux_btrace=yes.
6208 (x86_64-*-linux*): Add linux-btrace.o.
6209 Add srv_linux_btrace=yes.
6210 * configure.ac: Define HAVE_LINUX_BTRACE.
6211 * config.in: Regenerated.
6212 * configure: Regenerated.
6214 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6216 * server.c (handle_qxfer): Preserve error message if -3 is
6218 (qxfer): Document the -3 return value.
6220 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6222 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6223 (linux_btrace_h): New variable.
6224 (linux-btrace.o): New rule.
6226 2013-03-08 Stan Shebs <stan@codesourcery.com>
6227 Hafiz Abid Qadeer <abidh@codesourcery.com>
6229 * tracepoint.c (trace_buffer_size): New global.
6230 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6231 (init_trace_buffer): Change to one-argument function. Allocate
6232 trace buffer memory.
6233 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6234 handle QTBuffer:size packet.
6235 (cmd_bigqtbuffer_size): New function.
6236 (initialize_tracepoint): Call init_trace_buffer with
6237 DEFAULT_TRACE_BUFFER_SIZE.
6238 * server.c (handle_query): Add QTBuffer:size in the
6241 2013-03-07 Yao Qi <yao@codesourcery.com>
6243 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6244 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6246 (cmd_qtsp): Adjust condition. Do post increment.
6247 Set cur_action and cur_step_action back to 0.
6249 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6252 * linux-low.c (linux_write_memory): Return early success if LEN is
6255 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6257 * configure.srv: Add x86_64-*-cygwin* as target.
6259 2013-02-28 Tom Tromey <tromey@redhat.com>
6261 * configure.ac: Invoke AC_SYS_LARGEFILE.
6262 * configure, config.in: Rebuild.
6264 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6266 * win32-low.c: Throughout, fix format strings and casts of
6267 printf-like functions to avoid type related warnings on all
6269 (get_child_debug_event): Print dwDebugEventCode as hex since
6270 that's how it's usually documented.
6272 2013-02-28 Yao Qi <yao@codesourcery.com>
6274 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6277 2013-02-27 Jiong Wang <jiwang@tilera.com>
6279 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6280 (reg-tilegx32.c): New rule.
6281 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6282 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6283 different register info initializer according to elf class.
6284 (init_registers_tilgx32): New function. The tilegx32 register info
6286 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6287 (tile_store_gregset): Likewise.
6289 2013-02-27 Yao Qi <yao@codesourcery.com>
6291 * server.c (process_point_options): Print debug message when
6292 debug_threads is true.
6294 2013-02-26 Yao Qi <yao@codesourcery.com>
6296 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6298 2013-02-19 Pedro Alves <palves@redhat.com>
6299 Kai Tietz <ktietz@redhat.com>
6303 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6304 instead of strtoul to extract address from packet.
6305 (process_serial_event) <'z'>: Likewise.
6307 2013-02-18 Yao Qi <yao@codesourcery.com>
6309 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6311 2013-02-14 Pedro Alves <palves@redhat.com>
6315 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6316 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6318 2013-02-14 Pedro Alves <palves@redhat.com>
6320 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6322 2013-02-14 Pedro Alves <palves@redhat.com>
6324 * tracepoint.c (save_string): Delete.
6325 (add_tracepoint_action): Use savestring instead of save_string.
6327 2013-02-12 Pedro Alves <palves@redhat.com>
6329 * linux-xtensa-low.c: Ditto.
6330 * xtensa-xtregs.c: Ditto.
6332 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6334 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6337 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6339 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6340 aarch64_num_wp_regs and aarch64_num_bp_regs to
6341 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6343 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6345 * linux-aarch64-low.c (ps_get_thread_area): Replace
6346 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6348 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6349 Marcus Shawcroft <marcus.shawcroft@arm.com>
6350 Nigel Stephens <nigel.stephens@arm.com>
6351 Yufeng Zhang <yufeng.zhang@arm.com>
6353 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6354 (aarch64.c, aarch64-without-fpu.c): New targets.
6355 * configure.srv (aarch64*-*-linux*): New.
6356 * linux-aarch64-low.c: New file.
6358 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6360 * linux-low.c (handle_extended_wait, linux_create_inferior)
6361 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6362 (dequeue_one_deferred_signal, linux_resume_one_thread)
6363 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6364 (linux_tracefork_grandchild, linux_test_for_tracefork)
6365 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6366 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6367 where the argument is 0.
6369 2013-01-25 Yao Qi <yao@codesourcery.com>
6371 * event-loop.c: Include "queue.h".
6372 (gdb_event_p): New typedef.
6373 (struct gdb_event) <next_event>: Remove.
6374 (event_queue): Change to QUEUE(gdb_event_p).
6375 (async_queue_event): Remove.
6376 (gdb_event_xfree): New.
6377 (initialize_event_loop): New.
6378 (process_event): Use API from QUEUE.
6379 (wait_for_event): Likewise.
6380 * server.c (main): Call initialize_event_loop.
6381 * server.h (initialize_event_loop): Declare.
6383 2013-01-18 Yao Qi <yao@codesourcery.com>
6385 * ax.h (struct eval_agent_expr_context): New.
6386 (gdb_eval_agent_expr): Update declaration.
6387 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6388 TFRAME. Add new argument CTX.
6389 * server.h (struct eval_agent_expr_context): Declare.
6390 (agent_mem_read, agent_tsv_read): Update declaration.
6391 (agent_mem_read_string): Likewise.
6392 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6393 (add_traceframe_block): Add new argument TPOINT.
6394 Increase TPOINT->traceframe_usage.
6395 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6396 eval_tracepoint_agent_expr.
6397 (condition_true_at_tracepoint): Likewise.
6398 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6399 (agent_mem_read_string, agent_tsv_read): Likewise.
6401 2013-01-16 Yao Qi <yao@codesourcery.com>
6403 * linux-low.c (linux_resume_one_lwp): Don't check
6404 'lwp->bp_reinsert != 0'.
6406 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6407 Pedro Alves <palves@redhat.com>
6409 * lynx-low.c (ptrace_request_to_str): Define a temporary
6410 macro and use it to simplify this function's implementation.
6412 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6414 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6417 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6419 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6421 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6423 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6425 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6427 * lynx-low.c (lynx_resume): Use the resume_info parameter
6428 to determine the ptid for the lynx_ptrace call, unless
6429 it is equal to minus_one_ptid, in which case we use the
6430 ptid of the current_inferior.
6431 (lynx_wait_1): After having received a thread create/exit
6432 event, resume the inferior's execution using the signaling
6433 thread's ptid, rather than the old ptid.
6435 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6437 * lynx-low.c (lynx_resume): Delete variable ret.
6439 2013-01-01 Joel Brobecker <brobecker@adacore.com>
6441 * gdbreplay.c (gdbreplay_version): Update copyright year.
6442 * server.c (gdbserver_version): Likewise.
6444 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6446 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6449 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6451 * lynx-low.c (ptrace_request_to_str): Add handling for
6454 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6456 * lynx-low.c (lynx_attach): Delete variable new_process.
6458 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6460 * lynx-low.c (lynx_create_inferior): Delete variable
6463 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6465 * lynx-low.c (ptrace_request_to_str): Do not handle
6466 PTRACE_GETTHREADLIST if this macro does not exist.
6468 2012-12-15 Yao Qi <yao@codesourcery.com>
6470 * Makefile.in (OBS): Add notif.o.
6471 * notif.c, notif.h: New.
6472 * server.c: Include "notif.h".
6473 (struct vstop_notif) <next>: Remove.
6475 (queue_stop_reply): Update.
6476 (push_event, send_next_stop_reply): Remove.
6477 (discard_queued_stop_replies): Update.
6478 (notif_stop): New variable.
6479 (handle_v_stopped): Remove.
6480 (handle_v_requests): Don't call handle_v_stopped. Call
6481 handle_ack_notif instead.
6482 (queue_stop_reply_callback): Call notif_event_enque instead
6483 of queue_stop_reply.
6484 (handle_status): Don't call send_next_stop_reply, call
6485 notif_write_event instead.
6486 (kill_inferior_callback): Likewise.
6487 (detach_or_kill_inferior_callback): Likewise.
6488 (main): Call initialize_notif.
6489 (process_serial_event): Call QUEUE_is_empty.
6490 (handle_target_event): Call notif_push instead of push event.
6491 * server.h (push_event): Remove declaration.
6493 2012-12-10 Tom Tromey <tromey@redhat.com>
6495 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6496 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6499 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6500 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6501 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6502 (amd64-linux-ipa.o, ax.o): Rewrite.
6503 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6504 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6505 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6506 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6507 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6508 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6509 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6510 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6511 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6512 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6513 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6514 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6515 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6516 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6517 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6518 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6519 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6520 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6521 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6522 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6523 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6524 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6525 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6526 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6527 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6528 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6529 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6530 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6531 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6532 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6533 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6534 (reg-tilegx.o): Remove.
6535 (all_object_files): New macro.
6536 Include .deps files.
6537 * aclocal.m4, configure: Rebuild.
6538 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6539 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6540 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6542 2012-12-05 Tom Tromey <tromey@redhat.com>
6545 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6547 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6549 * configure.ac: Check for linux/perf_event.h.
6550 * config.in: Regenerated.
6551 * configure: Regenerated.
6553 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6555 * hostio.c (handle_readlink): Decrease buffer size
6556 parameter passed to readlink by one byte.
6558 2012-11-26 Yao Qi <yao@codesourcery.com>
6560 * configure.ac (build_warnings): Append '-Wempty-body'.
6561 * configure: Regenerated.
6562 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6565 2012-11-15 Pierre Muller <muller@sourceware.org>
6567 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6568 * config.in: Regenerate.
6569 * configure: Regenerate.
6570 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6571 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6572 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6573 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6575 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6576 instead of <sys/wait.h> header.
6577 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6579 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6581 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6582 (various make rules): Remove -DGDBSERVER
6584 2012-11-09 Yao Qi <yao@codesourcery.com>
6586 * spu-low.c (current_ptid): Move it to ..
6587 * gdbthread.h: ... here. New.
6588 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6589 * server.c (myresume, process_serial_event): Likewise.
6590 * thread-db.c (thread_db_find_new_threads): Likewise.
6591 * tracepoint.c (run_inferior_command): Likewise.
6593 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6595 * server.c (handle_search_memory_1): Include access length in
6598 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6600 * linux-crisv32-low.c: Fix compile errors.
6602 2012-09-04 Yao Qi <yao@codesourcery.com>
6604 * tracepoint.c (cmd_qtsv): Adjust debug message.
6605 Don't check CUR_TPOINT.
6607 2012-08-28 Yao Qi <yao@codesourcery.com>
6609 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6610 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6611 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6612 Remove declarations of xmalloc, xreallloc, xstrdup and
6614 * Makefile.in (libiberty_h): New.
6615 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6616 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6618 2012-08-23 Yao Qi <yao@codesourcery.com>
6620 * server.h: Remove declaration of 'xsnprintf'.
6622 2012-08-22 Keith Seitz <keiths@redhat.com>
6624 * server.h: Include build-gnulib-gbserver/config.h.
6625 * gdbreplay.c: Likewise.
6627 2012-08-08 Doug Evans <dje@google.com>
6629 * Makefile.in (SFILES): Add gdb_vecs.c.
6630 (OBS): Add gdb_vecs.o.
6631 (gdb_vecs_h, host_defs_h): New variables.
6632 (thread-db.o): Add $(gdb_vecs_h) dependency.
6633 (gdb_vecs.o): New rule.
6634 * thread-db.c: #include "gdb_vecs.h".
6635 (thread_db_load_search): Use a vector to iterate over path elements.
6636 Handle text appearing after "$pdir".
6638 * configure.ac: Add check for strstr.
6639 * config.in: Regenerate.
6640 * configure: Regenerate.
6642 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6644 * hostio.c (handle_pread): If pread fails, fall back to attempting
6646 (handle_pwrite): Likewise for pwrite.
6648 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6650 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6651 between unsupported TYPE and unimplementable ADDR/LEN combination.
6652 (arm_insert_point): Act on new return value.
6654 2012-07-31 Pedro Alves <palves@redhat.com>
6656 * server.c (process_point_options): Only skip tokens if we find
6657 one that is unrecognized. Don't treat 'X' specially while
6658 skipping unrecognized tokens.
6660 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6662 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6663 to 4-byte-align HW breakpoint addresses for Thumb.
6665 2012-07-27 Yao Qi <yao@codesourcery.com>
6669 * server.h: Declare gdb_agent_about_to_close.
6670 * target.c (kill_inferior): Include "agent.h".
6671 New. Send command 'kill'.
6672 * target.h (kill_inferior): Removed macro.
6673 * tracepoint.c (gdb_agent_about_to_close): New.
6674 (gdb_agent_helper_thread): Handle command 'close'.
6675 Wait endlessly until the inferior stops.
6676 Install gdb_agent_remove_socket to atexit hook.
6677 (agent_socket_name): New static variable.
6678 (gdb_agent_socket_init): Replace local variable 'name' with
6679 'agent_socket_name'.
6680 (gdb_agent_remove_socket): New.
6682 2012-07-27 Yao Qi <yao@codesourcery.com>
6684 * server.c (process_point_options): Stop at 'X' when parsing.
6686 2012-07-19 Michael Eager <eager@eagercon.com>
6688 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6690 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6691 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6692 hardware breakpoint.
6694 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6696 * gdbserver/linux-low.c (initialize_low): Call
6697 linux_ptrace_init_warnings.
6699 2012-07-02 Doug Evans <dje@google.com>
6701 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6704 2012-07-02 Stan Shebs <stan@codesourcery.com>
6706 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6707 (ax.o): Add it to build rule.
6709 (OBS): Add format.o.
6710 (IPA_OBS): Add format.o.
6711 * server.c (handle_query): Claim support for breakpoint commands.
6712 (process_point_options): Add command case.
6713 (process_serial_event): Leave running if there are printfs in
6715 * mem-break.h (any_persistent_commands): Declare.
6716 (add_breakpoint_commands): Declare.
6717 (gdb_no_commands_at_breakpoint): Declare.
6718 (run_breakpoint_commands): Declare.
6719 * mem-break.c (struct point_command_list): New struct.
6720 (struct breakpoint): New field command_list.
6721 (any_persistent_commands): New function.
6722 (add_commands_to_breakpoint): New function.
6723 (add_breakpoint_commands): New function.
6724 (gdb_no_commands_at_breakpoint): New function.
6725 (run_breakpoint_commands): New function.
6726 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6728 * ax.c: Include format.h.
6729 (ax_printf): New function.
6730 (gdb_eval_agent_expr): Add printf opcode.
6732 2012-06-13 Yao Qi <yao@codesourcery.com>
6734 * server.c (start_inferior): Remove duplicated writes to fields
6735 'last_resume_kind' and 'last_status' of 'current_inferior'.
6737 2012-06-12 Yao Qi <yao@codesourcery.com>
6738 Pedro Alves <palves@redhat.com>
6740 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6742 * server.c (handle_v_cont): Extend comment.
6744 2012-06-11 Yao Qi <yao@codesourcery.com>
6746 * linux-low.c (linux_attach): Add 'static'.
6748 2012-06-06 Yao Qi <yao@codesourcery.com>
6750 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6752 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6754 Fix gcc -flto compilation warning.
6755 * server.c (main): Make variable multi_mode and attach volatile.
6757 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6759 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6760 if the platform doesn't know about it.
6762 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6764 * Makefile.in (SFILES): Add linux-tile-low.c.
6765 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6766 * configure.srv: Handle tilegx-*-linux*.
6767 * linux-tile-low.c: New file.
6769 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6771 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6773 2012-05-24 Pedro Alves <palves@redhat.com>
6777 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6779 2012-05-24 Pedro Alves <palves@redhat.com>
6783 Replace target_signal with gdb_signal throughout.
6785 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6787 * linux-low.c (linux_store_registers): Avoid the copying sequence
6788 when no data has been retrieved by ptrace.
6790 2012-05-22 Will Deacon <will.deacon@arm.com>
6792 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6793 Include asm/ptrace.h.
6794 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6797 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6799 * linux-low.c (linux_store_registers): Don't re-retrieve data
6800 with ptrace that has already been obtained from /proc. Always
6801 copy any data retrieved with ptrace to the buffer supplied.
6803 2012-05-11 Yao Qi <yao@codesourcery.com>
6804 Pedro Alves <palves@redhat.com>
6806 * linux-low.c (enum stopping_threads_kind): New.
6807 (stopping_threads): Change type to `enum stopping_threads_kind'.
6808 (handle_extended_wait): If stopping and suspending threads, leave
6809 the new_lwp suspended too.
6810 (linux_wait_for_event): Adjust.
6811 (stop_all_lwps): Set `stopping_threads' to
6812 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6813 whether we're suspending threads or just stopping them. Assert no
6816 2012-04-29 Yao Qi <yao@codesourcery.com>
6818 * server.h: Move some code to ...
6819 * gdbthread.h: ... here. New.
6820 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6821 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6822 (nto-low.o, win32-low.o): Likewise.
6823 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6824 * regcache.c, remote-utils.c, server.c: Likewise.
6825 * target.c, tracepoint.c, win32-low.c: Likewise.
6827 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6829 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6830 (PTRACE_ARG4_TYPE): Likewise.
6831 (PTRACE_XFER_TYPE): Likewise.
6832 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6833 ptrace to PTRACE_ARG3_TYPE.
6834 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6835 (PTRACE_ARG4_TYPE): Likewise.
6836 (PTRACE_XFER_TYPE): Likewise.
6837 (linux_detach_one_lwp): Cast fourth argument of
6838 ptrace to long then PTRACE_ARG4_TYPE.
6839 (regsets_fetch_inferior_registers): Cast third argument of
6840 ptrace to long then PTRACE_ARG3_TYPE.
6841 (regsets_store_inferior_registers): Likewise.
6843 2012-04-20 Pedro Alves <palves@redhat.com>
6845 * configure: Regenerate.
6847 2012-04-19 Pedro Alves <palves@redhat.com>
6849 * Makefile.in (GNULIB_BUILDDIR): New.
6850 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6851 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6852 (all, install-only, uninstall, clean-info, all-lib, clean): No
6853 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6854 (maintainer-clean realclean distclean): Use subdir_do.
6856 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6857 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6858 * acinclude.m4: Include acx_configure_dir.m4.
6859 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6860 calls. Call AC_PROG_RANLIB. Configure gnulib using
6863 (GNULIB_STDINT_H): Adjust.
6864 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6865 * gdbreplay.c: Include build-gnulib/config.h.
6866 * server.h: Likewise.
6867 * aclocal.m4: Regenerate.
6868 * config.in: Regenerate.
6869 * configure: Regenerate.
6871 2012-04-19 Pedro Alves <palves@redhat.com>
6873 * Makefile.in (LIBGNU, INCGNU): Adjust.
6874 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6875 (all, install-only, uninstall, clean-info, all-lib, clean)
6876 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6877 * configure.ac: Adjust AC_OUTPUT output.
6878 * aclocal.m4: Regenerate.
6879 * configure: Regenerate.
6881 2012-04-19 Pedro Alves <palves@redhat.com>
6883 * Makefile.in (generated_files): New.
6884 (server_h): Remove the explicit dependency on config.h, and depend
6885 on $generated_files.
6887 2012-04-19 Pedro Alves <palves@redhat.com>
6889 * Makefile.in (INCGNU): Add -Ignulib.
6891 2012-04-19 Pedro Alves <palves@redhat.com>
6893 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6894 (INCGNU): ... this, and spell out -I here.
6895 (GNULIB_LIB): Rename to ...
6897 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6899 2012-04-19 Pedro Alves <palves@redhat.com>
6901 * config.in: Regenerate.
6903 2012-04-19 Pedro Alves <palves@redhat.com>
6905 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6906 * server.h (memmem): Remove declaration.
6907 * config.in: Regenerate.
6908 * configure: Regenerate.
6910 2012-04-19 Yao Qi <yao@codesourcery.com>
6912 * Makefile.in (SFILES): Add common/vec.c.
6916 2012-04-19 Yao Qi <yao@codesourcery.com>
6918 * remote-utils.c (prepare_resume_reply): Replace with macro
6919 target_core_of_thread.
6920 * server.c (handle_qxfer_threads_proper): Likewise.
6921 * target.h (traget_core_of_thread): New macro.
6923 2012-04-18 Pedro Alves <palves@redhat.com>
6925 * aclocal.m4: Regenerate.
6926 * configure: Regenerate.
6928 2012-04-16 Yao Qi <yao@codesourcery.com>
6930 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6931 duplicated on address.
6933 2012-04-16 Yao Qi <yao@codesourcery.com>
6935 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6936 (struct tracepoint_action_ops) <send>: New field.
6937 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6938 (agent_expr_send, x_tracepoint_action_send): New.
6939 (l_tracepoint_action_send): New.
6940 (cmd_qtdp): Download and install tracepoint
6941 according to `use_agent'.
6942 (run_inferior_command): Add one more parameter `len'.
6944 (tracepoint_send_agent): New.
6945 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6947 2012-04-16 Yao Qi <yao@codesourcery.com>
6949 * tracepoint.c (download_tracepoints): Moved to ...
6950 (cmd_qtstart): ... here.
6952 2012-04-14 Yao Qi <yao@codesourcery.com>
6954 * tracepoint.c: Include inttypes.h.
6955 (struct collect_memory_action): Use sized types.
6956 (struct tracepoint): Likewise.
6957 (cmd_qtdp, stop_tracing): Update print specifiers.
6958 (cmd_qtp, response_tracepoint): Likewise.
6959 (collect_data_at_tracepoint): Likewise.
6960 (collect_data_at_step): Likewise.
6962 2012-04-14 Yao Qi <yao@codesourcery.com>
6964 Import gnulib module inttypes.
6965 * aclocal.m4, config.in, configure: Regenerated.
6967 2012-04-14 Yao Qi <yao@codesourcery.com>
6969 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6970 Makefile and config.status at last.
6972 2012-04-13 Yao Qi <yao@codesourcery.com>
6974 * tracepoint.c: Include stdint.h unconditionally.
6976 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6978 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6979 on BFD_HAVE_SYS_PROCFS_TYPE.
6980 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6981 * configure: Regenerate.
6982 * config.in: Likewise.
6984 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6986 * Makefile.in (clean): Also remove x32.c x32-linux.c
6987 x32-avx.c x32-avx-linux.c.
6988 (x32.o): New target.
6990 (x32-linux.o): Likewise.
6991 (x32-linux.c): Likewise.
6992 (x32-avx.o): Likewise.
6993 (x32-avx.c): Likewise.
6994 (x32-avx-linux.o): Likewise.
6995 (x32-avx-linux.c): Likewise.
6997 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6998 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6999 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7000 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7001 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7002 i386/x32-avx-linux.xml.
7004 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7005 (init_registers_x32_avx_linux): Likwise.
7006 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7007 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7009 2012-04-13 Pedro Alves <palves@redhat.com>
7011 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7012 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7013 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7014 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7017 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7019 * linux-x86-low.c (compat_x32_clock_t): New.
7020 (compat_x32_siginfo_t): Likewise.
7021 (compat_x32_siginfo_from_siginfo): Likewise.
7022 (siginfo_from_compat_x32_siginfo): Likewise.
7023 (linux_is_elf64): Likewise.
7024 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7025 and siginfo_from_compat_x32_siginfo for x32.
7026 (x86_arch_setup): Set linux_is_elf64.
7028 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7031 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7033 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7034 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7035 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7036 compatible with process.
7038 2012-04-12 Yao Qi <yao@codesourcery.com>
7040 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7041 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7042 (install-only, install-info, clean): Handle sub dir gnulib.
7043 (all-lib, am--refresh): New targets.
7044 (memmem.o): Remove target.
7045 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7046 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7047 (AC_REPLACE_FUNCS): Remove memmem.
7048 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7049 (AC_OUTPUT): Generate Makefile in gnulib/.
7050 * aclocal.m4, config.in, configure: Regenerated.
7052 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7054 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7056 2012-04-05 Pedro Alves <palves@redhat.com>
7058 -Werror=strict-aliasing
7060 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7063 2012-04-04 Pedro Alves <palves@redhat.com>
7065 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7066 (sparc_store_gregset_from_stack, sparc_store_gregset)
7067 (sparc_breakpoint_at): Fix formatting.
7069 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7071 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7073 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7074 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7075 * config.in: Regenerate.
7076 * configure: Likewise.
7078 2012-03-29 Pedro Alves <palves@redhat.com>
7080 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7081 Correct ptrace arguments.
7083 2012-03-28 Pedro Alves <palves@redhat.com>
7085 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7086 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7087 (IA64_FR1_REGNUM): New defines.
7088 (ia64_fetch_register): New.
7089 (the_low_target): Install it.
7090 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7092 * linux-low.c (linux_fetch_registers): Try the
7093 the_low_target.fetch_register hook first.
7095 * linux-arm-low.c (the_low_target): Adjust.
7096 * linux-bfin-low.c (the_low_target): Adjust.
7097 * linux-cris-low.c (the_low_target): Adjust.
7098 * linux-crisv32-low.c (the_low_target): Adjust.
7099 * linux-m32r-low.c (the_low_target): Adjust.
7100 * linux-m68k-low.c (the_low_target): Adjust.
7101 * linux-mips-low.c (the_low_target): Adjust.
7102 * linux-ppc-low.c (the_low_target): Adjust.
7103 * linux-s390-low.c (the_low_target): Adjust.
7104 * linux-sh-low.c (the_low_target): Adjust.
7105 * linux-sparc-low.c (the_low_target): Adjust.
7106 * linux-tic6x-low.c (the_low_target): Adjust.
7107 * linux-x86-low.c (the_low_target): Adjust.
7108 * linux-xtensa-low.c (the_low_target): Adjust.
7110 2012-03-26 Pedro Alves <palves@redhat.com>
7112 * server.c (handle_qxfer_libraries): Don't bail early if
7113 the_target->qxfer_libraries_svr4 is not NULL.
7115 2012-03-26 Pedro Alves <palves@redhat.com>
7117 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7119 2012-03-23 Pedro Alves <palves@redhat.com>
7121 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7122 "library-list-svr4" element's start tag when the the DSO list is
7125 2012-03-23 Pedro Alves <palves@redhat.com>
7127 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7128 a variable whose type size is the same as the inferior's pointer
7131 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7133 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7135 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7136 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7137 * linux-low.h: Include <signal.h>.
7138 (struct siginfo): Remove forward declaration.
7139 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7142 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7144 * .gitignore: Ignore more files.
7146 2012-03-19 Pedro Alves <palves@redhat.com>
7147 Jan Kratochvil <jan.kratochvil@redhat.com>
7149 * server.c (cont_thread, general_thread): Add describing comments.
7150 (start_inferior): Clear `cont_thread'.
7151 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7154 2012-03-15 Yao Qi <yao@codesourcery.com>
7156 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7158 (cmd_qtdp): ... here.
7160 2012-03-15 Yao Qi <yao@codesourcery.com>
7162 * tracepoint.c (struct tracepoint_action_ops): New.
7163 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7164 (m_tracepoint_action_download): New.
7165 (r_tracepoint_action_download): New.
7166 (x_tracepoint_action_download): New.
7167 (l_tracepoint_action_download): New.
7168 (add_tracepoint_action): Install `action->ops' according type.
7169 (download_tracepoint_1): Move code `download' function pointer
7170 of various tracepoint_action_ops.
7172 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7174 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7175 linux_ptrace_attach_warnings.
7177 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7179 * Makefile.in (linux-ptrace.o): New.
7180 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7181 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7182 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7183 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7184 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7186 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7188 2012-03-08 Yao Qi <yao@codesourcery.com>
7189 Pedro Alves <palves@redhat.com>
7191 Fix PR server/13392.
7192 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7194 * tracepoint.c (remove_tracepoint): New.
7195 (cmd_qtdp): Call remove_tracepoint when failed to install.
7197 2012-03-07 Pedro Alves <palves@redhat.com>
7199 * linux-low.c (get_detach_signal): New.
7200 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7201 Pass on pending signals to PTRACE_DETACH. Check the result of the
7203 * server.c (program_signals, program_signals_p): New.
7204 (handle_general_set): Handle QProgramSignals.
7205 * server.h (program_signals, program_signals_p): Declare.
7207 2012-03-05 Pedro Alves <palves@redhat.com>
7208 Jan Kratochvil <jan.kratochvil@redhat.com>
7210 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7213 2012-03-03 Yao Qi <yao@codesourcery.com>
7215 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7216 agent_look_up_symbols.
7218 2012-03-03 Yao Qi <yao@codesourcery.com>
7220 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7221 (linux-x86-low.o): Likewise.
7222 * server.h: Remove in_process_agent_loaded.
7223 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7227 2012-03-03 Yao Qi <yao@codesourcery.com>
7229 * tracepoint.c (gdb_agent_capability): New global.
7230 (in_process_agent_loaded_ust): Renamed to
7231 `in_process_agent_supports_ust'.
7233 (in_process_agent_supports_ust): Call agent_capability_check.
7234 (clear_installed_tracepoints): Assert that agent supports
7237 2012-03-03 Yao Qi <yao@codesourcery.com>
7239 * linux-low.c (linux_supports_agent): New.
7240 (linux_target_ops): Initialize field `supports_agent' with
7241 linux_supports_agent.
7242 * target.h (struct target_ops) <supports_agent>: New.
7243 (target_supports_agent): New macro.
7244 * server.c (handle_general_set): Handle packet 'QAgent'.
7245 (handle_query): Send `QAgent+'.
7246 * Makefile.in (server.o): Depends on agent.h.
7248 2012-03-03 Yao Qi <yao@codesourcery.com>
7250 * Makefile.in (OBS): Add agent.o.
7251 Add new rule for agent.o.
7252 Track dependence of tracepoint.c on agent.h.
7253 * tracepoint.c (run_inferior_command_1):
7254 (run_inferior_command): Call agent_run_command.
7255 (gdb_ust_connect_sync_socket): Deleted. Move it to
7257 (resume_thread, stop_thread): Likewise.
7258 (gdb_ust_socket_init): Renamed to ...
7259 (gdb_agent_socket_init): ... New.
7260 (gdb_ust_thread): Renamed to ...
7261 (gdb_agent_helper_thread): ... New.
7262 (gdb_ust_init): Move some code to ...
7263 (gdb_agent_init): ... here. New.
7264 [HAVE_UST]: Call gdb_ust_init.
7265 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7266 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7267 * config.in, configure: Regenerated.
7269 2012-03-02 Pedro Alves <palves@redhat.com>
7271 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7272 * linux-low.c (struct simple_pid_list): New.
7273 (stopped_pids): New a struct simple_pid_list pointer.
7274 (add_to_pid_list, pull_pid_from_list): New.
7275 (handle_extended_wait): Don't assume the first signal new children
7276 report is SIGSTOP. Adjust call to pull_pid_from_list.
7277 (linux_wait_for_lwp): Adjust.
7279 2012-03-02 Yao Qi <yao@codesourcery.com>
7281 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7284 2012-03-02 Yao Qi <yao@codesourcery.com>
7286 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7287 `stop_pc' and `tpoint'. Update caller.
7289 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7291 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7292 * linux-low.c (use_linux_regsets): New macro.
7293 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7294 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7295 (linux_register_in_regsets): New function.
7296 (usr_fetch_inferior_registers): Skip registers covered by
7298 (usr_store_inferior_registers): Likewise.
7299 (usr_fetch_inferior_registers): New macro.
7300 (usr_store_inferior_registers): Likewise.
7301 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7302 (linux_store_registers): Likewise.
7303 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7305 (init_registers_mips64_dsp_linux): Likewise.
7306 (init_registers_mips_linux): New macro.
7307 (init_registers_mips_dsp_linux): Likewise.
7308 (mips_dsp_num_regs): Likewise.
7309 (DSP_BASE, DSP_CONTROL): New fallback macros.
7310 (mips_base_regs): New macro.
7311 (mips_regmap): Use it. Fix the size.
7312 (mips_dsp_regmap): New variable.
7313 (mips_dsp_regset_bitmap): Likewise.
7314 (mips_arch_setup): New function.
7315 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7317 (mips_cannot_store_register): Likewise.
7318 (the_low_target): Update .arch_setup, .num_regs and .regmap
7319 initializers. Add .regset_bitmap initializer.
7320 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7322 * linux-bfin-low.c (the_low_target): Likewise.
7323 * linux-cris-low.c (the_low_target): Likewise.
7324 * linux-crisv32-low.c (the_low_target): Likewise.
7325 * linux-ia64-low.c (the_low_target): Likewise.
7326 * linux-m32r-low.c (the_low_target): Likewise.
7327 * linux-m68k-low.c (the_low_target): Likewise.
7328 * linux-ppc-low.c (the_low_target): Likewise.
7329 * linux-s390-low.c (the_low_target): Likewise.
7330 * linux-sh-low.c (the_low_target): Likewise.
7331 * linux-sparc-low.c (the_low_target): Likewise.
7332 * linux-tic6x-low.c (the_low_target): Likewise.
7333 * linux-x86-low.c (the_low_target): Likewise.
7334 * linux-xtensa-low.c (the_low_target): Likewise.
7335 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7336 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7337 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7339 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7340 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7342 2012-02-29 Yao Qi <yao@codesourcery.com>
7343 Pedro Alves <palves@redhat.com>
7345 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7346 `step_over_finished' is true.
7348 2012-02-27 Pedro Alves <palves@redhat.com>
7350 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7351 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7353 2012-02-27 Pedro Alves <palves@redhat.com>
7356 * linux-low.c (pid_is_stopped): New.
7357 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7359 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7361 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7364 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7366 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7368 2012-02-24 Luis Machado <lgustavo@codesourcery>
7370 * server.c (handle_query): Advertise support for target-side
7371 breakpoint condition evaluation.
7372 (process_point_options): New function.
7373 (process_serial_event): When inserting a breakpoint, check for
7374 a target-side condition that should be evaluated.
7376 * mem-break.c: Include regcache.h and ax.h.
7377 (point_cond_list_t): New data structure.
7378 (breakpoint) <cond_list>: New field.
7379 (find_gdb_breakpoint_at): Make non-static.
7380 (delete_gdb_breakpoint_at): Clear any target-side
7382 (clear_gdb_breakpoint_conditions): New function.
7383 (add_condition_to_breakpoint): Likewise.
7384 (add_breakpoint_condition): Likewise.
7385 (gdb_condition_true_at_breakpoint): Likewise.
7386 (gdb_breakpoint_here): Return result directly instead
7387 of going through a local variable.
7389 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7390 (clear_gdb_breakpoint_conditions): Likewise.
7391 (add_breakpoint_condition): Likewise.
7392 (gdb_condition_true_at_breakpoint): Likewise.
7394 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7395 (need_step_over_p): Take target-side breakpoint condition into
7398 2012-02-24 Luis Machado <lgustavo@codesourcery>
7400 * server.h: Include tracepoint.h.
7401 (agent_mem_read, agent_get_trace_state_variable_value,
7402 agent_set_trace_state_variable_value,
7403 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7404 get_set_tsv_func_addr): New prototypes.
7406 * ax.h: New include file.
7407 * ax.c: New source file.
7409 * tracepoint.c: Include ax.h.
7410 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7411 agent_expr, eval_result_type): Move to ax.h.
7412 (parse_agent_expr): Rename to ...
7413 (gdb_parse_agent_expr): ... this, make it non-static and move
7415 (unparse_agent_expr) Rename to ...
7416 (gdb_unparse_agent_expr): ... this, make it non-static and move
7418 (eval_agent_expr): Rename to ...
7419 (eval_tracepoint_agent_expr): ... this.
7420 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7421 forward declarations.
7422 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7423 (agent_get_trace_state_variable_value): New function.
7424 (agent_set_trace_state_variable_value): New function.
7425 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7426 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7427 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7428 (condition_true_at_tracepoint): Likewise.
7429 (parse_agent_expr): Rename to ...
7430 (gdb_parse_agent_expr): ... this and move to ax.c.
7431 (unparse_agent_expr): Rename to ...
7432 (gdb_unparse_agent_expr): ... this and move to ax.c.
7433 (gdb_agent_op_name): Move to ax.c.
7434 (eval_agent_expr): Rename to ...
7435 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7437 (eval_tracepoint_agent_expr): New function.
7438 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7440 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7442 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7443 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7444 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7445 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7446 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7447 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7448 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7449 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7450 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7451 (compile_bytecodes): Remove forward declaration.
7452 (is_goto_target): Move to ax.c.
7453 (compile_bytecodes): Move to ax.c and call
7454 agent_get_trace_state_variable_value (...) and
7455 agent_set_trace_state_variable_value (...).
7457 * Makefile.in: Update ax.c and IPA dependencies.
7459 2012-02-24 Pedro Alves <palves@redhat.com>
7461 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7462 (cmd_bigqtbuffer_circular): ... this. Only handle
7463 'QTBuffer:circular:'.
7464 (handle_tracepoint_general_set): Adjust.
7466 2012-02-16 Yao Qi <yao@codesourcery.com>
7468 * inferiors.c: Move code to ...
7469 * dll.c: .... here. New.
7470 * server.h: Declare clear_dlls.
7471 * Makefile.in (SFILES): Add dll.c.
7475 2012-02-11 Yao Qi <yao@codesourcery.com>
7477 * server.c: (handle_monitor_command): Add a new parameter
7479 (handle_query): Update caller.
7481 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7483 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7484 * configure, config.in: Regenerate.
7485 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7488 2012-02-02 Pedro Alves <palves@redhat.com>
7490 Try SIGKILL first, then PTRACE_KILL.
7491 * linux-low.c (linux_kill_one_lwp): New.
7492 (linux_kill_one_lwp): Rename to ...
7493 (kill_one_lwp_callback): ... this. Use the new
7496 2012-02-02 Pedro Alves <palves@redhat.com>
7498 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7501 2012-01-27 Pedro Alves <palves@redhat.com>
7503 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7504 (elf_64_file_p): Make static.
7505 (linux_pid_exe_is_elf_64_file): New.
7506 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7507 Delete declarations.
7508 (linux_pid_exe_is_elf_64_file): Declare.
7509 * linux-x86-low.c (x86_arch_setup): Use
7510 linux_pid_exe_is_elf_64_file.
7512 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7514 * linux-low.c (linux_wait_for_event_1): Rename to ...
7515 (linux_wait_for_event): ... here and merge it with former
7516 linux_wait_for_event - new variable wait_ptid, use it.
7517 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7519 2012-01-23 Pedro Alves <palves@redhat.com>
7521 * server.c (main): Avoid yet another case of infinite loop while
7522 detaching/killing after a longjmp.
7524 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7527 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7529 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7531 * hostio.c (handle_readlink): New function.
7532 (handle_vFile): Call it to handle "vFile:readlink" packets.
7534 2012-01-20 Pedro Alves <palves@redhat.com>
7535 Ulrich Weigand <ulrich.weigand@linaro.org>
7537 * server.c (handle_v_requests): Only support vAttach and vRun to
7538 start multiple processes when in extended protocol mode.
7540 2012-01-17 Pedro Alves <palves@redhat.com>
7542 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7543 memalign plus mprotect to allocate the scratch buffer.
7545 2012-01-13 Pedro Alves <palves@redhat.com>
7547 * server.c (attach_inferior): Clear `cont_thread'.
7549 2012-01-13 Pedro Alves <palves@redhat.com>
7551 * server.c (main): Avoid infinite loop while detaching/killing
7554 2012-01-09 Doug Evans <dje@google.com>
7556 * server.c (start_inferior): Set last_ptid in --wrapper case.
7558 2012-01-06 Yao Qi <yao@codesourcery.com>
7560 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7562 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7564 2012-01-04 Yao Qi <yao@codesourcery.com>
7566 * tracepoint.c (cmd_qtdp): Print debug message
7567 for static tracepoint.
7569 2012-01-04 Yao Qi <yao@codesourcery.com>
7571 * tracepoint.c (trace_vdebug): Differentiate debug message
7572 between gdbserver and IPA.
7574 2012-01-03 Yao Qi <yao@codesourcery.com>
7576 * tracepoint.c (tracepoint_was_hit): Don't collect for
7579 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7581 * terminal.h: Reformat copyright header.
7583 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7585 * server.c (gdbserver_version): Update copyright year.
7586 * gdbreplay.c (gdbreplay_version): Likewise.
7588 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7590 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7593 2011-12-18 Hui Zhu <teawater@gmail.com>
7594 * linux-low.c (linux_create_inferior): Save return value to ret.
7596 2011-12-18 Hui Zhu <teawater@gmail.com>
7598 * linux-low.c (linux_create_inferior): Save return value to ret.
7600 2011-12-16 Doug Evans <dje@google.com>
7602 * linux-low.c (linux_create_inferior): If stdio connection,
7603 redirect stdin from /dev/null, stdout to stderr.
7604 * remote-utils.c (remote_is_stdio): New static global.
7605 (remote_connection_is_stdio): New function.
7606 (remote_prepare): Handle stdio connection.
7607 (remote_open): Ditto.
7608 (remote_close): Don't close stdin for stdio connections.
7609 (read_prim,write_prim): New functions. Replace all calls to
7610 read/write to these.
7611 * server.c (main): Watch for "-" argument. Move call to
7612 remote_prepare before start_inferior.
7613 * server.h (STDIO_CONNECTION_NAME): New macro.
7614 (remote_connection_is_stdio): Declare.
7616 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7617 in debugging output.
7619 2011-12-15 Yao Qi <yao@codesourcery.com>
7621 * tracepoint.c: Include sys/syscall.h.
7622 (gdb_ust_thread): Remove preprocessor conditional.
7624 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7626 * linux-low.c (linux_detach_one_lwp): Call
7627 the_low_target.prepare_to_resume before detaching.
7629 2011-12-14 Yao Qi <yao@codesourcery.com>
7631 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7634 2011-12-14 Yao Qi <yao@codesourcery.com>
7636 * i386-low.c (i386_low_stopped_data_address): Initialize local
7639 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7643 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7644 DR_CONTROL unless necessary. Extend comments.
7645 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7646 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7648 2011-12-13 Yao Qi <yao@codesourcery.com>
7650 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7652 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7654 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7656 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7657 Print new debug message for such case.
7659 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7661 Fix overlapping memcpy.
7662 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7663 the read_inferior_memory transfer.
7664 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7665 write_inferior_memory transfer.
7666 (set_fast_tracepoint_jump): New variable buf. Use it for the
7667 read_inferior_memory and write_inferior_memory transfers.
7668 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7669 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7670 Use it for the write_inferior_memory transfer.
7671 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7674 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7676 * linux-low.c (fetch_register, store_register): Make code
7677 consistent, fix formatting.
7679 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7681 * linux-low.c (usr_store_inferior_registers): Factor out code
7682 to handle individual registers into...
7683 (store_register): ... this new function.
7685 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7687 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7688 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7689 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7690 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7691 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7692 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7693 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7694 (srv_xmlfiles): Add new XML files.
7696 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7698 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7699 (init_registers_s390_linux32v1): Add prototype.
7700 (init_registers_s390_linux32v2): Likewise.
7701 (init_registers_s390_linux64v1): Likewise.
7702 (init_registers_s390_linux64v2): Likewise.
7703 (init_registers_s390x_linux64v1): Likewise.
7704 (init_registers_s390x_linux64v2): Likewise.
7705 (s390_num_regs): Increment to 52.
7706 (s390_regmap): Add orig_r2 register.
7707 (s390_num_regs_3264): Increment to 68.
7708 (s390_regmap_3264): Add orig_r2 register.
7709 (s390_collect_ptrace_register): Handle orig_r2 register.
7710 (s390_supply_ptrace_register): Likewise.
7711 (s390_fill_last_break): New function.
7712 (s390_store_last_break): Likewise.
7713 (s390_fill_system_call): New function.
7714 (s390_store_system_call): Likewise.
7715 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7717 (s390_check_regset): New function.
7718 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7719 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7720 Update target_regsets for available register sets.
7722 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7723 Jan Kratochvil <jan.kratochvil@redhat.com>
7725 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7726 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7728 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7729 * linux-low.h (struct process_info_private): New member r_debug.
7730 * server.c (handle_qxfer_libraries): Call
7731 the_target->qxfer_libraries_svr4.
7732 (handle_qxfer_libraries_svr4): New function.
7733 (qxfer_packets): New entry "libraries-svr4".
7734 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7735 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7736 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7737 PACKET_qXfer_libraries_svr4.
7739 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7741 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7742 PSW address/mask between 8-byte and 16-byte formats.
7743 (s390_supply_ptrace_register): Likewise.
7744 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7745 basic addressing mode bit.
7747 2011-11-24 Stan Shebs <stan@codesourcery.com>
7749 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7751 2011-11-17 Stan Shebs <stan@codesourcery.com>
7753 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7754 (tracing_start_time): New global.
7755 (tracing_stop_time): New global.
7756 (tracing_user_name): New global.
7757 (tracing_notes): New global.
7758 (tracing_stop_note): New global.
7759 (cmd_qtstart): Set traceframe_usage, start_time.
7760 (stop_tracing): Set stop_time.
7761 (cmd_qtstatus): Report additional status.
7762 (cmd_qtp): New function.
7763 (handle_tracepoint_query): Call it.
7764 (cmd_qtnotes): New function.
7765 (handle_tracepoint_general_set): Call it.
7766 (get_timestamp): Rename from tsv_get_timestamp.
7768 2011-11-14 Stan Shebs <stan@codesourcery.com>
7769 Kwok Cheung Yeung <kcy@codesourcery.com>
7771 * linux-x86-low.c (small_jump_insn): New.
7772 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7773 trampoline and error message, build a trampoline and issue a small
7774 jump instruction to it.
7775 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7776 trampoline and error message.
7777 (x86_get_min_fast_tracepoint_insn_len): New.
7778 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7779 * linux-low.h (struct linux_target_ops): Add arguments to
7780 install_fast_tracepoint_jump_pad operation, add new operation.
7781 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7783 (linux_get_min_fast_tracepoint_insn_len): New function.
7784 (linux_target_op): Add new operation.
7785 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7786 (gdb_trampoline_buffer_end): Ditto.
7787 (gdb_trampoline_buffer_error): Ditto.
7788 (struct ipa_sym_addresses): Add fields for new IPA variables.
7789 (symbol_list): Add entries for new IPA variables.
7790 (struct tracepoint): Add fields to hold the address range of the
7791 trampoline used by the tracepoint.
7792 (trampoline_buffer_head): New static variable.
7793 (trampoline_buffer_tail): Ditto.
7794 (claim_trampoline_space): New function.
7795 (have_fast_tracepoint_trampoline_buffer): New function.
7796 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7798 (install_fast_tracepoint): Ditto, also add error buffer argument.
7799 (cmd_qtminftpilen): New function.
7800 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7801 (fast_tracepoint_from_trampoline_address): New function.
7802 (fast_tracepoint_collecting): Handle trampoline as part of jump
7804 (set_trampoline_buffer_space): New function.
7805 (initialize_tracepoint): Initialize new IPA variables.
7806 * target.h (struct target_ops): Add arguments to
7807 install_fast_tracepoint_jump_pad operation, add new
7808 get_min_fast_tracepoint_insn_len operation.
7809 (target_get_min_fast_tracepoint_insn_len): New.
7810 (install_fast_tracepoint_jump_pad): Add arguments.
7811 * server.h (IPA_BUFSIZ): Define.
7812 * linux-i386-ipa.c: Include extra header files.
7813 (initialize_fast_tracepoint_trampoline_buffer): New function.
7814 (initialize_low_tracepoint): Call it.
7815 * server.h (set_trampoline_buffer_space): Declare.
7816 (claim_trampoline_space): Ditto.
7817 (have_fast_tracepoint_trampoline_buffer): Ditto.
7819 2011-11-14 Yao Qi <yao@codesourcery.com>
7821 * server.c (handle_query): Handle InstallInTrace for qSupported.
7822 * tracepoint.c (add_tracepoint): Sort list.
7823 (install_tracepoint, download_tracepoint): New.
7824 (cmd_qtdp): Call them to install and download tracepoints.
7825 (sort_tracepoints): Removed.
7826 (cmd_qtstart): Update.
7828 2011-11-14 Yao Qi <yao@codesourcery.com>
7830 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7831 * mem-break.h: Declare.
7832 * tracepoint.c (cmd_qtstart): Move some code to ...
7833 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7835 (download_tracepoints): Move some code to ...
7836 (download_tracepoint_1): ... here. New.
7838 2011-11-08 Yao Qi <yao@codesourcery.com>
7840 * remote-utils.c (relocate_instruction): A comment fix.
7842 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7844 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7845 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7846 dr_status_mirror and dr_control_mirror from debug_reg_state.
7847 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7848 (i386_initial_stuff): Remove use of deleted globals.
7849 (i386_get_thread_context, i386_set_thread_context,
7850 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7851 from debug_reg_state.
7853 2011-11-05 Yao Qi <yao@codesourcery.com>
7855 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7856 address as TPOINT's.
7858 2011-11-02 Stan Shebs <stan@codesourcery.com>
7860 * tracepoint.c (agent_mem_read_string): New function.
7861 (eval_agent_expr): Call it for tracenz.
7862 * server.c (handle_query): Report support for tracenz.
7864 2011-11-02 Yao Qi <yao@codesourcery.com>
7866 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7868 2011-11-02 Yao Qi <yao@codesourcery.com>
7870 * target.h: Fix a typo in comment.
7872 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7874 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7875 clobber the breakpoints' shadows with fast tracepoint jumps.
7876 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7877 * target.c (write_inferior_memory): Also pass MYADDR down to
7880 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7882 * configure.ac: Check support for personality routine.
7883 * configure: Regenerate.
7884 * config.in: Likewise.
7885 * linux-low.c: Include <sys/personality.h>.
7886 Define ADDR_NO_RANDOMIZE if necessary.
7887 (linux_create_inferior): Disable address space randomization when
7888 forking inferior, if requested.
7889 (linux_supports_disable_randomization): New function.
7890 (linux_target_ops): Install it.
7891 * server.h (disable_randomization): Declare.
7892 * server.c (disable_randomization): New global variable.
7893 (handle_general_set): Handle QDisableRandomization.
7894 (handle_query): Likewise for qSupported.
7895 (main): Support --disable-randomization and --no-disable-randomization
7896 command line arguments.
7897 * target.h (struct target_ops): Add supports_disable_randomization.
7898 (target_supports_disable_randomization): New macro.
7900 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7902 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7904 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7905 [!PT_GETDSBT] (target_loadmap): New definition.
7906 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7907 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7908 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7909 and PT_GETDSBT to LINUX_LOADMAP.
7910 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7911 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7913 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7915 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7916 (arm_linux_hwbp_cap): New static variable.
7917 (arm_linux_get_hwbp_cap): Replace by ...
7918 (arm_linux_init_hwbp_cap): ... this new function.
7919 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7920 (arm_linux_get_hw_watchpoint_count): Likewise.
7921 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7922 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7923 (arm_prepare_to_resume): Use perror_with_name instead of error.
7925 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7927 * linux-arm-low.c: Include <signal.h>.
7928 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7929 (struct arm_linux_hwbp_cap): New data type.
7930 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7931 (struct arm_linux_hw_breakpoint): New data type.
7932 (MAX_BPTS, MAX_WPTS): Define.
7933 (struct arch_process_info, struct arch_lwp_info): New data types.
7934 (arm_linux_get_hwbp_cap): New function.
7935 (arm_linux_get_hw_breakpoint_count): Likewise.
7936 (arm_linux_get_hw_watchpoint_count): Likewise.
7937 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7938 (arm_hwbp_control_initialize): Likewise.
7939 (arm_hwbp_control_is_enabled): Likewise.
7940 (arm_hwbp_control_is_initialized): Likewise.
7941 (arm_hwbp_control_disable): Likewise.
7942 (arm_linux_hw_breakpoint_equal): Likewise.
7943 (arm_linux_hw_point_initialize): Likewise.
7944 (struct update_registers_data): New data structure.
7945 (update_registers_callback: New function.
7946 (arm_insert_point): Likewise.
7947 (arm_remove_point): Likewise.
7948 (arm_stopped_by_watchpoint): Likewise.
7949 (arm_stopped_data_address): Likewise.
7950 (arm_new_process): Likewise.
7951 (arm_new_thread): Likewise.
7952 (arm_prepare_to_resume): Likewise.
7953 (the_low_target): Register arm_insert_point, arm_remove_point,
7954 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7955 arm_new_thread, and arm_prepare_to_resume.
7957 2011-09-15 Stan Shebs <stan@codesourcery.com>
7959 * server.h (struct emit_ops): Add compare-goto fields.
7960 * tracepoint.c (gdb_agent_op_sizes): New table.
7961 (emit_eq_goto): New function.
7962 (emit_ne_goto): New function.
7963 (emit_lt_goto): New function.
7964 (emit_le_goto): New function.
7965 (emit_gt_goto): New function.
7966 (emit_ge_goto): New function.
7967 (is_goto_target): New function.
7968 (compile_bytecodes): Recognize special cases of compare-goto
7969 combinations and call specialized emitters for them.
7970 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7971 (amd64_emit_ne_goto): New function.
7972 (amd64_emit_lt_goto): New function.
7973 (amd64_emit_le_goto): New function.
7974 (amd64_emit_gt_goto): New function.
7975 (amd64_emit_ge_goto): New function.
7976 (amd64_emit_ops): Add the new functions.
7977 (i386_emit_eq_goto): New function.
7978 (i386_emit_ne_goto): New function.
7979 (i386_emit_lt_goto): New function.
7980 (i386_emit_le_goto): New function.
7981 (i386_emit_gt_goto): New function.
7982 (i386_emit_ge_goto): New function.
7983 (i386_emit_ops): Add the new functions.
7985 2011-09-08 Stan Shebs <stan@codesourcery.com>
7987 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7988 (i386_emit_epilogue): Restore %ebx.
7990 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7992 * server.c (step_thread): Remove definition.
7993 (process_serial_event): Don't handle Hs.
7994 * server.h (step_thread): Remove declaration.
7995 * target.c (set_desired_inferior): Remove use of step_thread.
7997 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7999 * linux-low.c: Include linux-procfs.h.
8000 (linux_attach_lwp_1): Update comments.
8001 (linux_attach): Scan for existing threads when attaching to a
8002 process that is the tgid.
8003 * Makefile.in: Update dependencies.
8005 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8007 * configure.srv: Add linux-procfs.o dependencies.
8009 2011-08-14 Yao Qi <yao@codesourcery.com>
8011 * target.h (struct target_ops): Fix indent.
8012 * win32-low.c (win32_target_ops): Fix comment.
8014 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8015 Yao Qi <yao@codesourcery.com>
8017 * Makefile.in (clean): Remove tic6x-*.c files.
8018 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8019 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8020 (tic6x-c64xp-linux.c): Likewise.
8021 * configure.srv: Add support for tic6x-*-uclinux.
8022 * linux-tic6x-low.c: New.
8023 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8025 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8026 Yao Qi <yao@codesourcery.com>
8028 * target.h (struct target_ops): Add read_loadmap.
8029 * linux-low.c (struct target_loadseg): New type.
8030 (struct target_loadmap): New type.
8031 (linux_read_loadmap): New function.
8032 (linux_target_ops): Add linux_read_loadmap.
8033 * server.c (handle_query): Support qXfer:fdpic:read packet.
8034 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8037 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8039 * win32-low.c: Include <stdint.h>.
8041 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8043 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8044 to the inferior here.
8045 (i386_remove_aligned_watchpoint): Ditto.
8046 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8047 fit part of the watchpoint in the debug registers.
8048 (i386_update_inferior_debug_regs): New.
8049 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8050 registers, and only update the inferior on success.
8051 (i386_low_remove_watchpoint): Ditto.
8053 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8055 * linux-low.c (compare_ints, unique, list_threads, show_process,
8056 linux_core_of_thread): Delete.
8057 (linux_target_ops): Change linux_core_of_thread to
8058 linux_common_core_of_thread.
8059 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8060 * utils.c (malloc_failure): Change type of argument.
8061 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8062 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8063 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8064 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8065 (IPA_OBJS): Add common-utils-ipa.o.
8066 (ptid_h, linux_osdata_h): New macros.
8067 (server_h): Add common/common-utils.h, common/xml-utils.h,
8068 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8070 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8071 ptid.o, buffer.o): New rules.
8072 (linux-low.o): Add common/linux-osdata.h as a dependency.
8073 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8074 * configure.ac: Add AC_HEADER_DIRENT check.
8075 * config.in: Regenerate.
8076 * configure: Regenerate.
8077 * remote-utils.c (xml_escape_text): Delete.
8078 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8079 buffer_xml_printf): Move to common/buffer.c.
8080 * server.c (main): Remove call to initialize_inferiors.
8081 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8082 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8083 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8084 internal_error, gdb_assert, gdb_assert_fail): Delete.
8085 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8086 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8088 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8089 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8090 initialize_inferiors): Delete.
8092 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8094 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8097 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8099 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8101 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8103 2011-05-26 Yao Qi <yao@codesourcery.com>
8105 * Makefile.in (thread-db.o): Track dependence to
8106 common/gdb_thread_db.h.
8107 * thread-db.c: include gdb_thread_db.h from right place.
8109 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8111 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8112 __FILE__ and __LINE__ to internal_error.
8114 2011-05-13 Doug Evans <dje@google.com>
8116 * thread-db.c (try_thread_db_load_from_sdir): New function.
8117 (try_thread_db_load_from_dir): New function.
8118 (thread_db_load_search): Handle $sdir, ignore $pdir.
8119 Remove trying of system directories if search of
8120 libthread-db-search-path fails, that is now done via $sdir.
8122 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8124 * server.c (handle_query): Add EnableDisableTracepoints to the list
8125 of supported features.
8126 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8128 (cmd_qtenable_disable): New.
8129 (cmd_qtstart): Install tracepoints even if disabled.
8130 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8131 receiving a QTEnable or QTDisable packet.
8132 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8133 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8135 (gdb_probe): Skip data collection if static tracepoint is disabled.
8137 2011-05-10 Doug Evans <dje@google.com>
8139 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8141 2011-05-04 Doug Evans <dje@google.com>
8143 * linux-low.c (linux_join): Skip process lookup.
8144 * spu-low.c (spu_join): Ditto.
8145 * server.c (join_inferiors_callback): Delete.
8146 (process_serial_event): For 'D' packet (detach) call join_inferior
8149 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8151 * README: Don't mention xscale*-*-linux*.
8152 * configure.srv (xscale*-*-linux*): Don't handle target.
8154 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8156 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8158 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8159 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8160 (i386_emit_void_call_2): Likewise.
8162 2011-04-26 Yao Qi <yao@codesourcery.com>
8164 * linux-low.c: Move common macros to linux-ptrace.h.
8165 Include linux-ptrace.h.
8166 * Makefile.in (linux_ptrace_h): New.
8167 (linux-low.o): Depends on linux-ptrace.h.
8169 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8171 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8172 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8173 (remote_prepare): New function with most of the TCP code from ...
8174 (remote_open): ... here. Detect PORT here unconditionally. Move also
8175 setting transport_is_reliable.
8176 * server.c (run_once): New variable.
8177 (gdbserver_usage): Document it.
8178 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8179 the first run if RUN_ONCE.
8180 * server.h (run_once, remote_prepare): New declarations.
8182 2011-04-19 Tom Tromey <tromey@redhat.com>
8184 * win32-low.c (handle_load_dll): Remove duplicate "the".
8186 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8188 Remove support for old Cygwin 1.5 versions.
8189 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8190 function to avoid warning.
8191 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8194 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8196 * gdbserver/server.h (Macro _): Define it if not available.
8198 2011-03-14 Michael Snyder <msnyder@vmware.com>
8200 * hostio.c (handle_close): Remove unnecessary null test.
8202 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8204 * Makefile.in (maintainer-clean realclean distclean): Remove
8205 "make ... subdir_do" command.
8207 2011-03-10 Michael Snyder <msnyder@vmware.com>
8209 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8211 * server.c (handle_v_run): Free alloced buffer on early return.
8213 2011-03-09 Yao Qi <yao@codesourcery.com>
8216 2011-03-04 Yao Qi <yao@codesourcery.com>
8218 * Makefile.in: Remove GNU make feature --directory.
8220 2011-03-05 Yao Qi <yao@codesourcery.com>
8222 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8223 (subdir_do): New make target. Copied from gdb/Makefile.
8224 (maintainer-clean, realclean, distclean, clean): Call corresponding
8225 make targets in common/Makefile.
8227 2011-02-11 Yao Qi <yao@codesourcery.com>
8229 * configure.ac: Call AC_PROG_RANLIB.
8230 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8231 * configure: Regenerate.
8233 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8235 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8237 2011-03-06 Yao Qi <yao@codesourcery.com>
8239 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8241 2011-03-05 Yao Qi <yao@codesourcery.com>
8243 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8244 (subdir_do): New make target. Copied from gdb/Makefile.
8245 (maintainer-clean, realclean, distclean, clean): Call corresponding
8246 make targets in common/Makefile.
8248 2011-03-04 Yao Qi <yao@codesourcery.com>
8250 * Makefile.in: Remove GNU make feature --directory.
8252 2011-03-04 Michael Snyder <msnyder@vmware.com>
8254 * server.c (queue_stop_reply): Call xmalloc not malloc.
8256 2011-03-02 Michael Snyder <msnyder@vmware.com>
8258 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8260 2011-02-28 Michael Snyder <msnyder@vmware.com>
8262 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8263 (cmd_qtframe): Ditto.
8264 (cmd_qtbuffer): Ditto.
8265 (cmd_bigqtbuffer): Ditto.
8267 * utils.c (decimal2str): Initialize 'width' to nine, then
8270 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8272 * hostio.c (require_data): Free *data, not data.
8274 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8276 * hostio.c (require_data): Use free, not xfree.
8278 2011-02-27 Michael Snyder <msnyder@vmware.com>
8280 * server.c (handle_query): Discard unused value.
8282 * hostio.c (require_data): Free malloc memory before returning
8285 2011-02-26 Michael Snyder <msnyder@vmware.com>
8287 * linux-low.c (list_threads): Call closedir for dirent.
8289 2011-02-27 Michael Snyder <msnyder@vmware.com>
8291 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8292 a case statement falls through.
8294 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8296 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8299 2011-02-26 Michael Snyder <msnyder@vmware.com>
8301 * utils.c (decimal2str): Eliminate dead code and dead param.
8302 (pulongest): Drop dead param from call to decimal2str.
8305 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8307 Revert the following patch (not approved yet):
8308 2011-02-21 Hui Zhu <teawater@gmail.com>
8309 * tracepoint.c (tp_printf): New function.
8310 (eval_agent_expr): Handle gdb_agent_op_printf.
8312 2011-02-21 Hui Zhu <teawater@gmail.com>
8314 * tracepoint.c (tp_printf): New function.
8315 (eval_agent_expr): Handle gdb_agent_op_printf.
8317 2011-02-18 Tom Tromey <tromey@redhat.com>
8319 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8320 (tracepoint.o): Likewise.
8321 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8322 (gdb_agent_op_names): Likewise.
8324 2011-02-18 Tom Tromey <tromey@redhat.com>
8326 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8327 gdb_agent_op_rot>: New constants.
8328 (gdb_agent_op_names): Add pick and roll.
8329 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8332 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8334 * aclocal.m4: Regenerated with aclocal-1.11.1.
8336 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8338 * server.c (handle_qxfer_traceframe_info): New.
8339 (qxfer_packets): Register "traceframe-info".
8340 (handle_query): Report support for qXfer:traceframe-info:read+.
8341 * tracepoint.c (match_blocktype): New.
8342 (traceframe_find_block_type): Rename to ...
8343 (traceframe_walk_blocks): ... this. Add callback filter argument,
8345 (traceframe_find_block_type): New, reimplemented on top of
8346 traceframe_walk_blocks.
8347 (build_traceframe_info_xml): New.
8348 (traceframe_read_info): New.
8349 * server.h (traceframe_read_info): Declare.
8351 2011-02-11 Yao Qi <yao@codesourcery.com>
8353 * configure.ac: Call AC_PROG_RANLIB.
8354 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8355 * configure: Regenerate.
8357 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8359 * server.c (gdb_read_memory): Change return semantics to allow
8361 (handle_search_memory_1): Adjust.
8362 (process_serial_event) <'m' packet>: Handle partial transfers.
8363 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8365 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8367 * regcache.c (init_register_cache): Initialize
8368 regcache->register_status.
8369 (free_register_cache): Release regcache->register_status.
8370 (regcache_cpy): Copy register_status.
8371 (registers_to_string): Print 'x's for unavailable registers.
8372 (supply_register): Mark the register's status valid or
8373 unavailable, depending on whether a buffer was passed in or not.
8374 (supply_register_zeroed): New.
8375 (supply_regblock): Mark the registers' status valid or
8376 unavailable, depending on whether a buffer was passed in or not.
8377 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8378 (struct regcache): New `register_status' field.
8379 (supply_register_zeroed): Declare.
8380 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8381 supply_register_zeroed, rather than passing a NULL buffer to
8383 * tracepoint.c (fetch_traceframe_registers): Update comment.
8385 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8387 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8390 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8392 * server.h (decode_xfer_write): Change prototype.
8393 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8394 and don't extract the annex here.
8395 * server.c (decode_xfer_read): Remove `annex' parameter,
8396 and don't extract the annex here.
8398 (struct qxfer): New.
8399 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8400 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8401 (handle_qxfer_statictrace): New functions, abstracted out from
8402 handle_query, and made to use the struct qxfer interface.
8403 (handle_threads_qxfer_proper): Rename to ...
8404 (handle_qxfer_threads_proper): ... this.
8405 (handle_threads_qxfer): Rename to ...
8406 (handle_qxfer_threads): ... this. Adjust.
8407 (qxfer_packets): New array.
8408 (handle_qxfer): New function.
8409 (handle_query): Use handle_qxfer.
8411 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8413 * gdbreplay.c: Shorten lines of >= 80 columns.
8414 * linux-low.c: Ditto.
8415 * linux-ppc-low.c: Ditto.
8416 * linux-s390-low.c: Ditto.
8417 * linux-sparc-low.c: Ditto.
8418 * linux-x86-low.c: Ditto.
8419 * linux-xtensa-low.c: Ditto.
8420 * mem-break.c: Ditto.
8422 * regcache.h: Ditto.
8423 * remote-utils.c: Ditto.
8426 * thread-db.c: Ditto.
8427 * tracepoint.c: Ditto.
8429 * win32-low.h: Ditto.
8431 2011-01-05 Joel Brobecker <brobecker@adacore.com>
8433 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8436 2011-01-01 Joel Brobecker <brobecker@adacore.com>
8438 * server.c (gdbserver_version): Update copyright year in version
8440 * gdbreplay.c (gdbreplay_version): Ditto.
8442 2010-12-29 Jie Zhang <jie.zhang@analog.com>
8444 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8445 * linux-bfin-low.c: New file.
8446 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8447 PT_DATA_ADDR for BFIN targets.
8448 * Makefile.in (SFILES): Add linux-bfin-low.c.
8449 (clean): Remove reg-bfin.c.
8450 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8451 * README: Mention supported Blackfin targets.
8453 2010-12-23 Mike Frysinger <vapier@gentoo.org>
8455 * .gitignore: New file.
8457 2010-11-16 Mike Frysinger <vapier@gentoo.org>
8459 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8461 2010-10-22 Jie Zhang <jie@codesourcery.com>
8463 * Makefile.in: Add FLAGS_TO_PASS variable.
8464 (install): Remove dependency of install-only and recursively
8465 invoke make for install-only.
8467 2010-10-04 Doug Evans <dje@google.com>
8469 * Makefile.in (uninstall): Use $(DESTDIR).
8471 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8475 * linux-x86-low.c (compat_siginfo_from_siginfo)
8476 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8477 si_code is < 0. Check for si_code == SI_TIMER before checking for
8480 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8482 * lynx-i386-low.c: New file.
8483 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8485 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8487 * lynx-low.c (ptrace_request_to_str): Remove handling for
8488 request values that have been removed in LynxOS 5.x.
8490 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8492 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8495 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8497 * configure.ac: Add --enable-inprocess-agent option.
8498 * configure: Rebuilt.
8500 2010-09-06 Yao Qi <yao@codesourcery.com>
8502 * linux-low.c (linux_kill): Remove unused variable.
8503 (linux_stabilize_threads): Likewise.
8504 * server.c (start_inferior): Likewise.
8505 (queue_stop_reply_callback): Likewise.
8506 * tracepoint.c (do_action_at_tracepoint): Likewise.
8508 2010-09-06 Yao Qi <yao@codesourcery.com>
8510 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8513 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8515 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8517 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8519 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8522 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8524 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8525 gdbserver/lynx-ppc-low.c: New files.
8526 * Makefile.in (lynx_low_h): New variable.
8527 (lynx-low.o, lynx-ppc-low.o): New rules.
8528 * configure.ac: On LynxOS, link with -lnetinet.
8529 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8530 * configure: regenerate.
8532 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8534 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8535 * configure.ac: Add check for vasprintf and vsnprintf.
8536 * configure, config.in: Regenerate.
8537 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8539 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8541 * gdbreplay.c: Move include of alloca.h up, next to include of
8543 * server.h: Add include of malloc.h.
8544 * mem-break.c: Remove include of malloc.h.
8545 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8547 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8549 * Makefile.in (memmem.o): Build with -Wno-error.
8551 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8553 * utils.c (xsnprintf): Make non-static.
8554 * server.h: Add xsnprintf declaration.
8555 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8556 replace calls to snprintf by calls to xsnprintf throughout.
8558 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8560 * configure.ac: Add configure check for alloca.
8561 * configure, config.in: Regenerate.
8562 * server.h: Include alloca.h if it exists.
8563 * gdbreplay.c: Include alloca.h if it exists.
8565 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8567 * linux-low.c (__SIGRTMIN): Define if not already defined.
8568 (linux_create_inferior): Check for __ANDROID__ rather than
8570 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8571 are already deferred.
8572 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8573 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8574 stopped and already has a pending signal to report.
8575 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8576 a pending signal to report or is moving out of a jump pad.
8577 (linux_init_signals): Check for __ANDROID__ rather than
8580 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8582 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8583 debug_threads check. Avoid a linear search when not doing debug
8586 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8588 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8589 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8590 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8591 (process_event): Change local fd's type to gdb_fildes_t.
8592 (create_file_handler): Adjust prototype.
8593 (delete_file_handler): Adjust prototype.
8594 (handle_file_event): Adjust prototype. Use pfildes.
8595 (create_file_event): Adjsut prototype.
8596 * remote-utils.c (remote_desc, listen_desc): Change type to
8598 * server.h: New gdb_fildes_t typedef.
8599 [USE_WIN32API]: Include winsock2.h.
8600 (delete_file_handler, add_file_handler): Adjust prototypes.
8602 * utils.c (pfildes): New.
8604 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8606 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8607 * configure: Regenerate.
8609 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8611 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8612 (linux_done_accessing_memory): ... this.
8613 (linux_target_ops): Adjust.
8614 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8615 * nto-low.c (nto_target_ops): Adjust comment.
8616 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8617 * spu-low.c (spu_target_ops): Adjust comment.
8618 * target.h (target_ops): Rename unprepare_to_access_memory field
8619 to done_accessing_memory.
8620 (unprepare_to_access_memory): Rename to ...
8621 (done_accessing_memory): ... this.
8623 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8625 * linux-low.c (linux_prepare_to_access_memory): New.
8626 (linux_unprepare_to_access_memory): New.
8627 (linux_target_ops): Install them.
8628 * server.c (read_memory): Rename to ...
8629 (gdb_read_memory): ... this. Use
8630 prepare_to_access_memory/prepare_to_access_memory.
8631 (write_memory): Rename to ...
8632 (gdb_write_memory): ... this. Use
8633 prepare_to_access_memory/prepare_to_access_memory.
8634 (handle_search_memory_1): Adjust.
8635 (process_serial_event): Adjust.
8636 * target.h (struct target_ops): New fields
8637 prepare_to_access_memory and unprepare_to_access_memory.
8638 (prepare_to_access_memory, unprepare_to_access_memory): New.
8639 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8640 prepare_to_access_memory/prepare_to_access_memory.
8641 * nto-low.c (nto_target_ops): Adjust.
8642 * spu-low.c (spu_target_ops): Adjust.
8643 * win32-low.c (win32_target_ops): Adjust.
8645 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8647 * Makefile.in (WARN_CFLAGS): Get it from configure.
8648 (WERROR_CFLAGS): New.
8649 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8650 * configure.ac: Introduce --enable-werror, which adds -Werror to
8651 the compiler command line. Enabled by default. Disable with
8652 --disable-werror. Add -Wdeclaration-after-statement
8653 Wpointer-arith and -Wformat-nonliteral to warning flags.
8654 * configure: Regenerate.
8656 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8658 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8660 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8662 * gdbreplay.c (remote_error): New.
8664 (expect): Use gdbchar. Check for error reading from GDB.
8665 Clarify sync error output.
8666 (play): Check for errors writing to GDB.
8667 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8668 * remote-utils.c (getpkt): Check for errors writing to the remote
8671 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8673 * linux-low.c (linux_wait_1): Move non-debugging code out of
8674 `debug_threads' control.
8676 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8678 * linux-low.c (linux_wait_1): Don't set last_status here.
8679 * server.c (push_event, queue_stop_reply_callback): Assert we're
8680 not pushing a TARGET_WAITKIND_IGNORE event.
8681 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8682 (myresume, handle_target_event): Set the thread's last_resume_kind
8683 and last_status from the target returned status.
8685 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8689 * linux-x86-low.c (update_debug_registers_callback): New.
8690 (i386_dr_low_set_addr): Use it.
8691 (i386_dr_low_get_addr): New.
8692 (i386_dr_low_set_control): Use update_debug_registers_callback.
8693 (i386_dr_low_get_control): New.
8694 (i386_dr_low_get_status): Adjust.
8695 * linux-low.c (linux_stop_lwp): New.
8696 * linux-low.h (linux_stop_lwp): Declare.
8698 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8699 argument instead of a i386_debug_reg_state.
8700 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8701 a i386_debug_reg_state.
8702 (i386_insert_aligned_watchpoint): Adjust.
8703 (i386_remove_aligned_watchpoint): Adjust.
8704 (i386_low_stopped_data_address): Read the debug registers from the
8705 inferior instead of from the mirrors.
8706 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8707 (i386_dr_low_get_addr): Declare.
8708 (i386_dr_low_get_control): Declare.
8709 (i386_dr_low_get_status): Change prototype.
8711 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8712 (i386_dr_low_get_addr): New.
8713 (i386_dr_low_get_control): New.
8714 (i386_dr_low_get_status): Adjust prototype. Return
8716 (i386_initial_stuff): Clear dr_status_mirror and
8718 (i386_get_thread_context): Adjust.
8719 (i386_set_thread_context): Adjust.
8720 (i386_thread_added): Adjust.
8722 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8724 * linux-low.h (linux_thread_area): Delete declaration.
8726 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8728 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8729 after its termination.
8731 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8733 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8734 (gdb_wants_all_stopped): Delete.
8735 (linux_wait_1): Don't call them.
8736 * server.c (handle_v_cont): Tag all threads as want-stopped.
8737 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8738 stopped as "client-wants-stopped".
8740 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8742 * Makefile.in (signals_h): New.
8743 (server_h): Depend on it.
8744 (server.o): Don't depend on $(signals_def).
8745 (signals.o): Depend on $(signals_def).
8747 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8749 * Makefile.in (signals_def): New.
8750 (server_h): Append include/gdb/signals.h and signals_def.
8751 (server.o): Append signals_def.
8753 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8755 * server.c (handle_target_event): Use target_signal_to_host for
8756 resume_info.sig initialization.
8757 * target.h (struct thread_resume) <sig>: New comment.
8759 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8761 * server.c (handle_query): strcpy() the returned string from paddress()
8762 instead of sprintf().
8763 * utils.c (paddress): Return phex_nz().
8765 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8767 * server.c (handle_v_cont): Call mourn_inferior if process
8769 (myresume): Likewise.
8771 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8773 Static tracepoints, and integration with UST.
8775 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8776 * mem-break.c (uninsert_all_breakpoints)
8777 (reinsert_all_breakpoints): New.
8778 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8779 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8780 (gdb_agent_ust_loaded, helper_thread_id)
8781 (gdb_agent_helper_thread_id): New macros.
8782 (struct ipa_sym_addresses): Add addr_ust_loaded,
8783 addr_helper_thread_id, addr_cmd_buf.
8784 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8785 (in_process_agent_loaded_ust): New.
8786 (write_e_ust_not_loaded): New.
8787 (maybe_write_ipa_ust_not_loaded): New.
8788 (struct collect_static_trace_data_action): New.
8789 (enum tracepoint_type) <static_tracepoint>: New.
8790 (struct tracepoint) <handle>: Mention static tracepoints.
8791 (struct static_tracepoint_ctx): New.
8792 (CMD_BUF_SIZE): New.
8793 (add_tracepoint_action): Handle static tracepoint actions.
8794 (unprobe_marker_at): New.
8795 (clear_installed_tracepoints): Handle static tracepoints.
8796 (cmd_qtdp): Handle static tracepoints.
8797 (probe_marker_at): New.
8798 (cmd_qtstart): Handle static tracepoints.
8799 (response_tracepoint): Handle static tracepoints.
8800 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8801 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8802 (get_context_regcache): Handle static tracepoints.
8803 (do_action_at_tracepoint): Handle static tracepoint actions.
8804 (traceframe_find_block_type): Handle static trace data blocks.
8805 (traceframe_read_sdata): New.
8806 (download_tracepoints): Download static tracepoint actions.
8807 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8808 (GDB_PROBE_NAME): New.
8813 (ust_marker_to_static_tracepoint): New.
8815 (collect_ust_data_at_tracepoint): New.
8816 (gdb_ust_probe): New.
8817 (UNIX_PATH_MAX, SOCK_DIR): New.
8818 (gdb_ust_connect_sync_socket): New.
8819 (resume_thread, stop_thread): New.
8820 (run_inferior_command): New.
8821 (init_named_socket): New.
8822 (gdb_ust_socket_init): New.
8823 (cstr_to_hexstr): New.
8825 (first_marker, next_marker): New.
8826 (response_ust_marker): New.
8827 (cmd_qtfstm, cmd_qtsstm): New.
8828 (unprobe_marker_at, probe_marker_at): New.
8829 (cmd_qtstmat, gdb_ust_thread): New.
8830 (gdb_ust_init): New.
8831 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8832 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8834 (x86_64_st_collect_regmap): New.
8835 (X86_64_NUM_ST_COLLECT_GREGS): New.
8836 (AMD64_RIP_REGNUM): New.
8837 (supply_static_tracepoint_registers): New.
8838 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8840 (i386_st_collect_regmap): New.
8841 (i386_NUM_ST_COLLECT_GREGS): New.
8842 (supply_static_tracepoint_registers): New.
8843 * server.c (handle_query): Handle qXfer:statictrace:read.
8844 <qSupported>: Report support for StaticTracepoints, and
8845 qXfer:statictrace:read features.
8846 * server.h (traceframe_read_sdata)
8847 (supply_static_tracepoint_registers): Declare.
8848 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8849 (unpack_varlen_hex): Include in IPA build.
8850 * Makefile.in (ustlibs, ustinc): New.
8851 (IPA_OBJS): Add remote-utils-ipa.o.
8852 ($(IPA_LIB)): Link -ldl and -lpthread.
8854 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8855 * config.in, configure: Regenerate.
8857 2010-06-20 Ian Lance Taylor <iant@google.com>
8858 Pedro Alves <pedro@codesourcery.com>
8860 * linux-x86-low.c (always_true): Delete.
8861 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8862 trying to fool the compiler with always_true.
8864 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8866 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8867 conditions in gdbserver.
8869 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8871 * spu-low.c (spu_read_memory): Wrap around local store limit.
8872 (spu_write_memory): Likewise.
8874 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8876 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8877 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8879 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8881 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8882 uses with LONGEST uses.
8884 2010-06-14 Stan Shebs <stan@codesourcery.com>
8885 Pedro Alves <pedro@codesourcery.com>
8889 * linux-x86-low.c: Include limits.h.
8894 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8895 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8896 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8897 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8898 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8899 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8900 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8901 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8902 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8903 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8904 (amd64_emit_void_call_2): New.
8905 (amd64_emit_ops): New.
8906 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8907 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8908 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8909 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8910 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8911 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8912 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8913 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8914 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8915 (i386_emit_stack_adjust, i386_emit_int_call_1)
8916 (i386_emit_void_call_2): New.
8917 (i386_emit_ops): New.
8918 (x86_emit_ops): New.
8919 (the_low_target): Install x86_emit_ops.
8920 * server.h (struct emit_ops): New.
8921 (get_raw_reg_func_addr): Declare.
8922 (current_insn_ptr, emit_error): Declare.
8923 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8924 (set_trace_state_variable_value): New defines.
8925 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8926 addr_get_trace_state_variable_value and
8927 addr_set_trace_state_variable_value.
8928 (symbol_list): New fields for get_raw_reg,
8929 get_trace_state_variable_value and set_trace_state_variable_value.
8930 (condfn): New typedef.
8931 (struct tracepoint): New field `compiled_cond'.
8932 (do_action_at_tracepoint): Clear compiled_cond.
8933 (get_trace_state_variable_value, set_trace_state_variable_value):
8935 (condition_true_at_tracepoint): If there's a compiled condition,
8937 (current_insn_ptr, emit_error): New globals.
8938 (struct bytecode_address): New.
8939 (get_raw_reg_func_addr): New.
8940 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8941 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8942 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8943 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8944 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8945 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8946 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8947 (compile_tracepoint_condition, compile_bytecodes): New.
8948 * target.h (emit_ops): Forward declare.
8949 (struct target_ops): New field emit_ops.
8950 (target_emit_ops): New.
8951 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8952 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8953 * linux-low.c (linux_emit_ops): New.
8954 (linux_target_ops): Install it.
8955 * linux-low.h (struct linux_target_ops): New field emit_ops.
8957 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8959 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8960 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8962 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8963 Stan Shebs <stan@codesourcery.com>
8965 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8966 (all): Depend on $(extra_libraries).
8967 (install-only): Install the IPA.
8968 (IPA_OBJS, IPA_LIB): New.
8969 (clean): Remove the IPA lib.
8970 (IPAGENT_CFLAGS): New.
8971 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8972 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8973 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8974 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8975 * configure.ac: Check for atomic builtins support in the compiler.
8976 (IPA_DEPFILES, extra_libraries): Define.
8977 * configure.srv (ipa_obj): Add description.
8978 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8979 (i[34567]86-*-linux*): Set ipa_obj.
8980 (x86_64-*-linux*): Set ipa_obj.
8981 * linux-low.c (stabilizing_threads): New.
8982 (supports_fast_tracepoints): New.
8983 (linux_detach): Stabilize threads before detaching.
8984 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8985 the lwp is either not stabilizing, or is moving out of a jump pad.
8986 (linux_fast_tracepoint_collecting): New.
8987 (maybe_move_out_of_jump_pad): New.
8988 (enqueue_one_deferred_signal): New.
8989 (dequeue_one_deferred_signal): New.
8990 (linux_wait_for_event_1): If moving out of a jump pad, defer
8991 pending signals to later.
8992 (linux_stabilize_threads): New.
8993 (linux_wait_1): Check if threads need moving out of jump pads, and
8995 (stuck_in_jump_pad_callback): New.
8996 (move_out_of_jump_pad_callback): New.
8998 (linux_resume_one_lwp): Handle moving out of jump pads.
8999 (linux_set_resume_request): Dequeue deferred signals.
9000 (need_step_over_p): Also step over fast tracepoint jumps.
9001 (start_step_over): Also uninsert fast tracepoint jumps.
9002 (finish_step_over): Also reinsert fast tracepoint jumps.
9003 (linux_install_fast_tracepoint_jump): New.
9004 (linux_target_ops): Install linux_stabilize_threads and
9005 linux_install_fast_tracepoint_jump_pad.
9006 * linux-low.h (linux_target_ops) <get_thread_area,
9007 install_fast_tracepoint_jump_pad>: New fields.
9008 (struct lwp_info) <collecting_fast_tracepoint,
9009 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9010 (linux_get_thread_area): Declare.
9011 * linux-x86-low.c (jump_insn): New.
9012 (x86_get_thread_area): New.
9013 (append_insns): New.
9015 (amd64_install_fast_tracepoint_jump_pad): New.
9016 (i386_install_fast_tracepoint_jump_pad): New.
9017 (x86_install_fast_tracepoint_jump_pad): New.
9018 (the_low_target): Install x86_get_thread_area and
9019 x86_install_fast_tracepoint_jump_pad.
9020 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9021 (struct fast_tracepoint_jump): New.
9022 (fast_tracepoint_jump_insn): New.
9023 (fast_tracepoint_jump_shadow): New.
9024 (find_fast_tracepoint_jump_at): New.
9025 (fast_tracepoint_jump_here): New.
9026 (delete_fast_tracepoint_jump): New.
9027 (set_fast_tracepoint_jump): New.
9028 (uninsert_fast_tracepoint_jumps_at): New.
9029 (reinsert_fast_tracepoint_jumps_at): New.
9030 (set_breakpoint_at): Use write_inferior_memory.
9031 (uninsert_raw_breakpoint): Use write_inferior_memory.
9032 (check_mem_read): Mask out fast tracepoint jumps.
9033 (check_mem_write): Mask out fast tracepoint jumps.
9034 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9035 (set_fast_tracepoint_jump): Declare.
9036 (delete_fast_tracepoint_jump)
9037 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9038 (reinsert_fast_tracepoint_jumps_at): Declare.
9039 * regcache.c: Don't compile many functions when building the
9040 in-process agent library.
9041 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9042 the register buffer in the heap.
9043 (free_register_cache): If the register buffer isn't owned by the
9044 regcache, don't free it.
9045 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9046 pre-existing register caches.
9047 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9049 (convert_ascii_to_int): : Constify `from' parameter type.
9050 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9051 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9052 the needed buffer in-place.
9053 (relocate_instruction): New.
9054 * server.c (handle_query) <qSymbols>: If the target supports
9055 tracepoints, give it a chance of looking up symbols. Report
9056 support for fast tracepoints.
9057 (handle_status): Stabilize threads.
9058 (process_serial_event): Adjust.
9059 * server.h (struct fast_tracepoint_jump): Forward declare.
9060 (struct process_info) <fast_tracepoint_jumps>: New field.
9061 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9062 (decode_X_packet, decode_M_packet): Adjust.
9063 (relocate_instruction): Declare.
9064 (in_process_agent_loaded): Declare.
9065 (tracepoint_look_up_symbols): Declare.
9066 (struct fast_tpoint_collect_status): Declare.
9067 (fast_tracepoint_collecting): Declare.
9068 (force_unlock_trace_buffer): Declare.
9069 (handle_tracepoint_bkpts): Declare.
9070 (initialize_low_tracepoint)
9071 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9072 * target.h (struct target_ops) <stabilize_threads,
9073 install_fast_tracepoint_jump_pad>: New fields.
9074 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9075 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9076 [HAVE_STDINT_H]: Include stdint.h.
9077 (trace_debug_1): Rename to ...
9078 (trace_vdebug): ... this.
9079 (trace_debug): Rename to ...
9080 (trace_debug_1): ... this. Add `level' parameter.
9082 (ATTR_USED, ATTR_NOINLINE): New.
9083 (IP_AGENT_EXPORT): New.
9084 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9085 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9086 (about_to_request_buffer_space, trace_buffer_is_full)
9087 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9088 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9089 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9090 (traceframe_write_count, traceframes_created)
9091 (trace_state_variables)
9092 New renaming defines.
9093 (struct ipa_sym_addresses): New.
9094 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9096 (ipa_sym_addrs): New.
9097 (all_tracepoint_symbols_looked_up): New.
9098 (in_process_agent_loaded): New.
9099 (write_e_ipa_not_loaded): New.
9100 (maybe_write_ipa_not_loaded): New.
9101 (tracepoint_look_up_symbols): New.
9102 (debug_threads) [IN_PROCESS_AGENT]: New.
9103 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9104 (UNKNOWN_SIDE_EFFECTS): New.
9105 (stop_tracing): New.
9106 (flush_trace_buffer): New.
9107 (stop_tracing_bkpt): New.
9108 (flush_trace_buffer_bkpt): New.
9109 (read_inferior_integer): New.
9110 (read_inferior_uinteger): New.
9111 (read_inferior_data_pointer): New.
9112 (write_inferior_data_pointer): New.
9113 (write_inferior_integer): New.
9114 (write_inferior_uinteger): New.
9115 (struct collect_static_trace_data_action): Delete.
9116 (enum tracepoint_type): New.
9117 (struct tracepoint) <type>: New field `type'.
9118 <actions_str, step_actions, step_actions_str>: Only include in
9120 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9121 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9122 (tracepoints): Use IP_AGENT_EXPORT.
9123 (last_tracepoint): Don't include in the IPA.
9124 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9125 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9126 (alloced_trace_state_variables): New.
9127 (trace_state_variables): Use IP_AGENT_EXPORT.
9128 (traceframe_t): Delete unused variable.
9129 (circular_trace_buffer): Don't include in the IPA.
9130 (trace_buffer_start): Delete.
9131 (struct trace_buffer_control): New.
9132 (trace_buffer_free): Delete.
9133 (struct ipa_trace_buffer_control): New.
9134 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9135 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9137 (trace_buffer_ctrl): New.
9138 (TRACE_BUFFER_CTRL_CURR): New.
9139 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9140 Reimplement as macros.
9141 (trace_buffer_wrap): Delete.
9142 (traceframe_write_count, traceframe_read_count)
9143 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9144 (struct tracepoint_hit_ctx) <type>: New field.
9145 (struct fast_tracepoint_ctx): New.
9146 (memory_barrier): New.
9148 (record_tracepoint_error): Update atomically in the IPA.
9149 (clear_inferior_trace_buffer): New.
9150 (about_to_request_buffer_space): New.
9151 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9152 updating the same buffer.
9153 (add_tracepoint): Default the tracepoint's type to trap
9154 tracepoint, and orig_size to -1.
9155 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9157 (create_trace_state_variable): New parameter `gdb'. Handle it.
9158 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9159 (cmd_qtdp): Handle fast tracepoints.
9161 (max_jump_pad_size): New.
9162 (gdb_jump_pad_head): New.
9163 (get_jump_space_head): New.
9164 (claim_jump_space): New.
9165 (sort_tracepoints): New.
9166 (MAX_JUMP_SIZE): New.
9167 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9169 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9170 support. Upload fast traceframes, and delete internal IPA
9172 (stop_tracing_handler): New.
9173 (flush_trace_buffer_handler): New.
9174 (cmd_qtstop): Upload fast tracepoints.
9175 (response_tracepoint): Handle fast tracepoints.
9176 (tracepoint_finished_step): Upload fast traceframes. Set the
9177 tracepoint hit context's tracepoint type.
9178 (handle_tracepoint_bkpts): New.
9179 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9180 type. Add comment about fast tracepoints.
9181 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9182 non-existing action_str field.
9183 (get_context_regcache): Handle fast tracepoints.
9184 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9186 (fast_tracepoint_from_jump_pad_address): New.
9187 (fast_tracepoint_from_ipa_tpoint_address): New.
9188 (collecting_t): New.
9189 (force_unlock_trace_buffer): New.
9190 (fast_tracepoint_collecting): New.
9193 (write_inferior_data_ptr): New.
9194 (target_tp_heap): New.
9195 (target_malloc): New.
9196 (download_agent_expr): New.
9198 (download_tracepoints): New.
9199 (download_trace_state_variables): New.
9200 (upload_fast_traceframes): New.
9201 (IPA_FIRST_TRACEFRAME): New.
9202 (IPA_NEXT_TRACEFRAME_1): New.
9203 (IPA_NEXT_TRACEFRAME): New.
9204 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9205 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9206 (gdb_jump_pad_buffer_end): New.
9207 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9208 (initialize_tracepoint): Adjust.
9209 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9210 buffer. Initialize the low module.
9211 * utils.c (PREFIX, TOOLNAME): New.
9212 (malloc_failure): Use PREFIX.
9213 (error): In the IPA, an error causes an exit.
9214 (fatal, warning): Use PREFIX.
9215 (internal_error): Use TOOLNAME.
9216 (NUMCELLS): Increase to 10.
9217 * configure, config.in: Regenerate.
9219 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9221 * server.c (handle_query) <qSupported>: Do two passes over the
9222 qSupported string to avoid nesting strtok.
9224 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9226 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9228 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9230 * configure: Regenerate.
9231 * proc-service.list: New.
9233 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9235 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9238 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9240 * gdbreplay.c (remote_open): Check error return from socket() call by
9241 its equality to -1 not by it being negative.
9242 * remote-utils.c (remote_open): Likewise.
9244 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9246 * config.h: Regenerate.
9248 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9250 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9251 doesn't provide PTRACE_GET_THREAD_AREA.
9253 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9255 * linux-m68k-low.c: Include <asm/ptrace.h>
9256 (ps_get_thread_area): Implement.
9258 2010-05-03 Doug Evans <dje@google.com>
9260 * event-loop.c (struct callback_event): New struct.
9261 (callback_list): New global.
9262 (append_callback_event, delete_callback_event): New functions.
9263 (process_callback): New function.
9264 (start_event_loop): Call it.
9265 * remote-utils.c (NOT_SCHEDULED): Define.
9266 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9267 moved out of readchar.
9268 (readchar): Rewrite. Call reschedule before returning.
9269 (reset_readchar): New function.
9270 (remote_close): Call it.
9271 (process_remaining, reschedule): New functions.
9272 * server.h (callback_handler_func): New typedef.
9273 (append_callback_event, delete_callback_event): Declare.
9275 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9277 * proc-service.c (ps_pglobal_lookup): Use
9278 thread_db_look_up_one_symbol.
9279 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9280 parameter. Use it instead of all_symbols_looked_up.
9281 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9283 (all_symbols_looked_up): Don't declare.
9284 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9285 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9287 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9288 Set all_symbols_looked_up here.
9289 (thread_db_look_up_one_symbol): New.
9290 (thread_db_get_tls_address): Adjust.
9291 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9292 thread_db object on the heap, and tentatively set it in the
9294 (thread_db_init): Don't set all_symbols_looked_up here.
9295 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9297 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9299 * linux-low.c (linux_kill, linux_detach): Adjust.
9300 (status_pending_p_callback): Remove redundant statement. Check
9301 for !TARGET_WAITIKIND_IGNORE, instead of
9302 TARGET_WAITKIND_STOPPED.
9303 (handle_tracepoints): Make sure LWP is locked. Adjust.
9304 (linux_wait_for_event_1): Adjust.
9305 (linux_cancel_breakpoints): New.
9306 (unsuspend_one_lwp): New.
9307 (unsuspend_all_lwps): New.
9308 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9309 (send_sigstop_callback): Change return type to int, add new
9310 `except' parameter and handle it.
9311 (suspend_and_send_sigstop_callback): New.
9312 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9313 pass them down. If SUSPEND, also increment the lwp's suspend
9315 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9316 (need_step_over_p): Don't consider suspended LWPs.
9317 (start_step_over): Adjust.
9318 (proceed_one_lwp): Change return type to int, add new `except'
9319 parameter and handle it.
9320 (unsuspend_and_proceed_one_lwp): New.
9321 (proceed_all_lwps): Use find_inferior instead of
9323 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9324 also decrement the suspend count of LWPs. Pass `except' down,
9325 instead of hacking its suspend count.
9326 (linux_pause_all): Add `freeze' parameter. Adjust.
9327 (linux_unpause_all): New.
9328 (linux_target_ops): Install linux_unpause_all.
9329 * server.c (handle_status): Adjust.
9330 * target.h (struct target_ops): New fields `unpause_all' and
9331 `cancel_breakpoints'. Add new parameter to `pause_all'.
9332 (pause_all): Add new `freeze' parameter.
9334 (cancel_breakpoints): New.
9335 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9337 (cmd_qtstart): Pause threads.
9338 (stop_tracing): Pause threads, and cancel breakpoints.
9339 * win32-low.c (win32_target_ops): Adjust.
9341 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9343 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9344 the inferior right away from here...
9345 (linux_wait_1): ... to here, and adjust to check the thread's
9346 last_resume_kind instead of the lwp's step or stop_expected flags.
9348 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9350 * README: Use consistent `GDB' and `GDBserver' spellings.
9352 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9354 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9355 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9356 (linux_detach_one_lwp): Assume the lwp is stopped.
9357 (any_thread_of): Delete.
9358 (linux_detach): Stop all lwps here. Don't blindly delete all
9360 (delete_lwp_callback): New.
9361 (linux_mourn): Delete all lwps of the process that is gone.
9362 (linux_wait_1): Don't delete the last lwp of the process here.
9363 * mem-break.h (mark_breakpoints_out): Declare.
9364 * mem-break.c (mark_breakpoints_out): New.
9365 (free_all_breakpoints): Use it.
9366 * server.c (handle_target_event): If the process is gone, mark
9368 * thread-db.c (struct thread_db) <create_bp>: New field.
9369 (thread_db_enable_reporting): Fix prototype. Store a thread event
9370 breakpoint reference in the thread_db struct.
9371 (thread_db_load_search): Clear the thread_db object.
9372 (try_thread_db_load_1): Ditto.
9373 (switch_to_process): New.
9374 (disable_thread_event_reporting): Use it.
9375 (remove_thread_event_breakpoints): New.
9376 (thread_db_detach, thread_db_mourn): Use it.
9378 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9380 * linux-low.c (linux_enable_event_reporting): New.
9381 (linux_wait_for_event_1, handle_extended_wait): Use it.
9383 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9385 * linux-low.c (linux_kill_one_lwp, linux_kill)
9386 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9387 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9388 SIGSTOP even if the LWP is stopped.
9389 (send_sigstop_callback): New.
9390 (stop_all_lwps): Use send_sigstop_callback instead.
9391 (linux_resume_one_thread): Adjust.
9392 (proceed_one_lwp): Still proceed an LWP that the client has
9393 requested to stop, if we haven't reported it as stopped yet. Make
9394 sure that LWPs the client want stopped, have a pending SIGSTOP.
9396 2010-04-26 Doug Evans <dje@google.com>
9398 * server.c (handle_general_set): Make static.
9400 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9401 Print received char after testing for error/eof instead of before.
9402 (input_interrupt): Tweak comment.
9404 2010-04-23 Doug Evans <dje@google.com>
9406 * server.c (start_inferior): Print inferior argv if --debug.
9408 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9410 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9411 * nto-x86-low.c: Include server.h
9413 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9415 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9416 be consistent with other sources of this directory.
9417 (init_registers_amd64): Correct name of source file of this function
9420 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9422 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9425 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9427 * win32-i386-low.c: Add 64-bit support.
9428 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9429 (init_registers_amd64): Declare.
9430 (mappings): Add 64-bit version of array.
9431 (init_windows_x86): New function.
9432 (the_low_target): Change init_arch field to init_windows_x86.
9434 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9436 * win32-low.c: Adapt to support also 64-bit architecture.
9437 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9438 (get_image_name): Use SIZE_T type for local variable `done'.
9439 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9440 (toolhelp_get_dll_name): Idem.
9441 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9442 Use uintptr_t typecast to avoid warning.
9443 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9444 (handle_exception): Use phex_nz to avoid warning.
9445 (win32_wait): Remove unused local variable `process'.
9447 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9449 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9452 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9454 * configure.ac: Use `ws2_32' library for srv_mingw.
9455 * configure: Regenerate.
9456 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9457 * remote-utils.c: Likewise.
9459 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9461 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9462 if __x86_64__ is defined.
9464 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9466 * configure: Regenerate.
9468 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9470 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9471 * target.h (target_ops): New get_tib_address field.
9472 * win32-low.h (win32_thread_info): Add thread_local_base field.
9473 * win32-low.c (child_add_thread): Add tlb argument.
9474 Set thread_local_base field to TLB.
9475 (get_child_debug_event): Adapt to child_add_thread change.
9476 (win32_get_tib_address): New function.
9477 (win32_target_ops): Set get_tib_address field to
9478 win32_get_tib_address.
9479 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9481 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9483 * linux-low.c (linux_mourn): Also remove the process.
9484 * server.c (handle_target_event): Don't remove the process here.
9485 * nto-low.c (nto_mourn): New.
9486 (nto_target_ops): Install it.
9487 * spu-low.c (spu_mourn): New.
9488 (spu_target_ops): Install it.
9489 * win32-low.c (win32_mourn): New.
9490 (win32_target_ops): Install it.
9492 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9494 * server.h (buffer_xml_printf): Remove redundant `;'.
9496 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9498 * regcache.c (set_register_cache): Invalidate regcaches before
9499 changing the register cache layout.
9500 (regcache_invalidate_one): Allow a NULL regcache.
9501 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9502 regcaches before changing the register cache layout or the target
9505 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9507 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9508 variable warning on Linux/x86-64.
9510 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9512 GDBserver disconnected tracing support.
9514 * linux-low.c (linux_remove_process): Delete.
9515 (add_lwp): Don't set last_resume_kind here.
9516 (linux_kill): Use `mourn'.
9517 (linux_detach): Use `thread_db_detach', and `mourn'.
9519 (linux_attach_lwp_1): Adjust comment.
9520 (linux_attach): last_resume_kind moved the thread_info; adjust.
9521 (status_pending_p_callback): Adjust.
9522 (linux_wait_for_event_1): Adjust.
9523 (count_events_callback, select_singlestep_lwp_callback)
9524 (select_event_lwp_callback, cancel_breakpoints_callback)
9525 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9526 (proceed_one_lwp): Adjust.
9527 (linux_async): Add debug output.
9528 (linux_thread_stopped): New.
9529 (linux_pause_all): New.
9530 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9532 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9533 (thread_db_free): Delete declaration.
9534 (thread_db_detach, thread_db_mourn): Declare.
9535 * thread-db.c (thread_db_init): Use thread_db_mourn.
9536 (thread_db_free): Delete, split in two.
9537 (disable_thread_event_reporting): New.
9538 (thread_db_detach): New.
9539 (thread_db_mourn): New.
9541 * server.h (struct thread_info) <last_resume_kind>: New field.
9542 <attached>: Add comment.
9543 <gdb_detached>: New field.
9544 (handler_func): Change return type to int.
9545 (handle_serial_event, handle_target_event): Ditto.
9546 (gdb_connected): Declare.
9548 (disconnected_tracing): Declare.
9549 (stop_tracing): Declare.
9551 * server.c (handle_query) <qSupported>: Report support for
9552 disconnected tracing.
9553 (queue_stop_reply_callback): Account for running threads.
9554 (gdb_wants_thread_stopped): New.
9555 (gdb_wants_all_threads_stopped): New.
9556 (gdb_reattached_process): New.
9557 (handle_status): Clear the `gdb_detached' flag of all processes.
9558 In all-stop, stop all threads.
9559 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9560 (process_serial_event): If the remote connection breaks, or if an
9561 exit was forced with "monitor exit", force an event loop exit.
9562 Handle disconnected tracing on detach.
9563 (handle_serial_event): Adjust.
9564 (handle_target_event): If GDB isn't connected, forward events back
9565 to the inferior, unless the last process exited, in which case,
9566 exit gdbserver. Adjust interface.
9568 * remote-utils.c (remote_open): Don't block in accept. Instead
9569 register an event loop source on the listen socket file
9570 descriptor. Refactor bits into ...
9571 (listen_desc): ... this new global.
9572 (gdb_connected): ... this new function.
9573 (enable_async_notification): ... this new function.
9574 (handle_accept_event): ... this new function.
9575 (remote_close): Clear remote_desc.
9577 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9579 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9581 (mourn_inferior): Define.
9582 (target_process_qsupported): Avoid the dangling else problem.
9583 (thread_stopped): Define.
9584 (pause_all): Define.
9585 (target_waitstatus_to_string): Declare.
9586 * target.c (target_waitstatus_to_string): New.
9588 * tracepoint.c (tracing): Make extern.
9589 (disconnected_tracing): New.
9590 (stop_tracing): Make extern. Handle tracing stops due to GDB
9592 (cmd_qtdisconnected): New.
9593 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9594 (handle_tracepoint_general_set): Handle QTDisconnected.
9596 * event-loop.c (event_handler_func): Change return type to int.
9597 (process_event): Bail out if the event handler wants the event
9599 (handle_file_event): Ditto.
9600 (start_event_loop): Bail out if the event handler wants the event
9603 * nto-low.c (nto_target_ops): Adjust.
9604 * spu-low.c (spu_wait): Don't remove the process here.
9605 (spu_target_ops): Adjust.
9606 * win32-low.c (win32_wait): Don't remove the process here.
9607 (win32_target_ops): Adjust.
9609 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9611 * regcache.c (realloc_register_cache): Invalidate inferior's
9612 regcache before recreating it.
9614 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9616 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9618 2010-04-09 Stan Shebs <stan@codesourcery.com>
9619 Pedro Alves <pedro@codesourcery.com>
9621 * server.h (LONGEST): New.
9622 (struct thread_info) <while_stepping>: New field.
9623 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9625 (initialize_tracepoint, handle_tracepoint_general_set)
9626 (handle_tracepoint_query, tracepoint_finished_step)
9627 (tracepoint_was_hit, release_while_stepping_state_list):
9628 (current_traceframe): Declare.
9629 * server.c (handle_general_set): Handle tracepoint packets.
9631 (write_memory): New.
9632 (handle_search_memory_1): Use read_memory.
9633 (handle_query): Report support for conditional tracepoints, trace
9634 state variables, and tracepoint sources. Handle tracepoint
9636 (main): Initialize the tracepoints module.
9637 (process_serial_event): Handle traceframe reads/writes.
9639 * linux-low.c (handle_tracepoints): New.
9640 (linux_wait_1): Call it.
9641 (linux_resume_one_lwp): Handle while-stepping.
9642 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9643 (linux_target_ops): Install them.
9644 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9646 * linux-x86-low.c (x86_supports_tracepoints): New.
9647 (the_low_target). Install it.
9649 * mem-break.h (delete_breakpoint): Declare.
9650 * mem-break.c (delete_breakpoint): Make external.
9652 * target.h (struct target_ops): Add `supports_tracepoints',
9653 `read_pc', and `write_pc' fields.
9654 (target_supports_tracepoints): Define.
9655 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9658 * regcache.h (struct regcache) <registers_owned>: New field.
9659 (init_register_cache, regcache_cpy): Declare.
9660 (regcache_read_pc, regcache_write_pc): Declare.
9661 (register_cache_size): Declare.
9662 (supply_regblock): Declare.
9663 * regcache.c (init_register_cache): New.
9664 (new_register_cache): Use it.
9665 (regcache_cpy): New.
9666 (register_cache_size): New.
9667 (supply_regblock): New.
9668 (regcache_read_pc, regcache_write_pc): New.
9670 * tracepoint.c: New.
9672 * Makefile.in (OBS): Add tracepoint.o.
9673 (tracepoint.o): New rule.
9675 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9677 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9679 (i386-mmx.c): Likewise.
9680 (i386-mmx-linux.o): Likewise.
9681 (i386-mmx-linux.c): Likewise.
9683 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9684 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9685 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9686 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9688 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9689 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9690 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9692 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9694 * Makefile.in (clean): Updated.
9696 (i386-avx.c): Likewise.
9697 (i386-avx-linux.o): Likewise.
9698 (i386-avx-linux.c): Likewise.
9699 (amd64-avx.o): Likewise.
9700 (amd64-avx.c): Likewise.
9701 (amd64-avx-linux.o): Likewise.
9702 (amd64-avx-linux.c): Likewise.
9704 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9705 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9706 (srv_amd64_regobj): Add amd64-avx.o.
9707 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9708 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9709 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9710 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9711 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9712 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9713 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9715 * i387-fp.c: Include "i386-xstate.h".
9717 (i387_cache_to_xsave): Likewise.
9718 (i387_xsave_to_cache): Likewise.
9719 (x86_xcr0): Likewise.
9721 * i387-fp.h (i387_cache_to_xsave): Likewise.
9722 (i387_xsave_to_cache): Likewise.
9723 (x86_xcr0): Likewise.
9725 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9726 * linux-crisv32-low.c (target_regsets): Likewise.
9727 * linux-m68k-low.c (target_regsets): Likewise.
9728 * linux-mips-low.c (target_regsets): Likewise.
9729 * linux-ppc-low.c (target_regsets): Likewise.
9730 * linux-s390-low.c (target_regsets): Likewise.
9731 * linux-sh-low.c (target_regsets): Likewise.
9732 * linux-sparc-low.c (target_regsets): Likewise.
9733 * linux-xtensa-low.c (target_regsets): Likewise.
9735 * linux-low.c: Include <sys/uio.h>.
9736 (regsets_fetch_inferior_registers): Support nt_type.
9737 (regsets_store_inferior_registers): Likewise.
9738 (linux_process_qsupported): New.
9739 (linux_target_ops): Add linux_process_qsupported.
9741 * linux-low.h (regset_info): Add nt_type.
9742 (linux_target_ops): Add process_qsupported.
9744 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9746 (init_registers_i386_avx_linux): New.
9747 (init_registers_amd64_avx_linux): Likewise.
9748 (xmltarget_i386_linux_no_xml): Likewise.
9749 (xmltarget_amd64_linux_no_xml): Likewise.
9750 (PTRACE_GETREGSET): Likewise.
9751 (PTRACE_SETREGSET): Likewise.
9752 (x86_fill_xstateregset): Likewise.
9753 (x86_store_xstateregset): Likewise.
9754 (use_xml): Likewise.
9755 (x86_linux_update_xmltarget): Likewise.
9756 (x86_linux_process_qsupported): Likewise.
9757 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9758 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9759 init_registers_i386_linux here. Call
9760 x86_linux_update_xmltarget.
9761 (the_low_target): Add x86_linux_process_qsupported.
9763 * server.c (handle_query): Call target_process_qsupported.
9765 * target.h (target_ops): Add process_qsupported.
9766 (target_process_qsupported): New.
9768 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9770 * inferiors.c (add_thread): Set last_status kind to
9771 TARGET_WAITKIND_IGNORE.
9772 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9773 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9774 (linux_wait_1): Move `thread' local definition to block that uses
9775 it. Don't NULL initialize `event_child'.
9776 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9777 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9778 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9780 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9782 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9783 an extended waitstatus, or by a watchpoint.
9784 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9785 thread was stepping or has been stopped by a watchpoint.
9787 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9789 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9790 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9791 of another, then delete the previous, and validate all
9793 (validate_inserted_breakpoint): New.
9794 (delete_disabled_breakpoints): New.
9795 (validate_breakpoints): New.
9796 (check_mem_read): Validate breakpoints before trusting their
9797 shadow. Delete disabled breakpoints.
9798 (check_mem_write): Validate breakpoints before trusting they
9799 should be inserted. Delete disabled breakpoints.
9800 * mem-break.h (validate_breakpoints):
9801 * server.c (handle_query): Validate breakpoints when we see a
9804 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9806 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9807 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9808 if we could tell there's a GDB breakpoint at stop_pc.
9809 (need_step_over_p): Don't do a step over if we find a GDB
9810 breakpoint at the resume PC.
9812 * mem-break.c (struct raw_breakpoint): New.
9813 (enum bkpt_type): New type `gdb_breakpoint'.
9814 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9815 fields. New field `raw'.
9816 (find_raw_breakpoint_at): New.
9817 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9819 (set_breakpoint_at): Adjust.
9820 (delete_raw_breakpoint): New.
9821 (release_breakpoint): New.
9822 (delete_breakpoint): Rename to...
9823 (delete_breakpoint_1): ... this. Add proc parameter. Use
9824 release_breakpoint. Return ENOENT.
9825 (delete_breakpoint): Reimplement.
9826 (find_breakpoint_at): Delete.
9827 (find_gdb_breakpoint_at): New.
9828 (delete_breakpoint_at): Delete.
9829 (set_gdb_breakpoint_at): New.
9830 (delete_gdb_breakpoint_at): New.
9831 (gdb_breakpoint_here): New.
9832 (set_reinsert_breakpoint): Use release_breakpoint.
9833 (uninsert_breakpoint): Rename to ...
9834 (uninsert_raw_breakpoint): ... this.
9835 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9836 (reinsert_raw_breakpoint): Change parameter type to
9838 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9840 (check_breakpoints): Adjust. Use release_breakpoint.
9841 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9842 (breakpoint_inserted_here): Ditto.
9843 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9844 Don't trust the breakpoint's shadow if it is not inserted.
9845 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9846 (delete_all_breakpoints): Adjust.
9847 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9848 use delete_breakpoint_1.
9850 * mem-break.h (breakpoints_supported): Delete declaration.
9851 (set_gdb_breakpoint_at): Declare.
9852 (gdb_breakpoint_here): Declare.
9853 (delete_breakpoint_at): Delete.
9854 (delete_gdb_breakpoint_at): Declare.
9856 * server.h (struct raw_breakpoint): Forward declare.
9857 (struct process_info): New field `raw_breakpoints'.
9859 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9862 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9864 * linux-low.c (status_pending_p_callback): Fix comment.
9865 (linux_wait_for_event_1): Move most of the internal breakpoint
9866 handling from here...
9867 (linux_wait_1): ... to here.
9868 (count_events_callback): New.
9869 (select_singlestep_lwp_callback): New.
9870 (select_event_lwp_callback): New.
9871 (cancel_breakpoints_callback): New.
9872 (select_event_lwp): New.
9873 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9874 priority to all LWPs that have had events that should be reported
9875 to the client. Cancel breakpoints when about to reporting the
9876 event to the client, not while stopping lwps. No longer cancel
9877 finished single-steps here.
9878 (cancel_finished_single_step): Delete.
9879 (cancel_finished_single_steps): Delete.
9881 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9883 * mem-break.c (enum bkpt_type): New.
9884 (struct breakpoint): New field `type'.
9885 (set_breakpoint_at): Change return type to struct breakpoint
9886 pointer. Set type to `other_breakpoint' by default.
9887 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9888 in the breakpoint list.
9889 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9890 (reinsert_breakpoint): Rename to ...
9891 (reinsert_raw_breakpoint): ... this.
9892 (reinsert_breakpoints_at): Adjust.
9893 * mem-break.h (struct breakpoint): Declare.
9894 (set_breakpoint_at): Change return type to struct breakpoint
9897 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9899 * server.c (handle_query): Assign, not compare.
9901 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9903 Teach linux gdbserver to step-over-breakpoints.
9905 * linux-low.c (can_hardware_single_step): New.
9906 (supports_breakpoints): New.
9907 (handle_extended_wait): If stopping threads, read the stop pc of
9910 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9911 low target doesn't support retrieving the PC.
9912 (add_lwp): Set last_resume_kind to resume_continue.
9913 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9914 (linux_attach): Don't clear stop_expected. Set the lwp's
9915 last_resume_kind to resume_stop.
9916 (linux_detach_one_lwp): Don't check for removed breakpoints.
9917 (check_removed_breakpoint): Delete.
9918 (status_pending_p): Rename to ...
9919 (status_pending_p_callback): ... this. Don't check for removed
9920 breakpoints. Don't consider threads that are stopped from GDB's
9922 (linux_wait_for_lwp): Always read the stop_pc here.
9923 (cancel_breakpoint): New.
9924 (step_over_bkpt): New global.
9925 (linux_wait_for_event_1): Implement stepping over breakpoints.
9926 (gdb_wants_lwp_stopped): New.
9927 (gdb_wants_all_stopped): New.
9928 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9929 single-step traps here. Store the thread's last reported target
9931 (send_sigstop): Don't clear stop_expected. Always set it,
9933 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9934 (cancel_finished_single_step): New.
9935 (cancel_finished_single_steps): New.
9936 (wait_for_sigstop): Don't cancel finished single-step traps here.
9937 (linux_resume_one_lwp): Don't check for removed breakpoints.
9938 Don't set `step' on non-hardware step archs.
9939 (linux_set_resume_request): Ignore resume_stop requests if already
9940 stopping or stopped. Set the lwp's last_resume_kind.
9941 (resume_status_pending_p): Don't check for removed breakpoints.
9942 (need_step_over_p): New.
9943 (start_step_over): New.
9944 (finish_step_over): New.
9945 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9946 requests. Clear the thread's last reported target waitstatus.
9947 Don't use the `suspended' flag. Don't consider pending breakpoints.
9948 (linux_resume): Start a step-over if necessary.
9949 (proceed_one_lwp): New.
9950 (proceed_all_lwps): New.
9951 (unstop_all_lwps): New.
9952 * linux-low.h (struct lwp_info): Rewrite comment for the
9953 `suspended' flag. Add the `stop_pc' field. Delete the
9954 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9955 Add `'last_resume_kind' and `need_step_over' fields.
9956 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9957 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9958 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9959 (set_raw_breakpoint_at): New.
9960 (set_breakpoint_at): Rewrite to use it.
9961 (reinsert_breakpoint_handler): Delete.
9962 (set_reinsert_breakpoint): New.
9963 (reinsert_breakpoint_by_bp): Delete.
9964 (delete_reinsert_breakpoints): New.
9965 (uninsert_breakpoint): Rewrite.
9966 (uninsert_breakpoints_at): New.
9967 (reinsert_breakpoint): Rewrite.
9968 (reinsert_breakpoints_at): New.
9969 (check_breakpoints): Rewrite.
9970 (breakpoint_here): New.
9971 (breakpoint_inserted_here): New.
9972 (check_mem_read): Adjust.
9973 * mem-break.h (breakpoints_supported, breakpoint_here)
9974 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9975 (reinsert_breakpoint_by_bp): Delete declaration.
9976 (delete_reinsert_breakpoints): Declare.
9977 (reinsert_breakpoint): Delete declaration.
9978 (reinsert_breakpoints_at): Declare.
9979 (uninsert_breakpoint): Delete declaration.
9980 (uninsert_breakpoints_at): Declare.
9981 (check_breakpoints): Adjust prototype.
9982 * server.h: Adjust include order.
9983 (struct thread_info): Declare here. Add a `last_status' field.
9985 2010-03-23 Michael Snyder <msnyder@vmware.com>
9987 * server.c (crc32): New function.
9988 (handle_query): Add handling for 'qCRC:' request.
9990 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9992 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9993 lwp had been stopped by a watchpoint.
9995 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9997 * server.h (internal_error): Declare.
9998 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9999 * utils.c (internal_error): New function.
10001 2010-03-15 Andreas Schwab <schwab@redhat.com>
10003 * configure.srv: Fix typo setting srv_regobj.
10005 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10007 * linux-low.c (fetch_register): Avoid passing a non string literal
10009 (usr_store_inferior_registers): Ditto.
10011 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10013 * linux-low.c (linux_write_memory): Bail out early if peeking
10016 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10018 * linux-low.h (struct lwp_info): New fields
10019 `stopped_by_watchpoint' and `stopped_data_address'.
10020 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10021 here, and cache them in the lwp object.
10022 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10024 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10026 (linux_stopped_by_watchpoint): Rewrite.
10027 (linux_stopped_data_address): Rewrite.
10029 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10031 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10032 switching the current inferior, not before.
10034 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10036 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10037 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10038 i386-linux.c and amd64-linux.c.
10039 (reg-i386.o): Removed.
10040 (reg-i386.c): Likewise.
10041 (reg-i386-linux.o): Likewise.
10042 (reg-i386-linux.c): Likewise.
10043 (reg-x86-64.o): Likewise.
10044 (reg-x86-64.c): Likewise.
10045 (reg-x86-64-linux.o): Likewise.
10046 (reg-x86-64-linux.c): Likewise.
10048 (i386.c): Likewise.
10049 (i386-linux.o): Likewise.
10050 (i386-linux.c): Likewise.
10051 (amd64.o): Likewise.
10052 (amd64.c): Likewise.
10053 (amd64-linux.o): Likewise.
10054 (amd64-linux.c): Likewise.
10056 * configure.srv (srv_i386_regobj): New.
10057 (srv_i386_linux_regobj): Likewise.
10058 (srv_amd64_regobj): Likewise.
10059 (srv_amd64_linux_regobj): Likewise.
10060 (srv_i386_32bit_xmlfiles): Likewise.
10061 (srv_i386_64bit_xmlfiles): Likewise.
10062 (srv_i386_xmlfiles): Likewise.
10063 (srv_amd64_xmlfiles): Likewise.
10064 (srv_i386_linux_xmlfiles): Likewise.
10065 (srv_amd64_linux_xmlfiles): Likewise.
10066 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10067 srv_xmlfiles to $srv_i386_xmlfiles.
10068 (i[34567]86-*-mingw32ce*): Likewise.
10069 (i[34567]86-*-mingw*): Likewise.
10070 (i[34567]86-*-nto*): Likewise.
10071 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10072 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10073 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10074 (x86_64-*-linux*): Likewise.
10076 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10077 (init_registers_amd64_linux): New.
10078 (x86_arch_setup): Replace init_registers_x86_64_linux with
10079 init_registers_amd64_linux.
10081 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10083 * configure.ac: Check for libdl. If it is not available link against
10084 static libthread_db.
10085 * configure: Regenerate.
10087 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10091 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10092 handing a read watchpoint.
10093 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10095 2010-02-12 Doug Evans <dje@google.com>
10097 * linux-low.c (linux_supports_tracefork_flag): Document.
10098 (linux_look_up_symbols): Add comment.
10100 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10102 * regcache.c (supply_register): Clear regcache if buf is NULL.
10104 2010-02-02 Nicolas Roche <roche@sourceware.org>
10105 Joel Brobecker <brobecker@adacore.com>
10107 * inferiors.c (find_inferior): Add function documentation.
10108 (unloaded_dll): Handle the case where the unloaded dll has not
10109 been previously registered in the dll list.
10111 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10113 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10114 (thumb2_breakpoint): New.
10115 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10117 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10119 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10120 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10123 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10125 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10127 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10129 * linux-s390-low.c (s390_collect_ptrace_register)
10130 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10132 2010-01-21 Doug Evans <dje@google.com>
10134 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10135 (PTRACE_ARG4_TYPE): New macro.
10136 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10137 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10138 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10139 (usr_store_inferior_registers): Ditto.
10140 (linux_read_memory, linux_write_memory): Ditto.
10141 (linux_test_for_tracefork): Ditto.
10143 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10144 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10146 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10148 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10151 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10153 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10154 prototype to take a regcache. Adjust.
10156 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10158 * regcache.h (struct thread_info): Forward declare.
10159 (struct regcache): New.
10160 (new_register_cache): Adjust prototype.
10161 (get_thread_regcache): Declare.
10162 (free_register_cache): Adjust prototype.
10163 (registers_to_string, registers_from_string): Ditto.
10164 (supply_register, supply_register_by_name, collect_register)
10165 (collect_register_as_string, collect_register_by_name): Ditto.
10166 * regcache.c (struct inferior_regcache_data): Delete.
10167 (get_regcache): Rename to ...
10168 (get_thread_regcache): ... this. Adjust. Switch inferior before
10169 fetching registers.
10170 (regcache_invalidate_one): Adjust.
10171 (regcache_invalidate): Fix prototype.
10172 (new_register_cache): Return the new register cache.
10173 (free_register_cache): Change prototype.
10174 (realloc_register_cache): Adjust.
10175 (registers_to_string): Change prototype to take a regcache. Adjust.
10176 (registers_from_string): Ditto.
10177 (register_data): Ditto.
10178 (supply_register): Ditto.
10179 (supply_register_by_name): Ditto.
10180 (collect_register): Ditto.
10181 (collect_register_as_string): Ditto.
10182 (collect_register_by_name): Ditto.
10183 * server.c (process_serial_event): Adjust.
10184 * linux-low.h (regset_fill_func, regset_store_func): Change
10186 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10188 * linux-low.c (get_stop_pc): Adjust.
10189 (check_removed_breakpoint): Adjust.
10190 (linux_wait_for_event): Adjust.
10191 (linux_resume_one_lwp): Adjust.
10192 (fetch_register): Add regcache parameter. Adjust.
10193 (usr_store_inferior_registers): Ditto.
10194 (regsets_fetch_inferior_registers): Ditto.
10195 (regsets_store_inferior_registers): Ditto.
10196 (linux_fetch_registers, linux_store_registers): Ditto.
10197 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10199 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10201 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10202 prototype to take a regcache.
10203 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10204 * remote-utils.c (convert_ascii_to_int, outreg)
10205 (prepare_resume_reply): Change prototype to take a regcache.
10207 * target.h (struct target_ops) <fetch_registers, store_registers>:
10208 Change prototype to take a regcache.
10209 (fetch_inferior_registers, store_inferior_registers): Change
10210 prototype to take a regcache. Adjust.
10211 * proc-service.c (ps_lgetregs): Adjust.
10212 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10213 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10214 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10215 take a regcache. Adjust.
10216 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10217 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10218 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10219 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10220 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10221 (cris_cannot_fetch_register):
10222 (cris_breakpoint_at): Change prototype to take a regcache.
10224 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10225 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10226 to take a regcache. Adjust.
10227 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10229 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10230 take a regcache. Adjust.
10231 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10232 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10233 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10234 * linux-mips-low.c (mips_get_pc):
10235 (mips_set_pc): Change prototype to take a regcache. Adjust.
10236 (mips_reinsert_addr): Adjust.
10237 (mips_collect_register): Change prototype to take a regcache.
10239 (mips_supply_register):
10240 (mips_collect_register_32bit, mips_supply_register_32bit)
10241 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10242 (mips_store_fpregset): Ditto.
10243 * linux-ppc-low.c (ppc_supply_ptrace_register)
10244 (ppc_supply_ptrace_register): Ditto.
10245 (parse_spufs_run): Adjust.
10246 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10247 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10248 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10249 take a regcache. Adjust.
10250 * linux-s390-low.c (s390_collect_ptrace_register)
10251 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10252 (s390_set_pc): Change prototype to take a regcache. Adjust.
10253 (s390_arch_setup): Adjust.
10254 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10255 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10256 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10257 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10258 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10260 (sparc_breakpoint_at): Adjust.
10261 * linux-xtensa-low.c (xtensa_fill_gregset):
10262 (xtensa_store_gregset):
10263 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10264 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10265 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10266 prototype to take a regcache. Adjust.
10267 * win32-arm-low.c (arm_fetch_inferior_register)
10268 (arm_store_inferior_register): Change prototype to take a
10270 * win32-i386-low.c (i386_fetch_inferior_register)
10271 (i386_store_inferior_register): Change prototype to take a
10273 * win32-low.c (child_fetch_inferior_registers)
10274 (child_store_inferior_registers): Change prototype to take a
10276 (win32_wait): Adjust.
10277 (win32_fetch_inferior_registers): Change prototype to take a
10279 (win32_store_inferior_registers): Adjust.
10280 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10281 store_inferior_register>: Change prototype to take a regcache.
10283 2010-01-20 Doug Evans <dje@google.com>
10285 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10287 (linux_wait_for_event1, linux_init_signals): Ditto.
10288 (W_STOPCODE): Provide definition if missing.
10290 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10292 * linux-low.c (linux_core_of_thread): New.
10293 (compare_ints, show_process, list_threads): New.
10294 (linux_qxfer_osdata): Report threads and cores.
10295 (linux_target_op): Register linux_core_of_thread.
10296 * remote-utils.c (prepare_resume_reply): Report the core.
10297 (buffer_xml_printf): Support %d specifier.
10298 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10300 (handle_query): Handle qXfer:threads. Announce availability
10302 * target.h (struct target_ops): New field core_of_thread.
10304 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10306 * Makefile.in (clean): Remove new generated files.
10307 (reg-s390.o, reg-s390.c): Remove rules.
10308 (reg-s390x.o, reg-s390x.c): Likewise.
10309 (s390-linux32.o, s390-linux32.c): Add rules.
10310 (s390-linux64.o, s390-linux64.c): Likewise.
10311 (s390x-linux64.o, s390x-linux64.c): Likewise.
10312 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10313 * linux-s390-low.c: Include <elf.h>.
10314 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10315 (init_registers_s390): Remove prototype.
10316 (init_registers_s390x): Likewise.
10317 (init_registers_s390_linux32): Add prototype.
10318 (init_registers_s390_linux64): Likewise.
10319 (init_registers_s390x_linux64): Likewise.
10320 (s390_num_regs_3264): New define.
10321 (s390_regmap_3264): New global variable.
10322 (s390_cannot_fetch_register): Remove obsolete check.
10323 (s390_cannot_store_register): Likewise.
10324 (s390_collect_ptrace_register): Handle upper/lower register halves.
10325 (s390_supply_ptrace_register): Likewise.
10326 (s390_fill_gregset): Update to register number changes.
10327 (s390_get_hwcap): New routine.
10328 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10329 Install appropriate regmap and register set.
10331 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10333 * server.c (gdbserver_version): Update copyright year to 2010.
10334 * gdbreplay.c (gdbreplay_version): Likewise.
10336 2009-12-28 Doug Evans <dje@google.com>
10338 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10339 elf/external.h. Include <elf.h> instead but only if necessary.
10341 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10343 * linux-low.c (linux_remove_process): Remove `detaching'
10344 parameter. Don't release/detach from thread_db here.
10345 (linux_kill): Release/detach from thread_db here, ...
10346 (linux_detach): ... and here, before actually detaching.
10347 (linux_wait_1): ... and here, when a process exits.
10348 * thread-db.c (any_thread_of): New.
10349 (thread_db_free): Switch the current inferior to a thread of the
10352 2009-12-21 Doug Evans <dje@google.com>
10354 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10356 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10357 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10358 warning ifndef __NR_tkill. Move setting of errno there too.
10359 Delete unnecessary resetting of errno after syscall.
10360 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10362 * configure.ac: Check for dladdr.
10363 * config.in: Regenerate.
10364 * configure: Regenerate.
10365 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10366 (try_thread_db_load): Update.
10368 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10370 2009-12-18 Doug Evans <dje@google.com>
10372 * event-loop.c: Include unistd.h if it exists.
10374 * linux-low.c (my_waitpid): Move definition away from being in
10375 between linux_tracefork_child/linux_test_for_tracefork.
10377 * gdb_proc_service.h (psaddr_t): Fix type.
10378 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10379 signature to match glibc.
10381 2009-12-16 Doug Evans <dje@google.com>
10383 * linux-low.c (linux_read_memory): Fix argument to read.
10385 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10387 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10388 events, don't leave current_inferior pointing at null.
10390 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10392 * win32-low.c (LOG): Delete.
10393 (OUTMSG): Output to stderr.
10394 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10395 on compile time LOG macro.
10396 (win32_wait): Fix debug output.
10398 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10400 * win32-low.c (win32_add_one_solib): If the dll name is
10401 "ntdll.dll", prepend the system directory to the dll path.
10403 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10405 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10407 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10408 Vladimir Prus <vladimir@codesourcery.com>
10410 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10411 * configure.ac: Check for __mcoldfire__ and set
10412 gdb_cv_m68k_is_coldfire.
10413 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10414 reg-cf.o and reg-m68k.o.
10415 * configure: Regenerated.
10417 2009-11-16 Pedro Alves <pedro@codesourcery.com>
10419 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10420 Pass it to thread_db_free.
10421 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10422 proper `detaching' argument to linux_remove_process.
10423 * linux-low.h (thread_db_free): Add `detaching' parameter.
10424 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10426 (thread_db_free): Add `detaching' parameter. Only
10427 call td_ta_clear_event if detaching from process.
10429 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10431 * thread-db.c (thread_db_free): Fix typo.
10433 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10436 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10438 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10440 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10441 with an i686 compiler.
10442 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10444 * configure: Rebuilt.
10446 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10450 * server.c (handle_search_memory_1): Correct read_addr initialization
10451 in loop for searching subsequent chunks.
10453 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10455 * configure.ac: New --with-libthread-db option.
10456 * thread-db.c: Allow direct dependence on libthread_db.
10457 (thread_db_free): Adjust.
10458 * config.in: Regenerate.
10459 * configure: Likewise.
10461 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10464 * thread-db.c (attach_thread): New function.
10465 (maybe_attach_thread): Return success/failure.
10466 (find_new_threads_callback): Adjust.
10467 (thread_db_find_new_threads): Loop until no new threads.
10469 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10471 * proc-service.c (ps_lgetregs): Formatting.
10473 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10475 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10476 * configure.ac: Adjust.
10477 * linux-low.h (struct process_info_private): Move members to struct
10479 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10480 * linux-low.c (linux_remove_process): Adjust.
10481 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10482 * server.c (handle_query): Move code ...
10483 (handle_monitor_command): ... here. New function.
10484 * target.h (struct target_ops): New member.
10485 * thread-db.c (struct thread_db): New.
10486 (libthread_db_search_path): New variable.
10487 (thread_db_create_event, thread_db_enable_reporting)
10488 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10489 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10490 (try_thread_db_load_1, dladdr_to_soname): New functions.
10491 (try_thread_db_load, thread_db_load_search): New functions.
10492 (thread_db_init): Search for libthread_db.
10493 (thread_db_free): New function.
10494 (thread_db_handle_monitor_command): Likewise.
10495 * config.in: Regenerate.
10496 * configure: Regenerate.
10498 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10500 * spu-low.c (spu_kill): Wait for inferior to terminate.
10501 Call clear_inferiors.
10502 (spu_detach): Call clear_inferiors.
10504 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10506 * aclocal.m4: Regenerate.
10507 * config.in: Likewise.
10508 * configure: Likewise.
10510 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10512 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10513 (parse_spufs_run): New function.
10514 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10515 (ppc_breakpoint_at): Handle SPU breakpoints.
10517 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10519 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10520 (SPUFS_MAGIC): Define.
10521 (spu_enumerate_spu_ids): New function.
10522 (linux_qxfer_spu): New function.
10523 (linux_target_ops): Install linux_qxfer_spu.
10525 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10527 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10528 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10529 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10530 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10531 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10532 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10533 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10534 (init_registers_powerpc_cell32l): Add prototype.
10535 (init_registers_powerpc_cell64l): Likewise.
10536 (ppc_arch_setup): Detect Cell/B.E. architecture.
10538 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10540 * Makefile.in (datarootdir): New variable.
10542 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10544 * linux-low.c (linux_write_memory): Update debugging output.
10545 * Makefile.in (clean): Add new descriptions.
10546 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10547 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10548 * configure.srv: Add new files for arm*-*-linux*.
10549 * linux-arm-low.c: Add new declarations.
10550 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10551 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10552 (HWCAP_VFPv3D16): New.
10553 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10554 instead of __IWMMXT__.
10555 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10556 (arm_arch_setup): New.
10557 (target_regsets): Remove #ifdef. Add VFP regset.
10558 (the_low_target): Use arm_arch_setup.
10560 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10562 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10563 the main thread again.
10565 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10567 Adding Neutrino gdbserver.
10568 * configure: Regenerated.
10569 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10570 * configure.srv (i[34567]86-*-nto*): New target.
10571 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10572 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10573 (nto_comctrl) [__QNX__]: New function.
10574 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10576 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10578 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10581 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10582 Pedro Alves <pedro@codesourcery.com>
10584 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10585 don't support CONTEXT_EXTENDED_REGISTERS.
10586 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10587 (the_low_target): Install them.
10588 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10589 failing with ERROR_PIPE_NOT_CONNECTED.
10591 2009-06-30 Doug Evans <dje@google.com>
10592 Pierre Muller <muller@ics.u-strasbg.fr>
10594 Add h/w watchpoint support to x86-linux, win32-i386.
10595 * Makefile.in (SFILES): Add i386-low.c
10596 (i386_low_h): Define.
10597 (i386-low.o): Add dependencies.
10598 (linux-x86-low.o): Add i386-low.h dependency.
10599 (win32-i386-low.o): Ditto.
10600 * i386-low.c: New file.
10601 * i386-low.h: New file.
10602 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10603 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10604 * linux-low.c (linux_add_process): Initialize arch_private.
10605 (linux_remove_process): Free arch_private.
10606 (add_lwp): Initialize arch_private.
10607 (delete_lwp): Free arch_private.
10608 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10610 * linux-low.h (process_info_private): New member arch_private.
10611 (lwp_info): New member arch_private.
10612 (linux_target_ops): New members new_process, new_thread,
10614 (ptid_of): New macro.
10615 * linux-x86-low.c: Include stddef.h, i386-low.h.
10616 (arch_process_info): New struct.
10617 (arch_lwp_info): New struct.
10618 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10619 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10620 (i386_dr_low_get_status): New function.
10621 (x86_insert_point, x86_remove_point): New functions.
10622 (x86_stopped_by_watchpoint): New function.
10623 (x86_stopped_data_address): New function.
10624 (x86_linux_new_process, x86_linux_new_thread): New functions.
10625 (x86_linux_prepare_to_resume): New function.
10626 (the_low_target): Add entries for insert_point, remove_point,
10627 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10629 * server.c (debug_hw_points): New global.
10630 (monitor_show_help): Document set debug-hw-points.
10631 (handle_query): Process "set debug-hw-points".
10632 * server.h (debug_hw_points): Declare.
10633 (paddress): Declare.
10634 * utils.c (NUMCELLS, CELLSIZE): New macros.
10635 (get_sell, xsnprintf, paddress): New functions.
10636 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10637 remove_point, stopped_by_watchpoint, stopped_data_address.
10638 * win32-i386-low.c: Include i386-low.h.
10639 (debug_reg_state): Replaces dr.
10640 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10641 (i386_dr_low_get_status): New function.
10642 (i386_insert_point, i386_remove_point): New functions.
10643 (i386_stopped_by_watchpoint): New function.
10644 (i386_stopped_data_address): New function.
10645 (i386_initial_stuff): Update.
10646 (get_thread_context,set_thread_context,i386_thread_added): Update.
10647 (the_low_target): Add entries for insert_point,
10648 remove_point, stopped_by_watchpoint, stopped_data_address.
10649 * win32-low.c (win32_insert_watchpoint): New function.
10650 (win32_remove_watchpoint): New function.
10651 (win32_stopped_by_watchpoint): New function.
10652 (win32_stopped_data_address): New function.
10653 (win32_target_ops): Add entries for insert_watchpoint,
10654 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10655 * win32-low.h (win32_target_ops): New members insert_point,
10656 remove_point, stopped_by_watchpoint, stopped_data_address.
10658 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10660 * server.c (process_serial_event): Re-return unsupported, not
10661 error, if the type isn't recognized. Re-allow supporting only
10662 insert or remove packets. Also call require_running for
10663 breakpoints. Add missing break statement to default case. Tidy.
10664 * target.h (struct target_ops): Rename insert_watchpoint to
10665 insert_point, and remove_watchpoint to remove_point.
10667 * linux-low.h (struct linux_target_ops): Likewise.
10668 * linux-low.c (linux_insert_watchpoint): Rename to ...
10669 (linux_insert_point): ... this. Adjust.
10670 (linux_remove_watchpoint): Rename to ...
10671 (linux_remove_point): ... this. Adjust.
10672 (linux_target_ops): Adjust.
10673 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10674 (cris_insert_point): ... this.
10675 (cris_remove_watchpoint): Rename to ...
10676 (cris_remove_point): ... this.
10677 (the_low_target): Adjust.
10679 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10681 * server.c (handle_v_kill): Pass signal_pid to
10682 kill_inferior if multi_process is zero.
10684 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10686 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10687 * target.h (target_ops): Comment for *_watchpoint to make it clear
10688 the functions can get types '0' and '1'.
10690 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10692 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10693 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10694 * regcache.c (get_regcache): Likewise.
10695 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10696 * win32-low.c (child_fetch_inferior_registers): Remove check for
10699 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10700 Pedro Alves <pedro@codesourcery.com>
10702 * target.h (struct target_ops) <supports_multi_process>: New
10704 (target_supports_multi_process): New.
10705 * server.c (handle_query): Even if GDB reports support, only
10706 enable multi-process if the target also supports it. Report
10707 multi-process support only if the target backend supports it.
10708 * linux-low.c (linux_supports_multi_process): New function.
10709 (linux_target_ops): Install it as target_supports_multi_process
10712 2009-05-24 Doug Evans <dje@google.com>
10714 Global renaming of find_thread_pid to find_thread_ptid.
10715 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10716 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10717 All callers updated.
10719 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10720 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10723 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10724 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10725 (linux_resume_one_lwp): Ditto.
10727 2009-05-23 Doug Evans <dje@google.com>
10729 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10730 from struct inferior_list_entry * to struct lwp_info *.
10731 All callers updated.
10733 2009-05-13 Doug Evans <dje@google.com>
10735 * linux-x86-low.c: Don't include assert.h.
10736 (x86_siginfo_fixup): Use fatal, not assert.
10737 (x86_arch_setup): Fix comment.
10739 2009-05-12 Doug Evans <dje@google.com>
10741 Biarch support for i386/amd64 gdbserver.
10742 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10743 Add linux-x86-low.c.
10744 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10745 (linux-x86-low.o): Add.
10746 * linux-x86-64-low.c: Delete.
10747 * linux-i386-low.c: Delete.
10748 * linux-x86-low.c: New file.
10749 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10751 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10753 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10754 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10755 (linux_child_pid_to_exec_file): New function.
10756 (elf_64_header_p, elf_64_file_p): New functions.
10757 (siginfo_fixup): New function.
10758 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10759 give target a chance to convert layout.
10760 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10761 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10763 2009-05-07 Doug Evans <dje@google.com>
10765 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10766 (regsets_store_inferior_registers): Ditto.
10768 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10772 * linux-low.c (must_set_ptrace_flags): Delete.
10773 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10775 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10776 `lwp->must_set_ptrace_flags' instead.
10777 (linux_wait_for_event_1): Set ptrace options here.
10778 (linux_wait_1): ... not here.
10780 2009-04-30 Doug Evans <dje@google.com>
10782 * inferiors.c (started_inferior_callback): New function.
10783 (attached_inferior_callback): New function.
10784 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10785 * server.c (print_started_pid, print_attached_pid): New functions.
10786 (detach_or_kill_for_exit): New function.
10787 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10788 * server.h (have_started_inferiors_p): Declare.
10789 (have_attached_inferiors_p): Declare.
10791 * inferiors.c (remove_process): Fix memory leak, free process.
10792 * linux-low.c (linux_remove_process): New function.
10793 (linux_kill): Call it instead of remove_process.
10794 (linux_detach, linux_wait_1): Ditto.
10796 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10798 * configure.srv: Add x86 Windows CE target.
10800 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10802 * inferiors.c (get_thread_process): Make global.
10803 * server.h (get_thread_process): Add prototype.
10804 * thread-db.c (find_one_thread): Use get_thread_process
10805 instead of current_process.
10806 (thread_db_get_tls_address): Do not crash if called when
10807 thread layer is not yet initialized.
10809 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10811 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10812 * spu-low.c (current_tid): Rename to ...
10813 (current_ptid): ... this.
10814 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10815 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10816 ptid_get_lwp (current_ptid) instead of current_tid.
10817 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10818 instead of current_tid. Use find_process_pid to verify pid
10819 argument is valid. Pass proper argument to remove_process.
10820 (spu_thread_alive): Compare current_ptid instead of current_tid.
10821 (spu_resume): Likewise.
10823 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10825 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10828 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10830 Implement the multiprocess extensions, and add linux multiprocess
10833 * server.h (ULONGEST): Declare.
10834 (struct ptid, ptid_t): New.
10835 (minus_one_ptid, null_ptid): Declare.
10836 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10837 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10838 (struct inferior_list_entry): Change `id' type from unsigned from
10840 (struct sym_cache, struct breakpoint, struct
10841 process_info_private): Forward declare.
10842 (struct process_info): Declare.
10843 (current_process): Declare.
10844 (all_processes): Declare.
10845 (initialize_inferiors): Declare.
10846 (add_thread): Adjust to use ptid_t.
10847 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10848 (add_process, remove_process, find_thread_pid): Declare.
10849 (find_inferior_id): Adjust to use ptid_t.
10850 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10851 (multi_process): Declare.
10852 (push_event): Adjust to use ptid_t.
10853 (read_ptid, write_ptid): Declare.
10854 (prepare_resume_reply): Adjust to use ptid_t.
10855 (clear_symbol_cache): Declare.
10856 * inferiors.c (all_processes): New.
10857 (null_ptid, minus_one_ptid): New.
10858 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10859 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10860 (add_thread): Change unsigned long to ptid. Remove gdb_id
10862 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10863 (gdb_id_to_thread): Rename to ...
10864 (find_thread_pid): ... this. Change unsigned long to ptid.
10865 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10866 (loaded_dll, pull_pid_from_list): Adjust.
10867 (add_process, remove_process, find_process_pid)
10868 (get_thread_process, current_process, initialize_inferiors): New.
10869 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10870 (struct target_waitstatus) <related_pid>: Ditto.
10871 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10872 return type to int.
10873 (struct target_ops) <join>: Add `pid' argument.
10874 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10875 (struct target_ops) <wait>: Add `ptid' field. Change return type
10877 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10878 (mywait): Add `ptid' argument. Change return type to ptid_t.
10879 (target_pid_to_str): Declare.
10880 * target.c (set_desired_inferior): Adjust to use ptids.
10881 (mywait): Add new `ptid' argument. Adjust.
10882 (target_pid_to_str): New.
10883 * mem-break.h (free_all_breakpoints): Declare.
10884 * mem-break.c (breakpoints): Delelete.
10885 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10886 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10887 to use per-process breakpoint list.
10888 (free_all_breakpoints): New.
10889 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10890 (symbol_cache, all_symbols_looked_up): Delete.
10892 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10894 (prepare_resume_reply): Change ptid argument's type from unsigned
10895 long to ptid_t. Adjust. Implement W;process and X;process.
10896 (free_sym_cache, clear_symbol_cache): New.
10897 (look_up_one_symbol): Adjust to per-process symbol cache. *
10898 * server.c (cont_thread, general_thread, step_thread): Change type
10900 (attached): Delete.
10901 (multi_process): New.
10902 (last_ptid): Change type to ptid_t.
10903 (struct vstop_notif) <ptid>: Change type to ptid_t.
10904 (queue_stop_reply, push_event): Change `ptid' argument's type to
10906 (discard_queued_stop_replies): Add `pid' argument.
10907 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10908 changes. Don't reference the `attached' global.
10909 (attach_inferior): Adjust to mywait interface changes.
10910 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10911 features. Handle and report "multiprocess+". Handle
10913 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10915 (handle_v_kill): New.
10916 (handle_v_stopped): Adjust to use target_pid_to_str.
10917 (handle_v_requests): Allow multiple attaches and runs when
10918 multiprocess extensions are in effect. Handle "vKill".
10919 (myresume): Adjust to use ptids.
10920 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10921 (handle_status): Adjust to discard_queued_stop_replies interface
10923 (first_thread_of, kill_inferior_callback)
10924 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10925 (main): Call initialize_inferiors. Adjust to use ptids, killing
10926 and detaching from all inferiors. Handle multiprocess packet
10928 * linux-low.h: Include gdb_proc_service.h.
10929 (struct process_info_private): New.
10930 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10931 <lwpid_of>: Use ptid_get_lwp.
10932 (get_lwp_thread): Adjust.
10933 (struct lwp_info): Add `dead' member.
10934 (find_lwp_pid): Declare.
10935 * linux-low.c (thread_db_active): Delete.
10936 (new_inferior): Adjust comment.
10937 (inferior_pid): Delete.
10938 (linux_add_process): New.
10939 (handle_extended_wait): Adjust.
10940 (add_lwp): Change unsigned long to ptid.
10941 (linux_create_inferior): Add process to processes table. Adjust
10942 to use ptids. Don't set new_inferior here.
10943 (linux_attach_lwp): Rename to ...
10944 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10945 it. Adjust to use ptids.
10946 (linux_attach_lwp): New.
10947 (linux_attach): Add process to processes table. Don't set
10949 (struct counter): New.
10950 (second_thread_of_pid_p, last_thread_of_process_p): New.
10951 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10952 multiple processes.
10953 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10954 processes. Remove process from process table.
10955 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10956 to multiple processes.
10957 (any_thread_of): New.
10958 (linux_detach): Add `pid' argument, and handle it. Remove process
10959 from processes table.
10960 (linux_join): Add `pid' argument. Handle it.
10961 (linux_thread_alive): Change unsighed long argument to ptid_t.
10962 Consider dead lwps as not being alive.
10963 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10964 threads we're not interested in.
10965 (same_lwp, find_lwp_pid): New.
10966 (linux_wait_for_lwp): Change `pid' argument's type from int to
10968 (linux_wait_for_event): Rename to ...
10969 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10970 from int to ptid_t. Adjust.
10971 (linux_wait_for_event): New.
10972 (linux_wait_1): Add `ptid' argument. Change return type to
10973 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10974 that exit from the process table.
10975 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10977 (mark_lwp_dead): New.
10978 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10979 stopping all threads, mark its main lwp as dead.
10980 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10982 (fetch_register, usr_store_inferior_registers)
10983 (regsets_fetch_inferior_registers)
10984 (regsets_store_inferior_registers, linux_read_memory)
10985 (linux_write_memory): Inline `inferior_pid'.
10986 (linux_look_up_symbols): Adjust to use per-process
10987 `thread_db_active'.
10988 (linux_request_interrupt): Adjust to use ptids.
10989 (linux_read_auxv): Inline `inferior_pid'.
10990 (initialize_low): Don't reference thread_db_active.
10991 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10992 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10993 (ps_getpid): Return the pid of the current inferior.
10994 * thread-db.c (proc_handle, thread_agent): Delete.
10995 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10997 (find_one_thread): Change argument type to ptid_t. Adjust to
10999 (maybe_attach_thread): Adjust to per-process data and ptids.
11000 (thread_db_find_new_threads): Ditto.
11001 (thread_db_init): Ditto.
11002 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11003 processes table. Adjust to use ptids.
11004 (spu_kill, spu_detach): Adjust interface. Remove process from
11006 (spu_join, spu_thread_alive): Adjust interface.
11007 (spu_wait): Adjust interface. Remove process from processes
11008 table. Adjust to use ptids.
11009 * win32-low.c (current_inferior_tid): Delete.
11010 (current_inferior_ptid): New.
11011 (debug_event_ptid): New.
11012 (thread_rec): Take a ptid. Adjust.
11013 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11014 (child_delete_thread): Ditto.
11015 (do_initial_child_stuff): Add `attached' argument. Add process to
11017 (child_fetch_inferior_registers, child_store_inferior_registers):
11019 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11020 (win32_attach): Pass 1 to do_initial_child_stuff.
11021 (win32_kill): Adjust interface. Remove process from processes
11023 (win32_detach): Ditto.
11024 (win32_join): Adjust interface.
11025 (win32_thread_alive): Take a ptid.
11026 (win32_resume): Adjust to use ptids.
11027 (get_child_debug_event): Ditto.
11028 (win32_wait): Adjust interface. Remove exiting process from
11031 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11033 Non-stop mode support.
11035 * server.h (non_stop): Declare.
11036 (gdb_client_data, handler_func): Declare.
11037 (delete_file_handler, add_file_handler, start_event_loop):
11039 (handle_serial_event, handle_target_event, push_event)
11040 (putpkt_notif): Declare.
11041 * target.h (enum resume_kind): New.
11042 (struct thread_resume): Replace `step' field by `kind' field.
11043 (TARGET_WNOHANG): Define.
11044 (struct target_ops) <wait>: Add `options' argument.
11045 <supports_non_stop, async, start_non_stop>: New fields.
11046 (target_supports_non_stop, target_async): New.
11047 (start_non_stop): Declare.
11048 (mywait): Add `options' argument.
11049 * target.c (mywait): Add `options' argument. Print child exit
11050 notifications here.
11051 (start_non_stop): New.
11052 * server.c (non_stop, own_buf, mem_buf): New globals.
11053 (struct vstop_notif): New.
11054 (notif_queue): New global.
11055 (queue_stop_reply, push_event, discard_queued_stop_replies)
11056 (send_next_stop_reply): New.
11057 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11059 (attach_inferior): In non-stop mode, don't wait for the target
11061 (handle_general_set): Handle QNonStop.
11062 (handle_query): When handling qC, return the current general
11063 thread, instead of the first thread of the list.
11064 (handle_query): If the backend supports non-stop mode, include
11065 QNonStop+ in the qSupported query response.
11066 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11068 (handle_v_attach, handle_v_run): Handle non-stop mode.
11069 (handle_v_stopped): New.
11070 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11071 (myresume): Adjust to use resume_kind. Handle non-stop.
11072 (queue_stop_reply_callback): New.
11073 (handle_status): Handle non-stop mode.
11074 (main): Clear non_stop flag on reconnection. Use the event-loop.
11075 Refactor serial protocol handling from here ...
11076 (process_serial_event): ... to this new function. When GDB
11077 selects any thread, select one here. In non-stop mode, wait until
11078 GDB acks all pending events before exiting.
11079 (handle_serial_event, handle_target_event): New.
11080 * remote-utils.c (remote_open): Install remote_desc in the event
11082 (remote_close): Remove remote_desc from the event loop.
11083 (putpkt_binary): Rename to...
11084 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11085 (putpkt_binary): New as wrapper around putpkt_binary_1.
11086 (putpkt_notif): New.
11087 (prepare_resume_reply): In non-stop mode, don't change the
11089 * event-loop.c: New.
11090 * Makefile.in (OBJ): Add event-loop.o.
11091 (event-loop.o): New rule.
11093 * linux-low.h (pid_of): Moved here.
11095 (get_lwp_thread): Use lwpid_of.
11096 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11097 * linux-low.c (pid_of): Delete.
11098 (inferior_pid): Use lwpid_of.
11099 (linux_event_pipe): New.
11100 (target_is_async_p): New.
11102 (handle_extended_wait): Use lwpid_of.
11103 (add_lwp): Don't set lwpid field.
11104 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11105 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11106 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11107 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11108 first. Adjust to linux_wait_for_event interface changes. Use
11110 (linux_detach): Don't delete the main lwp here.
11111 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11112 (status_pending_p): Don't consider explicitly suspended lwps.
11113 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11114 pointer. Add OPTIONS argument. Change return type to int. Use
11115 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11116 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11117 pointer. Add status pointer argument. Return a pid instead of a
11118 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11119 changes. In non-stop mode, don't switch to a random thread.
11120 (linux_wait): Rename to...
11121 (linux_wait_1): ... this. Add target_options argument, and handle
11122 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11123 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11124 clean exit and signal exit code. Don't stop all threads in
11125 non-stop mode. In all-stop mode, only stop all threads when
11126 reporting a stop to GDB. Handle explicit thread stop requests.
11127 (async_file_flush, async_file_mark): New.
11129 (send_sigstop): Use lwpid_of.
11130 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11131 interface changes. In non-stop mode, don't switch to a random
11133 (linux_resume_one_lwp): Use lwpid_of.
11134 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11135 (linux_resume_one_thread): ... this. Handle resume_stop. In
11136 non-stop mode, don't look for pending flag in all threads.
11137 (resume_status_pending_p): Don't consider explicitly suspended
11139 (my_waitpid): Reimplement. Emulate __WALL.
11140 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11142 (sigchld_handler, linux_supports_non_stop, linux_async)
11143 (linux_start_non_stop): New.
11144 (linux_target_ops): Register linux_supports_non_stop, linux_async
11145 and linux_start_non_stop.
11146 (initialize_low): Install SIGCHLD handler.
11147 * thread-db.c (thread_db_create_event, find_one_thread)
11148 (thread_db_get_tls_address): Use lwpid_of.
11149 * win32-low.c (win32_detach): Adjust to use resume_kind.
11150 (win32_wait): Add `options' argument.
11151 * spu-low.c (spu_resume): Adjust to use resume_kind.
11152 (spu_wait): Add `options' argument.
11154 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11156 Decouple target code from remote protocol.
11158 * target.h (enum target_waitkind): New.
11159 (struct target_waitstatus): New.
11160 (struct target_ops) <wait>: Return an unsigned long. Take a
11161 target_waitstatus pointer instead of a char pointer.
11162 (mywait): Likewise.
11163 * target.c (mywait): Change prototype to return an unsigned long.
11164 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11165 * server.h (thread_from_wait, old_thread_from_wait): Delete
11167 (prepare_resume_reply): Change prototype to take a
11169 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11170 (last_status, last_ptid): New.
11171 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11172 pid instead of a signal.
11173 (attach_inferior): Remove "status" and "signal" parameters.
11175 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11177 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11178 (handle_v_requests, myresume): Remove "status" and "signal"
11179 parameters. Adjust.
11180 (handle_status): New.
11181 (main): Delete local `status'. Adjust.
11182 * remote-utils.c: Include target.h.
11183 (prepare_resume_reply): Change prototype to take a
11184 target_waitstatus. Adjust.
11186 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11188 * spu-low.c (spu_wait): Adjust.
11189 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11191 (win32_wait): Adjust.
11193 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11195 * target.h (struct thread_resume): Delete leave_stopped member.
11196 (struct target_ops): Add a `n' argument to the `resume' callback.
11197 * server.c (start_inferior): Adjust.
11198 (handle_v_cont, myresume): Adjust.
11199 * linux-low.c (check_removed_breakpoint): Adjust to resume
11200 interface change, and to removed leave_stopped field.
11201 (resume_ptr): Delete.
11202 (struct thread_resume_array): New.
11203 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11204 resume interface change.
11205 (linux_continue_one_thread, linux_queue_one_thread)
11206 (resume_status_pending_p): Check if the resume field is NULL
11207 instead of checking the leave_stopped member.
11208 (linux_resume): Adjust to the target resume interface change.
11209 * spu-low.c (spu_resume): Adjust to the target resume interface
11211 * win32-low.c (win32_detach, win32_resume): Ditto.
11213 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11215 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11217 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11219 (linux_continue_one_thread): Only preserve the stepping flag if
11220 there's a pending breakpoint.
11222 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11224 * server.c (main): After the inferior having exited, call
11225 remote_close before exiting gdbserver.
11227 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11229 Fix size of FPSCR in Power 7 processors.
11230 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11231 (PPC_FEATURE_HAS_DFP): New #define.
11232 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11235 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11237 * server.c (handle_query) Whitespace and formatting.
11239 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11241 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11242 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11243 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11244 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11245 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11246 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11247 Makefile.in, configure.ac: Fix whitespace throughout.
11248 * configure: Regenerate.
11250 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11252 * inferiors.c (find_inferior): Make it safe for the callback
11253 function to delete the currently iterated inferior.
11255 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11257 * Makefile.in (linuw_low_h): Move higher.
11258 (thread-db.o): Depend on $(linux_low_h).
11260 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11262 Rename "process" to "lwp" throughout.
11264 * linux-low.c (all_processes): Rename to...
11265 (all_lwps): ... this.
11266 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11267 (add_process): Rename to ...
11268 (add_lwp): ... this. Adjust.
11269 (linux_create_inferior): Adjust.
11270 (linux_attach_lwp): Adjust.
11271 (linux_attach): Adjust.
11272 (linux_kill_one_process): Rename to ...
11273 (linux_kill_one_lwp): ... this. Adjust.
11274 (linux_kill): Adjust.
11275 (linux_detach_one_process): Rename to ...
11276 (linux_detach_one_lwp): ... this. Adjust.
11277 (linux_detach): Adjust.
11278 (check_removed_breakpoint): Adjust.
11279 (status_pending_p): Adjust.
11280 (linux_wait_for_process): Rename to ...
11281 (linux_wait_for_lwp): ... this. Adjust.
11282 (linux_wait_for_event): Adjust.
11283 (send_sigstop): Adjust.
11284 (wait_for_sigstop): Adjust.
11285 (stop_all_processes): Rename to ...
11286 (stop_all_lwps): ... this.
11287 (linux_resume_one_process): Rename to ...
11288 (linux_resume_one_lwp): ... this. Adjust.
11289 (linux_set_resume_request, linux_continue_one_thread)
11290 (linux_queue_one_thread, resume_status_pending_p)
11291 (usr_store_inferior_registers, regsets_store_inferior_registers)
11292 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11294 * linux-low.h (get_process): Rename to ...
11295 (get_lwp): ... this. Adjust.
11296 (get_thread_process): Rename to ...
11297 (get_thread_lwp): ... this. Adjust.
11298 (get_process_thread): Rename to ...
11299 (get_lwp_thread): ... this. Adjust.
11300 (struct process_info): Rename to ...
11301 (struct lwp_info): ... this.
11302 (all_processes): Rename to ...
11303 (all_lwps): ... this.
11304 * proc-service.c (ps_lgetregs): Adjust.
11305 * thread-db.c (thread_db_create_event, find_one_thread)
11306 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11308 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11310 * server.c (handle_query): Handle "qAttached".
11312 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11314 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11315 GPLv3, update license URL.
11317 2009-03-01 Doug Evans <dje@google.com>
11319 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11320 (server_h): Add gdb_signals.h.
11321 (signals.o): Update.
11322 * server.h (target_signal_from_host,target_signal_to_host_p)
11323 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11325 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11327 * remote-utils.c (getpkt): Also generate remote-debug
11328 information if noack_mode is set.
11330 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11332 * server.c (handle_query): Report qXfer:siginfo:read and
11333 qXfer:siginfo:write as supported and handle them.
11334 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11335 * linux-low.c (linux_xfer_siginfo): New.
11336 (linux_target_ops): Set it.
11338 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11340 * server.c (gdbserver_usage): Mention --remote-debug.
11341 (main): Accept '--remote-debug' switch.
11343 2009-01-18 Doug Evans <dje@google.com>
11345 * regcache.c (new_register_cache): No need to check result of xcalloc.
11346 * server.c (handle_search_memory): Back out calls to xmalloc,
11347 result is checked and error is returned to user upon failure.
11348 (handle_query): Ditto. Add more checks for result of malloc.
11349 (handle_v_cont): Check result of malloc, report error back to
11351 (handle_v_run): Ditto. Call freeargv.
11352 * server.h (freeargv): Declare.
11353 * utils.c (freeargv): New fn.
11355 2009-01-15 Doug Evans <dje@google.com>
11357 * gdbreplay.c (perror_with_name): Make arg const char *.
11358 * server.h (target_signal_to_name): Make return type const char *.
11359 * thread-db.c (thread_db_err_str): Make return type const char *.
11360 * utils.c (perror_with_name): Make arg const char *.
11362 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11364 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11365 when handling a EXIT_PROCESS_DEBUG_EVENT.
11367 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11369 * gdbreplay.c (gdbreplay_version): Update copyright year.
11370 * server.c (gdbserver_version): Likewise.
11372 2009-01-05 Doug Evans <dje@google.com>
11374 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11375 (handle_extended_wait): Improve comment.
11377 2008-12-13 Doug Evans <dje@google.com>
11379 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11380 * server.h (ATTR_MALLOC): New macro.
11381 (xmalloc,xcalloc,xstrdup): Declare.
11382 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11383 * inferiors.c: Ditto.
11384 * linux-low.c: Ditto.
11385 * mem-break.c: Ditto.
11386 * regcache.c: Ditto.
11387 * remote-utils.c: Ditto.
11390 * win32-low.c: Ditto.
11392 2008-12-12 Doug Evans <dje@google.com>
11394 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11395 in debugging printf.
11397 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11399 2008-12-09 Doug Evans <dje@google.com>
11401 * linux-low.h (struct process_info): Delete member tid, unused.
11402 * thread-db.c (find_one_thread): Update.
11403 (maybe_attach_thread): Update.
11405 2008-12-02 Pedro Alves <pedro@codesourcery.com>
11407 * target.h (struct target_ops): Add qxfer_osdata member.
11408 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11410 (linux_qxfer_osdata): New functions.
11411 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11413 * server.c (handle_query): Handle "qXfer:osdata:read:".
11414 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11415 (buffer_xml_printf): New functions.
11416 * server.h (struct buffer): New.
11417 (buffer_grow_str, buffer_grow_str0): New macros.
11418 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11419 (buffer_xml_printf): Declare.
11421 2008-11-24 Doug Evans <dje@google.com>
11423 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11425 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11427 * server.c (handle_v_run): Always use the supplied argument list.
11429 2008-11-19 Bob Wilson <bob.wilson@acm.org>
11431 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11432 (xtensa_regmap_table): Add entry for scompare1.
11434 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11436 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11437 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11438 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11439 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11440 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11441 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11442 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11443 XML target descriptions.
11444 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11445 when inferior is running on an ISA 2.05 or later processor. Add
11446 special case to return offset for full 64-bit slot of FPSCR when
11449 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11451 * Makefile.in (SFILES, clean): Added sparc64 files.
11452 (reg-sparc64.o, reg-sparc64.c): New.
11453 * configure.srv (sparc*-*-linux*): New configuration.
11454 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11455 syscall arguments for SPARC.
11456 (regsets_store_inferior_registers): Likewise.
11457 * linux-sparc-low.c: New file.
11459 2008-10-21 Doug Evans <dje@google.com>
11461 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11462 (READLINE_DIR,READLINE_DEP): Delete.
11463 (INTERNAL_CFLAGS): Update.
11464 (LINTFLAGS): Update.
11466 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11468 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11469 whole argv from the last run, not just argv[0].
11471 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11473 * regcache.c (new_register_cache): Return NULL if the register
11474 cache size isn't known yet.
11475 (free_register_cache): Avoid dereferencing a NULL regcache.
11477 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11479 * configure.srv: Merge MIPS and MIPS64.
11481 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11483 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11485 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11487 * Makefile.in: Add required vsx dependencies.
11489 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11490 Declare init_registers_powerpc_vsx32l.
11491 Declare init_registers_powerpc_vsx64l.
11492 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11493 (ppc_arch_setup): Check for VSX in hwcap.
11494 (ppc_fill_vsxregset): New function.
11495 (ppc_store_vsxregset): New function.
11496 Add new VSX entry in regset_info target_regsets.
11498 * configure.srv: Add new VSX dependencies.
11500 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11502 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11503 (remote_open): Set or clear transport_is_reliable.
11504 (putpkt_binary): Don't expect acks in noack mode.
11505 (getpkt): Don't send ack/nac in noack mode.
11506 * server.c (handle_general_set): Handle QStartNoAckMode.
11507 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11509 (main): Reset noack_mode on every connection.
11510 * server.h (noack_mode): Declare.
11512 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11514 * Makefile.in (GDBREPLAY_OBS): New variable.
11515 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11517 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11518 Daniel Jacobowitz <dan@codesourcery.com>
11520 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11521 (usr_store_inferior_registers): Likewise.
11522 (regsets_store_inferior_registers): Likewise.
11524 2008-07-31 Rolf Jansen <rj@surtec.com>
11525 Pedro Alves <pedro@codesourcery.com>
11527 * configure.ac: Check for memmem declaration.
11528 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11529 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11530 (disable_packet_qfThreadInfo): Unconditionally compile.
11531 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11532 * configure, config.in: Regenerate.
11534 2008-07-28 Doug Kwan <dougkwan@google.com>
11536 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11537 (linux_write_memory): Remove declaration of errno.
11539 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11541 * linux-low.c (handle_extended_wait): Do not use "status"
11542 variable uninitialized.
11544 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11546 * server.c (handle_v_attach): Inhibit reporting dll changes.
11548 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11550 * remote-utils.c (prepare_resume_reply): If requested, don't
11551 output "thread:TID" in the T stop reply.
11553 * server.c (disable_packet_vCont, disable_packet_Tthread)
11554 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11555 (handle_query): If requested, disable support for qC, qfThreadInfo
11557 (handle_v_requests): If requested, disable support for vCont.
11558 (gdbserver_show_disableable): New.
11559 (main): Handle --disable-packet and --disable-packet=LIST.
11561 * server.h (disable_packet_vCont, disable_packet_Tthread)
11562 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11564 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11566 * server.c (gdbserver_usage): Mention --version.
11568 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11570 * Makefile.in (gdbreplay.o): New rule.
11572 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11574 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11575 message, not gdbserver.
11577 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11578 Nathan Sidwell <nathan@codesourcery.com>
11579 Joseph Myers <joseph@codesourcery.com>
11581 * acinclude.m4: Include ../../config/acx.m4.
11582 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11583 * configure, config.in: Regenerate.
11584 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11585 * server.c (gdbserver_version): Print PKGVERSION.
11586 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11587 (main): Adjust gdbserver_usage calls.
11588 * gdbreplay.c (version, host_name): Add declarations.
11589 (gdbreplay_version, gdbreplay_usage): New.
11590 (main): Accept --version and --help options.
11592 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11594 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11595 (arm_breakpoint_at): Handle Thumb.
11596 (the_low_target): Add comment.
11598 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11600 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11602 2008-05-09 Doug Evans <dje@google.com>
11604 * server.h (decode_search_memory_packet): Declare.
11605 * remote-utils.c (decode_search_memory_packet): New fn.
11606 * server.c (handle_search_memory_1): New fn.
11607 (handle_search_memory): New fn.
11608 (handle_query): Process qSearch:memory packets.
11610 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11612 * regcache.c (registers_length): Remove.
11613 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11614 full register packet.
11615 * regcache.h (registers_length): Remove prototype.
11616 * server.h (PBUFSIZ): Define to 16384.
11618 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11620 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11621 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11622 powerpc-64l.o, and powerpc-altivec64l.o.
11623 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11624 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11625 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11626 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11627 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11630 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11631 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11632 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11633 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11634 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11635 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11636 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11637 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11638 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11639 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11642 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11643 (init_registers_powerpc_32l): ... this new prototype.
11644 (init_registers_powerpc_32): Remove, replace by ...
11645 (init_registers_powerpc_altivec32l): ... this new prototype.
11646 (init_registers_powerpc_e500): Remove, replace by ...
11647 (init_registers_powerpc_e500l): ... this new prototype.
11648 (init_registers_ppc64): Remove, replace by ...
11649 (init_registers_powerpc_64l): ... this new prototype.
11650 (init_registers_powerpc_64): Remove, replace by ...
11651 (init_registers_powerpc_altivec64l): ... this new prototype.
11652 (ppc_num_regs): Set to 73.
11653 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11654 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11655 (ppc_cannot_store_register): Handle orig_r3 and trap.
11656 (ppc_arch_setup): Update init_registers_... calls.
11657 (ppc_fill_gregset): Handle orig_r3 and trap.
11659 * inferiors.c (clear_inferiors): Reset current_inferior.
11661 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11663 * acinclude.m4: Add override.m4.
11664 * configure: Regenerate.
11666 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11668 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11669 initial call to init_register_ppc64.
11671 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11673 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11674 single powerpc*-*-linux* case.
11675 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11677 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11679 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11680 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11682 * linux-ppc-low.c: Include <elf.h>.
11683 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11684 (ppc_hwcap): New global variable.
11685 (ppc_regmap): Remove __SPE__ #ifdef sections.
11686 (ppc_regmap_e500): New global variable.
11687 (ppc_cannot_store_register): Update __SPE__ special case.
11688 (ppc_get_hwcap): New function.
11689 (ppc_arch_setup): Use it to determine whether inferior supports
11690 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11691 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11692 Do not access registers if target does not support AltiVec.
11693 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11694 Do not access registers if target does not support SPE.
11695 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11697 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11699 * linux-low.c (disabled_regsets, num_regsets): New.
11700 (use_regsets_p): Delete.
11701 (linux_wait_for_process): Clear disabled_regsets.
11702 (regsets_fetch_inferior_registers): Check and set it.
11703 (regsets_store_inferior_registers): Likewise.
11704 (linux_fetch_registers, linux_store_registers): Do not use
11706 (initialize_low): Allocate disabled_regsets.
11708 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11710 * Makefile.in (LIBOBJS): New.
11711 (OBS): Use LIBOBJS.
11712 (memmem.o): New rule.
11713 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11714 * configure: Regenerated.
11716 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11718 * server.c (handle_query): Never return "unsupported" for
11719 qXfer:features:read queries.
11721 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11723 * server.c (get_features_xml): Fix inverted condition.
11724 (handle_query): Always support qXfer:feature:read.
11726 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11728 * server.c (wrapper_argv): New.
11729 (start_inferior): Handle wrapper_argv. If set, expect an extra
11731 (gdbserver_usage): Document --wrapper.
11732 (main): Parse --wrapper.
11734 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11736 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11737 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11738 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11739 (ppc_set_pc): Likewise.
11740 (ppc_arch_setup): New function.
11741 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11742 of collect_register.
11743 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11745 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11747 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11748 instead of linux-ppc64-low.o.
11749 * linux-ppc64-low.c: Remove file.
11750 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11751 (linux-ppc64-low.o): Remove rule.
11753 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11754 (init_registers_powerpc_64): Likewise.
11755 (ppc_regmap): Conditionally define depending on __powerpc64__.
11756 (ppc_cannot_store_register): Do not special-case "fpscr" when
11757 compiled on __powerpc64__.
11758 (ppc_collect_ptrace_register): New function.
11759 (ppc_supply_ptrace_register): New function.
11760 (ppc_breakpoint): Change type to "unsigned int".
11761 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11762 (the_low_target): Conditionally provide initializers for the
11763 arch_setup member depending on __powerpc64__. Install
11764 collect_ptrace_register and supply_ptrace_register members.
11766 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11768 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11769 * server.c (gdbserver_xmltarget): Define.
11770 (get_features_xml): Use it to replace "target.xml" and arch_string.
11772 * configure.srv: Remove srv_xmltarget. Add XML files that were
11773 mentioned there to srv_xmlfiles instead. Remove conditional tests
11774 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11775 srv_xmlfiles and srv_regobj to include all possible choices.
11776 * configure.ac (srv_xmltarget): Remove.
11777 (srv_xmlfiles): Do not add "target.xml".
11778 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11779 checks for supplementary target information.
11780 * configure: Regenerate.
11781 * Makefile.in (XML_TARGET): Remove.
11782 (target.xml): Remove rule.
11783 (clean): Do not clean up target.xml.
11784 (.PRECIOUS): Do not mention target.xml.
11786 * target.h (struct target_ops): Remove arch_string member.
11787 * linux-low.c (linux_arch_string): Remove.
11788 (linux_target_ops): Remove arch_string initializer.
11789 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11790 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11791 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11792 * spu-low.c (spu_arch_string): Remove.
11793 (spu_target_ops): Remove arch_string initializer.
11794 * win32-low.c (win32_arch_string): Remove.
11795 (win32_target_ops): Remove arch_string initializer.
11796 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11797 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11798 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11800 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11802 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11803 by collect_ptrace_register and supply_ptrace_register hooks.
11804 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11805 instead of checking for the_low_target.left_pad_xfer.
11806 (usr_store_inferior_registers): Use collect_ptrace_register callback
11807 instead of checking for the_low_target.left_pad_xfer.
11809 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11810 (s390_supply_ptrace_register): Likewise.
11811 (s390_fill_gregset): Call s390_collect_ptrace_register.
11812 (the_low_target): Update.
11814 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11815 (ppc_supply_ptrace_register): Likewise.
11816 (the_low_target): Update.
11818 * linux-i386-low.c (the_low_target): Update.
11819 * linux-x86-64-low.c (the_low_target): Update.
11821 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11823 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11824 reg-s390.o and reg-s390x.o.
11826 * linux-low.c (new_inferior): New global variable.
11827 (linux_create_inferior, linux_attach): Set it.
11828 (linux_wait_for_process): Call the_low_target.arch_setup after the
11829 target has stopped for the first time.
11830 (initialize_low): Do not call the_low_target.arch_setup.
11832 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11833 (s390_set_pc): Likewise.
11834 (s390_arch_setup): New function.
11835 (the_low_target): Use s390_arch_setup as arch_setup routine.
11837 * regcache.c (realloc_register_cache): New function.
11838 (set_register_cache): Call it for each existing regcache.
11840 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11842 * server.h (init_registers): Remove prototype.
11844 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11845 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11846 instead of init_registers ().
11847 * linux-arm-low.c (init_registers_arm): Add prototype.
11848 (init_registers_arm_with_iwmmxt): Likewise.
11849 (the_low_target): Add initializer for arch_setup field.
11850 * linux-cris-low.c (init_registers_cris): Add prototype.
11851 (the_low_target): Add initializer for arch_setup field.
11852 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11853 (the_low_target): Add initializer for arch_setup field.
11854 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11855 (the_low_target): Add initializer for arch_setup field.
11856 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11857 (the_low_target): Add initializer for arch_setup field.
11858 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11859 (the_low_target): Add initializer for arch_setup field.
11860 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11861 (the_low_target): Add initializer for arch_setup field.
11862 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11863 (init_registers_mips64_linux): Likewise.
11864 (the_low_target): Add initializer for arch_setup field.
11865 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11866 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11867 (the_low_target): Add initializer for arch_setup field.
11868 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11869 (init_registers_powerpc_64): Likewise.
11870 (the_low_target): Add initializer for arch_setup field.
11871 * linux-s390-low.c (init_registers_s390): Add prototype.
11872 (init_registers_s390x): Likewise.
11873 (the_low_target): Add initializer for arch_setup field.
11874 * linux-sh-low.c (init_registers_sh): Add prototype.
11875 (the_low_target): Add initializer for arch_setup field.
11876 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11877 (the_low_target): Add initializer for arch_setup field.
11878 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11879 (the_low_target): Add initializer for arch_setup field.
11881 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11882 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11883 instead of init_registers ().
11884 * win32-arm-low.c (init_registers_arm): Add prototype.
11885 (the_low_target): Add initializer for arch_setup field.
11886 * win32-i386-low.c (init_registers_i386): Add prototype.
11887 (the_low_target): Add initializer for arch_setup field.
11889 * spu-low.c (init_registers_spu): Add prototype.
11890 (initialize_low): Call initialie_registers_spu () instead of
11891 initialize_registers ().
11893 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11895 * server.c (handle_v_requests): When handling the vRun and vAttach
11896 packets, if already debugging a process, don't kill it. Return an
11899 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11901 * server.c (handle_query): Correct length check.
11903 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11905 * win32-low.c (do_initial_child_stuff): Add process handle
11906 parameter. Set current_process_handle and current_process_id from the
11907 parameters. Clear globals.
11908 (win32_create_inferior): Don't set current_process_handle and
11909 current_process_id here. Instead pass them on the call to
11910 do_initial_child_stuff.
11911 (win32_attach): Likewise.
11912 (win32_clear_inferiors): New.
11913 (win32_kill): Don't close the current process handle or the
11914 current thread handle here. Instead call win32_clear_inferiors.
11915 (win32_detach): Don't open a new handle to the process. Call
11916 win32_clear_inferiors.
11917 (win32_join): Don't rely on current_process_handle; open a new
11918 handle using the process id.
11919 (win32_wait): Call win32_clear_inferiors when the inferior process
11922 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11924 * server.c (monitor_show_help): Add "exit".
11926 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11928 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11929 (clean): Add reg-xtensa.c.
11930 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11931 * configure.srv (xtensa*-*-linux*) New target.
11932 * linux-xtensa-low.c: New.
11933 * xtensa-xtregs.c: New.
11935 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11937 * hostio.c: Don't include errno.h.
11938 (errno_to_fileio_errno): Move to hostio-errno.
11939 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11940 error number outputting to the target->hostio_last_error callback.
11941 (hostio_packet_error): Use FILEIO_EINVAL directly.
11942 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11943 calls to hostio_error.
11944 * hostio-errno.c: New.
11945 * server.h (hostio_last_error_from_errno): Declare.
11946 * target.h (target_ops): Add hostio_last_error member.
11947 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11948 as hostio_last_error handler.
11949 * spu-low.c (spu_target_ops): Likewise.
11950 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11951 (wince_hostio_last_error): New functions.
11952 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11953 as hostio_last_error handler.
11954 (win32_target_ops) [!_WIN32_WCE]: Register
11955 hostio_last_error_from_errno as hostio_last_error handler.
11956 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11957 (hostio-errno.o): New rule.
11958 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11959 * configure.srv (srv_hostio_err_objs): New variable. Default to
11961 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11962 * configure: Regenerate.
11964 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11966 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11967 (linux_kill, linux_detach): Clean up the process list.
11968 * remote-utils.c (remote_open): Improve port number parsing.
11969 (putpkt_binary, input_interrupt): Only send interrupts if the target
11971 * server.c (extended_protocol): Make static.
11972 (attached): Define earlier.
11973 (exit_requested, response_needed, program_argv): New variables.
11974 (target_running): New.
11975 (start_inferior): Clear attached here.
11976 (attach_inferior): Set attached here.
11977 (require_running): Define.
11978 (handle_query): Use require_running and target_running. Implement
11980 (handle_v_attach, handle_v_run): New.
11981 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11982 (gdbserver_usage): Update.
11983 (main): Redo argument parsing. Handle --debug and --multi. Handle
11984 --attach along with other options or after the port. Save
11985 program_argv. Support no initial program. Resynchronize
11986 communication with GDB after an error. Handle "monitor exit".
11987 Use require_running and target_running. Always allow the extended
11988 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11989 restart in extended mode.
11990 * README: Refer to the GDB manual. Update --attach usage.
11992 2007-12-20 Andreas Schwab <schwab@suse.de>
11994 * linux-low.c (STACK_SIZE): Define.
11995 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11996 (linux_test_for_tracefork): Likewise.
11998 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12000 * linux-low.c (linux_wait_for_event): Update messages. Do not
12001 reinsert auto-delete breakpoints.
12002 * mem-break.c (struct breakpoint): Change return type of handler to
12004 (set_breakpoint_at): Update handler type.
12005 (reinsert_breakpoint_handler): Return 1 instead of calling
12007 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12009 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12010 * mem-break.h (set_breakpoint_at): Update handler type.
12011 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12012 * win32-low.c (auto_delete_breakpoint): New.
12013 (get_child_debug_event): Use it.
12015 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12017 * configure.ac: Check for pread and pwrite.
12018 * hostio.c (handle_pread): Fall back to lseek and read.
12019 (handle_pwrite): Fall back to lseek and write.
12020 * config.in, configure: Regenerated.
12022 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12024 * server.c (myresume): Add own_buf argument.
12025 (main): Update calls.
12027 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12029 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12030 * remote-utils.c (remote_open): Do not call disable_async_io.
12031 (block_async_io): Delete.
12032 (unblock_async_io): Make static.
12033 (initialize_async_io): New.
12034 * server.c (handle_v_cont): Handle async I/O here.
12035 (myresume): Likewise. Move other common resume tasks here...
12036 (main): ... from here. Call initialize_async_io. Disable async
12037 I/O before the main loop.
12038 * server.h (initialize_async_io): Declare.
12039 (block_async_io, unblock_async_io): Delete prototypes.
12040 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12042 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12044 * remote-utils.c (readchar): Allow binary data in received messages.
12046 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12048 * win32-low.c (attaching): New global.
12049 (win32_create_inferior): Clear the `attaching' global.
12050 (win32_attach): Set the `attaching' global.
12051 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12052 attaching. Only set a breakpoint at the entry point if not
12055 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12057 * server.c (main): Don't report dll events on the initial
12058 connection on attaches.
12060 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12062 * server.c (main): Relax numerical bases supported for the pid of
12063 the --attach command line argument.
12065 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12067 * win32-low.c (win32_attach): Call OpenProcess before
12068 DebugActiveProcess, not after. Add last error output to error
12071 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12073 * win32-low.c (win32_get_thread_context)
12074 (win32_set_thread_context): New functions.
12075 (thread_rec): Use win32_get_thread_context.
12076 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12077 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12080 2007-12-03 Leo Zayas
12081 Pedro Alves <pedro_alves@portugalmail.pt>
12083 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12085 (child_add_thread): Minor cleanup.
12086 (child_continue): Resume artificially suspended threads before
12087 calling ContinueDebugEvent.
12088 (suspend_one_thread): New.
12089 (fake_breakpoint_event): New.
12090 (get_child_debug_event): Change return type to int. Check here if
12091 gdb sent an interrupt request. If a soft interrupt was requested,
12092 fake a breakpoint event. Return 0 if there is no event to handle,
12094 (win32_wait): Don't check here if gdb sent an interrupt request.
12095 Ensure there is a valid event to handle.
12096 (win32_request_interrupt): Add soft interruption method as last
12099 2007-12-03 Leo Zayas
12100 Pedro Alves <pedro_alves@portugalmail.pt>
12102 * win32-low.h (win32_thread_info): Add descriptions to the
12103 structure members. Replace `suspend_count' counter by a
12105 * win32-low.c (thread_rec): Update condition of when to get the
12106 context from the inferior. Rely on ContextFlags being set if it
12107 has already been retrieved. Only suspend the inferior thread if
12108 we haven't already. Warn if that fails.
12109 (continue_one_thread): s/suspend_count/suspended/. Only call
12110 ResumeThread once. Warn if that fails.
12112 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12114 * win32-low.c (win32_wait): Don't read from the inferior when it
12115 has already exited.
12117 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12119 * Makefile.in (win32_low_h): New variable.
12120 (win32-low.o): Add dependency on $(win32_low_h).
12121 (win32-arm-low.o, win32-i386-low.o): New rules.
12123 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12125 * hostio.c: Correct copyright year.
12127 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12129 * Makefile.in (OBS): Add hostio.o.
12130 (hostio.o): New rule.
12131 * server.h (handle_vFile): Declare.
12132 * hostio.c: New file.
12133 * server.c (handle_v_requests): Take packet_len and new_packet_len
12134 for binary packets. Call handle_vFile.
12135 (main): Update call to handle_v_requests.
12137 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12139 * linux-low.c: Include <sched.h>.
12141 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12143 * linux-low.c (linux_tracefork_grandchild): New.
12144 (linux_tracefork_child): Use clone.
12145 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12147 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12149 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12151 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12153 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12155 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12157 * inferiors.c (change_inferior_id): Delete.
12158 (add_pid_to_list, pull_pid_from_list): New.
12159 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12160 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12161 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12162 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12163 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12164 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12165 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12166 (using_threads): Always set to 1.
12167 (handle_extended_wait): New.
12168 (add_process): Do not set TID.
12169 (linux_create_inferior): Set must_set_ptrace_flags.
12170 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12171 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12172 (linux_thread_alive): Rename TID argument to LWPID.
12173 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12174 (linux_wait_for_event): Do not use TID or check using_threads. Update
12175 call to dead_thread_notify. Call handle_extended_wait.
12176 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12177 (send_sigstop): Delete sigstop_sent.
12178 (wait_for_sigstop): Avoid TID.
12179 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12180 (linux_test_for_tracefork): New.
12181 (linux_lookup_signals): Use thread_db_active and
12182 linux_supports_tracefork_flag.
12183 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12184 * linux-low.h (get_process_thread): Avoid TID.
12185 (struct process_ifo): Move thread_known and tid to the end. Remove
12187 (linux_attach_lwp, thread_db_init): Update prototypes.
12188 * server.h (change_inferior_id): Delete prototype.
12189 (add_pid_to_list, pull_pid_from_list): New prototypes.
12190 * thread-db.c (thread_db_use_events): New.
12191 (find_first_thread): Rename to...
12192 (find_one_thread): ...this. Update callers and messages. Do not
12193 call fatal. Check thread_db_use_events. Do not call
12194 change_inferior_id or new_thread_notify.
12195 (maybe_attach_thread): Update. Do not call new_thread_notify.
12196 (thread_db_init): Set thread_db_use_events. Check use_events.
12197 * utils.c (fatal, warning): Correct message prefix.
12199 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12201 * Makefile.in (clean): Remove new files.
12202 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12203 (powerpc-64.o, powerpc-64.c): New rules.
12204 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12205 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12207 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12209 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12210 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12211 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12212 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12213 (target_regsets): Add AltiVec and SPE register sets.
12214 * configure.ac: Check for AltiVec and SPE.
12215 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12216 (ppc_fill_vrregset, ppc_store_vrregset): New.
12217 (target_regsets): Add AltiVec register set.
12218 * configure: Regenerated.
12220 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12222 * linux-low.c (O_LARGEFILE): Define.
12223 (linux_read_memory): Use /proc/PID/mem.
12224 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12225 * configure, config.in: Regenerated.
12227 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12229 * linux-low.c (linux_wait_for_event): Do not pass signals while
12232 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12234 * win32-low.c (create_process): New.
12235 (win32_create_inferior): Use create_process instead of
12236 CreateProcess. If create_process failed retry appending an ".exe"
12237 suffix. Store the GetLastError result immediatelly after
12238 create_process calls and use it on the call to error.
12240 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12242 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12244 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12246 * configure.ac: Switch license to GPLv3.
12248 2007-08-01 Michael Snyder <msnyder@access-company.com>
12250 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12252 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12254 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12256 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12257 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12258 CloseToolhelp32Snapshot.
12259 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12260 CloseToolhelp32Snapshot.
12262 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12264 * server.c (main): Check for inferior exit before main loop.
12266 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12268 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12269 instead of on tmp_desc.
12271 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12272 Daniel Jacobowitz <dan@codesourcery.com>
12274 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12275 (add_thread): Minor cleanups.
12276 (clear_inferiors): Move lower in the file. Clear the DLL
12278 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12279 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12280 (xml_escape_text): New.
12281 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12283 (handle_v_cont): Report errors.
12284 (gdbserver_version): Update.
12285 (main): Correct size of own_buf. Do not report initial DLL events.
12286 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12287 (unloaded_dll, xml_escape_text): New.
12288 * win32-low.c (enum target_waitkind): Update comments.
12289 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12290 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12291 (win32_EnumProcessModules, win32_GetModuleInformation)
12292 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12293 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12294 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12295 (win32_Module32First, win32_Module32Next, load_toolhelp)
12296 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12297 (get_child_debug_event): Handle DLL events.
12298 (win32_wait): Likewise.
12300 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12302 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12303 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12305 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12307 * win32-low.c (handle_output_debug_string): Ignore event if not
12310 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12312 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12314 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12316 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12318 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12320 * inferiors.c (change_inferior_id): Add comment.
12321 * linux-low.c (check_removed_breakpoint): Add an early
12322 prototype. Improve debug output.
12323 (linux_attach): Doc update.
12324 (linux_detach_one_process, linux_detach): Clean up before releasing
12326 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12327 * linux-low.h (struct process_info): Doc improvement.
12328 * mem-break.c (delete_all_breakpoints): New.
12329 * mem-break.h (delete_all_breakpoints): New prototype.
12330 * thread-db.c (find_first_thread): New.
12331 (thread_db_create_event): Call it instead of
12332 thread_db_find_new_threads. Clean up unused variables.
12333 (maybe_attach_thread): Remove first thread handling.
12334 (thread_db_find_new_threads): Use find_first_thread.
12335 (thread_db_get_tls_address): Likewise.
12337 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12339 * thread-db.c (thread_db_find_new_threads): Add prototype.
12340 (thread_db_create_event): Check for the main thread before adding
12342 (maybe_attach_thread): Only enable event reporting if TID == 0.
12343 (thread_db_get_tls_address): Check for new threads.
12345 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12347 * linux-low.c (linux_create_inferior): Try execv before execvp.
12348 * spu-low.c (spu_create_inferior): Likewise.
12350 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12352 * linux-low.c (linux_create_inferior): Change execv to execvp.
12353 * spu-low.c (spu_create_inferior): Likewies.
12355 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12357 * Makefile.in (clean): Clean new files instead of deleted ones.
12358 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12359 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12361 * configure.srv: Specify XML files and new regformats for MIPS and
12363 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12364 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12365 an entry for the restart register.
12366 (mips_cannot_fetch_register, mips_cannot_store_register)
12367 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12368 register names to match the XML descriptions.
12369 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12370 restart register instead of $0.
12372 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12373 Markus Deuling <deuling@de.ibm.com>
12375 * remote-utils.c (decode_xfer_write): New function.
12376 * server.h (decode_xfer_write): Add prototype.
12377 * server.c (handle_query): Add PACKET_LEN argument. Support
12378 qXfer:spu:read and qXfer:spu:write packets.
12379 (main): Pass packet_len to handle_query.
12380 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12381 * target.h (target_ops): Add qxfer_spu.
12383 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12385 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12386 accessing non-seekable spufs files.
12388 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12390 * server.c (handle_query): Add reply for qC packet.
12392 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12393 Leo Zayas <lerele@champenstudios@com>
12395 * server.h (check_remote_input_interrupt_request): New function.
12396 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12397 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12398 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12399 (check_remote_input_interrupt_request): New function.
12400 * server.h (check_remote_input_interrupt_request): Declare.
12401 * win32-low.c (winapi_DebugBreakProcess,
12402 winapi_GenerateConsoleCtrlEvent): New typedefs.
12403 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12405 (win32_wait): Check for remote interrupt request
12406 with check_remote_input_interrupt_request.
12407 (win32_request_interrupt): New function.
12408 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12410 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12412 * win32-low.c (debug_registers_changed,
12413 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12414 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12415 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12416 (thread_rec): Get context using the low target.
12417 (child_add_thread): Call thread_added on the low target,
12418 which does the same thing.
12420 (do_initial_child_stuff): Remove debug registers references.
12421 Set context using the low target. Resume threads after
12422 setting the contexts.
12423 (child_continue): Remove dead variable. Remove debug
12424 registers references.
12425 (child_fetch_inferior_registers): Go through the low target.
12426 (do_child_store_inferior_registers): Remove.
12427 (child_store_inferior_registers): Go through the low target.
12428 (win32_resume): Remove debug registers references.
12429 Set context using the low target.
12430 (handle_exception): Change return type to void. Don't record
12431 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12432 first chance exception.
12433 (get_child_debug_event): Change return type to void. Remove
12434 goto loop. Always return after waiting for debug event.
12435 (win32_wait): Convert to switch statement. Handle spurious
12438 * win32-i386-low.c (debug_registers_changed,
12439 debug_registers_used): New.
12440 (initial_stuff): Rename to ...
12441 (i386_initial_stuff): ... this. Clear debug registers
12443 (store_debug_registers): Delete.
12444 (i386_get_thread_context): New.
12445 (load_debug_registers): Delete.
12446 (i386_set_thread_context): New.
12447 (i386_thread_added): New.
12448 (single_step): Rename to ...
12449 (i386_single_step): ... this.
12450 (do_fetch_inferior_registers): Rename to ...
12451 (i386_fetch_inferior_register): ... this.
12452 (i386_store_inferior_register): New.
12453 (the_low_target): Adapt to new interface.
12455 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12456 (arm_get_thread_context): New.
12457 (arm_set_thread_context): New.
12459 (do_fetch_inferior_registers): Rename to ...
12460 (arm_fetch_inferior_register): ... this.
12461 (arm_store_inferior_register): New.
12462 (arm_wince_breakpoint): Reimplement as unsigned long.
12463 (arm_wince_breakpoint_len): Define.
12464 (the_low_target): Adapt to new interface.
12466 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12467 load_debug_registers. Add get_thread_context, set_thread_context,
12468 thread_added and store_inferior_register. Rename
12469 fetch_inferior_registers to fetch_inferior_register.
12470 (regptr): Remove declaration.
12472 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12474 * linux-low.c (linux_detach): Change return type to int. Return 0.
12475 * spu-low.c (spu_detach): Likewise.
12477 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12479 * target.h (target_ops): Change return type of detach to int.
12481 (join_inferior): New.
12482 * server.c (main): Don't skip detach support on mingw32.
12483 If the inferior doesn't support detaching return error.
12484 Call join_inferior instead of using waitpid.
12485 * linux-low.c (linux_join): New.
12486 (linux_target_op): Add linux_join.
12487 * spu-low.c (spu_join): New.
12488 (spu_target_ops): Add spu_join.
12489 * win32-low.c (win32_detach): Adapt to new interface.
12490 Reopen current_process_handle before detaching. Issue a child
12491 resume before detaching.
12493 (win32_target_op): Add win32_join.
12495 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12497 * win32-low.c (win32-attach): Fix return value.
12498 * target.h (target_ops): Describe ATTACH return values.
12500 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12502 * win32-low.c (GETPROCADDRESS): Define.
12503 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12504 (winapi_DebugSetProcessKillOnExit): Likewise.
12505 (win32_create_inferior): Force usage of ansi CreateProcessA.
12506 (win32_attach): Use GETPROCADDRESS.
12507 (win32_detach): Likewise.
12509 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12511 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12513 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12515 * win32-low.c: Commit leftover changes from 2007-03-29.
12517 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12519 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12520 fields short instead of int. Add explicit padding.
12521 (i387_cache_to_fsave): Remove unnecessary casts.
12522 (i387_fsave_to_cache): Doc fix.
12523 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12525 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12527 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12528 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12530 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12532 * configure.srv (arm*-*-mingw32ce*): Move near the other
12535 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12537 * configure.ac: Add errno checking.
12538 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12539 sys/file.h and malloc.h.
12540 (AC_CHECK_DECLS): Add perror.
12541 (srv_mingwce): Handle.
12542 * configure.srv (i[34567]86-*-cygwin*): Add
12543 win32-i386-low.o to srv_tgtobj.
12544 (i[34567]86-*-mingw*): Likewise.
12545 (arm*-*-mingw32ce*): Add case.
12546 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12547 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12548 [__MINGW32CE__] (strerror): New function.
12549 [__MINGW32CE__] (errno): Define to GetLastError.
12550 [__MINGW32CE__] (COUNTOF): New macro.
12551 (remote_open): Remove extra close call.
12552 * mem-break.c (delete_breakpoint_at): New function.
12553 * mem-break.h (delete_breakpoint_at): Declare.
12554 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12555 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12556 [USE_WIN32API] (read, write): Add char* casts.
12557 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12558 * server.h: Include wincecompat.h on Windows CE.
12559 [HAVE_ERRNO_H]: Check.
12560 (perror): Declare if not declared.
12561 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12562 (perror_with_name): Remove errno declaration.
12563 * wincecompat.h: New.
12564 * wincecompat.c: New.
12565 * win32-low.h: New.
12566 * win32-arm-low.c: New.
12567 * win32-i386-low.c: New.
12568 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12569 (OUTMSG2): Make it safe.
12571 (COUNTOF): New macro.
12572 (NUM_REGS): Get it from the low target.
12573 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12574 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12575 (thread_rec): Let low target handle debug registers.
12576 (child_add_thread): Likewise.
12577 (child_init_thread_list): Likewise.
12578 (continue_one_thread): Likewise.
12580 (do_child_fetch_inferior_registers): Move to ...
12581 * win32-i386-low.c: ... here, and rename to ...
12582 (do_fetch_inferior_registers): ... this.
12583 * win32-low.c (child_fetch_inferior_registers):
12584 Go through the low target.
12585 (do_child_store_inferior_registers): Use regptr.
12586 (strwinerror): New function.
12587 (win32_create_inferior): Handle Windows CE.
12588 Use strwinerror instead of strerror on Windows error
12589 codes. Add program to the error output.
12590 Don't close the main thread handle on Windows CE.
12591 (win32_attach): Use coredll.dll on Windows CE.
12592 (win32_kill): Close current process and current
12594 (win32_detach): Use coredll.dll on Windows CE.
12595 (win32_resume): Let low target handle debug registers, and
12597 (handle_exception): Add/Remove initial breakpoint. Avoid
12598 non-existant WSTOPSIG on Windows CE.
12599 (win32_read_inferior_memory): Cast to remove warning.
12600 (win32_arch_string): Go through the low target.
12601 (initialize_low): Call set_breakpoint_data with the low
12602 target's breakpoint.
12603 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12604 FOP_REGNUM, mappings): Move to ...
12605 * win32-i386-low.c: ... here.
12606 * win32-low.c (win32_thread_info): Move to ...
12607 * win32-low.h: ... here.
12608 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12609 win32-arm-low.c and wincecompat.c.
12610 (all:): Add $EXEEXT.
12611 (install-only:): Likewise.
12612 (gdbserver:): Likewise.
12613 (gdbreplay:): Likewise.
12614 * config.in: Regenerate.
12615 * configure: Regenerate.
12617 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12619 * win32-low.c: Rename typedef thread_info to
12620 win32_thread_info throughout.
12622 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12624 * win32-i386-low.c: Rename to ...
12625 * win32-low.c: ... this.
12626 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12627 * Makefile.in: Likewise.
12629 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12631 * remote-utils.c (monitor_output): Constify msg parameter.
12632 * server.h (monitor_output): Likewise.
12633 * win32-i386-low.c (handle_output_debug_string): New.
12634 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12635 handle_output_debug_string.
12636 (get_child_debug_event): Likewise.
12638 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12640 * server.c (main): Correct strtoul check.
12642 2007-03-27 Jon Ringle <jon@ringle.org>
12644 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12646 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12648 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12650 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12652 * terminal.h: Check HAVE_SGTTY_H.
12654 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12656 * remote-utils.c (remote_open): Print out the assigned port number.
12658 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12660 * remote-utils.c (monitor_output): New function.
12661 * server.c (debug_threads): Define here.
12662 (monitor_show_help): New function.
12663 (handle_query): Handle qRcmd.
12664 (main): Do not handle 'd' packet.
12665 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12666 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12669 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12671 * Makefile.in (EXEEXT): New.
12672 (clean): Use $(EXEEXT).
12674 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12676 * target.h (target_ops): Rename send_signal to request_interrupt,
12677 and remove enum target_signal parameter.
12678 * linux-low.c (linux_request_interrupt): Rename from
12679 linux_send_signal, and always send SIGINT.
12680 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12681 and always send SIGINT.
12682 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12684 (input_interrupt): Likewise.
12686 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12688 * server.c (get_features_xml): Check if target implemented
12690 * win32-i386-low.c (win32_arch_string): New.
12691 (win32_target_ops): Add win32_arch_string as arch_string member.
12693 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12695 * spu-low.c (spu_arch_string): New.
12696 (spu_target_ops): Add spu_arch_string.
12698 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12700 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12701 * configure.ac: Do not check for terminal.h.
12702 * configure, config.in: Regenerated.
12704 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12706 * Makefile.in (OBS): Add $(XML_BUILTIN).
12707 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12709 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12710 (arm-with-iwmmxt.c): New.
12711 * config.in, configure: Regenerate.
12712 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12713 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12714 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12715 (arm*-*-linux*): Add iWMMXt and regset support.
12716 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12717 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12718 (arm_store_wmmxregset, target_regsets): New.
12719 * server.c (get_features_xml): Take annex argument. Check builtin
12721 (handle_query): Handle multiple annexes.
12723 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12725 * remote-utils.c [USE_WIN32API] (read, write): Define.
12726 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12729 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12731 * linux-i386-low.c (the_low_target): Set arch_string.
12732 * linux-x86-64-low.c (the_low_target): Likewise.
12733 * linux-low.c (linux_arch_string): New.
12734 (linux_target_ops): Add it.
12735 * linux-low.h (struct linux_target_ops): Add arch_string.
12736 * server.c (write_qxfer_response): Use const void * for DATA.
12737 (get_features_xml): New.
12738 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12739 * target.h (struct target_ops): Add arch_string method.
12741 2007-01-03 Denis Pilat <denis.pilat@st.com>
12742 Daniel Jacobowitz <dan@codesourcery.com>
12744 * linux-low.c (linux_kill): Handle being called with no threads.
12745 * win32-i386-low.c (win32_kill): Likewise.
12746 (get_child_debug_event): Clear current_process_handle.
12748 2006-12-30 Denis PILAT <denis.pilat@st.com>
12749 Daniel Jacobowitz <dan@codesourcery.com>
12751 * remote-utils.c (remote_open): Check the type of specified
12752 serial port devices before opening them.
12753 * server.c (main): Kill the inferior if an error occurs during
12754 the first remote_open.
12756 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12758 * README: Update supported targets.
12760 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12762 * Makefile.in (clean): Remove reg-mips64.c.
12763 (reg-mips64.c, reg-mips64.o): New rules.
12764 * configure.srv: Handle mips64. Include regset support for mips.
12765 * linux-mips-low.c (union mips_register): New.
12766 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12767 (mips_breakpoint, mips_breakpoint_at): Use int.
12768 (mips_collect_register, mips_supply_register)
12769 (mips_collect_register_32bit, mips_supply_register_32bit)
12770 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12771 (mips_store_fpregset, target_regsets): New.
12772 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12774 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12776 * configure.srv: Add target "spu*-*-*".
12777 * Makefile.in (clean): Remove reg-spu.c.
12778 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12779 * spu-low.c: New file.
12781 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12783 * configure.ac: Correct td_thr_tls_get_addr test.
12784 * configure: Regenerated.
12786 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12788 * linux-low.c (linux_wait_for_event): Reformat. Use the
12789 pass_signals array.
12790 * remote-utils.c (decode_address_to_semicolon): New.
12791 * server.c (pass_signals, handle_general_set): New.
12792 (handle_query): Mention QPassSignals for qSupported.
12793 (main): Call handle_general_set.
12794 * server.h (pass_signals, decode_address_to_semicolon): New.
12796 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12798 * server.c (handle_query): Correct error handling for read_auxv.
12800 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12802 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12803 and srv_linux_thread_db to yes.
12804 * linux-s390-low.c (s390_fill_gregset): New function.
12805 (target_regsets): Define data structure.
12807 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12809 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12810 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12811 * config.in, configure: Regenerated.
12812 * inferiors.c (gdb_id_to_thread): New function.
12813 (gdb_id_to_thread_id): Use it.
12814 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12815 * linux-low.h (struct process_info): Add th member.
12816 (thread_db_get_tls_address): New prototype.
12817 * remote-utils.c (decode_address): Make non-static.
12818 * server.c (handle_query): Handle qGetTLSAddr.
12819 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12820 * target.h (struct target_ops): Add get_tls_address.
12821 * thread-db.c (maybe_attach_thread): Save the thread handle.
12822 (thread_db_get_tls_address): New.
12824 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12826 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12827 (linux_resume_one_process): Take a siginfo_t *. Update all
12828 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12829 (struct pending_signals): Add a siginfo_t.
12830 (linux_wait_for_process): Always set last_status.
12831 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12832 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12833 * linux-low.h (struct process_info): Add last_status.
12835 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12837 * remote-utils.c (try_rle): New function.
12838 (putpkt_binary): Use it.
12840 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12842 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12843 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12844 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12845 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12846 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12849 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12851 * server.c (terminal_fd): New variable.
12852 (old_foreground_pgrp): Likewise.
12853 (restore_old_foreground_pgrp): New function.
12854 (start_inferior): Record the terminal file descriptor in terminal_fd
12855 and its original foreground group in old_foreground_pgrp. Register
12856 restore_old_foreground_pgrp with atexit().
12858 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12860 * server.c (handle_query): Correct qPart to qXfer.
12862 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12864 * configure.ac: Check for more headers which are missing on
12865 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12866 * configure.srv: Add Cygwin and mingw32.
12867 * remote-utils.c: Don't include headers unconditionally which
12868 are missing on mingw32. Include <winsock.h> for mingw32.
12869 (remote_open): Adjust for mingw32 support. Flush
12870 standard error after writing to it.
12871 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12872 (unblock_async_io, enable_async_io, disable_async_io)
12873 (readchar, getpkt): Update for Winsock support.
12874 (prepare_resume_reply): Expect a protocol signal number.
12875 * server.c: Disable <sys/wait.h> on mingw32.
12876 (start_inferior): Adjust for mingw32 support. Flush
12877 standard error after writing to it.
12878 (attach_inferior): Likewise. Use protocol signal
12880 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12882 * win32-i386-low.c: New file.
12883 * Makefile.in (XM_CLIBS): Set.
12884 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12885 (win32-i386-low.o): New dependency rule.
12886 * linux-low.c (linux_wait): Use target signal numbers.
12887 * target.h (struct target_ops): Doc fix.
12888 * server.h (target_signal_to_name): New prototype.
12889 * gdbreplay.c: Don't include headers unconditionally which
12890 are missing on mingw32. Include <winsock.h> for mingw32.
12891 (remote_close, remote_open): Adjust for Winsock support.
12892 * configure, config.in: Regenerated.
12894 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12896 * server.c (decode_xfer_read, write_qxfer_response): New.
12897 (handle_query): Take a packet length argument. Handle
12898 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12899 the qSupported response.
12900 (main): Update call to handle_query.
12902 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12904 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12905 (putpkt_binary): Renamed from putpkt and adjusted for binary
12907 (putpkt): New wrapper for putpkt_binary.
12908 (readchar): Don't mask off the high bit.
12909 (decode_X_packet): New function.
12910 * server.c (main): Call putpkt_binary if a handler sets the packet
12911 length. Save the length of the incoming packet. Handle 'X'.
12912 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12914 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12916 * server.c (handle_query): Handle qSupported.
12918 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12920 * remote-utils.c (all_symbols_looked_up): New variable.
12921 (look_up_one_symbol): Check it.
12922 * server.h (look_up_one_symbol): New declaration.
12923 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12925 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12927 * Makefile.in (linux-arm-low.o): Update dependencies.
12928 * linux-arm-low.c: Include "gdb_proc_service.h".
12929 (PTRACE_GET_THREAD_AREA): Define.
12930 (ps_get_thread_area): New function.
12932 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12934 * configure.srv (m68k*-*-uclinux*): New target.
12935 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12936 (linux_resume_one_process): Remove extraneous cast.
12937 (linux_read_offsets): New.
12938 (linux_target_op): Add linux_read_offsets on mmuless systems.
12939 * server.c (handle_query): Add qOffsets logic.
12940 * target.h (struct target_ops): Add read_offsets.
12942 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12944 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12945 (PTRACE_GET_THREAD_AREA): Define.
12946 (ps_get_thread_area): New function.
12947 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12948 (linux-x86-64-low.o): Update.
12950 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12952 * configure.ac: Remove checks for prfpregset_t.
12953 * gdb_proc_service.h: New file.
12954 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12955 new "gdb_proc_service.h".
12956 * proc-service.c: Likewise.
12957 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12958 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12959 * Makefile.in (gdb_proc_service_h): Updated.
12960 * configure, config.in: Regenerated.
12962 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12964 * remote-utils.c (prepare_resume_reply): Move declaration
12965 of gdb_id_from_wait to the top of the block.
12967 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12969 * linux-low.c (regsets_store_inferior_registers): Read the regset
12970 from the target before filling it.
12972 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12974 * server.c (attach_inferior): Return SIGTRAP for a successful
12977 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12979 * Makefile.in (OBS): Add version.o.
12980 (STAGESTUFF): Delete.
12981 (version.o): Add dependencies.
12982 (version.c): Replace rule.
12983 (clean): Remove version.c.
12984 * server.c (gdbserver_version): New.
12985 (gdbserver_usage): Use printf.
12986 (main): Handle --version and --help.
12987 * server.h (version, host_name): Add declarations.
12989 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13001 * linux-x86-64-low.c:
13003 * linux-s390-low.c:
13004 * linux-ppc64-low.c:
13006 * linux-mips-low.c:
13007 * linux-m68k-low.c:
13008 * linux-m32r-low.c:
13011 * linux-ia64-low.c:
13012 * linux-i386-low.c:
13013 * linux-crisv32-low.c:
13025 * gdbserver.1: Add (C) after Copyright. Update the FSF
13028 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13030 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13031 (arm_breakpoint_at): Recognize both breakpoints.
13032 (the_low_target): Use the correct breakpoint instruction.
13034 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13036 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13037 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13038 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13039 (the_low_target): Update.
13041 2005-10-25 Andreas Schwab <schwab@suse.de>
13043 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13045 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13046 (ia64_num_regs): Reduce to 462.
13048 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13050 * acinclude.m4: Correct quoting.
13051 * aclocal.m4: Regenerated.
13053 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13054 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13055 (thread_db_init): Call thread_db_err_str.
13056 * configure.ac: Check for TD_VERSION.
13057 * config.in, configure: Regenerated.
13059 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13061 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13063 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13065 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13066 is not available. Define HAVE_PTRACE_GETREGS if it is.
13067 * config.in, configure: Regenerated.
13068 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13069 * linux-i386-low.c, linux-m68k-low.c: Update to use
13070 HAVE_PTRACE_GETREGS.
13071 * linux-low.c (regsets_fetch_inferior_registers)
13072 (regsets_store_inferior_registers): Only return 0 if we processed
13074 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13075 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13077 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13079 * inferiors.c (struct thread_info): Add gdb_id.
13080 (add_thread): Add gdb_id argument.
13081 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13082 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13083 calls to add_thread.
13084 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13085 * server.c (handle_query): Use thread_to_gdb_id.
13086 (handle_v_cont, main): Use gdb_id_to_thread_id.
13087 * server.h (add_thread): Update prototype.
13088 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13091 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13093 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13094 left-padded registers.
13095 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13096 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13098 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13100 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13101 * configure: Regenerate.
13102 * config.in: Regenerate.
13103 * server.h (NEED_DECLARATION_STRERROR):
13104 Replace with !HAVE_DECL_STRERROR.
13106 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13108 * linux-low.c (linux_wait, linux_send_signal): Don't test
13109 an unsigned long variable for > 0 if it could be MAX_ULONG.
13110 * server.c (myresume): Likewise.
13111 * target.c (set_desired_inferior): Likewise.
13113 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13115 * configure.ac: Simplify and improve check for socklen_t.
13116 * configure, config.in: Regenerate.
13118 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13120 * acconfig.h: Remove.
13121 * configure.ac: Add a test for socklen_t. Use three-argument
13122 AC_DEFINE throughout.
13123 * config.in: Regenerated using autoheader 2.59.
13124 * configure: Regenerated.
13126 * gdbreplay.c (socklen_t): Provide a default.
13127 (remote_open): Use socklen_t.
13128 * remote-utils.c (socklen_t): Provide a default.
13129 (remote_open): Use socklen_t.
13130 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13133 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13135 * linux-low.c (linux_read_memory, linux_write_memory)
13136 (linux_read_auxv): Likewise.
13137 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13138 (check_mem_write): Likewise.
13139 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13141 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13142 (registers_from_string, register_data): Likewise.
13143 * server.c (handle_query, main): Likewise.
13144 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13145 (decode_M_packet): Likewise.
13146 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13147 * target.h (struct target_ops): Update read_memory, write_memory,
13149 (read_inferior_memory, write_inferior_memory): Update.
13150 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13151 to unsigned char *.
13152 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13153 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13154 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13155 linux-s390-low.c, linux-sh-low.c: Update for changes in
13156 read_inferior_memory and the_low_target->breakpoint.
13158 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13160 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13161 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13162 * configure.srv: Add powerpc64-*-linux*.
13163 * linux-ppc64-low.c: New file.
13165 2005-05-23 Orjan Friberg <orjanf@axis.com>
13167 * linux-cris-low.c: New file with support for CRIS.
13168 * linux-crisv32-low.c: Ditto for CRISv32.
13169 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13170 (clean): Add reg-cris.c and reg-crisv32.c.
13171 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13172 reg-crisv32.o, and reg-crisv32.c to make rules.
13173 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13174 recognized targets.
13176 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13178 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13179 of sizeof (PTRACE_XFER_TYPE).
13180 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13182 2005-05-12 Orjan Friberg <orjanf@axis.com>
13184 * target.h (struct target_ops): Add insert_watchpoint,
13185 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13186 pointers for hardware watchpoint support.
13187 * linux-low.h (struct linux_target_ops): Ditto.
13188 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13189 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13190 to linux_target_ops.
13191 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13193 * server.c (main): Recognize 'Z' and 'z' packets.
13195 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13197 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13198 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13199 (the_low_target): Add new members.
13201 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13203 * proc-service.c (ps_lgetregs): Search all_processes instead of
13206 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13208 * server.c (start_inferior): Change return type to int.
13209 (attach_inferior): Change sigptr to int *.
13210 (handle_v_cont, handle_v_requests): Change signal to int *.
13211 (main): Change signal to int.
13213 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13215 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13216 * configure.srv: Add m32r*-*-linux*.
13217 * linux-m32r-low.c: New file.
13219 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13221 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13223 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13225 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13226 Take unsigned long arguments for PIDs.
13227 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13228 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13229 (wait_for_sigstop, linux_resume_one_process)
13230 (regsets_fetch_inferior_registers, linux_send_signal)
13231 (linux_read_auxv): Likewise. Update the types of variables holding
13232 PIDs. Update format string specifiers.
13233 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13234 * remote-utils.c (prepare_resume_reply): Likewise.
13235 * server.c (cont_thread, general_thread, step_thread)
13236 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13238 (handle_query): Update format specifiers.
13239 (handle_v_cont, main): Use strtoul for thread IDs.
13240 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13241 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13242 (general_thread, step_thread, thread_from_wait)
13243 (old_thread_from_wait): Update.
13244 * target.h (struct thread_resume): Use unsigned long for THREAD.
13245 (struct target_ops): Use unsigned long for arguments to attach and
13248 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13250 * acinclude.m4: Include bfd/bfd.m4 directly.
13251 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13252 <agriffis@toolchain.org>.
13253 * aclocal.m4, configure: Regenerated.
13255 2005-01-07 Andrew Cagney <cagney@gnu.org>
13257 * configure.ac: Rename configure.in, require autoconf 2.59.
13258 * configure: Re-generate.
13260 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13262 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13263 LIBS when finished.
13264 * aclocal.m4: Regenerated.
13265 * configure: Regenerated.
13267 2004-11-21 Andreas Schwab <schwab@suse.de>
13269 * linux-m68k-low.c (m68k_num_gregs): Define.
13270 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13271 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13272 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13273 (m68k_breakpoint_at): New. Add to the_low_target.
13275 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13276 srv_linux_thread_db to yes.
13278 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13280 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13281 (ARCH_SET_FS): Likewise.
13282 (ARCH_GET_FS): Likewise.
13283 (ARCH_GET_GS): Likewise.
13285 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13287 * linux-i386-low.c (ps_get_thread_area): New.
13288 * linux-x86-64-low.c (ps_get_thread_area): New.
13289 * linux-low.c: Include <sys/syscall.h>.
13290 (linux_kill_one_process): Don't kill the first thread here.
13291 (linux_kill): Kill the first thread here.
13292 (kill_lwp): New function.
13293 (send_sigstop, linux_send_signal): Use it.
13294 * proc-service.c: Clean up #ifdefs.
13295 (fpregset_info): Delete.
13296 (ps_lgetregs): Update and enable implementation.
13297 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13299 * remote-utils.c (struct sym_cache, symbol_cache): New.
13300 (input_interrupt): Print a clearer message.
13301 (async_io_enabled): New variable.
13302 (enable_async_io, disable_async_io): Use it. Update comments.
13303 (look_up_one_symbol): Use the symbol cache.
13304 * thread-db.c (thread_db_look_up_symbols): New function.
13305 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13307 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13309 * configure.in: Test for -rdynamic.
13310 * configure: Regenerated.
13311 * Makefile (INTERNAL_LDFLAGS): New.
13312 (gdbserver, gdbreplay): Use it.
13314 2004-09-02 Andrew Cagney <cagney@gnu.org>
13316 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13318 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13320 * linux-low.c (linux_wait): Clear all_processes list also.
13322 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13324 * linux-low.c: Include <errno.h>. Remove extern declaration of
13327 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13329 * gdbreplay.c, server.h, utils.c: Update copyright years.
13331 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13333 * server.c (main): Print child status or termination signal from
13334 variable 'signal', not 'sig'.
13336 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13338 * linux-low.c (linux_read_memory): Change return type to
13339 int. Check for and return error from ptrace().
13340 * target.c (read_inferior_memory): Change return type to int. Pass
13341 back return status from the_target->read_memory().
13342 * target.h (struct target_ops): Adapt *read_memory() prototype.
13344 (read_inferior_memory): Adapt prototype.
13345 * server.c (main): Return an error packet if
13346 read_inferior_memory() returns an error.
13348 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13350 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13351 Unify with other clean targets.
13353 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13355 * server.c (handle_v_cont): Call set_desired_inferior.
13357 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13359 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13361 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13363 * linux-low.c (linux_wait): Unblock async I/O.
13364 (linux_resume): Block and enable async I/O.
13365 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13366 * server.h (block_async_io, unblock_async_io): Add prototypes.
13368 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13370 * remote-utils.c (remote_open): Print a status notice after
13371 opening a TCP port.
13372 * server.c (attach_inferior): Print a status notice after
13375 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13377 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13379 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13381 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13383 * server.c, target.h: Update copyright years.
13385 2004-02-25 Roland McGrath <roland@redhat.com>
13387 * target.h (struct target_ops): New member `read_auxv'.
13388 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13389 * linux-low.c (linux_read_auxv): New function.
13390 (linux_target_ops): Initialize `read_auxv' member to that.
13392 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13394 Committed by Jim Blandy <jimb@redhat.com>.
13396 * linux-s390-low.c (s390_num_regs): Update.
13397 (s390_regmap): Remove control registers. Use __s390x__ predefine
13398 instead of GPR_SIZE to distiguish s390 and s390x targets.
13400 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
13402 * linux-low.c: Update copyright year.
13403 (check_removed_breakpoint): Clear pending_is_breakpoint.
13404 (linux_set_resume_request, linux_queue_one_thread)
13405 (resume_status_pending_p): New functions.
13406 (linux_continue_one_thread): Use process->resume.
13407 (linux_resume): Only resume threads if there are no pending events.
13408 * linux-low.h (struct process_info): Add resume request
13411 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
13413 * regcache.c (new_register_cache): Clear the allocated register
13414 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13416 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
13418 * linux-low.c (linux_resume): Take a struct thread_resume *
13420 (linux_wait): Update call.
13421 (resume_ptr): New static variable.
13422 (linux_continue_one_thread): Renamed from
13423 linux_continue_one_process. Use resume_ptr.
13424 (linux_resume): Use linux_continue_one_thread.
13425 * server.c (handle_v_cont, handle_v_requests): New functions.
13426 (myresume): New function.
13427 (main): Handle 'v' case.
13428 * target.h (struct thread_resume): New type.
13429 (struct target_ops): Change argument of "resume" to struct
13431 (myresume): Delete macro.
13433 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13435 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13436 (uninstall): Support DESTDIR.
13438 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13440 * configure.srv: Add xscale*linux copy of arm*linux entry.
13442 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
13444 * linux-arm-low.c (arm_reinsert_addr): New function.
13445 (the_low_target): Add arm_reinsert_addr.
13447 2003-07-08 Mark Kettenis <kettenis@gnu.org>
13449 * mem-break.c: Remove whitespace at end of file.
13451 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13453 * configure.in: Check whether we need to prototype strerror.
13454 * server.h: Optionally prototype strerror.
13455 * gdbreplay.c (perror_with_name): Use strerror.
13456 * linux-low.c (linux_attach_lwp): Use strerror.
13457 * utils.c (perror_with_name): Use strerror.
13458 * config.in, configure: Regenerated.
13460 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13462 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13463 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13465 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13467 * Makefile.in (SFILES): Update.
13468 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13469 low-sun3.c: Remove files.
13471 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13473 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13474 (linux_detach_one_process, linux_detach): New functions.
13475 (linux_target_ops): Add linux_detach.
13476 * server.c (main): Handle 'D' packet.
13477 * target.h (struct target_ops): Add "detach" member.
13478 (detach_inferior): Define.
13480 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13482 From Kelley Cook <kelleycook@wideopenwest.com>:
13483 * configure.srv: Accept i[34567]86 variants.
13485 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13487 * linux-low.c (linux_wait_for_event): Correct comment typos.
13488 (linux_resume_one_process): Call check_removed_breakpoint.
13489 (linux_send_signal): New function.
13490 (linux_target_ops): Add linux_send_signal.
13491 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13493 * target.h (struct target_ops): Add send_signal.
13495 2003-05-29 Jim Blandy <jimb@redhat.com>
13497 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13498 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13499 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13500 away part of the register's value.
13502 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13504 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13505 (linux_wait_for_event, linux_init_signals): Likewise.
13507 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13509 * configure.in: Check for stdlib.h.
13510 * configure: Regenerated.
13511 * config.in: Regenerated.
13513 2003-01-04 Andreas Schwab <schwab@suse.de>
13515 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13517 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13519 * Makefile.in: Remove obsolete code.
13521 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13523 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13524 defined(PT_FPR0_HI).
13526 2002-11-17 Stuart Hughes <seh@zee2.com>
13528 * linux-arm-low.c (arm_num_regs): Increase.
13529 (arm_regmap): Include status register.
13531 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13533 * linux-low.c (register_addr): Remove incorrect -1 check.
13535 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13537 * linux-low.c (linux_create_inferior): Call setpgid. Return
13539 (unstopped_p, linux_signal_pid): Remove.
13540 (linux_target_ops): Remove linux_signal_pid.
13541 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13542 global instead of target method.
13543 * target.h (struct target_ops): Remove signal_pid. Update comment
13544 for create_inferior.
13545 * server.c (signal_pid): New variable.
13546 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13547 gdbserver. Set the child to be the foreground process group.
13548 (attach_inferior): Set signal_pid.
13550 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13552 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13554 2002-08-20 Jim Blandy <jimb@redhat.com>
13556 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13559 2002-08-01 Andrew Cagney <cagney@redhat.com>
13561 * Makefile.in: Make chill references obsolete.
13563 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13565 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13566 * configure: Regenerate.
13567 * config.in: Regenerate.
13569 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13571 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13572 (perror_with_name, remote_close, remote_open, expect, play): Static.
13574 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13576 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13577 byte offsets instead of an array of indexes.
13578 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13580 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13582 * regcache.c: Add comment.
13584 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13586 * thread-db.c: New file.
13587 * proc-service.c: New file.
13588 * acinclude.m4: New file.
13589 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13590 proc-service.o, and thread-db.o.
13591 (linux-low.o): Add USE_THREAD_DB.
13592 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13593 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13594 * aclocal.m4: Regenerated.
13595 * config.in: Regenerated.
13596 * configure: Regenerated.
13597 * configure.in: Check for proc_service.h, sys/procfs.h,
13598 thread_db.h, and linux/elf.h headrs.
13599 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13600 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13601 Check for -lthread_db and thread support.
13602 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13603 PowerPC, and SuperH.
13604 * i387-fp.c: Constify arguments.
13605 * i387-fp.h: Likewise.
13606 * inferiors.c: (struct thread_info): Renamed from
13607 `struct inferior_info'. Remove PID member. Use generic inferior
13608 list header. All uses updated.
13609 (inferiors, signal_pid): Removed.
13610 (all_threads): New variable.
13611 (get_thread): Define.
13612 (add_inferior_to_list): New function.
13613 (for_each_inferior): New function.
13614 (change_inferior_id): New function.
13615 (add_inferior): Removed.
13616 (remove_inferior): New function.
13617 (add_thread): New function.
13618 (free_one_thread): New function.
13619 (remove_thread): New function.
13620 (clear_inferiors): Use for_each_inferior and free_one_thread.
13621 (find_inferior): New function.
13622 (find_inferior_id): New function.
13623 (inferior_target_data): Update argument type.
13624 (set_inferior_target_data): Likewise.
13625 (inferior_regcache_data): Likewise.
13626 (set_inferior_regcache_data): Likewise.
13627 * linux-low.c (linux_bp_reinsert): Remove.
13628 (all_processes, stopping_threads, using_thrads)
13629 (struct pending_signals, debug_threads, pid_of): New.
13630 (inferior_pid): Replace with macro.
13631 (struct inferior_linux_data): Remove.
13632 (get_stop_pc, add_process): New functions.
13633 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13634 Use add_process and add_thread.
13635 (linux_attach_lwp): New function, based on old linux_attach. Use
13636 add_process and add_thread. Set stop_expected for new threads.
13637 (linux_attach): New function.
13638 (linux_kill_one_process): New function.
13639 (linux_kill): Kill all LWPs.
13640 (linux_thread_alive): Use find_inferior_id.
13641 (check_removed_breakpoints, status_pending_p): New functions.
13642 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13643 Update. Use WNOHANG. Wait for cloned processes also. Update process
13644 struct for the found process.
13645 (linux_wait_for_event): New function.
13646 (linux_wait): Use it. Support LWPs.
13647 (send_sigstop, wait_for_sigstop, stop_all_processes)
13648 (linux_resume_one_process, linux_continue_one_process): New functions.
13649 (linux_resume): Support LWPs.
13650 (REGISTER_RAW_SIZE): Remove.
13651 (fetch_register): Use register_size instead. Call supply_register.
13652 (usr_store_inferior_registers): Likewise. Call collect_register.
13653 Fix recursive case.
13654 (regsets_fetch_inferior_registers): Improve error message.
13655 (regsets_store_inferior_registers): Add debugging.
13656 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13657 (unstopped_p, linux_signal_pid): New functions.
13658 (linux_target_ops): Add linux_signal_pid.
13659 (linux_init_signals): New function.
13660 (initialize_low): Call it. Initialize using_threads.
13661 * regcache.c (inferior_regcache_data): Add valid
13663 (get_regcache): Fetch registers lazily. Add fetch argument
13664 and update all callers.
13665 (regcache_invalidate_one, regcache_invalidate): New
13667 (new_register_cache): Renamed from create_register_cache.
13668 Return the new regcache.
13669 (free_register_cache): Change argument to a void *.
13670 (registers_to_string, registers_from_string): Call get_regcache
13671 with fetch flag set.
13672 (register_data): Make static. Pass fetch flag to get_regcache.
13673 (supply_register): Call get_regcache with fetch flag clear.
13674 (collect_register): Call get_regcache with fetch flag set.
13675 (collect_register_as_string): New function.
13676 * regcache.h: Update.
13677 * remote-utils.c (putpkt): Flush after debug output and use
13679 Handle input interrupts while waiting for an ACK.
13680 (input_interrupt): Use signal_pid method.
13681 (getpkt): Flush after debug output and use stderr.
13682 (outreg): Use collect_register_as_string.
13683 (new_thread_notify, dead_thread_notify): New functions.
13684 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13685 and general_thread.
13686 (look_up_one_symbol): Flush after debug output.
13687 * server.c (step_thread, server_waiting): New variables.
13688 (start_inferior): Don't use signal_pid. Update call to mywait.
13689 (attach_inferior): Update call to mywait.
13690 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13691 (main): Don't fetch/store registers explicitly. Use
13692 set_desired_inferior. Support proposed ``Hs'' packet. Update
13694 * server.h: Update.
13695 (struct inferior_list, struct_inferior_list_entry): New.
13696 * target.c (set_desired_inferior): New.
13697 (write_inferior_memory): Constify.
13698 (mywait): New function.
13699 * target.h: Update.
13700 (struct target_ops): New signal_pid method.
13701 (mywait): Removed macro, added prototype.
13703 * linux-low.h (regset_func): Removed.
13704 (regset_fill_func, regset_store_func): New.
13705 (enum regset_type): New.
13706 (struct regset_info): Add type field. Use new operation types.
13707 (struct linux_target_ops): stop_pc renamed to get_pc.
13708 Add decr_pc_after_break and breakpoint_at.
13709 (get_process, get_thread_proess, get_process_thread)
13710 (strut process_info, all_processes, linux_attach_lwp)
13711 (thread_db_init): New.
13713 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13714 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13715 (the_low_target): Add new members.
13716 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13717 (i386_store_fpxregset): Constify.
13718 (target_regsets): Add new kind identifier.
13719 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13720 (i386_set_pc): Add debugging.
13721 (i386_breakpoint_at): New function.
13722 (the_low_target): Add new members.
13723 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13724 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13725 (mips_breakpoint_at): New.
13726 (the_low_target): Add new members.
13727 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13728 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13729 (the_low_target): Add new members.
13730 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13731 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13732 (the_low_target): Add new members.
13733 * linux-x86-64-low.c (target_regsets): Add new kind
13736 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13738 From Martin Pool <mbp@samba.org>:
13739 * server.c (gdbserver_usage): New function.
13742 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13744 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13745 stop_at -> stop_pc.
13747 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13749 * Makefile.in: Remove obsolete code.
13751 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13753 * linux-low.c (regsets_fetch_inferior_registers),
13754 (regsets_store_inferior_registers): Removed cast to int from
13756 * regcache.h: Added declaration of struct inferior_info.
13758 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13760 * inferiors.c (struct inferior_info): Add regcache_data.
13761 (add_inferior): Call create_register_cache.
13762 (clear_inferiors): Call free_register_cache.
13763 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13764 * regcache.c (struct inferior_regcache_data): New.
13765 (registers): Remove.
13766 (get_regcache): New function.
13767 (create_register_cache, free_register_cache): New functions.
13768 (set_register_cache): Don't initialize the register cache here.
13769 (registers_to_string, registers_from_string, register_data): Call
13771 * regcache.h: Add prototypes.
13772 * server.h: Likewise.
13774 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13776 * mem-break.c: New file.
13777 * mem-break.h: New file.
13778 * Makefile.in: Add mem-break.o rule; update server.h
13780 * inferiors.c (struct inferior_info): Add target_data
13782 (clear_inferiors): Free target_data member if set.
13783 (inferior_target_data, set_inferior_target_data): New functions.
13784 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13785 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13786 * linux-low.c (linux_bp_reinsert): New variable.
13787 (struct inferior_linux_data): New.
13788 (linux_create_inferior): Use set_inferior_target_data.
13789 (linux_attach): Likewise. Call add_inferior.
13790 (linux_wait_for_one_inferior): New function.
13791 (linux_wait): Call it.
13792 (linux_write_memory): Add const.
13793 (initialize_low): Call set_breakpoint_data.
13794 * linux-low.h (struct linux_target_ops): Add breakpoint
13796 * server.c (attach_inferior): Remove extra add_inferior
13798 * server.h: Include mem-break.h. Update inferior.c
13800 * target.c (read_inferior_memory)
13801 (write_inferior_memory): New functions.
13802 * target.h (read_inferior_memory)
13803 (write_inferior_memory): Change macros to prototypes.
13804 (struct target_ops): Update comments. Add const to write_memory
13807 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13809 * linux-low.c (usr_store_inferior_registers): Support
13810 registers which are allowed to fail to store.
13811 * linux-low.h (linux_target_ops): Likewise.
13812 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13813 (ppc_cannot_store_register): FPSCR may not be storable.
13815 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13817 * server.h: Include <string.h> if HAVE_STRING_H.
13818 * ChangeLog: Correct paths in last ChangeLog entry.
13820 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13822 * linux-low.h: Remove obsolete prototypes.
13823 (struct linux_target_ops): New.
13824 (extern the_low_target): New.
13825 * linux-low.c (num_regs, regmap): Remove declarations.
13826 (register_addr): Use the_low_target explicitly.
13827 (fetch_register): Likewise.
13828 (usr_fetch_inferior_registers): Likewise.
13829 (usr_store_inferior_registers): Likewise.
13830 * linux-arm-low.c (num_regs): Remove.
13831 (arm_num_regs): Define.
13832 (arm_regmap): Renamed from regmap, made static.
13833 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13835 (arm_cannot_store_register): Renamed from cannot_store_register,
13837 (the_low_target): New.
13838 * linux-i386-low.c (num_regs): Remove.
13839 (i386_num_regs): Define.
13840 (i386_regmap): Renamed from regmap, made static.
13841 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13843 (i386_cannot_store_register): Renamed from cannot_store_register,
13845 (the_low_target): New.
13846 * linux-ia64-low.c (num_regs): Remove.
13847 (ia64_num_regs): Define.
13848 (ia64_regmap): Renamed from regmap, made static.
13849 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13851 (ia64_cannot_store_register): Renamed from cannot_store_register,
13853 (the_low_target): New.
13854 * linux-m68k-low.c (num_regs): Remove.
13855 (m68k_num_regs): Define.
13856 (m68k_regmap): Renamed from regmap, made static.
13857 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13859 (m68k_cannot_store_register): Renamed from cannot_store_register,
13861 (the_low_target): New.
13862 * linux-mips-low.c (num_regs): Remove.
13863 (mips_num_regs): Define.
13864 (mips_regmap): Renamed from regmap, made static.
13865 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13867 (mips_cannot_store_register): Renamed from cannot_store_register,
13869 (the_low_target): New.
13870 * linux-ppc-low.c (num_regs): Remove.
13871 (ppc_num_regs): Define.
13872 (ppc_regmap): Renamed from regmap, made static.
13873 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13875 (ppc_cannot_store_register): Renamed from cannot_store_register,
13877 (the_low_target): New.
13878 * linux-s390-low.c (num_regs): Remove.
13879 (s390_num_regs): Define.
13880 (s390_regmap): Renamed from regmap, made static.
13881 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13883 (s390_cannot_store_register): Renamed from cannot_store_register,
13885 (the_low_target): New.
13886 * linux-sh-low.c (num_regs): Remove.
13887 (sh_num_regs): Define.
13888 (sh_regmap): Renamed from regmap, made static.
13889 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13891 (sh_cannot_store_register): Renamed from cannot_store_register,
13893 (the_low_target): New.
13894 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13895 (the_low_target): New.
13897 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13899 * Makefile.in: Add stamp-h target.
13900 * configure.in: Create stamp-h.
13901 * configure: Regenerated.
13903 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13905 * inferiors.c: New file.
13906 * target.c: New file.
13907 * target.h: New file.
13908 * Makefile.in: Add target.o and inferiors.o. Update
13910 * linux-low.c (inferior_pid): New static variable,
13911 moved from server.c.
13912 (linux_create_inferior): Renamed from create_inferior.
13913 Call add_inferior. Return 0 on success instead of a PID.
13914 (linux_attach): Renamed from myattach.
13915 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13916 (linux_thread_alive): Renamed from mythread_alive.
13917 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13919 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13920 (regsets_store_inferior_registers): Correct error message.
13921 Add missing ``return 0''.
13922 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13923 (linux_store_registers): Renamed from store_inferior_registers.
13924 (linux_read_memory): Renamed from read_inferior_memory.
13925 (linux_write_memory): Renamed from write_inferior_memory.
13926 (linux_target_ops): New structure.
13927 (initialize_low): Call set_target_ops ().
13928 * remote-utils.c (unhexify): New function.
13929 (hexify): New function.
13930 (input_interrupt): Send signals to ``signal_pid''.
13931 * server.c (inferior_pid): Remove.
13932 (start_inferior): Update create_inferior call.
13933 (attach_inferior): Call add_inferior.
13934 (handle_query): New function.
13935 (main): Call handle_query for `q' packets.
13936 * server.h: Include "target.h". Remove obsolete prototypes.
13937 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13939 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13941 * Makefile.in: Add WARN_CFLAGS. Update configury
13943 * configure.in: Check for <string.h>
13944 * configure: Regenerate.
13945 * config.in: Regenerate.
13946 * gdbreplay.c: Include needed system headers.
13947 (remote_open): Remove strchr prototype.
13948 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13949 * regcache.c (supply_register): Change buf argument to const void *.
13950 (supply_register_by_name): Likewise.
13951 (collect_register): Change buf argument to void *.
13952 (collect_register_by_name): Likewise.
13953 * regcache.h: Add missing prototypes.
13954 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13955 * server.c (handle_query): New function.
13956 (attached): New static variable, moved out of main.
13957 (main): Quiet longjmp clobber warnings.
13958 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13959 * utils.c (error): Remove NORETURN.