1 2015-11-19 Pedro Alves <palves@redhat.com>
3 * linux-low.c (linux_process_qsupported): Change prototype.
5 * linux-low.h (struct linux_target_ops) <process_qsupported>:
7 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
8 and adjust to loop over all features.
9 * server.c (handle_query) <qSupported>: Adjust to call
10 target_process_qsupported once, passing it a vector of unprocessed
12 * target.h (struct target_ops) <process_qsupported>: Change
14 (target_process_qsupported): Adjust.
16 2015-11-19 Pedro Alves <palves@redhat.com>
18 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
20 * configure: Regenerate.
22 2015-11-19 Pedro Alves <palves@redhat.com>
24 * configure: Regenerate.
26 2015-11-19 Yao Qi <yao.qi@linaro.org>
28 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
31 2015-11-19 Yao Qi <yao.qi@linaro.org>
33 * linux-aarch64-low.c (enum aarch64_operand_type): New.
34 (struct aarch64_operand): Move enum out.
36 2015-11-19 Yao Qi <yao.qi@linaro.org>
38 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
39 struct user_fpsimd_state *.
40 (aarch64_store_fpregset): Likewise.
42 2015-11-19 Yao Qi <yao.qi@linaro.org>
44 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
45 struct user_pt_regs *.
46 (aarch64_store_gregset): Likewise.
48 2015-11-18 Pedro Alves <palves@redhat.com>
50 * Makefile.in (all_object_files): Add $IPA_OBJS.
52 2015-11-17 Pedro Alves <palves@redhat.com>
54 * win32-low.c (win32_resume): Use gdb_signal_from_host,
55 GDB_SIGNAL_0 and gdb_signal_to_string.
57 2015-11-17 Pedro Alves <palves@redhat.com>
59 * win32-low.c (handle_output_debug_string): Remove parameter.
60 (win32_kill): Remove our_status local and adjust call to
61 handle_output_debug_string.
62 (get_child_debug_event): Adjust call to
63 handle_output_debug_string.
65 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
67 * linux-mips-low.c (mips_fill_gregset): Add cast.
68 (mips_store_gregset): Likewise.
69 (mips_fill_fpregset): Likewise.
70 (mips_store_fpregset): Likewise.
72 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
74 * linux-mips-low.c (mips_add_watchpoint): Rename private to
77 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
79 * linux-mips-low.c (mips_linux_new_thread): Change type of
80 watch_type to enum target_hw_bp_type.
82 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
84 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
85 Change return type to arm_hwbp_type.
87 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
89 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
90 (arm_store_gregset): Likewise.
91 * linux-arm-low.c (arm_get_hwcap): Likewise.
92 (arm_read_description): Likewise.
94 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
96 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
98 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
100 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
101 (ppc_fill_vsxregset): Likewise.
102 (ppc_store_vsxregset): Likewise.
103 (ppc_fill_vrregset): Likewise.
104 (ppc_store_vrregset): Likewise.
105 (ppc_fill_evrregset): Likewise.
106 (ppc_store_evrregset): Likewise.
108 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
110 * linux-ppc-low.c (ppc_usrregs_info): Remove
112 (ppc_arch_setup): Move lower in file.
114 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
116 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
117 (ps_pdwrite): Likewise.
119 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
121 * linux-arm-low.c (arm_new_thread): Move pointer dereference
122 to after assert checks.
124 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
126 * proc-service.c (ps_pdread): Add/adjust casts.
127 (ps_pdwrite): Add/adjust casts.
129 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
131 * server.c (handle_search_memory_1): Cast return value of
134 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
136 * server.c (write_qxfer_response): Change type of data to
139 2015-10-29 Pedro Alves <palves@redhat.com>
141 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
143 2015-10-29 Pedro Alves <palves@redhat.com>
145 * tracepoint.c (clear_installed_tracepoints): Add casts.
147 2015-10-29 Pedro Alves <palves@redhat.com>
149 * server.c (handle_v_cont, process_serial_event): Add enum
150 gdb_signal casts to signal parsing code.
152 2015-10-29 Pedro Alves <palves@redhat.com>
154 * linux-low.h (NULL_REGSET): Define.
155 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
156 * linux-arm-low.c (arm_regsets): Likewise.
157 * linux-crisv32-low.c (cris_regsets): Likewise.
158 * linux-m68k-low.c (m68k_regsets): Likewise.
159 * linux-mips-low.c (mips_regsets): Likewise.
160 * linux-nios2-low.c (nios2_regsets): Likewise.
161 * linux-ppc-low.c (ppc_regsets): Likewise.
162 * linux-s390-low.c (s390_regsets): Likewise.
163 * linux-sh-low.c (sh_regsets): Likewise.
164 * linux-sparc-low.c (sparc_regsets): Likewise.
165 * linux-tic6x-low.c (tic6x_regsets): Likewise.
166 * linux-tile-low.c (tile_regsets): Likewise.
167 * linux-x86-low.c (x86_regsets): Likewise.
168 * linux-xtensa-low.c (xtensa_regsets): Likewise.
170 2015-10-29 Pedro Alves <palves@redhat.com>
172 * linux-low.h (NULL_REGSET): Define.
173 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
174 * linux-arm-low.c (arm_regsets): Likewise.
175 * linux-crisv32-low.c (cris_regsets): Likewise.
176 * linux-m68k-low.c (m68k_regsets): Likewise.
177 * linux-mips-low.c (mips_regsets): Likewise.
178 * linux-nios2-low.c (nios2_regsets): Likewise.
179 * linux-ppc-low.c (ppc_regsets): Likewise.
180 * linux-s390-low.c (s390_regsets): Likewise.
181 * linux-sh-low.c (sh_regsets): Likewise.
182 * linux-sparc-low.c (sparc_regsets): Likewise.
183 * linux-tic6x-low.c (tic6x_regsets): Likewise.
184 * linux-tile-low.c (tile_regsets): Likewise.
185 * linux-x86-low.c (x86_regsets): Likewise.
186 * linux-xtensa-low.c (xtensa_regsets): Likewise.
188 2015-10-26 Doug Evans <dje@google.com>
190 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
192 2015-10-26 Doug Evans <dje@google.com>
194 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
196 2015-10-26 Doug Evans <dje@google.com>
198 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
200 (attach_thread, find_new_threads_callback): Ditto.
202 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
204 * mem-break.h (set_breakpoint_data): Remove.
206 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
208 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
209 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
210 (initialize_low): Remove set_breakpoint_data call.
211 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
212 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
213 (initialize_low): Remove set_breakpoint_data call.
214 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
215 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
216 (initialize_low): Remove set_breakpoint_data call.
218 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
220 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
221 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
222 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
223 * target.h (target_breakpoint_kind_from_pc): New macro.
225 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
227 * linux-low.c (default_breakpoint_kind_from_pc): New function.
228 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
229 the default breakpoint kind.
231 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
233 * linux-arm-low.c (arm_supports_z_point_type): Add software
236 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
238 * linux-arm-low.c: Refactor breakpoint definitions.
239 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
240 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
242 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
244 * Makefile.in: Add arm.c/o.
245 * configure.srv: Likewise.
246 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
247 (arm_breakpoint_kind_from_pc): New function.
248 (arm_sw_breakpoint_from_kind): Return proper kind.
249 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
251 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
253 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
255 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
256 (struct raw_breakpoint) <size>: Remove.
257 (struct raw_breakpoint) <kind>: Add.
258 (bp_size): New function.
259 (bp_opcode): Likewise.
260 (find_raw_breakpoint_at): Adjust for kind.
261 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
262 (remove_memory_breakpoint): Adjust for kind call bp_size.
263 (set_raw_breakpoint_at): Adjust for kind.
264 (set_breakpoint): Likewise.
265 (set_breakpoint_at): Call breakpoint_kind_from_pc.
266 (delete_raw_breakpoint): Adjust for kind.
267 (delete_breakpoint): Likewise.
268 (find_gdb_breakpoint): Likewise.
269 (set_gdb_breakpoint_1): Likewise.
270 (set_gdb_breakpoint): Likewise.
271 (delete_gdb_breakpoint_1): Likewise.
272 (delete_gdb_breakpoint): Likewise.
273 (uninsert_raw_breakpoint): Likewise.
274 (reinsert_raw_breakpoint): Likewise.
275 (set_breakpoint_data): Remove.
276 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
277 (check_mem_read): Adjust for kind call bp_size.
278 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
279 (clone_one_breakpoint): Adjust for kind.
280 * mem-break.h (set_gdb_breakpoint): Likewise.
281 (delete_gdb_breakpoint): Likewise.
282 * server.c (process_serial_event): Likewise.
284 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
286 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
287 (struct linux_target_ops) <breakpoint>: Remove.
288 (struct linux_target_ops) <breakpoint_len>: Remove.
289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
290 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
291 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
292 (arm_sw_breakpoint_from_kind): New function.
293 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
294 (struct linux_target_ops) <breakpoint>: Remove.
295 (struct linux_target_ops) <breakpoint_len>: Remove.
296 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
297 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
298 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
299 (struct linux_target_ops) <breakpoint>: Remove.
300 (struct linux_target_ops) <breakpoint_len>: Remove.
301 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
302 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
303 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
304 (struct linux_target_ops) <breakpoint>: Remove.
305 (struct linux_target_ops) <breakpoint_len>: Remove.
306 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
307 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
308 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
309 and sw_breakpoint_from_kind to increment the pc.
310 (linux_breakpoint_kind_from_pc): New function.
311 (linux_sw_breakpoint_from_kind): New function.
312 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
313 (initialize_low): Call breakpoint_kind_from_pc and
314 sw_breakpoint_from_kind to replace breakpoint_data/len.
315 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
317 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
318 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
319 (struct linux_target_ops) <breakpoint>: Remove.
320 (struct linux_target_ops) <breakpoint_len>: Remove.
321 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
322 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
323 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
324 (struct linux_target_ops) <breakpoint>: Remove.
325 (struct linux_target_ops) <breakpoint_len>: Remove.
326 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
327 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
328 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
329 (struct linux_target_ops) <breakpoint>: Remove.
330 (struct linux_target_ops) <breakpoint_len>: Remove.
331 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
332 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
333 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
334 (struct linux_target_ops) <breakpoint>: Remove.
335 (struct linux_target_ops) <breakpoint_len>: Remove.
336 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
337 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
338 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
339 (struct linux_target_ops) <breakpoint>: Remove.
340 (struct linux_target_ops) <breakpoint_len>: Remove.
341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
343 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
344 (struct linux_target_ops) <breakpoint>: Remove.
345 (struct linux_target_ops) <breakpoint_len>: Remove.
346 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
347 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
348 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
349 (struct linux_target_ops) <breakpoint>: Remove.
350 (struct linux_target_ops) <breakpoint_len>: Remove.
351 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
352 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
353 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
354 (struct linux_target_ops) <breakpoint>: Remove.
355 (struct linux_target_ops) <breakpoint_len>: Remove.
356 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
357 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
358 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
359 (struct linux_target_ops) <breakpoint>: Remove.
360 (struct linux_target_ops) <breakpoint_len>: Remove.
361 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
362 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
363 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
364 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
365 (struct linux_target_ops) <breakpoint>: Remove.
366 (struct linux_target_ops) <breakpoint_len>: Remove.
367 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
369 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
370 (struct linux_target_ops) <breakpoint>: Remove.
371 (struct linux_target_ops) <breakpoint_len>: Remove.
372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
375 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
377 * linux-cris-low.c (cris_get_pc): Remove void arg.
379 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
381 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
384 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
386 * inferiors.c (thread_pid_matches_callback): New function.
387 (find_thread_process): New function.
388 (remove_thread): Reset current_thread.
389 (remove_process): Assert threads have been removed first.
391 2015-10-15 Yao Qi <yao.qi@linaro.org>
393 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
395 (aarch64_remove_point): Likewise.
396 * regcache.c (regcache_register_size): New function.
398 2015-10-12 Yao Qi <yao.qi@linaro.org>
400 * linux-aarch64-low.c: Update all callers as emit_load_store
401 is renamed to aarch64_emit_load_store.
403 2015-10-12 Yao Qi <yao.qi@linaro.org>
405 * linux-aarch64-low.c: Update all callers of function renaming
406 from emit_insn to aarch64_emit_insn.
408 2015-10-12 Yao Qi <yao.qi@linaro.org>
410 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
412 (struct aarch64_memory_operand): Likewise.
414 (emit_insn): Move to arch/aarch64-insn.c.
415 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
416 (emit_load_store): Move to arch/aarch64-insn.c.
417 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
418 (can_encode_int32): Remove.
420 2015-10-12 Yao Qi <yao.qi@linaro.org>
422 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
423 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
424 (aarch64_relocate_instruction): Likewise.
425 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
426 (struct aarch64_insn_visitor): Likewise.
428 2015-10-12 Yao Qi <yao.qi@linaro.org>
430 * linux-aarch64-low.c (struct aarch64_insn_data): New.
431 (struct aarch64_insn_visitor): New.
432 (struct aarch64_insn_relocation_data): New.
433 (aarch64_ftrace_insn_reloc_b): New function.
434 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
435 (aarch64_ftrace_insn_reloc_cb): Likewise.
436 (aarch64_ftrace_insn_reloc_tb): Likewise.
437 (aarch64_ftrace_insn_reloc_adr): Likewise.
438 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
439 (aarch64_ftrace_insn_reloc_others): Likewise.
441 (aarch64_relocate_instruction): Use visitor.
443 2015-10-12 Yao Qi <yao.qi@linaro.org>
445 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
446 int. Add argument buf.
447 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
448 aarch64_relocate_instruction.
450 2015-10-12 Yao Qi <yao.qi@linaro.org>
452 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
453 argument insn. Remove local variable insn. Don't call
455 (aarch64_install_fast_tracepoint_jump_pad): Call
458 2015-09-30 Yao Qi <yao.qi@linaro.org>
460 * linux-aarch64-low.c (emit_movk): Shorten a long line.
461 (emit_load_store_pair): Likewise.
463 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
465 * dll.c (match_dll): Add cast(s).
466 (unloaded_dll): Likewise.
467 * linux-low.c (second_thread_of_pid_p): Likewise.
468 (delete_lwp_callback): Likewise.
469 (count_events_callback): Likewise.
470 (select_event_lwp_callback): Likewise.
471 (linux_set_resume_request): Likewise.
472 * server.c (accumulate_file_name_length): Likewise.
473 (emit_dll_description): Likewise.
474 (handle_qxfer_threads_worker): Likewise.
475 (visit_actioned_threads): Likewise.
476 * thread-db.c (any_thread_of): Likewise.
477 * tracepoint.c (same_process_p): Likewise.
478 (match_blocktype): Likewise.
479 (build_traceframe_info_xml): Likewise.
481 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
483 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
485 (gdb_unparse_agent_expr): Likewise.
486 * hostio.c (require_data): Likewise.
487 (handle_pread): Likewise.
488 * linux-low.c (disable_regset): Likewise.
489 (fetch_register): Likewise.
490 (store_register): Likewise.
491 (get_dynamic): Likewise.
492 (linux_qxfer_libraries_svr4): Likewise.
493 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
494 (set_fast_tracepoint_jump): Likewise.
495 (uninsert_fast_tracepoint_jumps_at): Likewise.
496 (reinsert_fast_tracepoint_jumps_at): Likewise.
497 (validate_inserted_breakpoint): Likewise.
498 (clone_agent_expr): Likewise.
499 * regcache.c (init_register_cache): Likewise.
500 * remote-utils.c (putpkt_binary_1): Likewise.
501 (decode_M_packet): Likewise.
502 (decode_X_packet): Likewise.
503 (look_up_one_symbol): Likewise.
504 (relocate_instruction): Likewise.
505 (monitor_output): Likewise.
506 * server.c (handle_search_memory): Likewise.
507 (handle_qxfer_exec_file): Likewise.
508 (handle_qxfer_libraries): Likewise.
509 (handle_qxfer): Likewise.
510 (handle_query): Likewise.
511 (handle_v_cont): Likewise.
512 (handle_v_run): Likewise.
513 (captured_main): Likewise.
514 * target.c (write_inferior_memory): Likewise.
515 * thread-db.c (try_thread_db_load_from_dir): Likewise.
516 * tracepoint.c (init_trace_buffer): Likewise.
517 (add_tracepoint_action): Likewise.
518 (add_traceframe): Likewise.
519 (add_traceframe_block): Likewise.
520 (cmd_qtdpsrc): Likewise.
521 (cmd_qtdv): Likewise.
522 (cmd_qtstatus): Likewise.
523 (response_source): Likewise.
524 (response_tsv): Likewise.
525 (cmd_qtnotes): Likewise.
526 (gdb_collect): Likewise.
527 (initialize_tracepoint): Likewise.
529 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
531 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
532 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
533 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
535 (enum aarch64_condition_codes): New enum.
536 (w0): New static global.
539 (struct aarch64_memory_operand) <type>: New
540 MEMORY_OPERAND_POSTINDEX type.
541 (postindex_memory_operand): New helper function.
542 (emit_ret): New function.
543 (emit_load_store_pair): New function, factored out of emit_stp
544 with support for MEMORY_OPERAND_POSTINDEX.
545 (emit_stp): Rewrite using emit_load_store_pair.
546 (emit_ldp): New function.
547 (emit_load_store): Likewise.
548 (emit_ldr): Mention post-index instruction in comment.
549 (emit_ldrh): New function.
550 (emit_ldrb): New function.
551 (emit_ldrsw): Mention post-index instruction in comment.
552 (emit_str): Likewise.
553 (emit_subs): New function.
554 (emit_cmp): Likewise.
555 (emit_and): Likewise.
556 (emit_orr): Likewise.
557 (emit_orn): Likewise.
558 (emit_eor): Likewise.
559 (emit_mvn): Likewise.
560 (emit_lslv): Likewise.
561 (emit_lsrv): Likewise.
562 (emit_asrv): Likewise.
563 (emit_mul): Likewise.
564 (emit_sbfm): Likewise.
565 (emit_sbfx): Likewise.
566 (emit_ubfm): Likewise.
567 (emit_ubfx): Likewise.
568 (emit_csinc): Likewise.
569 (emit_cset): Likewise.
570 (emit_nop): Likewise.
571 (emit_ops_insns): New helper function.
572 (emit_pop): Likewise.
573 (emit_push): Likewise.
574 (aarch64_emit_prologue): New function.
575 (aarch64_emit_epilogue): Likewise.
576 (aarch64_emit_add): Likewise.
577 (aarch64_emit_sub): Likewise.
578 (aarch64_emit_mul): Likewise.
579 (aarch64_emit_lsh): Likewise.
580 (aarch64_emit_rsh_signed): Likewise.
581 (aarch64_emit_rsh_unsigned): Likewise.
582 (aarch64_emit_ext): Likewise.
583 (aarch64_emit_log_not): Likewise.
584 (aarch64_emit_bit_and): Likewise.
585 (aarch64_emit_bit_or): Likewise.
586 (aarch64_emit_bit_xor): Likewise.
587 (aarch64_emit_bit_not): Likewise.
588 (aarch64_emit_equal): Likewise.
589 (aarch64_emit_less_signed): Likewise.
590 (aarch64_emit_less_unsigned): Likewise.
591 (aarch64_emit_ref): Likewise.
592 (aarch64_emit_if_goto): Likewise.
593 (aarch64_emit_goto): Likewise.
594 (aarch64_write_goto_address): Likewise.
595 (aarch64_emit_const): Likewise.
596 (aarch64_emit_call): Likewise.
597 (aarch64_emit_reg): Likewise.
598 (aarch64_emit_pop): Likewise.
599 (aarch64_emit_stack_flush): Likewise.
600 (aarch64_emit_zero_ext): Likewise.
601 (aarch64_emit_swap): Likewise.
602 (aarch64_emit_stack_adjust): Likewise.
603 (aarch64_emit_int_call_1): Likewise.
604 (aarch64_emit_void_call_2): Likewise.
605 (aarch64_emit_eq_goto): Likewise.
606 (aarch64_emit_ne_goto): Likewise.
607 (aarch64_emit_lt_goto): Likewise.
608 (aarch64_emit_le_goto): Likewise.
609 (aarch64_emit_gt_goto): Likewise.
610 (aarch64_emit_ge_got): Likewise.
611 (aarch64_emit_ops_impl): New static global variable.
612 (aarch64_emit_ops): New target function, return
613 &aarch64_emit_ops_impl.
614 (struct linux_target_ops): Install it.
616 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
618 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
619 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
621 * linux-aarch64-ipa.c: New file.
622 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
624 (aarch64_get_thread_area): New target method.
625 (extract_signed_bitfield): New helper function.
626 (aarch64_decode_ldr_literal): New function.
627 (enum aarch64_opcodes): New enum.
628 (struct aarch64_register): New struct.
629 (struct aarch64_operand): New struct.
630 (x0): New static global.
639 (aarch64_register): New helper function.
640 (register_operand): Likewise.
641 (immediate_operand): Likewise.
642 (struct aarch64_memory_operand): New struct.
643 (offset_memory_operand): New helper function.
644 (preindex_memory_operand): Likewise.
645 (enum aarch64_system_control_registers): New enum.
647 (emit_insn): New helper function.
648 (emit_b): New function.
649 (emit_bcond): Likewise.
652 (emit_blr): Likewise.
653 (emit_stp): Likewise.
654 (emit_ldp_q_offset): Likewise.
655 (emit_stp_q_offset): Likewise.
656 (emit_load_store): Likewise.
657 (emit_ldr): Likewise.
658 (emit_ldrsw): Likewise.
659 (emit_str): Likewise.
660 (emit_ldaxr): Likewise.
661 (emit_stxr): Likewise.
662 (emit_stlr): Likewise.
663 (emit_data_processing_reg): Likewise.
664 (emit_data_processing): Likewise.
665 (emit_add): Likewise.
666 (emit_sub): Likewise.
667 (emit_mov): Likewise.
668 (emit_movk): Likewise.
669 (emit_mov_addr): Likewise.
670 (emit_mrs): Likewise.
671 (emit_msr): Likewise.
672 (emit_sevl): Likewise.
673 (emit_wfe): Likewise.
674 (append_insns): Likewise.
675 (can_encode_int32_in): New helper function.
676 (aarch64_relocate_instruction): New function.
677 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
678 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
679 (struct linux_target_ops): Install aarch64_get_thread_area,
680 aarch64_install_fast_tracepoint_jump_pad and
681 aarch64_get_min_fast_tracepoint_insn_len.
683 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
685 * Makefile.in (aarch64-insn.o): New rule.
686 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
688 2015-09-21 Yao Qi <yao.qi@linaro.org>
690 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
692 2015-09-21 Yao Qi <yao.qi@linaro.org>
694 * tracepoint.c (max_jump_pad_size): Remove.
696 2015-09-18 Yao Qi <yao.qi@linaro.org>
698 * linux-aarch64-low.c: Don't include sys/uio.h.
699 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
701 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
703 * tracepoint.c (eval_result_type): Change prototype.
704 (condition_true_at_tracepoint): Fix argument to compiled_cond.
706 2015-09-15 Pedro Alves <palves@redhat.com>
708 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
709 Check whether to report exec events instead of checking whether
710 multiprocess is enabled.
712 2015-09-15 Pedro Alves <palves@redhat.com>
715 * remote-utils.c (prepare_resume_reply): Merge
716 TARGET_WAITKIND_VFORK_DONE switch case with the
717 TARGET_WAITKIND_FORKED case.
719 2015-09-15 Yao Qi <yao.qi@linaro.org>
721 * server.c (handle_query): Check string comparison using
722 "else if" instead of "if".
724 2015-09-15 Yao Qi <yao.qi@linaro.org>
726 * server.c (vCont_supported): New global variable.
727 (handle_query): Set vCont_supported to 1 if "vContSupported+"
728 matches. Append ";vContSupported+" to own_buf.
729 (handle_v_requests): Append ";s;S" to own_buf if target supports
730 hardware single step or vCont_supported is false.
731 (capture_main): Set vCont_supported to zero.
733 2015-09-15 Yao Qi <yao.qi@linaro.org>
735 * linux-low.c (linux_supports_conditional_breakpoints): Rename
737 (linux_supports_hardware_single_step): ... New function.
738 (linux_target_ops): Update.
739 * lynx-low.c (lynx_target_ops): Set field
740 supports_hardware_single_step to target_can_do_hardware_single_step.
741 * nto-low.c (nto_target_ops): Likewise.
742 * spu-low.c (spu_target_ops): Likewise.
743 * win32-low.c (win32_target_ops): Likewise.
744 * target.c (target_can_do_hardware_single_step): New function.
745 * target.h (struct target_ops) <supports_conditional_breakpoints>:
746 Remove. <supports_hardware_single_step>: New field.
747 (target_supports_conditional_breakpoints): Remove.
748 (target_supports_hardware_single_step): New macro.
749 (target_can_do_hardware_single_step): Declare.
750 * server.c (handle_query): Use target_supports_hardware_single_step
751 instead of target_supports_conditional_breakpoints.
753 2015-09-15 Yao Qi <yao.qi@linaro.org>
755 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
757 (struct linux_target_ops the_low_target): Install
758 aarch64_linux_siginfo_fixup.
760 2015-09-11 Don Breazeal <donb@codesourcery.com>
761 Luis Machado <lgustavo@codesourcery.com>
763 * linux-low.c (linux_mourn): Static declaration.
764 (linux_arch_setup): Move in front of
765 handle_extended_wait.
766 (linux_arch_setup_thread): New function.
767 (handle_extended_wait): Handle exec events. Call
768 linux_arch_setup_thread. Make event_lwp argument a
769 pointer-to-a-pointer.
770 (check_zombie_leaders): Do not check stopped threads.
771 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
772 (linux_low_filter_event): Add lwp and thread for exec'ing
773 non-leader thread if leader thread has been deleted.
774 Refactor code into linux_arch_setup_thread and call it.
775 Pass child lwp pointer by reference to handle_extended_wait.
776 (linux_wait_for_event_filtered): Update comment.
777 (linux_wait_1): Prevent clobbering exec event status.
778 (linux_supports_exec_events): New function.
779 (linux_target_ops) <supports_exec_events>: Initialize new member.
780 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
782 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
783 * server.c (report_exec_events): New global variable.
784 (handle_query): Handle qSupported query for exec-events feature.
785 (captured_main): Initialize report_exec_events.
786 * server.h (report_exec_events): Declare new global variable.
787 * target.h (struct target_ops) <supports_exec_events>: New
789 (target_supports_exec_events): New macro.
790 * win32-low.c (win32_target_ops) <supports_exec_events>:
791 Initialize new member.
793 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
795 * linux-low.c (linux_low_enable_btrace): Remove.
796 (linux_target_ops): Replace linux_low_enable_btrace with
799 2015-09-03 Yao Qi <yao.qi@linaro.org>
801 * linux-aarch64-low.c (aarch64_insert_point): Call
802 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
805 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
807 * linux-low.c (check_stopped_by_breakpoint): Use
808 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
810 2015-08-27 Pedro Alves <palves@redhat.com>
812 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
814 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
816 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
817 the XNEW-family equivalent.
818 (compile_bytecodes): Likewise.
819 * dll.c (loaded_dll): Likewise.
820 * event-loop.c (append_callback_event): Likewise.
821 (create_file_handler): Likewise.
822 (create_file_event): Likewise.
823 * hostio.c (handle_open): Likewise.
824 * inferiors.c (add_thread): Likewise.
825 (add_process): Likewise.
826 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
827 * linux-arm-low.c (arm_new_process): Likewise.
828 (arm_new_thread): Likewise.
829 * linux-low.c (add_to_pid_list): Likewise.
830 (linux_add_process): Likewise.
831 (handle_extended_wait): Likewise.
833 (enqueue_one_deferred_signal): Likewise.
834 (enqueue_pending_signal): Likewise.
835 (linux_resume_one_lwp_throw): Likewise.
836 (linux_resume_one_thread): Likewise.
837 (linux_read_memory): Likewise.
838 (linux_write_memory): Likewise.
839 * linux-mips-low.c (mips_linux_new_process): Likewise.
840 (mips_linux_new_thread): Likewise.
841 (mips_add_watchpoint): Likewise.
842 * linux-x86-low.c (initialize_low_arch): Likewise.
843 * lynx-low.c (lynx_add_process): Likewise.
844 * mem-break.c (set_raw_breakpoint_at): Likewise.
845 (set_breakpoint): Likewise.
846 (add_condition_to_breakpoint): Likewise.
847 (add_commands_to_breakpoint): Likewise.
848 (clone_agent_expr): Likewise.
849 (clone_one_breakpoint): Likewise.
850 * regcache.c (new_register_cache): Likewise.
851 * remote-utils.c (look_up_one_symbol): Likewise.
852 * server.c (queue_stop_reply): Likewise.
853 (start_inferior): Likewise.
854 (queue_stop_reply_callback): Likewise.
855 (handle_target_event): Likewise.
856 * spu-low.c (fetch_ppc_memory): Likewise.
857 (store_ppc_memory): Likewise.
858 * target.c (set_target_ops): Likewise.
859 * thread-db.c (thread_db_load_search): Likewise.
860 (try_thread_db_load_1): Likewise.
861 * tracepoint.c (add_tracepoint): Likewise.
862 (add_tracepoint_action): Likewise.
863 (create_trace_state_variable): Likewise.
864 (cmd_qtdpsrc): Likewise.
865 (cmd_qtro): Likewise.
866 (add_while_stepping_state): Likewise.
867 * win32-low.c (child_add_thread): Likewise.
868 (get_image_name): Likewise.
870 2015-08-25 Yao Qi <yao.qi@linaro.org>
872 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
874 2015-08-25 Yao Qi <yao.qi@linaro.org>
876 * Makefile.in (aarch64-linux.o): New rule.
877 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
879 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
880 (aarch64_init_debug_reg_state): Make it extern.
881 (aarch64_linux_prepare_to_resume): Remove.
883 2015-08-25 Yao Qi <yao.qi@linaro.org>
885 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
886 lwp_arch_private_info and ptid_of_lwp.
888 2015-08-25 Yao Qi <yao.qi@linaro.org>
890 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
891 Find proc_info by find_process_pid. All callers updated.
893 2015-08-25 Yao Qi <yao.qi@linaro.org>
895 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
897 (debug_reg_change_callback): Remove.
898 (aarch64_notify_debug_reg_change): Remove.
900 2015-08-25 Yao Qi <yao.qi@linaro.org>
902 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
903 Call current_lwp_ptid.
905 2015-08-25 Yao Qi <yao.qi@linaro.org>
907 * linux-aarch64-low.c (debug_reg_change_callback): Use
910 2015-08-25 Yao Qi <yao.qi@linaro.org>
912 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
914 2015-08-25 Yao Qi <yao.qi@linaro.org>
916 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
918 2015-08-25 Yao Qi <yao.qi@linaro.org>
920 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
923 2015-08-25 Yao Qi <yao.qi@linaro.org>
925 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
927 (debug_reg_change_callback): Remove argument entry and add argument
928 lwp. Remove local variable thread. Don't print thread id in the
929 debugging output. Don't check whether pid of thread equals to pid.
930 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
931 iterate_over_lwps instead find_inferior.
933 2015-08-24 Pedro Alves <palves@redhat.com>
935 * inferiors.c (get_first_process): New function.
936 * inferiors.h (get_first_process): New declaration.
937 * remote-utils.c (read_ptid): Default to the first process in the
938 list, instead of to the current thread's process.
940 2015-08-24 Pedro Alves <palves@redhat.com>
942 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
943 * event-loop.c: Likewise.
944 * remote-utils.c: Likewise.
945 * tracepoint.c: Likewise.
947 2015-08-24 Pedro Alves <palves@redhat.com>
949 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
952 2015-08-21 Pedro Alves <palves@redhat.com>
954 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
955 instead of literal 1.
957 2015-08-21 Pedro Alves <palves@redhat.com>
959 * tdesc.c (default_description): Explicitly zero-initialize.
961 2015-08-21 Pedro Alves <palves@redhat.com>
964 * inferiors.c (remove_thread): Discard any pending stop reply for
966 * server.c (remove_all_on_match_pid): Rename to ...
967 (remove_all_on_match_ptid): ... this. Work with a filter ptid
969 (discard_queued_stop_replies): Change parameter to a ptid. Now
971 (handle_v_kill, kill_inferior_callback, captured_main)
972 (process_serial_event): Adjust.
973 * server.h (discard_queued_stop_replies): Declare.
975 2015-08-21 Pedro Alves <palves@redhat.com>
977 * linux-low.c (wait_for_sigstop): Always switch to no thread
978 selected if the previously current thread dies.
979 * lynx-low.c (lynx_request_interrupt): Use the first thread's
980 process instead of the current thread's.
981 * remote-utils.c (input_interrupt): Don't check if there's no
983 * server.c (gdb_read_memory, gdb_write_memory): If setting the
984 current thread to the general thread fails, error out.
985 (handle_qxfer_auxv, handle_qxfer_libraries)
986 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
987 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
988 (handle_query): Check if there's a thread selected instead of
989 checking whether there's any thread in the thread list.
990 (handle_qxfer_threads, handle_qxfer_btrace)
991 (handle_qxfer_btrace_conf): Don't error out early if there's no
992 thread in the thread list.
993 (handle_v_cont, myresume): Don't set the current thread to the
995 (process_serial_event) <Hg handling>: Also set thread_id if the
996 previous general thread is still alive.
997 (process_serial_event) <g/G handling>: If setting the current
998 thread to the general thread fails, error out.
999 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1000 thread's lwp instead of the current thread's.
1001 * target.c (set_desired_thread): If the desired thread was not
1002 found, leave the current thread pointing to NULL. Return an int
1003 (boolean) indicating success.
1004 * target.h (set_desired_thread): Change return type to int.
1006 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1008 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1009 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1011 (ps_get_thread_area): New function.
1013 2015-08-19 Gary Benson <gbenson@redhat.com>
1015 * hostio.c (handle_pread): Do not attempt to read more data
1016 than hostio_reply_with_data can fit in a packet.
1018 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1020 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1022 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1024 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1026 2015-08-06 Pedro Alves <palves@redhat.com>
1028 * tracepoint.c (expr_eval_result): Now an int.
1030 2015-08-06 Pedro Alves <palves@redhat.com>
1032 * gdbthread.h (struct regcache): Forward declare.
1033 (struct thread_info) <regcache_data>: Now a struct regcache
1035 * inferiors.c (inferior_regcache_data)
1036 (set_inferior_regcache_data): Now work with struct regcache
1038 * inferiors.h (struct regcache): Forward declare.
1039 (inferior_regcache_data, set_inferior_regcache_data): Now work
1040 with struct regcache pointers.
1041 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1042 (free_register_cache_thread): Remove struct regcache pointer
1045 2015-08-06 Pedro Alves <palves@redhat.com>
1047 * server.c (captured_main): On error, print the exception message
1048 to stderr, and if run_once is set, throw a quit.
1050 2015-08-06 Pedro Alves <palves@redhat.com>
1052 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1055 2015-08-06 Pedro Alves <palves@redhat.com>
1057 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1058 reading beyond the passed in buffer length.
1060 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1062 * tracepoint.c (symbol_list) <required>: Remove.
1064 2015-08-06 Pedro Alves <palves@redhat.com>
1066 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1067 count if stopping and suspending threads.
1068 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1069 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1070 (linux_detach): Complete an ongoing step-over.
1071 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1073 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1074 (linux_wait_1): If passing a signal to the inferior after
1075 finishing a step-over, unsuspend and re-resume all lwps. If we
1076 see a single-step event but the thread should be continuing, don't
1077 pass the trap to gdb.
1078 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1079 internal_error instead of gdb_assert.
1080 (enqueue_pending_signal): New function.
1081 (check_ptrace_stopped_lwp_gone): Add debug output.
1082 (start_step_over): Use internal_error instead of gdb_assert.
1083 (complete_ongoing_step_over): New function.
1084 (linux_resume_one_thread): Don't resume a suspended thread.
1085 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1088 2015-08-06 Pedro Alves <palves@redhat.com>
1090 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1091 (linux_thread_alive): Use lwp_is_marked_dead.
1092 (extended_event_reported): Delete.
1093 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1094 instead of extended_event_reported.
1095 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1097 (lwp_is_marked_dead): New function.
1098 (lwp_running): Use lwp_is_marked_dead.
1099 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1102 2015-08-06 Pedro Alves <palves@redhat.com>
1104 * linux-low.c (linux_wait_1): Move fork event output out of the
1105 !report_to_gdb check. Pass event_child->waitstatus to
1106 target_waitstatus_to_string instead of ourstatus.
1108 2015-08-04 Yao Qi <yao.qi@linaro.org>
1110 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1111 if current_thread is 32 bit.
1113 2015-08-04 Yao Qi <yao.qi@linaro.org>
1115 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1116 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1117 * server.c (extended_protocol): Remove "static".
1118 * server.h (extended_protocol): Declare it.
1120 2015-08-04 Yao Qi <yao.qi@linaro.org>
1122 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1123 both aarch64 and aarch32.
1124 (aarch64_set_pc): Likewise.
1126 2015-08-04 Yao Qi <yao.qi@linaro.org>
1128 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1129 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1130 arm-with-neon.xml to srv_xmlfiles.
1131 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1132 (is_64bit_tdesc): New function.
1133 (aarch64_linux_read_description): New function.
1134 (aarch64_arch_setup): Call aarch64_linux_read_description.
1135 (regs_info): Rename to regs_info_aarch64.
1136 (aarch64_regs_info): Return right regs_info.
1137 (initialize_low_arch): Call initialize_low_arch_aarch32.
1139 2015-08-04 Yao Qi <yao.qi@linaro.org>
1141 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1142 * linux-aarch32-low.c: New file.
1143 * linux-aarch32-low.h: New file.
1144 * linux-arm-low.c (arm_fill_gregset): Move it to
1145 linux-aarch32-low.c.
1146 (arm_store_gregset): Likewise.
1147 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1148 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1149 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1150 (regs_info): Rename to regs_info_arm.
1151 (arm_regs_info): Return regs_info_aarch32 if
1152 have_ptrace_getregset is 1 and target description is
1153 arm_with_neon or arm_with_vfpv3.
1154 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1155 Call initialize_low_arch_aarch32 instead.
1157 2015-08-04 Yao Qi <yao.qi@linaro.org>
1159 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1160 * linux-low.c: ... here.
1161 * linux-low.h (have_ptrace_getregset): Declare it.
1163 2015-08-04 Pedro Alves <palves@redhat.com>
1165 * thread-db.c (struct thread_db): Use new typedefs.
1166 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1168 (disable_thread_event_reporting): Cast result of dlsym to
1169 destination function pointer type.
1170 (thread_db_mourn): Use td_ta_delete_ftype.
1172 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1174 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1176 (CDX_BREAKPOINT): Define for R2.
1177 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1178 (the_low_target): Add comments.
1180 2015-07-30 Yao Qi <yao.qi@linaro.org>
1182 * linux-arm-low.c (arm_hwcap): Remove it.
1183 (arm_read_description): New local variable arm_hwcap. Don't
1184 set arm_hwcap to zero.
1186 2015-07-30 Yao Qi <yao.qi@linaro.org>
1188 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1189 Use regcache->tdesc instead.
1190 (arm_store_wmmxregset): Likewise.
1191 (arm_fill_vfpregset): Likewise.
1192 (arm_store_vfpregset): Likewise.
1194 2015-07-30 Yao Qi <yao.qi@linaro.org>
1196 * linux-arm-low.c: Include arch/arm.h.
1197 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1198 (arm_store_gregset): Likewise.
1200 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1202 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1203 ptrace's 4th parameter.
1205 2015-07-27 Yao Qi <yao.qi@linaro.org>
1207 * configure.srv (case aarch64*-*-linux*): Don't set
1210 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1212 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1214 * linux-arm-low.c: Likewise.
1215 * linux-cris-low.c: Likewise.
1216 * linux-crisv32-low.c: Likewise.
1217 * linux-low.c: Likewise.
1218 * linux-m68k-low.c: Likewise.
1219 * linux-mips-low.c: Likewise.
1220 * linux-nios2-low.c: Likewise.
1221 * linux-s390-low.c: Likewise.
1222 * linux-sparc-low.c: Likewise.
1223 * linux-tic6x-low.c: Likewise.
1224 * linux-tile-low.c: Likewise.
1225 * linux-x86-low.c: Likewise.
1227 2015-07-24 Pedro Alves <palves@redhat.com>
1229 * config.in: Regenerate.
1230 * configure: Regenerate.
1232 2015-07-24 Pedro Alves <palves@redhat.com>
1234 * acinclude.m4: Include ../ptrace.m4.
1235 * configure.ac: Call GDB_AC_PTRACE.
1236 * config.in, configure: Regenerate.
1238 2015-07-24 Yao Qi <yao.qi@linaro.org>
1240 * linux-low.c (linux_create_inferior): Remove setting to
1241 proc->priv->new_inferior.
1242 (linux_attach): Likewise.
1243 (linux_low_filter_event): Likewise.
1244 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1246 2015-07-24 Yao Qi <yao.qi@linaro.org>
1248 * linux-low.c (linux_arch_setup): New function.
1249 (linux_low_filter_event): If proc->tdesc is NULL and
1250 proc->attached is true, call the_low_target.arch_setup.
1251 Otherwise, keep status pending, and return.
1252 (linux_resume_one_lwp_throw): Don't call get_pc if
1253 thread->while_stepping isn't NULL. Don't call
1254 get_thread_regcache if proc->tdesc is NULL.
1255 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1256 (linux_target_ops): Install arch_setup.
1257 * server.c (start_inferior): Call the_target->arch_setup.
1258 * target.h (struct target_ops) <arch_setup>: New field.
1259 (target_arch_setup): New marco.
1260 * lynx-low.c (lynx_target_ops): Update.
1261 * nto-low.c (nto_target_ops): Update.
1262 * spu-low.c (spu_target_ops): Update.
1263 * win32-low.c (win32_target_ops): Update.
1265 2015-07-24 Yao Qi <yao.qi@linaro.org>
1267 * linux-low.c (linux_add_process): Don't set
1268 proc->priv->new_inferior.
1269 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1270 (linux_attach): Likewise.
1272 2015-07-24 Yao Qi <yao.qi@linaro.org>
1274 * server.c (start_inferior): Code refactor.
1276 2015-07-24 Yao Qi <yao.qi@linaro.org>
1278 * server.c (process_serial_event): Set general_thread.
1280 2015-07-21 Yao Qi <yao.qi@linaro.org>
1282 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1283 aarch64_linux_get_debug_reg_capacity.
1285 2015-07-17 Yao Qi <yao.qi@linaro.org>
1287 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1288 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1289 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1290 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1291 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1292 (AARCH64_HWP_ALIGNMENT): Likewise.
1293 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1294 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1295 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1296 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1297 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1298 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1299 (struct aarch64_debug_reg_state): Likewise.
1300 (struct arch_lwp_info): Likewise.
1301 (aarch64_align_watchpoint): Likewise.
1302 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1303 (aarch64_watchpoint_length): Likewise.
1304 (aarch64_point_encode_ctrl_reg): Likewise
1305 (aarch64_point_is_aligned): Likewise.
1306 (aarch64_align_watchpoint): Likewise.
1307 (aarch64_linux_set_debug_regs):
1308 (aarch64_dr_state_insert_one_point): Likewise.
1309 (aarch64_dr_state_remove_one_point): Likewise.
1310 (aarch64_handle_breakpoint): Likewise.
1311 (aarch64_handle_aligned_watchpoint): Likewise.
1312 (aarch64_handle_unaligned_watchpoint): Likewise.
1313 (aarch64_handle_watchpoint): Likewise.
1315 2015-07-17 Yao Qi <yao.qi@linaro.org>
1317 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1318 and don't aarch64_get_debug_reg_state. All callers update.
1319 (aarch64_handle_aligned_watchpoint): Likewise.
1320 (aarch64_handle_unaligned_watchpoint): Likewise.
1321 (aarch64_handle_watchpoint): Likewise.
1322 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1323 (aarch64_remove_point): Likewise.
1325 2015-07-17 Yao Qi <yao.qi@linaro.org>
1327 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1329 (aarch64_handle_unaligned_watchpoint): Likewise.
1331 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1333 Revert the previous 3 commits:
1334 Move gdb_regex* to common/
1335 Move linux_find_memory_regions_full & co.
1336 gdbserver build-id attribute generator
1338 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1339 Jan Kratochvil <jan.kratochvil@redhat.com>
1341 gdbserver build-id attribute generator.
1342 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1343 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1344 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1346 (get_dynamic): Use find_pdhr to traverse program headers.
1347 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1348 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1349 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1350 (get_hex_build_id): New.
1351 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1352 to reply XML document.
1354 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1355 Jan Kratochvil <jan.kratochvil@redhat.com>
1357 * target.c: Include target/target-utils.h and fcntl.h.
1358 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1359 (target_fileio_read_stralloc): New functions.
1361 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1363 * Makefile.in (OBS): Add gdb_regex.o.
1365 * config.in: Rebuilt.
1366 * configure: Rebuilt.
1368 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1369 Jan Kratochvil <jan.kratochvil@redhat.com>
1371 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1372 * Makefile.in (OBS): Add target-utils.o.
1373 (linux-maps.o, target-utils.o): New.
1374 * configure.srv (srv_linux_obj): Add linux-maps.o.
1376 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1378 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1380 (the_low_target): Install it.
1382 2015-07-14 Pedro Alves <palves@redhat.com>
1384 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1385 Instead, ignore ECHILD, and throw an error for other errnos.
1387 2015-07-10 Pedro Alves <palves@redhat.com>
1389 * event-loop.c (struct callback_event) <data>: Change type to
1390 gdb_client_data instance instead of gdb_client_data pointer.
1391 (append_callback_event): Adjust.
1393 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1395 * linux-aarch64-low.c: Add comments for each linux_target_ops
1396 method. Remove comments already covered in target_ops and
1397 linux_target_ops definitions.
1398 (the_low_target): Add comments for each unimplemented method.
1400 2015-07-09 Yao Qi <yao.qi@linaro.org>
1402 * linux-aarch64-low.c (aarch64_regmap): Remove.
1403 (aarch64_usrregs_info): Remove.
1404 (regs_info): Set field usrregs to NULL.
1406 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1408 * linux-low.c: Include "rsp-low.h"
1409 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1410 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1411 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1412 (handle_btrace_enable_pt): New.
1413 (handle_btrace_general_set): Support "pt".
1414 (handle_btrace_conf_general_set): Support "pt:size".
1416 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1418 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1421 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1423 * linux-aarch64-low.c: Remove comment about endianness.
1424 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1425 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1428 2015-06-24 Gary Benson <gbenson@redhat.com>
1430 * linux-i386-ipa.c (stdint.h): Do not include.
1431 * lynx-i386-low.c (stdint.h): Likewise.
1432 * lynx-ppc-low.c (stdint.h): Likewise.
1433 * mem-break.c (stdint.h): Likewise.
1434 * thread-db.c (stdint.h): Likewise.
1435 * tracepoint.c (stdint.h): Likewise.
1436 * win32-low.c (stdint.h): Likewise.
1438 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1440 * server.c (write_qxfer_response): Update call to
1441 remote_escape_output.
1443 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1444 Jan Kratochvil <jan.kratochvil@redhat.com>
1446 Merge multiple hex conversions.
1447 * gdbreplay.c (tohex): Rename to 'fromhex'.
1448 (logchar): Use fromhex.
1450 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1452 * server.c (handle_qxfer_libraries): Set `version' attribute for
1455 2015-06-10 Gary Benson <gbenson@redhat.com>
1457 * target.h (struct target_ops) <multifs_open>: New field.
1458 <multifs_unlink>: Likewise.
1459 <multifs_readlink>: Likewise.
1460 * linux-low.c (nat/linux-namespaces.h): New include.
1461 (linux_target_ops): Initialize the_target->multifs_open,
1462 the_target->multifs_unlink and the_target->multifs_readlink.
1463 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1464 * hostio.c (hostio_fs_pid): New static variable.
1465 (hostio_handle_new_gdb_connection): New function.
1466 (handle_setfs): Likewise.
1467 (handle_open): Use the_target->multifs_open as appropriate.
1468 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1469 (handle_readlink): Use the_target->multifs_readlink as
1471 (handle_vFile): Handle vFile:setfs packets.
1472 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1473 after target_handle_new_gdb_connection.
1475 2015-06-10 Gary Benson <gbenson@redhat.com>
1477 * configure.ac (AC_CHECK_FUNCS): Add setns.
1478 * config.in: Regenerate.
1479 * configure: Likewise.
1480 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1481 (linux-namespaces.o): New rule.
1482 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1484 2015-06-09 Gary Benson <gbenson@redhat.com>
1486 * hostio.c (handle_open): Process mode argument with
1487 fileio_to_host_mode.
1489 2015-06-01 Yao Qi <yao.qi@linaro.org>
1491 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1492 * linux-x86-low.c: Likewise.
1494 2015-05-28 Don Breazeal <donb@codesourcery.com>
1496 * linux-low.c (handle_extended_wait): Initialize
1497 thread_info.last_resume_kind for new fork children.
1499 2015-05-15 Pedro Alves <palves@redhat.com>
1501 * target.h (target_handle_new_gdb_connection): Rewrite using if
1502 wrapped in do/while.
1504 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1506 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1507 * configure, config.in: Regenerate.
1508 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1511 2015-05-12 Don Breazeal <donb@codesourcery.com>
1513 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1514 PTRACE_EVENT_VFORK_DONE.
1515 (linux_low_ptrace_options, extended_event_reported): Add vfork
1517 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1518 and "vforkdone" for RSP 'T' Stop Reply Packet.
1519 * server.h (report_vfork_events): Declare
1522 2015-05-12 Don Breazeal <donb@codesourcery.com>
1524 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1525 (the_low_target) <new_fork>: Initialize new member.
1526 * linux-arm-low.c (arm_new_fork): New function.
1527 (the_low_target) <new_fork>: Initialize new member.
1528 * linux-low.c (handle_extended_wait): Call new target function
1530 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1531 * linux-mips-low.c (mips_add_watchpoint): New function
1532 extracted from mips_insert_point.
1533 (the_low_target) <new_fork>: Initialize new member.
1534 (mips_linux_new_fork): New function.
1535 (mips_insert_point): Call mips_add_watchpoint.
1536 * linux-x86-low.c (x86_linux_new_fork): New function.
1537 (the_low_target) <new_fork>: Initialize new member.
1539 2015-05-12 Don Breazeal <donb@codesourcery.com>
1541 * linux-low.c (handle_extended_wait): Implement return value,
1542 rename argument 'event_child' to 'event_lwp', handle
1543 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1544 (linux_low_ptrace_options): New function.
1545 (linux_low_filter_event): Call linux_low_ptrace_options,
1546 use different argument fo linux_enable_event_reporting,
1547 use return value from handle_extended_wait.
1548 (extended_event_reported): New function.
1549 (linux_wait_1): Call extended_event_reported and set
1550 status to report fork events.
1551 (linux_write_memory): Add pid to debug message.
1552 (reset_lwp_ptrace_options_callback): New function.
1553 (linux_handle_new_gdb_connection): New function.
1554 (linux_target_ops): Initialize new structure member.
1555 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1556 * lynx-low.c: Initialize new structure member.
1557 * remote-utils.c (prepare_resume_reply): Implement stop reason
1558 "fork" for "T" stop message.
1559 * server.c (handle_query): Call handle_new_gdb_connection.
1560 * server.h (report_fork_events): Declare global flag.
1561 * target.h (struct target_ops) <handle_new_gdb_connection>:
1563 (target_handle_new_gdb_connection): New macro.
1564 * win32-low.c: Initialize new structure member.
1566 2015-05-12 Don Breazeal <donb@codesourcery.com>
1568 * mem-break.c (APPEND_TO_LIST): Define macro.
1569 (clone_agent_expr): New function.
1570 (clone_one_breakpoint): New function.
1571 (clone_all_breakpoints): New function.
1572 * mem-break.h: Declare new functions.
1574 2015-05-12 Don Breazeal <donb@codesourcery.com>
1576 * linux-low.c (linux_supports_fork_events): New function.
1577 (linux_supports_vfork_events): New function.
1578 (linux_target_ops): Initialize new structure members.
1579 (initialize_low): Call linux_check_ptrace_features.
1580 * lynx-low.c (lynx_target_ops): Initialize new structure
1582 * server.c (report_fork_events, report_vfork_events):
1584 (handle_query): Add new features to qSupported packet and
1586 (captured_main): Initialize new global variables.
1587 * target.h (struct target_ops) <supports_fork_events>:
1589 <supports_vfork_events>: New member.
1590 (target_supports_fork_events): New macro.
1591 (target_supports_vfork_events): New macro.
1592 * win32-low.c (win32_target_ops): Initialize new structure
1595 2015-05-12 Gary Benson <gbenson@redhat.com>
1597 * server.c (handle_qxfer_exec_file): Use current process
1600 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1602 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1603 Remove HAVE_PTRACE_GETREGS conditionals.
1604 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1605 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1607 2015-05-08 Yao Qi <yao.qi@linaro.org>
1609 * linux-low.c (linux_supports_conditional_breakpoints): New
1611 (linux_target_ops): Install new target method.
1612 * lynx-low.c (lynx_target_ops): Install NULL hook for
1613 supports_conditional_breakpoints.
1614 * nto-low.c (nto_target_ops): Likewise.
1615 * spu-low.c (spu_target_ops): Likewise.
1616 * win32-low.c (win32_target_ops): Likewise.
1617 * server.c (handle_query): Check
1618 target_supports_conditional_breakpoints.
1619 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1621 (target_supports_conditional_breakpoints): New macro.
1623 2015-05-06 Pedro Alves <palves@redhat.com>
1626 * server.c (start_inferior): If the process exits, mourn it.
1628 2015-04-21 Gary Benson <gbenson@redhat.com>
1630 * hostio.c (fileio_open_flags_to_host): Factored out to
1631 fileio_to_host_openflags in common/fileio.c. Single use
1634 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1636 * linux-xtensa-low.c (xtensa_fill_gregset)
1637 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1640 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1642 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1643 (regs_info): Replace usrregs pointer with NULL.
1645 2015-04-17 Gary Benson <gbenson@redhat.com>
1647 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1648 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1649 * server.c (handle_qxfer_exec_file): New function.
1650 (qxfer_packets): Add exec-file entry.
1651 (handle_query): Report qXfer:exec-file:read as supported packet.
1653 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1655 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1657 2015-04-09 Gary Benson <gbenson@redhat.com>
1659 * hostio-errno.c (errno_to_fileio_error): Remove function.
1660 Update caller to use remote_fileio_to_fio_error.
1662 2015-04-09 Yao Qi <yao.qi@linaro.org>
1664 * linux-low.c (linux_insert_point): Call
1665 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1666 (linux_remove_point): Call remove_memory_breakpoint if type is
1668 * linux-x86-low.c (x86_insert_point): Don't call
1669 insert_memory_breakpoint.
1670 (x86_remove_point): Don't call remove_memory_breakpoint.
1672 2015-04-01 Pedro Alves <palves@redhat.com>
1673 Cleber Rosa <crosa@redhat.com>
1675 * server.c (gdbserver_usage): Reorganize and extend the usage
1678 2015-03-24 Pedro Alves <palves@redhat.com>
1680 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1681 output. Also dump TRAP_TRACE.
1682 (linux_low_filter_event): In debug output, distinguish a
1683 resume_stop SIGSTOP from a delayed SIGSTOP.
1685 2015-03-24 Gary Benson <gbenson@redhat.com>
1687 * linux-x86-low.c (x86_linux_new_thread): Moved to
1689 (x86_linux_prepare_to_resume): Likewise.
1691 2015-03-24 Gary Benson <gbenson@redhat.com>
1693 * Makefile.in (x86-linux-dregs.o): New rule.
1694 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1695 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1696 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1697 (x86_linux_dr_get): Likewise.
1698 (x86_linux_dr_set): Likewise.
1699 (update_debug_registers_callback): Likewise.
1700 (x86_linux_dr_set_addr): Likewise.
1701 (x86_linux_dr_get_addr): Likewise.
1702 (x86_linux_dr_set_control): Likewise.
1703 (x86_linux_dr_get_control): Likewise.
1704 (x86_linux_dr_get_status): Likewise.
1705 (x86_linux_update_debug_registers): Likewise.
1707 2015-03-24 Gary Benson <gbenson@redhat.com>
1709 * linux-x86-low.c (x86_linux_update_debug_registers):
1710 New function, factored out from...
1711 (x86_linux_prepare_to_resume): ...this.
1713 2015-03-24 Gary Benson <gbenson@redhat.com>
1715 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1716 (x86_linux_dr_set): Likewise.
1717 (update_debug_registers_callback): Likewise.
1718 (x86_linux_dr_set_addr): Likewise.
1719 (x86_linux_dr_get_addr): Likewise.
1720 (x86_linux_dr_set_control): Likewise.
1721 (x86_linux_dr_get_control): Likewise.
1722 (x86_linux_dr_get_status): Likewise.
1723 (x86_linux_prepare_to_resume): Likewise.
1725 2015-03-24 Gary Benson <gbenson@redhat.com>
1727 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1728 Use perror_with_name. Pass string through gettext.
1729 (x86_linux_dr_set): Likewise.
1731 2015-03-24 Gary Benson <gbenson@redhat.com>
1733 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1734 (x86_linux_dr_set_addr): ...this.
1735 (x86_dr_low_get_addr): Rename to...
1736 (x86_linux_dr_get_addr): ...this.
1737 (x86_dr_low_set_control): Rename to...
1738 (x86_linux_dr_set_control): ...this.
1739 (x86_dr_low_get_control): Rename to...
1740 (x86_linux_dr_get_control): ...this.
1741 (x86_dr_low_get_status): Rename to...
1742 (x86_linux_dr_get_status): ...this.
1743 (x86_dr_low): Update with new function names.
1745 2015-03-24 Gary Benson <gbenson@redhat.com>
1747 * Makefile.in (x86-linux.o): New rule.
1748 * configure.srv: Add x86-linux.o to relevant targets.
1749 * linux-low.c (lwp_set_arch_private_info): New function.
1750 (lwp_arch_private_info): Likewise.
1751 * linux-x86-low.c: Include nat/x86-linux.h.
1752 (arch_lwp_info): Removed structure.
1753 (update_debug_registers_callback):
1754 Use lwp_set_debug_registers_changed.
1755 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1756 and lwp_set_debug_registers_changed.
1757 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1759 2015-03-24 Gary Benson <gbenson@redhat.com>
1761 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1762 * linux-arm-low.c (arm_new_thread): Likewise.
1763 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1764 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1765 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1766 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1768 2015-03-24 Gary Benson <gbenson@redhat.com>
1770 * linux-low.c (ptid_of_lwp): New function.
1771 (lwp_is_stopped): Likewise.
1772 (lwp_stop_reason): Likewise.
1773 * linux-x86-low.c (update_debug_registers_callback):
1775 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1778 2015-03-24 Gary Benson <gbenson@redhat.com>
1780 * linux-low.h (linux_stop_lwp): Remove declaration.
1782 2015-03-24 Gary Benson <gbenson@redhat.com>
1784 * linux-low.h: Include nat/linux-nat.h.
1785 * linux-low.c (iterate_over_lwps_args): New structure.
1786 (iterate_over_lwps_filter): New function.
1787 (iterate_over_lwps): Likewise.
1788 * linux-x86-low.c (update_debug_registers_callback):
1789 Update signature to what iterate_over_lwps expects.
1790 Remove PID check that iterate_over_lwps now performs.
1791 (x86_dr_low_set_addr): Use iterate_over_lwps.
1792 (x86_dr_low_set_control): Likewise.
1794 2015-03-24 Gary Benson <gbenson@redhat.com>
1796 * linux-x86-low.c (x86_debug_reg_state): New function.
1797 (x86_linux_prepare_to_resume): Use the above.
1799 2015-03-24 Gary Benson <gbenson@redhat.com>
1801 * linux-low.c (current_lwp_ptid): New function.
1802 * linux-x86-low.c: Include nat/linux-nat.h.
1803 (x86_dr_low_get_addr): Use current_lwp_ptid.
1804 (x86_dr_low_get_control): Likewise.
1805 (x86_dr_low_get_status): Likewise.
1807 2015-03-20 Pedro Alves <palves@redhat.com>
1809 * tracepoint.c (cmd_qtstatus): Make "str" const.
1811 2015-03-20 Pedro Alves <palves@redhat.com>
1813 * server.c (handle_general_set): Make "req_str" const.
1815 2015-03-19 Pedro Alves <palves@redhat.com>
1817 * linux-low.c (linux_resume_one_lwp): Rename to ...
1818 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1819 instead call perror_with_name.
1820 (check_ptrace_stopped_lwp_gone): New function.
1821 (linux_resume_one_lwp): Reimplement as wrapper around
1822 linux_resume_one_lwp_throw that swallows errors if the LWP is
1825 2015-03-19 Pedro Alves <palves@redhat.com>
1827 * linux-low.c (count_events_callback, select_event_lwp_callback):
1828 No longer check whether the thread has resume_stop as last resume
1831 2015-03-19 Pedro Alves <palves@redhat.com>
1833 * linux-low.c (count_events_callback, select_event_lwp_callback):
1834 Use the lwp's status_pending_p field, not the thread's.
1836 2015-03-19 Pedro Alves <palves@redhat.com>
1838 * linux-low.c (select_event_lwp_callback): Update comments to
1839 no longer mention SIGTRAP.
1841 2015-03-18 Gary Benson <gbenson@redhat.com>
1843 * server.c (handle_query): Do not report vFile:fstat as supported.
1845 2015-03-11 Gary Benson <gbenson@redhat.com>
1847 * hostio.c (sys/types.h): New include.
1848 (sys/stat.h): Likewise.
1849 (common-remote-fileio.h): Likewise.
1850 (handle_fstat): New function.
1851 (handle_vFile): Handle vFile:fstat packets.
1853 2015-03-11 Gary Benson <gbenson@redhat.com>
1855 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1856 struct stat.st_blocks and struct stat.st_blksize.
1857 * configure: Regenerate.
1858 * config.in: Likewise.
1859 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1860 (OBS): Add common-remote-fileio.o.
1861 (common-remote-fileio.o): New rule.
1863 2015-03-09 Pedro Alves <palves@redhat.com>
1865 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1866 'struct sockaddr' pointer in 'accept' call.
1868 2015-03-09 Pedro Alves <palves@redhat.com>
1871 2015-03-07 Pedro Alves <palves@redhat.com>
1872 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1873 or <winsock2.h> here. Instead include "gdb_socket.h".
1874 (remote_open): Use union gdb_sockaddr_u.
1875 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1876 or <winsock2.h> here. Instead include "gdb_socket.h".
1877 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1878 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1880 (init_named_socket, gdb_agent_helper_thread): Use union
1883 2015-03-07 Pedro Alves <palves@redhat.com>
1885 * configure.ac (build_warnings): Move
1886 -Wdeclaration-after-statement to the C-specific set.
1887 * configure: Regenerate.
1889 2015-03-07 Pedro Alves <palves@redhat.com>
1891 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1892 or <winsock2.h> here. Instead include "gdb_socket.h".
1893 (remote_open): Use union gdb_sockaddr_u.
1894 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1895 or <winsock2.h> here. Instead include "gdb_socket.h".
1896 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1897 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1899 (init_named_socket, gdb_agent_helper_thread): Use union
1902 2015-03-07 Pedro Alves <palves@redhat.com>
1904 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1907 2015-03-06 Yao Qi <yao.qi@linaro.org>
1909 * linux-aarch64-low.c (aarch64_insert_point): Use
1910 show_debug_regs as a boolean.
1911 (aarch64_remove_point): Likewise.
1913 2015-03-05 Pedro Alves <palves@redhat.com>
1915 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1916 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1917 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1918 * nto-low.c (nto_target_ops): Likewise.
1919 * spu-low.c (spu_target_ops): Likewise.
1920 * win32-low.c (win32_target_ops): Likewise.
1922 2015-03-04 Pedro Alves <palves@redhat.com>
1924 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1925 Decide whether a breakpoint triggered based on the SIGTRAP's
1927 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1928 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1929 (linux_low_filter_event): Check for breakpoints before checking
1931 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1933 (linux_stopped_by_sw_breakpoint)
1934 (linux_supports_stopped_by_sw_breakpoint)
1935 (linux_stopped_by_hw_breakpoint)
1936 (linux_supports_stopped_by_hw_breakpoint): New functions.
1937 (linux_target_ops): Install new target methods.
1939 2015-03-04 Pedro Alves <palves@redhat.com>
1941 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1942 * server.c (swbreak_feature, hwbreak_feature): New globals.
1943 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1944 (captured_main): Clear swbreak_feature and hwbreak_feature.
1945 * server.h (swbreak_feature, hwbreak_feature): Declare.
1946 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1947 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1948 supports_stopped_by_hw_breakpoint>: New fields.
1949 (target_supports_stopped_by_sw_breakpoint)
1950 (target_stopped_by_sw_breakpoint)
1951 (target_supports_stopped_by_hw_breakpoint)
1952 (target_stopped_by_hw_breakpoint): Declare.
1954 2015-03-04 Pedro Alves <palves@redhat.com>
1956 enum lwp_stop_reason -> enum target_stop_reason
1957 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1958 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1959 (linux_wait_1, stuck_in_jump_pad_callback)
1960 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1961 (linux_stopped_by_watchpoint):
1962 * linux-low.h (enum lwp_stop_reason): Delete.
1963 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1964 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1966 2015-03-04 Yao Qi <yao.qi@linaro.org>
1968 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1970 2015-03-03 Gary Benson <gbenson@redhat.com>
1972 * hostio.c (handle_vFile): Fix prefix lengths.
1974 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1976 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1979 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1981 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1982 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1983 (clean): Add "rm -f" for above C files.
1984 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1985 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1986 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1987 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1988 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1989 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1990 (init_registers_s390x_vx_linux64)
1991 (init_registers_s390x_tevx_linux64)
1992 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1993 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1995 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1996 (s390_store_vxrs_high): New functions.
1997 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1999 (s390_arch_setup): Add logic for selecting one of the new target
2000 descriptions. Activate the new vector regsets if applicable.
2001 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2002 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2003 and init_registers_s390x_tevx_linux64.
2005 2015-03-01 Pedro Alves <palves@redhat.com>
2007 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2010 2015-02-27 Pedro Alves <palves@redhat.com>
2012 * linux-x86-low.c (u_debugreg_offset): New function.
2013 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2015 2015-02-27 Pedro Alves <palves@redhat.com>
2017 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2018 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2019 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2020 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2021 (ps_lsetfpregs, ps_getpid)
2022 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2023 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2024 (ps_lsetxregs, ps_plog): Declare.
2026 2015-02-27 Pedro Alves <palves@redhat.com>
2028 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2029 IP_AGENT_EXPORT_FUNC.
2030 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2031 IP_AGENT_EXPORT_FUNC.
2032 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2033 (IP_AGENT_EXPORT): Delete.
2034 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2035 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2036 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2037 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2038 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2039 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2040 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2041 (traceframe_read_count, traceframe_write_count)
2042 (traceframes_created, trace_state_variables, get_raw_reg)
2043 (get_trace_state_variable_value, set_trace_state_variable_value)
2044 (ust_loaded, helper_thread_id, cmd_buf): Use
2045 IPA_SYM_EXPORTED_NAME.
2046 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2047 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2048 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2049 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2050 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2051 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2052 EXTERN_C_PUSH/EXTERN_C_POP.
2053 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2054 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2055 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2056 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2057 (traceframe_write_count, traceframe_read_count)
2058 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2059 (about_to_request_buffer_space, get_trace_state_variable_value)
2060 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2061 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2062 EXTERN_C_PUSH/EXTERN_C_POP.
2063 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2064 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2065 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2066 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2067 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2068 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2069 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2070 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2072 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2073 (IP_AGENT_EXPORT_VAR_DECL): Define.
2075 (gdb_agent_get_raw_reg): Declare.
2077 2015-02-27 Tom Tromey <tromey@redhat.com>
2078 Pedro Alves <palves@redhat.com>
2080 Rename symbols whose names are reserved C++ keywords throughout.
2082 2015-02-27 Pedro Alves <palves@redhat.com>
2084 * Makefile.in (COMPILER): New, get it from autoconf.
2085 (CXX): Get from autoconf instead.
2086 (COMPILE.pre): Use COMPILER.
2087 (CC-LD): Rename to ...
2088 (CC_LD): ... this. Use COMPILER.
2089 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2090 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2091 * acinclude.m4: Include build-with-cxx.m4.
2092 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2093 Disable -Werror by default if building in C++ mode.
2094 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2095 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2096 the C++ compiler. Save/restore CXXFLAGS too.
2097 * configure: Regenerate.
2099 2015-02-27 Pedro Alves <palves@redhat.com>
2101 * acinclude.m4: Include libiberty.m4.
2102 * configure.ac: Call libiberty_INIT.
2103 * config.in, configure: Regenerate.
2105 2015-02-26 Pedro Alves <palves@redhat.com>
2107 * linux-low.c (linux_wait_1): When incrementing the PC past a
2108 program breakpoint always use the_low_target.breakpoint_len as
2109 increment, rather than the maximum between that and
2110 the_low_target.decr_pc_after_break.
2112 2015-02-23 Pedro Alves <palves@redhat.com>
2114 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2115 thread was doing a step-over; always adjust the PC if
2116 we stepped over a permanent breakpoint.
2117 (linux_wait_1): If we stepped over breakpoint that was on top of a
2118 permanent breakpoint, manually advance the PC past it.
2120 2015-02-23 Pedro Alves <palves@redhat.com>
2122 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2124 (x86_fill_gregset, x86_store_gregset): Use it when handling
2127 2015-02-20 Pedro Alves <palves@redhat.com>
2129 * thread-db.c: Include "nat/linux-procfs.h".
2130 (thread_db_init): Skip listing new threads if the kernel supports
2131 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2133 2015-02-20 Pedro Alves <palves@redhat.com>
2135 * linux-low.c (status_pending_p_callback): Use ptid_match.
2137 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2139 PR breakpoints/16812
2140 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2141 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2142 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2144 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2146 PR breakpoints/15956
2147 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2149 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2151 * linux-low.c (linux_low_btrace_conf): Print size.
2152 * server.c (handle_btrace_conf_general_set): New.
2153 (hanle_general_set): Call handle_btrace_conf_general_set.
2154 (handle_query): Report Qbtrace-conf:bts:size as supported.
2156 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2158 * linux-low.c (linux_low_enable_btrace): Update parameters.
2159 (linux_low_btrace_conf): New.
2160 (linux_target_ops)<to_btrace_conf>: Initialize.
2161 * server.c (current_btrace_conf): New.
2162 (handle_btrace_enable): Rename to ...
2163 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2164 to target_enable_btrace. Update comment. Update users.
2165 (handle_qxfer_btrace_conf): New.
2166 (qxfer_packets): Add btrace-conf entry.
2167 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2168 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2169 (target_ops)<read_btrace_conf>: New.
2170 (target_enable_btrace): Update parameters.
2171 (target_read_btrace_conf): New.
2173 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2175 * server.c (handle_btrace_general_set): Remove call to
2176 target_supports_btrace.
2177 (supported_btrace_packets): New.
2178 (handle_query): Call supported_btrace_packets.
2179 * target.h: include btrace-common.h.
2180 (btrace_target_info): Removed.
2181 (supports_btrace, target_supports_btrace): Update parameters.
2183 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2185 * Makefile.in (SFILES): Add common/btrace-common.c.
2186 (OBS): Add common/btrace-common.o.
2187 (btrace-common.o): Add build rules.
2188 * linux-low: Include btrace-common.h.
2189 (linux_low_read_btrace): Use struct btrace_data. Call
2190 btrace_data_init and btrace_data_fini.
2192 2015-02-06 Pedro Alves <palves@redhat.com>
2194 * thread-db.c (find_new_threads_callback): Add debug output.
2196 2015-02-04 Pedro Alves <palves@redhat.com>
2198 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2199 (resume_stopped_resumed_lwps): New function.
2200 (linux_wait_for_event_filtered): Use it.
2202 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2204 * Makefile.in (SFILES): Add linux-personality.c.
2205 (linux-personality.o): New rule.
2206 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2207 list of objects to be built.
2208 * linux-low.c: Include nat/linux-personality.h.
2209 (linux_create_inferior): Remove code to disable address space
2210 randomization (moved to ../nat/linux-personality.c). Create
2211 cleanup to disable address space randomization.
2213 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2215 * Makefile.in (posix-strerror.o): New rule.
2216 (mingw-strerror.o): Likewise.
2217 * configure: Regenerated.
2218 * configure.ac: Source file ../common/common.host. Initialize new
2219 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2221 2015-01-14 Yao Qi <yao@codesourcery.com>
2223 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2224 (ppc-linux.o): New rule.
2225 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2226 * configure.ac: AC_CHECK_FUNCS(getauxval).
2227 * config.in: Re-generated.
2228 * configure: Re-generated.
2229 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2230 ppc64_64bit_inferior_p
2232 2015-01-14 Yao Qi <yao@codesourcery.com>
2234 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2235 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2236 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2237 (PT_ORIG_R3, PT_TRAP): Likewise.
2238 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2239 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2240 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2242 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2244 * i387-fp.c (i387_cache_to_xsave): In look over
2245 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2246 zmmh_low_space field by use of zmmh_high_space.
2248 2015-01-09 Pedro Alves <palves@redhat.com>
2250 * linux-low.c (step_over_bkpt): Move higher up in the file.
2251 (handle_extended_wait): Don't store the stop_pc here.
2252 (get_stop_pc): Adjust comments and rename to ...
2253 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2254 stopped for a software breakpoint or hardware breakpoint.
2255 (thread_still_has_status_pending_p): New function.
2256 (status_pending_p_callback): Use
2257 thread_still_has_status_pending_p. If the event is no longer
2258 interesting, resume the LWP.
2259 (handle_tracepoints): Add assert.
2260 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2261 (wstatus_maybe_breakpoint): New function.
2262 (cancel_breakpoint): Delete function.
2263 (check_stopped_by_watchpoint): New function, factored out from
2264 linux_low_filter_event.
2265 (lp_status_maybe_breakpoint): Delete function.
2266 (linux_low_filter_event): Remove filter_ptid argument.
2267 Leave thread group exits pending here. Store the LWP's stop PC.
2268 Always leave events pending.
2269 (linux_wait_for_event_filtered): Pull all events out of the
2270 kernel, and leave them all pending.
2271 (count_events_callback, select_event_lwp_callback): Consider all
2273 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2274 (select_event_lwp): Only give preference to the stepping LWP in
2275 all-stop mode. Adjust comments.
2276 (ignore_event): New function.
2277 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2278 references to cancel_breakpoints. Adjust to renames. Also give
2279 equal priority to all LWPs that have had events in non-stop mode.
2280 If reporting a software breakpoint event, unadjust the LWP's PC.
2281 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2282 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2284 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2285 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2286 (linux_stopped_by_watchpoint): Adjust.
2287 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2288 * linux-low.h (enum lwp_stop_reason): New.
2289 (struct lwp_info) <stop_pc>: Adjust comment.
2290 <stopped_by_watchpoint>: Delete field.
2291 <stop_reason>: New field.
2292 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2293 * mem-break.c (software_breakpoint_inserted_here)
2294 (hardware_breakpoint_inserted_here): New function.
2295 * mem-break.h (software_breakpoint_inserted_here)
2296 (hardware_breakpoint_inserted_here): Declare.
2297 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2298 (cancel_breakpoints): Delete.
2299 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2300 (upload_fast_traceframes): Remove references to
2303 2015-01-09 Pedro Alves <palves@redhat.com>
2305 * thread-db.c (find_new_threads_callback): Ignore thread if the
2306 kernel thread ID is -1.
2308 2015-01-09 Pedro Alves <palves@redhat.com>
2310 * linux-low.c (linux_attach_fail_reason_string): Move to
2311 nat/linux-ptrace.c, and rename.
2312 (linux_attach_lwp): Update comment.
2313 (attach_proc_task_lwp_callback): New function.
2314 (linux_attach): Adjust to rename and use
2315 linux_proc_attach_tgid_threads.
2316 (linux_attach_fail_reason_string): Delete declaration.
2318 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2320 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2321 * server.c (gdbserver_version): Likewise.
2323 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2325 * remote-utils.c: Include ctype.h.
2326 (input_interrupt): Explicitly handle the case when the char
2327 received is the NUL byte. Improve the printing of non-ASCII
2330 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2332 * linux-low.c (linux_low_filter_event): Update call to
2333 linux_enable_event_reporting following the addition of
2334 a new parameter to that function.
2336 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2339 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2340 (AARCH64_FPCR_REGNO): Likewise.
2341 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2342 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2343 (aarch64_store_fpregset): Likewise.
2345 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2347 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2348 Remove FIXME comment about assumption about N.
2350 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2352 * configure.ac: If large-file support is disabled in GDBserver,
2353 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2354 * configure: Regenerate.
2356 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2358 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2359 warning upon ENODATA from ptrace.
2360 * linux-s390-low.c (s390_store_tdb): New.
2361 (s390_regsets): Add regset for NT_S390_TDB.
2363 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2365 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2366 without a fill_function.
2367 * linux-s390-low.c (s390_fill_last_break): Remove.
2368 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2369 (s390_arch_setup): Use regset's size instead of fill_function for
2372 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2374 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2375 the regset's store function when ptrace returned an error.
2376 * regcache.c (get_thread_regcache): Invalidate register cache
2377 before fetching inferior's registers.
2379 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2381 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2382 while-loop as for-loop.
2383 (regsets_store_inferior_registers): Likewise.
2385 2014-11-28 Yao Qi <yao@codesourcery.com>
2387 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2388 * config.in, configure: Re-generate.
2389 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2392 2014-11-21 Yao Qi <yao@codesourcery.com>
2394 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2395 (AC_CHECK_HEADERS): Remove malloc.h.
2396 * configure: Re-generated.
2397 * config.in: Re-generated.
2398 * server.h: Don't include alloca.h and malloc.h.
2399 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2400 Don't include malloc.h.
2402 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2404 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2405 corresponding ERRNO check in same block.
2407 2014-11-12 Pedro Alves <palves@redhat.com>
2409 * server.c (cont_thread): Update comment.
2410 (start_inferior, attach_inferior): No longer clear cont_thread.
2411 (handle_v_cont): No longer set cont_thread.
2412 (captured_main): Clear cont_thread each time a GDB connects.
2414 2014-11-12 Pedro Alves <palves@redhat.com>
2416 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2417 thread, and don't resume all threads if the Hc thread has exited.
2419 2014-11-12 Pedro Alves <palves@redhat.com>
2421 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2422 the process group instead of to a specific LWP.
2424 2014-10-15 Pedro Alves <palves@redhat.com>
2427 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2429 (arm_set_thread_context): Delete.
2430 (the_low_target): Adjust.
2431 * win32-i386-low.c (debug_registers_changed)
2432 (debug_registers_used): Delete.
2433 (update_debug_registers_callback): New function.
2434 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2435 needing to update their debug registers.
2436 (win32_get_current_dr): New function.
2437 (x86_dr_low_get_addr, x86_dr_low_get_control)
2438 (x86_dr_low_get_status): Fetch the debug register from the thread
2440 (i386_initial_stuff): Adjust.
2441 (i386_get_thread_context): Remove current_event parameter. Don't
2442 clear debug_registers_changed nor copy DR values to
2444 (i386_set_thread_context): Delete.
2445 (i386_prepare_to_resume): New function.
2446 (i386_thread_added): Mark the thread as needing to update irs
2448 (the_low_target): Remove i386_set_thread_context and install
2449 i386_prepare_to_resume.
2450 * win32-low.c (win32_get_thread_context): Adjust.
2451 (win32_set_thread_context): Use SetThreadContext
2453 (win32_prepare_to_resume): New function.
2454 (win32_require_context): New function, factored out from ...
2455 (thread_rec): ... this.
2456 (continue_one_thread): Call win32_prepare_to_resume on each thread
2457 we're about to continue.
2458 (win32_resume): Call win32_prepare_to_resume on the event thread.
2459 * win32-low.h (struct win32_thread_info)
2460 <debug_registers_changed>: New field.
2461 (struct win32_target_ops): Change prototype of set_thread_context,
2462 delete set_thread_context and add prepare_to_resume.
2463 (win32_require_context): New declaration.
2465 2014-10-08 Gary Benson <gbenson@redhat.com>
2467 * server.h: Do not include common-exceptions.h.
2469 2014-10-08 Gary Benson <gbenson@redhat.com>
2471 * server.h: Do not include cleanups.h.
2473 2014-09-30 James Hogan <james.hogan@imgtec.com>
2475 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2478 2014-09-23 Yao Qi <yao@codesourcery.com>
2480 * linux-low.c (lp_status_maybe_breakpoint): New function.
2481 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2482 (count_events_callback): Likewise.
2483 (select_event_lwp_callback): Likewise.
2484 (cancel_breakpoints_callback): Likewise.
2486 2014-09-19 Don Breazeal <donb@codesourcery.com>
2488 * linux-low.c (handle_extended_wait): Call
2489 linux_ptrace_get_extended_event.
2490 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2491 linux_is_extended_waitstatus.
2493 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2495 * Makefile.in (CPPFLAGS): Define.
2496 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2497 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2499 2014-09-16 Gary Benson <gbenson@redhat.com>
2501 * inferiors.h (current_inferior): Renamed as...
2502 (current_thread): New variable. All uses updated.
2503 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2504 (maybe_move_out_of_jump_pad): Likewise.
2505 (cancel_breakpoint): Likewise.
2506 (linux_low_filter_event): Likewise.
2507 (wait_for_sigstop): Likewise.
2508 (linux_resume_one_lwp): Likewise.
2509 (need_step_over_p): Likewise.
2510 (start_step_over): Likewise.
2511 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2512 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2513 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2514 and save_inferior as saved_thread.
2515 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2517 (regcache_invalidate_thread): Likewise.
2518 * remote-utils.c (prepare_resume_reply): Likewise.
2519 * thread-db.c (thread_db_get_tls_address): Likewise.
2520 (disable_thread_event_reporting): Likewise.
2521 (remove_thread_event_breakpoints): Likewise.
2522 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2524 * target.h (set_desired_inferior): Renamed as...
2525 (set_desired_thread): New declaration. All uses updated.
2526 * server.c (myresume): Updated comment to reference thread instead
2528 (handle_serial_event): Likewise.
2529 (handle_target_event): Likewise.
2531 2014-09-12 Tom Tromey <tromey@redhat.com>
2532 Gary Benson <gbenson@redhat.com>
2534 * regcache.h: Include common-regcache.h.
2535 (regcache_read_pc): Don't declare.
2536 * regcache.c (get_thread_regcache_for_ptid): New function.
2538 2014-09-11 Tom Tromey <tromey@redhat.com>
2539 Gary Benson <gbenson@redhat.com>
2541 * symbol.c: New file.
2542 * Makefile.in (SFILES): Add symbol.c.
2543 (OBS): Add symbol.o.
2545 2014-09-11 Gary Benson <gbenson@redhat.com>
2547 * target.c (target_stop_ptid, target_continue_ptid): New
2550 2014-09-11 Tom Tromey <tromey@redhat.com>
2551 Gary Benson <gbenson@redhat.com>
2553 * target.h: Include target/target.h.
2554 * target.c (target_read_memory, target_read_uint32)
2555 (target_write_memory): New functions.
2557 2014-09-11 Gary Benson <gbenson@redhat.com>
2559 * server.h (debug_hw_points): Don't declare.
2560 * server.c (debug_hw_points): Don't define. Replace all uses
2561 with show_debug_regs.
2562 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2563 all uses with show_debug_regs.
2565 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2567 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2568 endianness into account.
2569 (ppc_supply_ptrace_register): Likewise.
2571 2014-09-03 James Hogan <james.hogan@imgtec.com>
2573 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2574 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2576 2014-09-03 Gary Benson <gbenson@redhat.com>
2578 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2579 ALL_DEBUG_ADDRESS_REGISTERS.
2581 2014-09-02 Gary Benson <gbenson@redhat.com>
2583 * i386-low.h: Renamed as...
2584 * x86-low.h: New file. All type, function and variable name
2585 prefixes changed from "i386_" to "x86_". All references updated.
2586 * i386-low.c: Renamed as...
2587 * x86-low.c: New file. All type, function and variable name
2588 prefixes changed from "i386_" to "x86_". All references updated.
2590 2014-09-02 Gary Benson <gbenson@redhat.com>
2592 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2593 (x86_linux_new_thread): Likewise.
2595 2014-08-29 Gary Benson <gbenson@redhat.com>
2597 * server.h (setjmp.h): Do not include.
2598 (toplevel): Do not declare.
2599 (common-exceptions.h): Include.
2600 (cleanups.h): Likewise.
2601 * server.c (toplevel): Do not define.
2602 (exit_code): New static global.
2603 (detach_or_kill_for_exit_cleanup): New function.
2604 (main): New function. Original main renamed to...
2605 (captured_main): New function.
2606 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2608 2014-08-29 Gary Benson <gbenson@redhat.com>
2610 * Makefile.in (SFILES): Add common/common-exceptions.c.
2611 (OBS): Add common-exceptions.o.
2612 (common-exceptions.o): New rule.
2613 * utils.c (prepare_to_throw_exception): New function.
2615 2014-08-29 Gary Benson <gbenson@redhat.com>
2617 * config.in: Regenerate.
2618 * configure: Likewise.
2620 2014-08-29 Gary Benson <gbenson@redhat.com>
2622 * Makefile.in (SFILES): Add common/cleanups.c.
2624 (cleanups.o): New rule.
2626 2014-08-29 Gary Benson <gbenson@redhat.com>
2628 * utils.c (internal_vwarning): New function.
2630 2014-08-28 Gary Benson <gbenson@redhat.com>
2632 * utils.h (fatal): Remove declaration.
2633 * utils.c (fatal): Remove function.
2635 2014-08-28 Gary Benson <gbenson@redhat.com>
2637 * tracepoint.c (gdb_agent_init): Replace fatal with
2639 (initialize_tracepoint): Likewise.
2641 2014-08-28 Gary Benson <gbenson@redhat.com>
2643 * remote-utils.c (remote_prepare): Replace fatal with error.
2645 2014-08-28 Gary Benson <gbenson@redhat.com>
2647 * linux-low.c (linux_async): Replace fatal with warning.
2649 (linux_start_non_stop): Return -1 if linux_async failed.
2651 2014-08-28 Gary Benson <gbenson@redhat.com>
2653 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2655 (i386_dr_low_get_addr): Remove vague comment.
2656 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2659 2014-08-28 Gary Benson <gbenson@redhat.com>
2661 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2662 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2664 (linux_resume_one_lwp): Likewise.
2665 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2667 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2668 with internal_error.
2669 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2670 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2671 (find_register_by_name): Replace fatal with internal_error.
2672 (find_regno): Likewise.
2673 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2674 * thread-db.c (thread_db_create_event): Likewise.
2675 (thread_db_load_search): Likewise.
2676 (try_thread_db_load_1): Likewise.
2677 * tracepoint.c (get_jump_space_head): Replace fatal with
2679 (claim_trampoline_space): Likewise.
2680 (have_fast_tracepoint_trampoline_buffer): Likewise.
2681 (cmd_qtstart): Likewise.
2682 (stop_tracing): Likewise.
2683 (fast_tracepoint_collecting): Likewise.
2684 (target_malloc): Likewise.
2685 (download_tracepoint): Likewise.
2686 (download_trace_state_variables): Replace check with gdb_assert.
2687 (upload_fast_traceframes): Replace fatal with internal_error.
2689 2014-08-19 Tom Tromey <tromey@redhat.com>
2690 Gary Benson <gbenson@redhat.com>
2692 * Makefile.in (SFILES): Add common/common-debug.c.
2693 (OBS): Add common-debug.o.
2694 (common-debug.o): New rule.
2695 * debug.h (debug_printf): Don't declare.
2696 * debug.c (debug_printf): Renamed and rewritten as...
2697 (debug_vprintf): New function.
2699 2014-08-19 Gary Benson <gbenson@redhat.com>
2701 * utils.h: Do not include print-utils.h.
2703 2014-08-19 Tom Tromey <tromey@redhat.com>
2704 Gary Benson <gbenson@redhat.com>
2706 * server.h: Add static assertion.
2707 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2709 2014-08-19 Tom Tromey <tromey@redhat.com>
2710 Gary Benson <gbenson@redhat.com>
2712 * Makefile.in (SFILES): Add common/errors.c.
2713 (OBS): Add errors.o.
2714 (IPA_OBS): Add errors-ipa.o.
2715 (errors.o): New rule.
2716 (errors-ipa.o): Likewise.
2717 * utils.h (perror_with_name, error, warning): Don't declare.
2718 * utils.c (warning): Renamed and rewritten as...
2719 (vwarning): New function.
2720 (error): Renamed and rewritten as...
2721 (verror): New function.
2722 (internal_error): Renamed and rewritten as...
2723 (internal_verror): New function.
2725 2014-08-07 Gary Benson <gbenson@redhat.com>
2727 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2728 * configure: Regenerate.
2729 * config.in: Likewise.
2730 * server.h: Do not include errno.h.
2731 * event-loop.c: Likewise.
2732 * hostio-errno.c: Likewise.
2733 * linux-low.c: Likewise.
2734 * remote-utils.c: Likewise.
2735 * spu-low.c: Likewise.
2736 * utils.c: Likewise.
2737 * gdbreplay.c: Unconditionally include errno.h.
2739 2014-08-07 Gary Benson <gbenson@redhat.com>
2741 * server.h: Do not include string.h.
2742 * event-loop.c: Likewise.
2743 * linux-low.c: Likewise.
2744 * regcache.c: Likewise.
2745 * remote-utils.c: Likewise.
2746 * spu-low.c: Likewise.
2747 * utils.c: Likewise.
2749 2014-08-07 Gary Benson <gbenson@redhat.com>
2751 * server.h: Do not include gdb_assert.h.
2753 2014-08-07 Gary Benson <gbenson@redhat.com>
2755 * server.h: Do not include common-utils.h.
2757 2014-08-07 Gary Benson <gbenson@redhat.com>
2759 * server.h: Do not include ptid.h.
2760 * notif.h: Likewise.
2762 2014-08-07 Gary Benson <gbenson@redhat.com>
2764 * server.h: Do not include gdb_locale.h.
2766 2014-08-07 Gary Benson <gbenson@redhat.com>
2768 * server.h: Do not include gdb/signals.h.
2769 * win32-low.c: Likewise.
2771 2014-08-07 Gary Benson <gbenson@redhat.com>
2773 * server.h: Do not include pathmax.h.
2775 2014-08-07 Gary Benson <gbenson@redhat.com>
2777 * server.h: Do not include libiberty.h.
2778 * linux-bfin-low.c: Likewise.
2780 2014-08-07 Gary Benson <gbenson@redhat.com>
2782 * server.h: Do not include ansidecl.h.
2784 2014-08-07 Gary Benson <gbenson@redhat.com>
2786 * linux-x86-low.c: Do not include stddef.h.
2787 * lynx-ppc-low.c: Likewise.
2788 * tracepoint.c: Likewise.
2790 2014-08-07 Gary Benson <gbenson@redhat.com>
2792 * server.h: Do not include stdarg.h.
2793 * nto-low.c: Likewise.
2795 2014-08-07 Gary Benson <gbenson@redhat.com>
2797 * server.h: Do not include stdlib.h.
2798 * inferiors.c: Likewise.
2799 * linux-low.c: Likewise.
2800 * regcache.c: Likewise.
2801 * spu-low.c: Likewise.
2802 * tracepoint.c: Likewise.
2803 * utils.c: Likewise.
2805 2014-08-07 Gary Benson <gbenson@redhat.com>
2807 * server.h: Do not include stdio.h.
2808 * linux-low.c: Likewise.
2809 * remote-utils.c: Likewise.
2810 * spu-low.c: Likewise.
2811 * utils.c: Likewise.
2812 * wincecompat.c: Likewise.
2814 2014-08-06 Gary Benson <gbenson@redhat.com>
2816 * regcache.c (init_register_cache): Move conditionals inside if.
2818 2014-08-06 Gary Benson <gbenson@redhat.com>
2820 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2822 2014-07-31 Gary Benson <gbenson@redhat.com>
2824 * ax.h: Do not include server.h.
2825 * gdbthread.h: Likewise.
2826 * lynx-low.h: Likewise.
2827 * notif.h: Likewise.
2829 2014-07-30 Gary Benson <gbenson@redhat.com>
2831 * server.h: Include common-defs.h.
2832 Do not include config.h or build-gnulib-gdbserver/config.h.
2834 2014-07-30 Gary Benson <gbenson@redhat.com>
2836 * hostio-errno.c: Move server.h to top of includes list.
2837 * inferiors.c: Likewise.
2838 * linux-x86-low.c: Likewise.
2839 * notif.c: Include server.h.
2841 2014-07-24 Tom Tromey <tromey@redhat.com>
2842 Gary Benson <gbenson@redhat.com>
2844 * server.h (CORE_ADDR): Now unsigned.
2846 2014-07-16 Pedro Alves <palves@redhat.com>
2848 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2850 2014-07-15 Pedro Alves <palves@redhat.com>
2852 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2855 2014-07-11 Pedro Alves <palves@redhat.com>
2857 * linux-low.c (kill_wait_lwp): New function, based on
2858 kill_one_lwp_callback, but use my_waitpid directly.
2859 (kill_one_lwp_callback, linux_kill): Use it.
2861 2014-06-23 Pedro Alves <palves@redhat.com>
2863 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2864 before setting DR0..DR3.
2866 2014-06-20 Gary Benson <gbenson@redhat.com>
2868 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2869 * configure: Regenerated.
2870 * config.in: Likewise.
2872 2014-06-20 Gary Benson <gbenson@redhat.com>
2874 * Makefile.in (SFILES): Update locations for files moved
2876 (object file files): Reordered.
2878 2014-06-20 Gary Benson <gbenson@redhat.com>
2880 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2881 (i386_dr_low_set_addr): Likewise.
2882 (i386_dr_low_get_addr): Likewise.
2883 (i386_dr_low_can_set_control): Likewise.
2884 (i386_dr_low_set_control): Likewise.
2885 (i386_dr_low_get_control): Likewise.
2886 (i386_dr_low_get_status): Likewise.
2887 (i386_get_debug_register_length): Likewise.
2888 * linux-x86-low.c (i386_dr_low_set_addr):
2889 Changed signature. Made static.
2890 (i386_dr_low_get_addr): Likewise.
2891 (i386_dr_low_set_control): Likewise.
2892 (i386_dr_low_get_control): Likewise.
2893 (i386_dr_low_get_status): Likewise.
2894 (i386_dr_low): New global variable.
2895 * win32-i386-low.c (i386_dr_low_set_addr):
2896 Changed signature. Made static.
2897 (i386_dr_low_get_addr): Likewise.
2898 (i386_dr_low_set_control): Likewise.
2899 (i386_dr_low_get_control): Likewise.
2900 (i386_dr_low_get_status): Likewise.
2901 (i386_dr_low): New global variable.
2903 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2905 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2906 * Makefile.in (AR, AR_FLAGS): Define.
2907 * configure: Regenerate.
2909 2014-06-19 Gary Benson <gbenson@redhat.com>
2911 * Makefile.in (i386-dregs.o): New rule.
2912 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2913 * i386-low.c (target.h): Remove include.
2914 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2915 (DR_CONTROL_SHIFT): Likewise.
2916 (DR_CONTROL_SIZE): Likewise.
2917 (DR_RW_EXECUTE): Likewise.
2918 (DR_RW_WRITE): Likewise.
2919 (DR_RW_READ): Likewise.
2920 (DR_RW_IORW): Likewise.
2921 (DR_LEN_1): Likewise.
2922 (DR_LEN_2): Likewise.
2923 (DR_LEN_4): Likewise.
2924 (DR_LEN_8): Likewise.
2925 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2926 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2927 (DR_ENABLE_SIZE): Likewise.
2928 (DR_LOCAL_SLOWDOWN): Likewise.
2929 (DR_GLOBAL_SLOWDOWN): Likewise.
2930 (DR_CONTROL_RESERVED): Likewise.
2931 (I386_DR_CONTROL_MASK): Likewise.
2932 (I386_DR_VACANT): Likewise.
2933 (I386_DR_LOCAL_ENABLE): Likewise.
2934 (I386_DR_GLOBAL_ENABLE): Likewise.
2935 (I386_DR_DISABLE): Likewise.
2936 (I386_DR_SET_RW_LEN): Likewise.
2937 (I386_DR_GET_RW_LEN): Likewise.
2938 (I386_DR_WATCH_HIT): Likewise.
2939 (i386_wp_op_t): Likewise.
2940 (i386_show_dr): Likewise.
2941 (i386_length_and_rw_bits): Likewise.
2942 (i386_insert_aligned_watchpoint): Likewise.
2943 (i386_remove_aligned_watchpoint): Likewise.
2944 (i386_handle_nonaligned_watchpoint): Likewise.
2945 i386_update_inferior_debug_regs(): Likewise.
2946 (i386_dr_insert_watchpoint): Likewise.
2947 (i386_dr_remove_watchpoint): Likewise.
2948 (i386_dr_region_ok_for_watchpoint): Likewise.
2949 (i386_dr_stopped_data_address): Likewise.
2950 (i386_dr_stopped_by_watchpoint): Likewise.
2952 2014-06-19 Gary Benson <gbenson@redhat.com>
2954 * i386-low.c (i386_dr_show): Renamed to
2955 i386_show_dr and made static. All uses updated.
2956 (i386_dr_length_and_rw_bits): Renamed to
2957 i386_length_and_rw_bits and made static.
2959 (i386_dr_insert_aligned_watchpoint): Renamed to
2960 i386_insert_aligned_watchpoint and made static.
2962 (i386_dr_remove_aligned_watchpoint): Renamed to
2963 i386_remove_aligned_watchpoint and made static.
2965 (i386_dr_update_inferior_debug_regs): Renamed to
2966 i386_update_inferior_debug_regs and made static.
2969 2014-06-18 Gary Benson <gbenson@redhat.com>
2971 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2972 (i386_dr_low_can_set_control): Likewise.
2973 (i386_get_debug_register_length): Likewise.
2974 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2975 (i386_dr_low_can_set_control): Likewise.
2976 (i386_get_debug_register_length): Likewise.
2978 2014-06-17 Gary Benson <gbenson@redhat.com>
2980 * i386-low.h (i386-dregs.h): New include.
2981 (DR_FIRSTADDR): Now in i386-dregs.h.
2982 (DR_LASTADDR): Likewise.
2983 (DR_NADDR): Likewise.
2984 (DR_STATUS): Likewise.
2985 (DR_CONTROL): Likewise.
2986 (i386_debug_reg_state): Likewise.
2987 (i386_dr_insert_watchpoint): Likewise.
2988 (i386_dr_remove_watchpoint): Likewise.
2989 (i386_dr_region_ok_for_watchpoint): Likewise.
2990 (i386_dr_stopped_data_address): Likewise.
2991 (i386_dr_stopped_by_watchpoint): Likewise.
2992 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2994 2014-06-18 Gary Benson <gbenson@redhat.com>
2996 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2997 i386_dr_insert_watchpoint.
2998 (i386_low_remove_watchpoint): Renamed to
2999 i386_dr_remove_watchpoint.
3000 (i386_low_region_ok_for_watchpoint): Renamed to
3001 i386_dr_region_ok_for_watchpoint.
3002 (i386_low_stopped_data_address): Renamed to
3003 i386_dr_stopped_data_address.
3004 (i386_low_stopped_by_watchpoint): Renamed to
3005 i386_dr_stopped_by_watchpoint.
3006 * i386-low.c (i386_show_dr): Renamed to
3007 i386_dr_show and made nonstatic. All uses updated.
3008 (i386_length_and_rw_bits): Renamed to
3009 i386_dr_length_and_rw_bits and made nonstatic.
3011 (i386_insert_aligned_watchpoint): Renamed to
3012 i386_dr_insert_aligned_watchpoint and made nonstatic.
3014 (i386_remove_aligned_watchpoint): Renamed to
3015 i386_dr_remove_aligned_watchpoint and made nonstatic.
3017 (i386_update_inferior_debug_regs): Renamed to
3018 i386_dr_update_inferior_debug_regs and made nonstatic.
3020 (i386_low_insert_watchpoint): Renamed to
3021 i386_dr_insert_watchpoint. All uses updated.
3022 (i386_low_remove_watchpoint): Renamed to
3023 i386_dr_remove_watchpoint. All uses updated.
3024 (i386_low_region_ok_for_watchpoint): Renamed to
3025 i386_dr_region_ok_for_watchpoint. All uses updated.
3026 (i386_low_stopped_data_address): Renamed to
3027 i386_dr_stopped_data_address. All uses updated.
3028 (i386_low_stopped_by_watchpoint): Renamed to
3029 i386_dr_stopped_by_watchpoint. All uses updated.
3031 2014-06-18 Gary Benson <gbenson@redhat.com>
3033 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3034 (i386_dr_low_can_set_control): Likewise.
3035 (i386_insert_aligned_watchpoint): New check.
3037 2014-06-18 Gary Benson <gbenson@redhat.com>
3039 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3042 2014-06-18 Gary Benson <gbenson@redhat.com>
3044 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3045 instead of fatal and error.
3046 (i386_handle_nonaligned_watchpoint): Likewise.
3048 2014-06-18 Gary Benson <gbenson@redhat.com>
3050 * i386-low.c (i386_get_debug_register_length): New macro.
3051 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3052 (i386_show_dr): Use debug_printf instead of fprintf. Use
3053 phex to format values.
3055 2014-06-18 Gary Benson <gbenson@redhat.com>
3057 * i386-low.h: Comment changes.
3058 * i386-low.c: Likewise.
3060 2014-06-18 Gary Benson <gbenson@redhat.com>
3062 * i386-low.c: Whitespace changes.
3064 2014-06-12 Tom Tromey <tromey@redhat.com>
3066 * utils.c (freeargv): Remove.
3068 2014-06-12 Tom Tromey <tromey@redhat.com>
3070 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3071 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3072 (parse_debug_format_options): Likewise.
3073 (gdbserver_usage): Likewise.
3074 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3075 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3076 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3078 ($(LIBGNU)): Depend on libiberty.
3079 (all-lib): Recurse into all subdirs.
3080 (install-only): Invoke "install" target in subdirs.
3081 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3083 * configure: Rebuild.
3084 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3085 for vasprintf, vsnprintf, or gettimeofday.
3086 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3089 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3091 * development.sh: Delete.
3092 * Makefile.in (config.status): Adjust dependency on development.sh.
3093 * configure.ac: Adjust development.sh source call.
3094 * configure: Regenerate.
3096 2014-06-02 Pedro Alves <palves@redhat.com>
3098 * ax.c (gdb_free_agent_expr): New function.
3099 * ax.h (gdb_free_agent_expr): New declaration.
3100 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3102 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3104 (clear_breakpoint_conditions_and_commands): New function.
3105 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3106 (clear_breakpoint_conditions_and_commands): New declaration.
3108 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3110 * linux-aarch64-low.c (asm/ptrace.h): Include.
3112 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3114 Fix TLS access for -static -pthread.
3115 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3116 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3117 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3119 2014-05-20 Pedro Alves <palves@redhat.com>
3121 * linux-aarch64-low.c (aarch64_insert_point)
3122 (aarch64_remove_point): No longer check whether the type is
3123 supported here. Adjust to new interface.
3124 (the_low_target): Install aarch64_supports_z_point_type as
3125 supports_z_point_type method.
3126 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3127 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3128 instead of a Z packet char. Adjust.
3129 (arm_supports_z_point_type): New function.
3130 (arm_insert_point, arm_remove_point): Adjust to new interface.
3131 (the_low_target): Install arm_supports_z_point_type.
3132 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3133 (cris_insert_point, cris_remove_point): Adjust to new interface.
3134 Don't check whether the type is supported here.
3135 (the_low_target): Install cris_supports_z_point_type.
3136 * linux-low.c (linux_supports_z_point_type): New function.
3137 (linux_insert_point, linux_remove_point): Adjust to new interface.
3138 * linux-low.h (struct linux_target_ops) <insert_point,
3139 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3140 raw_breakpoint pointer parameter.
3141 <supports_z_point_type>: New method.
3142 * linux-mips-low.c (mips_supports_z_point_type): New function.
3143 (mips_insert_point, mips_remove_point): Adjust to new interface.
3144 Use mips_supports_z_point_type.
3145 (the_low_target): Install mips_supports_z_point_type.
3146 * linux-ppc-low.c (the_low_target): Install NULL as
3147 supports_z_point_type method.
3148 * linux-s390-low.c (the_low_target): Install NULL as
3149 supports_z_point_type method.
3150 * linux-sparc-low.c (the_low_target): Install NULL as
3151 supports_z_point_type method.
3152 * linux-x86-low.c (x86_supports_z_point_type): New function.
3153 (x86_insert_point): Adjust to new insert_point interface. Use
3154 insert_memory_breakpoint. Adjust to new
3155 i386_low_insert_watchpoint interface.
3156 (x86_remove_point): Adjust to remove_point interface. Use
3157 remove_memory_breakpoint. Adjust to new
3158 i386_low_remove_watchpoint interface.
3159 (the_low_target): Install x86_supports_z_point_type.
3160 * lynx-low.c (lynx_target_ops): Install NULL as
3161 supports_z_point_type callback.
3162 * nto-low.c (nto_supports_z_point_type): New.
3163 (nto_insert_point, nto_remove_point): Adjust to new interface.
3164 (nto_target_ops): Install nto_supports_z_point_type.
3165 * mem-break.c: Adjust intro comment.
3166 (struct raw_breakpoint) <raw_type, size>: New fields.
3167 <inserted>: Update comment.
3168 <shlib_disabled>: Delete field.
3169 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3170 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3171 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3172 (raw_bkpt_type_to_target_hw_bp_type): New function.
3173 (find_enabled_raw_code_breakpoint_at): New function.
3174 (find_raw_breakpoint_at): New type and size parameters. Use them.
3175 (insert_memory_breakpoint): New function, based off
3176 set_raw_breakpoint_at.
3177 (remove_memory_breakpoint): New function.
3178 (set_raw_breakpoint_at): Reimplement.
3179 (set_breakpoint): New, based on set_breakpoint_at.
3180 (set_breakpoint_at): Reimplement.
3181 (delete_raw_breakpoint): Go through the_target->remove_point
3182 instead of assuming memory breakpoints.
3183 (find_gdb_breakpoint_at): Delete.
3184 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3185 (find_gdb_breakpoint): New function.
3186 (set_gdb_breakpoint_at): Delete.
3187 (z_type_supported): New function.
3188 (set_gdb_breakpoint_1): New function, loosely based off
3189 set_gdb_breakpoint_at.
3190 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3191 (delete_gdb_breakpoint_at): Delete.
3192 (delete_gdb_breakpoint_1): New function, loosely based off
3193 delete_gdb_breakpoint_at.
3194 (delete_gdb_breakpoint): New function.
3195 (clear_gdb_breakpoint_conditions): Rename to ...
3196 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3198 (add_condition_to_breakpoint): Make static.
3199 (add_breakpoint_condition): Take a struct breakpoint pointer
3200 instead of an address. Adjust.
3201 (gdb_condition_true_at_breakpoint): Rename to ...
3202 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3204 (gdb_condition_true_at_breakpoint): Reimplement.
3205 (add_breakpoint_commands): Take a struct breakpoint pointer
3206 instead of an address. Adjust.
3207 (gdb_no_commands_at_breakpoint): Rename to ...
3208 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3209 parameter. Return true if no breakpoint was found. Change debug
3211 (gdb_no_commands_at_breakpoint): Reimplement.
3212 (run_breakpoint_commands): Rename to ...
3213 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3214 and change return type to boolean.
3215 (run_breakpoint_commands): New function.
3216 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3217 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3218 breakpoint. Go through the_target->remove_point instead of
3219 assuming memory breakpoint.
3220 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3221 software and hardware breakpoints.
3222 (reinsert_raw_breakpoint): Go through the_target->insert_point
3223 instead of assuming memory breakpoint.
3224 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3225 software and hardware breakpoints.
3226 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3227 Check both software and hardware breakpoints.
3228 (validate_inserted_breakpoint): Assert the breakpoint is a
3229 software breakpoint. Set the inserted flag to -1 instead of
3230 setting shlib_disabled.
3231 (delete_disabled_breakpoints): Adjust.
3232 (validate_breakpoints): Only validate software breakpoints.
3233 Adjust to inserted flag change.
3234 (check_mem_read, check_mem_write): Skip breakpoint types other
3235 than software breakpoints. Adjust to inserted flag change.
3236 * mem-break.h (enum raw_bkpt_type): New enum.
3237 (raw_breakpoint, struct process_info): Forward declare.
3238 (Z_packet_to_target_hw_bp_type): Delete declaration.
3239 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3240 (set_gdb_breakpoint, delete_gdb_breakpoint)
3241 (clear_breakpoint_conditions): New declarations.
3242 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3243 (breakpoint_inserted_here): Update comment.
3244 (add_breakpoint_condition, add_breakpoint_commands): Replace
3245 address parameter with a breakpoint pointer parameter.
3246 (gdb_breakpoint_here): Update comment.
3247 (delete_gdb_breakpoint_at): Delete.
3248 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3249 * server.c (process_point_options): Take a struct breakpoint
3250 pointer instead of an address. Adjust.
3251 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3252 delete_gdb_breakpoint.
3253 * spu-low.c (spu_target_ops): Install NULL as
3254 supports_z_point_type method.
3255 * target.h: Include mem-break.h.
3256 (struct target_ops) <prepare_to_access_memory>: Update comment.
3257 <supports_z_point_type>: New field.
3258 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3259 instead of a char. Also take a raw breakpoint pointer.
3260 * win32-arm-low.c (the_low_target): Install NULL as
3261 supports_z_point_type.
3262 * win32-i386-low.c (i386_supports_z_point_type): New function.
3263 (i386_insert_point, i386_remove_point): Adjust to new interface.
3264 (the_low_target): Install i386_supports_z_point_type.
3265 * win32-low.c (win32_supports_z_point_type): New function.
3266 (win32_insert_point, win32_remove_point): Adjust to new interface.
3267 (win32_target_ops): Install win32_supports_z_point_type.
3268 * win32-low.h (struct win32_target_ops):
3269 <supports_z_point_type>: New method.
3270 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3271 instead of a char. Also take a raw breakpoint pointer.
3273 2014-05-20 Pedro Alves <palves@redhat.com>
3275 * mem-break.h: Include break-common.h.
3276 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3277 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3278 (Z_packet_to_target_hw_bp_type): New declaration.
3279 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3280 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3281 (Z_PACKET_ACCESS_WP): Delete macros.
3282 (Z_packet_to_hw_type): Delete function.
3283 * i386-low.h: Don't include break-common.h here.
3284 (Z_packet_to_hw_type): Delete declaration.
3285 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3286 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3287 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3288 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3289 * linux-aarch64-low.c: Don't include break-common.h here.
3290 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3291 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3292 (Z_packet_to_target_hw_bp_type): Delete function.
3293 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3295 (mips_insert_point, mips_remove_point): Use
3296 Z_packet_to_target_hw_bp_type.
3298 2014-05-20 Pedro Alves <palves@redhat.com>
3300 * linux-aarch64-low.c: Include break-common.h.
3301 (enum target_point_type): Delete.
3302 (Z_packet_to_point_type): Rename to ...
3303 (Z_packet_to_target_hw_bp_type): ... this, and return a
3304 target_hw_bp_type instead.
3305 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3306 instead of an enum target_point_type.
3307 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3309 (aarch64_dr_state_insert_one_point)
3310 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3311 (aarch64_handle_aligned_watchpoint)
3312 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3313 Take an enum target_hw_bp_type instead of an enum
3315 (aarch64_supports_z_point_type): New function.
3316 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3317 use Z_packet_to_target_hw_bp_type.
3319 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3321 * configure.ac: Only use -Werror by default when DEVELOPMENT
3323 * configure: Regenerate.
3325 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3327 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3328 * linux-x86-low.c (X86_64_USER_REGS): New.
3329 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3331 2014-04-28 Yao Qi <yao@codesourcery.com>
3333 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3336 2014-04-25 Pedro Alves <palves@redhat.com>
3339 * linux-low.c (linux_attach_fail_reason_string): New function.
3340 (linux_attach_lwp): Delete.
3341 (linux_attach_lwp_1): Rename to ...
3342 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3343 argument. Remove "initial" parameter. Return int instead of
3344 void. Don't error or warn here.
3345 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3346 failure to attach to the tgid. Call warning when failing to
3348 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3349 argument. Remove "initial" parameter. Return int instead of
3350 void. Don't error or warn here.
3351 (linux_attach_fail_reason_string): New declaration.
3352 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3353 interface change. Use linux_attach_fail_reason_string.
3355 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3356 Walfred Tedeschi <walfred.tedeschi@intel.com>
3358 * Makefile.in: Added rules to handle new files
3359 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3360 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3361 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3362 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3363 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3364 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3366 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3367 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3368 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3369 i386/x32-avx512.xml.
3370 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3371 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3372 i386/x32-avx512-linux.xml.
3373 * i387-fp.c (num_avx512_k_registers): New constant for number
3375 (num_avx512_zmmh_low_registers): New constant for number of
3376 lower ZMM registers (0-15).
3377 (num_avx512_zmmh_high_registers): New constant for number of
3378 higher ZMM registers (16-31).
3379 (num_avx512_ymmh_registers): New contant for number of higher
3380 YMM registers (ymm16-31 added by avx521 on x86_64).
3381 (num_avx512_xmm_registers): New constant for number of higher
3382 XMM registers (xmm16-31 added by AVX512 on x86_64).
3383 (struct i387_xsave): Add space for AVX512 registers.
3384 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3385 Add code to handle AVX512 registers.
3386 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3387 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3388 prototypei from generated file.
3389 (tdesc_amd64_avx512_linux): Likewise.
3390 (init_registers_x32_avx512_linux): Likewise.
3391 (tdesc_x32_avx512_linux): Likewise.
3392 (init_registers_i386_avx512_linux): Likewise.
3393 (tdesc_i386_avx512_linux): Likewise.
3394 (x86_64_regmap): Add AVX512 registers.
3395 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3397 (initialize_low_arch): Add code to initialize AVX512 registers.
3399 2014-04-23 Pedro Alves <palves@redhat.com>
3401 * mem-break.c (find_gdb_breakpoint_at): Make static.
3402 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3404 2014-04-23 Pedro Alves <palves@redhat.com>
3406 * i386-low.c: Don't include break-common.h here.
3407 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3408 prototype to take target_hw_bp_type as argument instead of a Z
3410 * i386-low.h: Include break-common.h here.
3411 (Z_packet_to_hw_type): Declare.
3412 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3414 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3415 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3416 (x86_remove_point): Convert the packet number to a
3417 target_hw_bp_type before calling i386_low_remove_watchpoint.
3418 * win32-i386-low.c (i386_insert_point): Convert the packet number
3419 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3420 (i386_remove_point): Convert the packet number to a
3421 target_hw_bp_type before calling i386_low_remove_watchpoint.
3423 2014-04-23 Pedro Alves <palves@redhat.com>
3425 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3427 2014-04-10 Pedro Alves <palves@redhat.com>
3429 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3430 Check if the condition or command is NULL before checking if the
3431 breakpoint is known. On success, return true.
3432 * mem-break.h (add_breakpoint_condition): Document return.
3433 (add_breakpoint_commands): Add describing comment.
3434 * server.c (skip_to_semicolon): New function.
3435 (process_point_options): Use it.
3437 2014-04-09 Pedro Alves <palves@redhat.com>
3439 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3442 2014-02-27 Pedro Alves <palves@redhat.com>
3445 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3447 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3449 (last_thread_of_process_p): Take a PID argument instead of a
3451 (linux_wait_for_lwp): Delete.
3452 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3454 (linux_low_filter_event): New function, party factored out from
3455 linux_wait_for_event.
3456 (linux_wait_for_event): Rename to ...
3457 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3458 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3459 sigsuspend. Check for zombie leaders.
3460 (linux_wait_for_event): Reimplement as wrapper around
3461 linux_wait_for_event_filtered.
3462 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3463 a normal or signal exit is seen, it's the whole process exiting.
3464 (wait_for_sigstop): No longer a for_each_inferior callback.
3465 Rewrite on top of linux_wait_for_event_filtered.
3466 (stop_all_lwps): Call wait_for_sigstop directly.
3467 * server.c (resume, handle_target_event): Handle
3468 TARGET_WAITKIND_NO_RESUMED.
3470 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3472 * win32-low.c (psapi_get_dll_name,
3473 * win32_CreateToolhelp32Snapshot): Delete.
3474 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3475 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3477 (handle_load_dll): Add function description.
3478 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3480 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3482 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3484 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3485 base address when calling win32_add_one_solib.
3486 (handle_load_dll): Delete local variable load_addr.
3487 Remove 0x1000 offset applied to DLL base address when calling
3488 win32_add_one_solib.
3489 (handle_unload_dll): Add comment.
3491 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3493 * win32-low.c (win32_add_all_dlls): Renames
3494 win32_ensure_ntdll_loaded. Rewrite function documentation.
3495 Adjust implementation to always load all DLLs.
3496 Add 0x1000 offset to DLL base address when calling
3497 win32_add_one_solib.
3498 (child_initialization_done): New static global.
3499 (do_initial_child_stuff): Set child_initialization_done to
3500 zero during child initialization, and 1 after. Replace call
3501 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3503 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3504 (handle_unload_dll): Add function documentation.
3505 (get_child_debug_event): Ignore load and unload DLL events
3506 during child initialization.
3508 2014-02-20 Doug Evans <dje@google.com>
3510 Remove global all_lwps.
3511 * inferiors.h (ptid_of): Move here from linux-low.h.
3512 (pid_of, lwpid_of): Ditto.
3513 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3514 parameter is a struct thread_info * now.
3515 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3516 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3517 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3519 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3520 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3521 * linux-arm-low.c (update_registers_callback): Update, "entry"
3522 parameter is a struct thread_info * now.
3523 Fetch lwpid from current_inferior directly.
3524 (arm_insert_point): Pass &all_threads to find_inferior instead of
3526 (arm_remove_point): Ditto.
3527 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3528 (arm_prepare_to_resume): Fetch pid from thread.
3529 (arm_read_description): Fetch lwpid from current_inferior directly.
3530 * linux-low.c (all_lwps): Delete.
3531 (delete_lwp): Delete call to remove_inferior.
3532 (handle_extended_wait): Fetch lwpid from thread.
3533 (add_lwp): Don't set lwp->entry.id. Remove call to
3534 add_inferior_to_list.
3535 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3536 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3537 (kill_one_lwp_callback): Ditto.
3538 (linux_kill): Don't dereference NULL pointer.
3539 Fetch ptid,lwpid from thread.
3540 (get_detach_signal): Fetch ptid from thread.
3541 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3542 Simplify call to regcache_invalidate_thread.
3543 (delete_lwp_callback): Update, "entry" parameter is a
3544 struct thread_info * now. Fetch pid from thread.
3545 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3546 (status_pending_p_callback): Update, "entry" parameter is a
3547 struct thread_info * now. Fetch ptid from thread.
3548 (find_lwp_pid): Update, "entry" parameter is a
3549 struct thread_info * now.
3550 (linux_wait_for_lwp): Fetch pid from thread.
3551 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3552 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3553 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3554 (dequeue_one_deferred_signal): Ditto.
3555 (cancel_breakpoint): Fetch ptid from current_inferior.
3556 (linux_wait_for_event): Pass &all_threads to find_inferior,
3557 not &all_lwps. Fetch ptid, lwpid from thread.
3558 (count_events_callback): Update, "entry" parameter is a
3559 struct thread_info * now.
3560 (select_singlestep_lwp_callback): Ditto.
3561 (select_event_lwp_callback): Ditto.
3562 (cancel_breakpoints_callback): Ditto.
3563 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3565 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3566 (unsuspend_one_lwp): Update, "entry" parameter is a
3567 struct thread_info * now.
3568 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3570 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3571 Fetch lwpid from thread, not lwp.
3572 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3573 Pass &all_threads to find_inferior, not &all_lwps.
3574 (send_sigstop): Fetch lwpid from thread, not lwp.
3575 (send_sigstop_callback): Update, "entry" parameter is a
3576 struct thread_info * now.
3577 (suspend_and_send_sigstop_callback): Ditto.
3578 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3579 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3580 struct thread_info * now.
3581 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3583 (lwp_running): Update, "entry" parameter is a
3584 struct thread_info * now.
3585 (stop_all_lwps): Fetch ptid from thread.
3586 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3587 (linux_resume_one_lwp): Fetch lwpid from thread.
3588 (linux_set_resume_request): Update, "entry" parameter is a
3589 struct thread_info * now. Fetch pid, lwpid from thread.
3590 (resume_status_pending_p): Update, "entry" parameter is a
3591 struct thread_info * now.
3592 (need_step_over_p): Ditto. Fetch lwpid from thread.
3593 (start_step_over): Fetch lwpid from thread.
3594 (linux_resume_one_thread): Update, "entry" parameter is a
3595 struct thread_info * now. Fetch lwpid from thread.
3596 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3597 (proceed_one_lwp): Update, "entry" parameter is a
3598 struct thread_info * now. Fetch lwpid from thread.
3599 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3600 struct thread_info * now.
3601 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3602 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3603 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3605 (regsets_store_inferior_registers): Ditto.
3606 (fetch_register, store_register): Ditto.
3607 (linux_read_memory, linux_write_memory): Ditto.
3608 (linux_request_interrupt): Ditto.
3609 (linux_read_auxv): Ditto.
3610 (linux_xfer_siginfo): Ditto.
3611 (linux_qxfer_spu): Ditto.
3612 (linux_qxfer_libraries_svr4): Ditto.
3613 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3614 moved to inferiors.h.
3616 (get_thread_lwp): Update.
3617 (struct lwp_info): Delete member "entry". Simplify comment for
3620 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3621 current_inferior directly.
3622 (update_watch_registers_callback): Update, "entry" parameter is a
3623 struct thread_info * now. Fetch pid from thread.
3624 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3625 (mips_insert_point): Fetch lwpid from current_inferior.
3626 Pass &all_threads to find_inferior, not &all_lwps.
3627 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3628 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3630 (mips_stopped_data_address): Ditto.
3631 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3633 * linux-tile-low.c (tile_arch_setup): Ditto.
3634 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3635 (update_debug_registers_callback): Update, "entry" parameter is a
3636 struct thread_info * now. Fetch pid from thread.
3637 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3638 Pass &all_threads to find_inferior, not &all_lwps.
3639 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3640 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3641 Pass &all_threads to find_inferior, not &all_lwps.
3642 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3643 (i386_dr_low_get_status): Ditto.
3644 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3645 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3646 (x86_linux_read_description): Ditto.
3647 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3649 2014-02-20 Doug Evans <dje@google.com>
3651 * inferiors.c (get_first_inferior): Fix buglet.
3653 2014-02-19 Doug Evans <dje@google.com>
3655 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3656 * inferiors.c (add_thread): Change result type to struct thread_info *.
3657 All callers updated.
3658 (add_lwp): Call add_thread here instead of in callers.
3659 All callers updated.
3660 * linux-low.h (get_lwp_thread): Rewrite.
3661 (struct lwp_info): New member "thread".
3663 2014-02-19 Doug Evans <dje@google.com>
3665 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3666 All callers updated.
3668 2014-02-19 Doug Evans <dje@google.com>
3670 * inferiors.c (add_thread): Fix whitespace.
3672 2014-02-19 Doug Evans <dje@google.com>
3674 * dll.c (clear_dlls): Replace accessing list implemention details
3676 * gdbthread.h (get_first_thread): Declare.
3677 * inferiors.c (for_each_inferior_with_data): New function.
3678 (get_first_thread): New function.
3679 (find_thread_ptid): Simplify.
3680 (get_first_inferior): New function.
3681 (clear_list): Delete.
3682 (one_inferior_p): New function.
3683 (clear_inferior_list): New function.
3684 (clear_inferiors): Update.
3685 * inferiors.h (for_each_inferior_with_data): Declare.
3686 (clear_inferior_list): Declare.
3687 (one_inferior_p): Declare.
3688 (get_first_inferior): Declare.
3689 * linux-low.c (linux_wait_for_event): Replace accessing list
3690 implemention details with API function.
3691 * server.c (target_running): Ditto.
3692 (accumulate_file_name_length): New function.
3693 (emit_dll_description): New function.
3694 (handle_qxfer_libraries): Replace accessing list implemention
3695 details with API function.
3696 (handle_qxfer_threads_worker): New function.
3697 (handle_qxfer_threads_proper): Replace accessing list implemention
3698 details with API function.
3699 (handle_query): Ditto.
3700 (visit_actioned_threads_callback_ftype): New typedef.
3701 (visit_actioned_threads_data): New struct.
3702 (visit_actioned_threads): Rewrite to be find_inferior callback.
3703 (resume): Call find_inferior.
3704 (handle_status): Replace accessing list implemention
3705 details with API function.
3706 (process_serial_event): Replace accessing list implemention details
3708 * target.c (set_desired_inferior): Replace accessing list implemention
3709 details with API function.
3710 * tracepoint.c (same_process_p): New function.
3711 (gdb_agent_about_to_close): Replace accessing list implemention
3712 details with API function.
3713 * win32-low.c (child_delete_thread): Replace accessing list
3714 implemention details with API function.
3715 (match_dll_by_basename): New function.
3716 (dll_is_loaded_by_basename): New function.
3717 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3718 details call to dll_is_loaded_by_basename.
3720 2014-02-19 Doug Evans <dje@google.com>
3722 * dll.h (struct dll_info): Add comment.
3723 * gdbthread.h (struct thread_info): Add comment.
3724 (current_ptid): Simplify.
3725 * inferiors.c (add_process): Update.
3726 (remove_process): Update.
3727 * inferiors.h (struct process_info): Rename member "head" to "entry".
3728 * linux-low.c (delete_lwp): Update.
3730 (last_thread_of_process_p): Update.
3731 (kill_one_lwp_callback, linux_kill): Update.
3732 (status_pending_p_callback): Update.
3733 (wait_for_sigstop): Update. Simplify read of ptid.
3734 (start_step_over): Update.
3735 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3736 (get_lwp_thread): Update.
3737 (struct lwp_info): Rename member "head" to "entry".
3738 * regcache.h (inferior_list_entry): Delete.
3739 * server.c (kill_inferior_callback): Update.
3740 (detach_or_kill_inferior_callback): Update.
3741 (print_started_pid): Update.
3742 (print_attached_pid): Update.
3743 (process_serial_event): Simplify read of ptid.
3744 * thread-db.c (thread_db_create_event): Update.
3745 (thread_db_get_tls_address): Update.
3746 * win32-low.c (current_inferior_ptid): Simplify.
3748 2014-02-19 Tom Tromey <tromey@redhat.com>
3750 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3752 (target_supports_btrace): Update.
3754 2014-02-14 Yao Qi <yao@codesourcery.com>
3756 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3757 (rsp-low-ipa.o): New target.
3759 2014-02-12 Tom Tromey <tromey@redhat.com>
3761 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3762 convert_ascii_to_int.
3763 * regcache.c (registers_to_string): Likewise.
3764 * remote-utils.c (decode_M_packet): Likewise.
3765 * server.c (process_serial_event): Likewise.
3767 2014-02-12 Tom Tromey <tromey@redhat.com>
3769 * server.c (handle_query, handle_v_run): Use hex2bin, not
3771 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3773 2014-02-12 Tom Tromey <tromey@redhat.com>
3775 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3776 convert_int_to_ascii.
3777 * regcache.c (registers_to_string, collect_register_as_string):
3779 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3781 * server.c (process_serial_event): Likewise.
3782 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3783 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3785 2014-02-12 Tom Tromey <tromey@redhat.com>
3787 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3788 bin2hex, not hexify.
3789 * tracepoint.c (cmd_qtstatus): Likewise.
3791 2014-02-12 Tom Tromey <tromey@redhat.com>
3793 * remote-utils.c (monitor_output): Pass explicit length to
3796 2014-02-12 Tom Tromey <tromey@redhat.com>
3798 * tracepoint.c: Include rsp-low.h.
3799 * server.c: Include rsp-low.h.
3800 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3801 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3803 * remote-utils.c: Include rsp-low.h.
3804 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3805 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3806 (convert_int_to_ascii, convert_ascii_to_int): Move to
3808 * regcache.c: Include rsp-low.h.
3809 * ax.c: Include rsp-low.h.
3810 * Makefile.in (SFILES): Add common/rsp-low.c.
3811 (OBS): Add rsp-low.o.
3812 (rsp-low.o): New target.
3814 2014-02-12 Tom Tromey <tromey@redhat.com>
3816 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3817 Include print-utils.h.
3818 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3819 (plongest, thirty_two, phex_nz): Remove.
3820 * Makefile.in (SFILES): Add common/print-utils.c.
3821 (OBS): Add print-utils.o.
3822 (print-utils-ipa.o): New target.
3823 (print-utils.o): New target.
3824 (IPA_OBJS): Add print-utils-ipa.o.
3826 2014-02-06 Tom Tromey <tromey@redhat.com>
3828 * Makefile.in (SFILES): Fix indentation.
3830 2014-02-05 Doug Evans <dje@google.com>
3832 * linux-low.c (linux_wait_for_event): Improve comment.
3833 (linux_wait_1): Keep current_inferior in sync with event_child.
3835 2014-01-22 Doug Evans <dje@google.com>
3837 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3839 2014-01-22 Doug Evans <dje@google.com>
3841 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3842 * configure: Regenerate.
3843 * config.in: Regenerate.
3844 * Makefile.in (SFILES): Add debug.c.
3846 * debug.c: New file.
3847 * debug.h: New file.
3848 * linux-aarch64-low.c (*): Update all debugging printfs to use
3849 debug_printf instead of fprintf.
3850 * linux-arm-low.c (*): Ditto.
3851 * linux-cris-low.c (*): Ditto.
3852 * linux-crisv32-low.c (*): Ditto.
3853 * linux-m32r-low.c (*): Ditto.
3854 * linux-sparc-low.c (*): Ditto.
3855 * linux-x86.c (*): Ditto.
3856 * linux-low.c (*): Ditto.
3857 (linux_wait_1): Add calls to debug_enter, debug_exit.
3858 (linux_wait): Remove redundant debugging printf.
3859 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3860 (linux_resume, unstop_all_lwps): Ditto.
3861 * mem-break.c (*): Update all debugging printfs to use
3862 debug_printf instead of fprintf.
3863 * remote-utils.c (*): Ditto.
3864 * thread-db.c (*): Ditto.
3865 * server.c #include <ctype.h>, "gdb_vecs.h".
3866 (debug_threads): Moved to debug.c.
3867 (*): Update all debugging printfs to use debug_printf instead of
3869 (start_inferior): Replace call to fflush with call to debug_flush.
3870 (monitor_show_help): Mention set debug-format.
3871 (parse_debug_format_options): New function.
3872 (handle_monitor_command): Handle "monitor set debug-format".
3873 (gdbserver_usage): Mention --debug-format.
3874 (main): Parse --debug-format.
3875 * server.h (debug_threads): Declaration moved to debug.h.
3877 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3878 trace_debug_1 that uses debug_printf.
3879 (tracepoint_look_up_symbols): Update all debugging printfs to use
3880 debug_printf instead of fprintf.
3882 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3884 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3887 2014-01-17 Pedro Alves <palves@redhat.com>
3890 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3891 defined after including gdb_proc_service.h.
3893 2014-01-16 Doug Evans <dje@google.com>
3895 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3896 (match_dll): Use it.
3898 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3900 * target.h (target_ops) <read_btrace>: Change parameters and
3901 return type to allow error reporting.
3902 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3903 trace reading errors on.
3904 * linux-low.c (linux_low_read_btrace): Pass trace reading
3906 (linux_low_disable_btrace): New.
3908 2014-01-15 Doug Evans <dje@google.com>
3910 * inferiors.c (thread_id_to_gdb_id): Delete.
3911 * inferiors.h (thread_id_to_gdb_id): Delete.
3913 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3915 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3916 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3919 2014-01-08 Pedro Alves <palves@redhat.com>
3921 * server.c (handle_status): Don't discard previous queued stop
3922 replies or thread's pending status here.
3923 (main) <disconnection>: Do it here instead.
3925 2014-01-08 Pedro Alves <palves@redhat.com>
3927 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3928 * server.c (visit_actioned_threads, handle_pending_status): New
3930 (handle_v_cont): Factor out parts to ...
3931 (resume): ... this new function. If in all-stop, and a thread
3932 being resumed has a pending status, report it without actually
3934 (myresume): Adjust to use the new 'resume' function.
3935 (clear_pending_status_callback, set_pending_status_callback)
3936 (find_status_pending_thread_callback): New functions.
3937 (handle_status): Handle the case of multiple threads having
3938 interesting statuses to report. Report threads' real last signal
3939 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3940 with an interesting thread to report the status for, instead of
3941 always reporting the status of the first thread.
3943 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3945 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3946 * gdbreplay.c (gdbreplay_version): Likewise.
3948 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3950 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3951 iov.iov_len with the real length in use.
3953 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3955 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3956 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3957 for all targets that use win32-low.c.
3958 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3959 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3961 2013-12-13 Pedro Alves <palves@redhat.com>
3963 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3964 if equal to TARGET_WAITKIND_LOADED.
3965 * win32-low.c (cached_status): New static global.
3966 (win32_wait): Add declaration.
3967 (do_initial_child_stuff): Flush all initial pending debug events
3968 up to the initial breakpoint.
3969 (win32_wait): If CACHED_STATUS was set, return that instead
3970 of doing a real wait. Remove the code resuming the execution
3971 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3972 during the initial phase. Also remove the code changing
3973 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3974 TARGET_WAITKIND_STOPPED.
3976 2013-12-11 Yao Qi <yao@codesourcery.com>
3978 * notif.c (handle_notif_ack): Return 0 if no notification
3981 2013-11-20 Doug Evans <dje@google.com>
3983 * linux-low.c (linux_set_resume_request): Fix comment.
3985 2013-11-20 Doug Evans <dje@google.com>
3987 * linux-low.c (resume_status_pending_p): Tweak comment.
3989 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3991 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3992 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3993 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3994 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3995 (srv_amd64_regobj): Add amd64-mpx.o.
3996 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3997 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3998 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3999 * i387-fp.c (num_pl_bnd_register) Added constant.
4000 (num_pl_bnd_cfg_registers) Added constant.
4001 (struct i387_xsave) Added reserved area and MPX fields.
4002 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4003 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4005 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4006 (init_registers_amd64_mpx_linux): Declare new function.
4007 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4008 (x86_64_regmap): Add MPX registers.
4009 (x86_linux_read_description): Add MPX case.
4010 (initialize_low_arch): Initialize MPX targets.
4012 2013-11-18 Tom Tromey <tromey@redhat.com>
4014 * configure: Rebuild.
4015 * configure.ac: Don't check for stdlib.h.
4016 * gdbreplay.c: Unconditionally include stdlib.h.
4018 2013-11-18 Tom Tromey <tromey@redhat.com>
4020 * config.in: Rebuild.
4021 * configure: Rebuild.
4022 * configure.ac: Don't use AC_HEADER_DIRENT.
4024 2013-11-18 Tom Tromey <tromey@redhat.com>
4026 * server.h: Don't check HAVE_STRING_H.
4027 * gdbreplay.c: Don't check HAVE_STRING_H.
4028 * configure: Rebuild.
4030 2013-11-18 Tom Tromey <tromey@redhat.com>
4032 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4035 2013-11-08 Tom Tromey <tromey@redhat.com>
4037 * configure, config.in: Rebuild.
4038 * configure.ac: Remove unused configury.
4040 2013-11-08 Tom Tromey <tromey@redhat.com>
4042 * acinclude.m4: Include common.m4, codeset.m4.
4043 * configure, config.in: Rebuild.
4044 * configure.ac: Use GDB_AC_COMMON.
4046 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4048 * linux-s390-low.c (HWCAP_S390_TE): New define.
4049 (s390_arch_setup): Consider the TE field in the HWCAP for
4050 determining 'have_regset_tdb'.
4052 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4055 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4058 2013-10-02 Pedro Alves <palves@redhat.com>
4060 * server.c (process_serial_event): Don't output "GDBserver
4061 exiting" if GDB is connected through stdio.
4062 * target.c (mywait): Likewise, be silent if GDB is connected
4065 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4067 * lynx-low.c (lynx_add_threads_after_attach): New function.
4068 (lynx_attach): Remove call to add_thread. Add call to
4069 lynx_add_threads_after_attach instead.
4071 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4073 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4074 * config.in, configure: Regenerated.
4076 2013-09-18 Yao Qi <yao@codesourcery.com>
4079 * server.c (start_inferior): Clear 'resume_info'.
4081 2013-09-16 Jiong Wang <jiwang@tilera.com>
4083 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4086 2013-09-16 Jiong Wang <jiwang@tilera.com>
4088 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4089 linux-tile-low.o to srv_tgtobj.
4091 2013-09-16 Will Newton <will.newton@linaro.org>
4093 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4096 2013-09-06 Pedro Alves <palves@redhat.com>
4098 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4099 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4100 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4101 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4102 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4103 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4105 2013-09-06 Pedro Alves <palves@redhat.com>
4107 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4108 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4110 2013-09-06 Pedro Alves <palves@redhat.com>
4112 * linux-amd64-ipa.c: Include tracepoint.h.
4113 * linux-i386-ipa.c: Include tracepoint.h.
4115 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4117 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4118 (ps_get_thread_area): New function.
4120 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4122 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4123 (initialize_low_arch): Call init_registers_crisv32 rather than
4124 init_register_crisv32.
4126 2013-09-05 Pedro Alves <palves@redhat.com>
4128 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4130 * hostio.h: ... this new file.
4131 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4132 win32-low.c: Include hostio.h.
4134 2013-09-05 Pedro Alves <palves@redhat.com>
4136 * server.h (gdb_client_data, handler_func, callback_handler_func)
4137 (delete_file_handler, add_file_handler, append_callback_event)
4138 (delete_callback_event, start_event_loop, initialize_event_loop):
4139 Move to event-loop.h and include it.
4140 * event-loop.h: New file.
4142 2013-09-05 Pedro Alves <palves@redhat.com>
4144 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4145 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4146 (loaded_dll, unloaded_dll): Move to ...
4147 * dll.h: ... this new file.
4148 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4150 2013-09-05 Pedro Alves <palves@redhat.com>
4152 * server.h (current_process, get_thread_process, all_processes)
4153 (add_inferior_to_list, for_each_inferior, current_inferior)
4154 (remove_inferior, add_process, remove_process, find_process_pid)
4155 (have_started_inferiors_p, have_attached_inferiors_p)
4156 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4157 (clear_inferiors, find_inferior, find_inferior_id)
4158 (inferior_target_data, set_inferior_target_data)
4159 (inferior_regcache_data, set_inferior_regcache_data): Move to
4160 inferiors.h, and include it.
4161 * inferiors.h: New file.
4163 2013-09-05 Pedro Alves <palves@redhat.com>
4165 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4169 2013-09-05 Pedro Alves <palves@redhat.com>
4171 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4173 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4174 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4175 (handle_tracepoint_general_set, handle_tracepoint_query)
4176 (tracepoint_finished_step, tracepoint_was_hit)
4177 (release_while_stepping_state_list, current_traceframe)
4178 (in_readonly_region, traceframe_read_mem)
4179 (fetch_traceframe_registers, traceframe_read_sdata)
4180 (traceframe_read_info, struct fast_tpoint_collect_status)
4181 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4182 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4183 (supply_fast_tracepoint_registers)
4184 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4185 (ipa_tdesc, claim_trampoline_space)
4186 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4187 (agent_mem_read, agent_get_trace_state_variable_value)
4188 (agent_set_trace_state_variable_value, agent_tsv_read)
4189 (agent_mem_read_string, get_raw_reg_func_addr)
4190 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4191 * tracepoint.h: ... this new file.
4193 2013-09-05 Pedro Alves <palves@redhat.com>
4195 * server.h (perror_with_name, error, fatal, warning, paddress)
4196 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4198 * utils.h: New file.
4200 2013-09-05 Pedro Alves <palves@redhat.com>
4202 * server.h (remote_debug, noack_mode, transport_is_reliable)
4203 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4204 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4205 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4206 (write_enn, initialize_async_io, enable_async_io)
4207 (disable_async_io, check_remote_input_interrupt_request)
4208 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4209 (dead_thread_notify, prepare_resume_reply)
4210 (decode_address_to_semicolon, decode_address, decode_m_packet)
4211 (decode_M_packet, decode_X_packet, decode_xfer_write)
4212 (decode_search_memory_packet, unhexify, hexify)
4213 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4214 (look_up_one_symbol, relocate_instruction)
4215 (monitor_output): Move to remote-utils.h, and include it.
4216 * remote-utils.h: New file.
4218 2013-09-05 Pedro Alves <palves@redhat.com>
4220 * server.h (_): Delete.
4222 2013-09-02 Pedro Alves <palves@redhat.com>
4224 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4225 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4227 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4229 2013-09-02 Pierre Muller <muller@sourceware.org>
4231 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4232 or WriteProcessMemory complete successfully and handle
4233 ERROR_PARTIAL_COPY error.
4235 2013-09-02 Pedro Alves <palves@redhat.com>
4237 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4238 error instead of EIO.
4240 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4243 * linux-low.c: Include filestuff.h.
4244 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4245 * lynx-low.c: Include filestuff.h.
4246 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4247 * server.c: Include filestuff.h.
4248 (main): Call notice_open_fds.
4249 * spu-low.c: Include filestuff.h.
4250 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4252 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4254 * Makefile.in: Explain why ../target and ../nat are not
4255 listed as include file search paths.
4256 (linux-waitpid.o): New object file rule.
4257 * configure.srv (srv_native_linux_obj): New variable.
4258 Replace all occurrences of linux native object files with
4259 $srv_native_linux_obj.
4260 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4261 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4262 (linux_enable_event_reporting): Remove declaration.
4263 (my_waitpid): Moved to common/linux-waitpid.c.
4264 (linux_wait_for_event): Pass ptid when calling
4265 linux_enable_event_reporting.
4266 (linux_supports_tracefork_flag): Remove.
4267 (linux_enable_event_reporting): Likewise.
4268 (linux_tracefork_grandchild): Remove.
4269 (STACK_SIZE): Moved to common/linux-ptrace.c.
4270 (linux_tracefork_child): Remove.
4271 (linux_test_for_tracefork): Remove.
4272 (linux_look_up_symbols): Call linux_supports_traceclone.
4273 (initialize_low): Remove call to linux_test_for_tracefork.
4274 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4275 common/linux-ptrace.h.
4276 (PTRACE_TYPE_ARG4): Likewise.
4277 Include linux-ptrace.h.
4279 2013-08-21 Pedro Alves <palves@redhat.com>
4281 * config.in: Renegerate.
4283 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4285 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4286 (SFILES): Remove $(srcdir)/common/target-common.c and
4287 add $(srcdir)/target/waitstatus.c.
4288 (OBS): Remove target-common.o and add waitstatus.o.
4289 (server_h): Remove $(srcdir)/../common/target-common.h and
4290 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4291 and $(srcdir)/../target/waitstatus.h.
4292 (target-common.o): Remove.
4293 (waitstatus.o): New target object file.
4294 * target.h: Do not include target-common.h and
4295 include target/resume.h, target/wait.h and
4296 target/waitstatus.h.
4298 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4300 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4301 to PTRACE_TYPE_ARG3.
4302 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4303 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4305 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4306 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4308 2013-07-27 Jie Zhang <jie@codesourcery.com>
4309 Daniel Jacobowitz <dan@codesourcery.com>
4310 Yao Qi <yao@codesourcery.com>
4312 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4313 (mips-linux-watch.o): New rule.
4314 (mips_linux_watch_h): New variable.
4315 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4317 * linux-mips-low.c: Include mips-linux-watch.h.
4318 (struct arch_process_info, struct arch_lwp_info): New.
4319 (update_watch_registers_callback): New function.
4320 (mips_linux_new_process, mips_linux_new_thread) New functions.
4321 (mips_linux_prepare_to_resume, mips_insert_point): New
4323 (mips_remove_point, mips_stopped_by_watchpoint): New
4325 (rsp_bp_type_to_target_hw_bp_type): New function.
4326 (mips_stopped_data_address): New function.
4327 (the_low_target): Add watchpoint support functions.
4329 2013-07-27 Yao Qi <yao@codesourcery.com>
4331 * i386-low.c: Include break-common.h.
4332 (enum target_hw_bp_type): Remove.
4334 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4336 * Makefile.in (SFILES): /common/target-common.c.
4337 (OBS): Add target-common.o.
4338 (server_h): Add $(srcdir)/../common/target-common.h.
4339 (target-common.o): New target.
4340 * server.c (queue_stop_reply_callback): Free
4341 status string after use.
4342 * target.c (target_waitstatus_to_string): Remove.
4343 * target.h: Include target-common.h.
4344 (resume_kind): Likewise.
4345 (target_waitkind): Likewise.
4346 (target_waitstatus): Likewise.
4347 (TARGET_WNOHANG): Likewise.
4349 2013-07-04 Yao Qi <yao@codesourcery.com>
4351 * Makefile.in (host_alias): Use @host_noncanonical@.
4352 (target_alias): Use @target_noncanonical@.
4353 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4354 ACX_NONCANONICAL_HOST.
4355 * configure: Regenerated.
4358 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4360 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4361 * configure: Rebuild.
4362 * Makefile.in (version_host, version_target): Get from configure.
4363 (version.c): Use $(version_host) and $(version_target).
4365 2013-07-03 Pedro Alves <palves@redhat.com>
4367 * Makefile.in (config.status): Depend on development.sh.
4368 * acinclude.m4: Include libmcheck.m4.
4369 * configure: Regenerate.
4371 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4373 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4374 attribute inside the parentheses.
4375 (winapi_DebugSetProcessKillOnExit): Ditto.
4376 (winapi_DebugBreakProcess): Ditto.
4377 (winapi_GenerateConsoleCtrlEvent): Ditto.
4379 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4381 * notif.h (notif_event): Add a dummy member to avoid compiler
4384 2013-07-01 Pedro Alves <palves@redhat.com>
4386 * hostio.c (HOSTIO_PATH_MAX): Define.
4387 (require_filename, handle_open, handle_unlink, handle_readlink):
4390 2013-07-01 Pedro Alves <palves@redhat.com>
4392 * server.h: Include "pathmax.h".
4393 * linux-low.c: Don't include sys/param.h.
4394 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4396 * win32-low.c: Don't include sys/param.h.
4397 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4399 2013-07-01 Pedro Alves <palves@redhat.com>
4401 * event-loop.c: Don't check HAVE_UNISTD_H before including
4403 * gdbreplay.c: Likewise.
4404 * remote-utils.c: Likewise.
4405 * server.c: Likewise.
4406 * configure.ac: Don't check for unistd.h.
4407 * configure: Regenerate.
4409 2013-06-28 Tom Tromey <tromey@redhat.com>
4411 * Makefile.in (version.c): Use version.in, not
4414 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4416 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4417 * configure: Rebuild.
4418 * Makefile.in (version_host, version_target): Get from configure.
4419 (version.c): Use $(version_host) and $(version_target).
4421 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4423 Fix trace-status to output user name without trailing colon.
4424 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4426 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4428 Fix trace-status to output proper start-time and stop-time.
4429 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4430 output start time and stop time in hex as gdb expects.
4432 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4434 * tracepoint.c (build_traceframe_info_xml): Output trace state
4435 variables present in the trace buffer.
4437 2013-06-24 Tom Tromey <tromey@redhat.com>
4439 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4441 (version.o): Remove.
4442 * gdbreplay.c: Include version.h.
4443 (version, host_name): Don't declare.
4444 * server.h: Include version.h.
4445 (version, host_name): Don't declare.
4447 2013-06-12 Pedro Alves <palves@redhat.com>
4449 * linux-x86-low.c (linux_is_elf64): Delete global.
4450 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4451 with local linux_pid_exe_is_elf_64_file use.
4453 2013-06-11 Pedro Alves <palves@redhat.com>
4455 * linux-low.c (regset_disabled, disable_regset): New functions.
4456 (regsets_fetch_inferior_registers)
4457 (regsets_store_inferior_registers): Use them.
4458 (initialize_regsets_info); Don't allocate the disabled_regsets
4460 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4463 2013-06-11 Pedro Alves <palves@redhat.com>
4465 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4468 2013-06-11 Pedro Alves <palves@redhat.com>
4470 * linux-x86-low.c (initialize_low_arch): Call
4471 init_registers_x32_avx_linux.
4473 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4475 Fix compatibility with Android Bionic.
4476 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4479 2013-06-07 Pedro Alves <palves@redhat.com>
4482 * Makefile.in (OBS): Add tdesc.o.
4483 (IPA_OBJS): Add tdesc-ipa.o.
4484 (tdesc-ipa.o): New rule.
4485 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4487 * linux-low.c (new_inferior): Delete.
4488 (disabled_regsets, num_regsets): Delete.
4489 (linux_add_process): Adjust to set the new per-process
4491 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4492 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4493 was a stop. When calling arch_setup, switch the current inferior
4494 to the thread that got an event.
4495 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4496 (regsets_fetch_inferior_registers)
4497 (regsets_store_inferior_registers): New regsets_info parameter.
4499 (linux_register_in_regsets): New regs_info parameter. Adjust to
4501 (register_addr, fetch_register, store_register): New usrregs_info
4502 parameter. Adjust to use it.
4503 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4504 parameter regs_info. Adjust to use it.
4505 (linux_fetch_registers): Get the current inferior's regs_info, and
4507 (linux_store_registers): Ditto.
4508 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4509 (initialize_low): Don't initialize the target_regsets here. Call
4510 initialize_low_arch.
4511 * linux-low.h (target_regsets): Delete declaration.
4512 (struct regsets_info): New.
4513 (struct usrregs_info): New.
4514 (struct regs_info): New.
4515 (struct process_info_private) <new_inferior>: New field.
4516 (struct linux_target_ops): Delete the num_regs, regmap, and
4517 regset_bitmap fields. New field regs_info.
4518 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4519 * i387-fp.c (num_xmm_registers): Delete.
4520 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4521 calls to new interface.
4522 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4523 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4524 Infer the number of xmm registers from the regcache's target
4526 * i387-fp.h (num_xmm_registers): Delete.
4527 * inferiors.c (add_thread): Don't install the thread's regcache
4529 * proc-service.c (gregset_info): Fetch the current inferior's
4530 regs_info. Adjust to use it.
4531 * regcache.c: Include tdesc.h.
4532 (register_bytes, reg_defs, num_registers)
4533 (gdbserver_expedite_regs): Delete.
4534 (get_thread_regcache): If the thread doesn't have a regcache yet,
4535 create one, instead of aborting gdbserver.
4536 (regcache_invalidate_one): Rename to ...
4537 (regcache_invalidate_thread): ... this.
4538 (regcache_invalidate_one): New.
4539 (regcache_invalidate): Only invalidate registers of the current
4541 (init_register_cache): Add target_desc parameter, and use it.
4542 (new_register_cache): Ditto. Assert the target description has a
4543 non zero registers_size.
4544 (regcache_cpy): Add assertions. Adjust.
4545 (realloc_register_cache, set_register_cache): Delete.
4546 (registers_to_string, registers_from_string): Adjust.
4547 (find_register_by_name, find_regno, find_register_by_number)
4548 (register_cache_size): Add target_desc parameter, and use it.
4549 (free_register_cache_thread, free_register_cache_thread_one)
4550 (regcache_release, register_cache_size): New.
4551 (register_size): Add target_desc parameter, and use it.
4552 (register_data, supply_register, supply_register_zeroed)
4553 (supply_regblock, supply_register_by_name, collect_register)
4554 (collect_register_as_string, collect_register_by_name): Adjust.
4555 * regcache.h (struct target_desc): Forward declare.
4556 (struct regcache) <tdesc>: New field.
4557 (init_register_cache, new_register_cache): Add target_desc
4559 (regcache_invalidate_thread): Declare.
4560 (regcache_invalidate_one): Delete declaration.
4561 (regcache_release): Declare.
4562 (find_register_by_number, register_cache_size, register_size)
4563 (find_regno): Add target_desc parameter.
4564 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4566 * remote-utils.c: Include tdesc.h.
4567 (outreg, prepare_resume_reply): Adjust.
4568 * server.c: Include tdesc.h.
4569 (gdbserver_xmltarget): Delete declaration.
4570 (get_features_xml, process_serial_event): Adjust.
4571 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4573 (struct process_info) <tdesc>: New field.
4574 (ipa_tdesc): Declare.
4575 * tdesc.c: New file.
4576 * tdesc.h: New file.
4577 * tracepoint.c: Include tdesc.h.
4578 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4579 (get_context_regcache): Adjust to pass ipa_tdesc down.
4580 (do_action_at_tracepoint): Adjust to get the register cache size
4581 from the context regcache's description.
4582 (traceframe_walk_blocks): Adjust to get the register cache size
4583 from the current trace frame's description.
4584 (traceframe_get_pc): Adjust to get current trace frame's
4585 description and pass it down.
4586 (gdb_collect): Adjust to get the register cache size from the
4588 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4589 (gdbserver_xmltarget): Delete.
4590 (initialize_low_tracepoint): Set the ipa's target description.
4591 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4592 (initialize_low_tracepoint): Set the ipa's target description.
4593 * linux-x86-low.c: Include tdesc.h.
4594 [__x86_64__] (is_64bit_tdesc): New.
4595 (ps_get_thread_area, x86_get_thread_area): Use it.
4596 (i386_cannot_store_register): Rename to ...
4597 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4598 (i386_cannot_fetch_register): Rename to ...
4599 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4600 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4602 (target_regsets): Rename to ...
4603 (x86_regsets): ... this.
4604 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4606 (x86_siginfo_fixup): Use is_64bit_tdesc.
4607 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4608 (tdesc_x32_avx_linux, tdesc_x32_linux)
4609 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4611 (x86_linux_update_xmltarget): Delete.
4612 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4613 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4614 (AMD64_LINUX_USER64_CS): New.
4615 (x86_linux_read_description): New, based on
4616 x86_linux_update_xmltarget.
4617 (same_process_callback): New.
4618 (x86_arch_setup_process_callback): New.
4619 (x86_linux_update_xmltarget): New.
4620 (x86_regsets_info): New.
4621 (amd64_linux_regs_info): New.
4622 (i386_linux_usrregs_info): New.
4623 (i386_linux_regs_info): New.
4624 (x86_linux_regs_info): New.
4625 (x86_arch_setup): Reimplement.
4626 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4627 (x86_emit_ops): Ditto.
4628 (the_low_target): Adjust. Install x86_linux_regs_info,
4629 x86_cannot_fetch_register, and x86_cannot_store_register.
4630 (initialize_low_arch): New.
4631 * linux-ia64-low.c (tdesc_ia64): Declare.
4632 (ia64_fetch_register): Adjust.
4633 (ia64_usrregs_info, regs_info): New globals.
4634 (ia64_regs_info): New function.
4635 (the_low_target): Adjust.
4636 (initialize_low_arch): New function.
4637 * linux-sparc-low.c (tdesc_sparc64): Declare.
4638 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4640 (sparc_arch_setup): New function.
4641 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4642 (the_low_target): Adjust.
4643 (initialize_low_arch): New function.
4644 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4645 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4646 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4647 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4648 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4649 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4650 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4651 (tdesc_powerpc_isa205_vsx64l): Declare.
4652 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4653 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4654 (ppc_set_pc, ppc_get_hwcap): Adjust.
4655 (ppc_usrregs_info): Forward declare.
4656 (!__powerpc64__) ppc_regmap_adjusted: New global.
4657 (ppc_arch_setup): Adjust to the current process'es target
4659 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4660 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4661 (ppc_store_evrregset): Adjust.
4662 (target_regsets): Rename to ...
4663 (ppc_regsets): ... this, and make static.
4664 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4665 (ppc_regs_info): New function.
4666 (the_low_target): Adjust.
4667 (initialize_low_arch): New function.
4668 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4669 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4670 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4671 (tdesc_s390x_linux64v2): Declare.
4672 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4673 (s390_fill_gregset, s390_store_last_break): Adjust.
4674 (target_regsets): Rename to ...
4675 (s390_regsets): ... this, and make static.
4676 (s390_get_pc, s390_set_pc): Adjust.
4677 (s390_get_hwcap): New target_desc parameter, and use it.
4678 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4679 (s390_arch_setup): Adjust to set the current process'es target
4680 description. Don't adjust the regmap.
4681 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4682 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4683 (regs_info_3264): New globals.
4684 (s390_regs_info): New function.
4685 (the_low_target): Adjust.
4686 (initialize_low_arch): New function.
4687 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4688 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4689 [__mips64] (init_registers_mips_linux)
4690 (init_registers_mips_dsp_linux): Delete defines.
4691 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4692 (have_dsp): New global.
4693 (mips_read_description): New, based on mips_arch_setup.
4694 (mips_arch_setup): Reimplement.
4695 (get_usrregs_info): New function.
4696 (mips_cannot_fetch_register, mips_cannot_store_register)
4697 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4698 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4699 (target_regsets): Rename to ...
4700 (mips_regsets): ... this, and make static.
4701 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4702 (dsp_regs_info, regs_info): New globals.
4703 (mips_regs_info): New function.
4704 (the_low_target): Adjust.
4705 (initialize_low_arch): New function.
4706 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4707 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4709 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4710 (arm_read_description): New, with bits factored from
4712 (arm_arch_setup): Reimplement.
4713 (target_regsets): Rename to ...
4714 (arm_regsets): ... this, and make static.
4715 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4716 (arm_regs_info): New function.
4717 (the_low_target): Adjust.
4718 (initialize_low_arch): New function.
4719 * linux-m68k-low.c (tdesc_m68k): Declare.
4720 (target_regsets): Rename to ...
4721 (m68k_regsets): ... this, and make static.
4722 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4723 (m68k_regs_info): New function.
4724 (m68k_arch_setup): New function.
4725 (the_low_target): Adjust.
4726 (initialize_low_arch): New function.
4727 * linux-sh-low.c (tdesc_sharch): Declare.
4728 (target_regsets): Rename to ...
4729 (sh_regsets): ... this, and make static.
4730 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4731 (sh_regs_info, sh_arch_setup): New functions.
4732 (the_low_target): Adjust.
4733 (initialize_low_arch): New function.
4734 * linux-bfin-low.c (tdesc_bfin): Declare.
4735 (bfin_arch_setup): New function.
4736 (bfin_usrregs_info, regs_info): New globals.
4737 (bfin_regs_info): New function.
4738 (the_low_target): Adjust.
4739 (initialize_low_arch): New function.
4740 * linux-cris-low.c (tdesc_cris): Declare.
4741 (cris_arch_setup): New function.
4742 (cris_usrregs_info, regs_info): New globals.
4743 (cris_regs_info): New function.
4744 (the_low_target): Adjust.
4745 (initialize_low_arch): New function.
4746 * linux-cris-low.c (tdesc_crisv32): Declare.
4747 (cris_arch_setup): New function.
4748 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4749 (cris_regs_info): New function.
4750 (the_low_target): Adjust.
4751 (initialize_low_arch): New function.
4752 * linux-m32r-low.c (tdesc_m32r): Declare.
4753 (m32r_arch_setup): New function.
4754 (m32r_usrregs_info, regs_info): New globals.
4755 (m32r_regs_info): Adjust.
4756 (initialize_low_arch): New function.
4757 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4758 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4759 (tic6x_usrregs_info): Forward declare.
4760 (tic6x_read_description): New function, based on ...
4761 (tic6x_arch_setup): ... this. Reimplement.
4762 (target_regsets): Rename to ...
4763 (tic6x_regsets): ... this, and make static.
4764 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4765 (tic6x_regs_info): New function.
4766 (the_low_target): Adjust.
4767 (initialize_low_arch): New function.
4768 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4769 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4770 (target_regsets): Rename to ...
4771 (xtensa_regsets): ... this, and make static.
4772 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4774 (xtensa_arch_setup, xtensa_regs_info): New functions.
4775 (the_low_target): Adjust.
4776 (initialize_low_arch): New function.
4777 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4778 (nios2_arch_setup): Set the current process'es tdesc.
4779 (target_regsets): Rename to ...
4780 (nios2_regsets): ... this.
4781 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4782 (nios2_regs_info): New function.
4783 (the_low_target): Adjust.
4784 (initialize_low_arch): New function.
4785 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4786 (aarch64_arch_setup): Set the current process'es tdesc.
4787 (target_regsets): Rename to ...
4788 (aarch64_regsets): ... this.
4789 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4790 (aarch64_regs_info): New function.
4791 (the_low_target): Adjust.
4792 (initialize_low_arch): New function.
4793 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4795 (target_regsets): Rename to ...
4796 (tile_regsets): ... this.
4797 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4798 (tile_regs_info): New function.
4799 (tile_arch_setup): Set the current process'es tdesc.
4800 (the_low_target): Adjust.
4801 (initialize_low_arch): New function.
4802 * spu-low.c (tdesc_spu): Declare.
4803 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4804 * win32-arm-low.c (tdesc_arm): Declare.
4805 (arm_arch_setup): New function.
4806 (the_low_target): Install arm_arch_setup instead of
4808 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4809 (init_windows_x86): Rename to ...
4810 (i386_arch_setup): ... this. Set `win32_tdesc'.
4811 (the_low_target): Adjust.
4812 * win32-low.c (win32_tdesc): New global.
4813 (child_add_thread): Don't create the thread cache here.
4814 (do_initial_child_stuff): Set the new process'es tdesc.
4815 * win32-low.h (struct target_desc): Forward declare.
4816 (win32_tdesc): Declare.
4817 * lynx-i386-low.c (tdesc_i386): Declare global.
4818 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4819 * lynx-low.c (lynx_tdesc): New global.
4820 (lynx_add_process): Set the new process'es tdesc.
4821 * lynx-low.h (struct target_desc): Forward declare.
4822 (lynx_tdesc): Declare global.
4823 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4824 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4825 * nto-low.c (nto_tdesc): New global.
4826 (do_attach): Set the new process'es tdesc.
4827 * nto-low.h (struct target_desc): Forward declare.
4828 (nto_tdesc): Declare.
4829 * nto-x86-low.c (tdesc_i386): Declare.
4830 (nto_x86_arch_setup): Set `nto_tdesc'.
4832 2013-06-04 Gary Benson <gbenson@redhat.com>
4834 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4835 to qSupported response when appropriate.
4836 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4837 with nonzero-length annex.
4838 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4839 arguments supplied in annex.
4841 2013-05-31 Doug Evans <dje@google.com>
4844 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4845 64 bits in 64-cross-32 environment.
4847 2013-05-28 Pedro Alves <palves@redhat.com>
4849 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4850 (aarch64-without-fpu.c): Delete rule.
4851 * configure.srv (aarch64*-*-linux*): Remove references to
4852 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4853 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4856 2013-05-24 Pedro Alves <palves@redhat.com>
4858 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4859 instead of strchr/decode_address. Error if the range isn't split
4860 with a ','. Don't assume there's be a ':' in the action.
4862 2013-05-23 Yao Qi <yao@codesourcery.com>
4863 Pedro Alves <palves@redhat.com>
4865 * linux-low.c (lwp_in_step_range): New function.
4866 (linux_wait_1): If the thread was range stepping and stopped
4867 outside the stepping range, report the stop to GDB. Otherwise,
4868 continue stepping. Add range stepping debug output.
4869 (linux_set_resume_request): Copy the step range from the resume
4871 (linux_supports_range_stepping): New.
4872 (linux_target_ops) <supports_range_stepping>: Set to
4873 linux_supports_range_stepping.
4874 * linux-low.h (struct linux_target_ops)
4875 <supports_range_stepping>: New field.
4876 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4877 * linux-x86-low.c (x86_supports_range_stepping): New.
4878 (the_low_target) <supports_range_stepping>: Set to
4879 x86_supports_range_stepping.
4880 * server.c (handle_v_cont): Handle 'r' action.
4881 (handle_v_requests): Append ";r" if the target supports range
4883 * target.h (struct thread_resume) <step_range_start,
4884 step_range_end>: New fields.
4885 (struct target_ops) <supports_range_stepping>:
4887 (target_supports_range_stepping): New macro.
4889 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4891 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4892 confusion in comment.
4894 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4896 * lynx-low.c (struct process_info_private): New type.
4897 (lynx_add_process): New function.
4898 (lynx_create_inferior, lynx_attach): Replace calls to
4899 add_process by calls to lynx_add_process.
4900 (lynx_resume): If PTID is null, then try using
4901 current_process()->private->last_wait_event_ptid.
4903 (lynx_clear_inferiors): Delete. The contents of that function
4904 has been inlined in lynx_mourn;
4905 (lynx_wait_1): Save the ptid in the process's private data.
4906 (lynx_mourn): Free the process' private data. Replace call
4907 to lynx_clear_inferiors by call to clear_inferiors.
4909 2013-05-17 Yao Qi <yao@codesourcery.com>
4911 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4914 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4916 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4917 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4918 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4919 PT_TEXT_END_ADDR guards. Update comments.
4920 (linux_target_op) <read_offsets>: Conditionally define to
4921 linux_read_offsets if the target is UCLIBC and if it defines
4922 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4924 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4925 Andrew Jenner <andrew@codesourcery.com>
4927 * Makefile.in (SFILES): Add linux-nios2-low.c.
4928 (clean): Add action to delete nios2-linux.c.
4929 (nios2-linux.c): New rule.
4930 * configure.srv: Add nios2*-*-linux*.
4931 * linux-nios2-low.c: New.
4933 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4935 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4937 2013-04-25 Hui Zhu <hui@codesourcery.com>
4940 * ax.c (ax_printf): Add fflush.
4942 2013-04-22 Tom Tromey <tromey@redhat.com>
4944 * Makefile.in (SFILES): Add filestuff.c.
4945 (OBS): Add filestuff.o.
4946 (filestuff.o): New target.
4947 * config.in, configure: Rebuild.
4948 * configure.ac: Check for fdwalk, pipe2.
4950 2013-04-17 Pedro Alves <palves@redhat.com>
4952 * configure.ac (USE_THREAD_DB): Delete variable.
4953 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4954 Don't AC_SUBST USE_THREAD_DB.
4955 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4956 * config.in, configure: Regenerate.
4958 2013-04-16 Pedro Alves <palves@redhat.com>
4960 * linux-low.h (struct lwp_info) <thread_known>: Move under
4961 the USE_THREAD_DB #ifdef.
4963 2013-04-16 Pedro Alves <palves@redhat.com>
4965 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4966 (linux-low.o): Delete rule.
4967 * linux-low.h: Always include "gdb_thread_db.h" instead of
4968 conditionally including thread_db.h.
4969 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4972 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4974 * Makefile.in (install-only): Fix make install regression.
4976 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4978 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4979 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4981 * gdbserver.1: Remove.
4983 2013-03-22 Pedro Alves <palves@redhat.com>
4985 * linux-low.c (handle_extended_wait): Don't call
4986 linux_enable_event_reporting.
4988 2013-03-15 Tony Theodore <tonyt@logyst.com>
4991 * Makefile.in (SHELL): Use @SHELL@.
4993 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4995 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4998 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5000 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5001 Remove extraneous NULL element.
5003 2013-03-13 Yao Qi <yao@codesourcery.com>
5005 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5006 'V' block in trace frame.
5008 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5010 * target.h (struct target_ops): Add btrace ops.
5011 (target_supports_btrace): New macro.
5012 (target_enable_btrace): New macro.
5013 (target_disable_btrace): New macro.
5014 (target_read_btrace): New macro.
5015 * gdbthread.h (struct thread_info): Add btrace field.
5016 * server.c: Include btrace-common.h.
5017 (handle_btrace_general_set): New function.
5018 (handle_btrace_enable): New function.
5019 (handle_btrace_disable): New function.
5020 (handle_general_set): Call handle_btrace_general_set.
5021 (handle_qxfer_btrace): New function.
5022 (struct qxfer qxfer_packets[]): Add btrace entry.
5023 * inferiors.c (remove_thread): Disable btrace.
5024 * linux-low: Include linux-btrace.h.
5025 (linux_low_enable_btrace): New function.
5026 (linux_low_read_btrace): New function.
5027 (linux_target_ops): Add btrace ops.
5028 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5029 Add srv_linux_btrace=yes.
5030 (x86_64-*-linux*): Add linux-btrace.o.
5031 Add srv_linux_btrace=yes.
5032 * configure.ac: Define HAVE_LINUX_BTRACE.
5033 * config.in: Regenerated.
5034 * configure: Regenerated.
5036 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5038 * server.c (handle_qxfer): Preserve error message if -3 is
5040 (qxfer): Document the -3 return value.
5042 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5044 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5045 (linux_btrace_h): New variable.
5046 (linux-btrace.o): New rule.
5048 2013-03-08 Stan Shebs <stan@codesourcery.com>
5049 Hafiz Abid Qadeer <abidh@codesourcery.com>
5051 * tracepoint.c (trace_buffer_size): New global.
5052 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5053 (init_trace_buffer): Change to one-argument function. Allocate
5054 trace buffer memory.
5055 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5056 handle QTBuffer:size packet.
5057 (cmd_bigqtbuffer_size): New function.
5058 (initialize_tracepoint): Call init_trace_buffer with
5059 DEFAULT_TRACE_BUFFER_SIZE.
5060 * server.c (handle_query): Add QTBuffer:size in the
5063 2013-03-07 Yao Qi <yao@codesourcery.com>
5065 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5066 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5068 (cmd_qtsp): Adjust condition. Do post increment.
5069 Set cur_action and cur_step_action back to 0.
5071 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5074 * linux-low.c (linux_write_memory): Return early success if LEN is
5077 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5079 * configure.srv: Add x86_64-*-cygwin* as target.
5081 2013-02-28 Tom Tromey <tromey@redhat.com>
5083 * configure.ac: Invoke AC_SYS_LARGEFILE.
5084 * configure, config.in: Rebuild.
5086 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5088 * win32-low.c: Throughout, fix format strings and casts of
5089 printf-like functions to avoid type related warnings on all
5091 (get_child_debug_event): Print dwDebugEventCode as hex since
5092 that's how it's usually documented.
5094 2013-02-28 Yao Qi <yao@codesourcery.com>
5096 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5099 2013-02-27 Jiong Wang <jiwang@tilera.com>
5101 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5102 (reg-tilegx32.c): New rule.
5103 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5104 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5105 different register info initializer according to elf class.
5106 (init_registers_tilgx32): New function. The tilegx32 register info
5108 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5109 (tile_store_gregset): Likewise.
5111 2013-02-27 Yao Qi <yao@codesourcery.com>
5113 * server.c (process_point_options): Print debug message when
5114 debug_threads is true.
5116 2013-02-26 Yao Qi <yao@codesourcery.com>
5118 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5120 2013-02-19 Pedro Alves <palves@redhat.com>
5121 Kai Tietz <ktietz@redhat.com>
5125 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5126 instead of strtoul to extract address from packet.
5127 (process_serial_event) <'z'>: Likewise.
5129 2013-02-18 Yao Qi <yao@codesourcery.com>
5131 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5133 2013-02-14 Pedro Alves <palves@redhat.com>
5137 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5138 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5140 2013-02-14 Pedro Alves <palves@redhat.com>
5142 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5144 2013-02-14 Pedro Alves <palves@redhat.com>
5146 * tracepoint.c (save_string): Delete.
5147 (add_tracepoint_action): Use savestring instead of save_string.
5149 2013-02-12 Pedro Alves <palves@redhat.com>
5151 * linux-xtensa-low.c: Ditto.
5152 * xtensa-xtregs.c: Ditto.
5154 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5156 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5159 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5161 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5162 aarch64_num_wp_regs and aarch64_num_bp_regs to
5163 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5165 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5167 * linux-aarch64-low.c (ps_get_thread_area): Replace
5168 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5170 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5171 Marcus Shawcroft <marcus.shawcroft@arm.com>
5172 Nigel Stephens <nigel.stephens@arm.com>
5173 Yufeng Zhang <yufeng.zhang@arm.com>
5175 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5176 (aarch64.c, aarch64-without-fpu.c): New targets.
5177 * configure.srv (aarch64*-*-linux*): New.
5178 * linux-aarch64-low.c: New file.
5180 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5182 * linux-low.c (handle_extended_wait, linux_create_inferior)
5183 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5184 (dequeue_one_deferred_signal, linux_resume_one_thread)
5185 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5186 (linux_tracefork_grandchild, linux_test_for_tracefork)
5187 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5188 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5189 where the argument is 0.
5191 2013-01-25 Yao Qi <yao@codesourcery.com>
5193 * event-loop.c: Include "queue.h".
5194 (gdb_event_p): New typedef.
5195 (struct gdb_event) <next_event>: Remove.
5196 (event_queue): Change to QUEUE(gdb_event_p).
5197 (async_queue_event): Remove.
5198 (gdb_event_xfree): New.
5199 (initialize_event_loop): New.
5200 (process_event): Use API from QUEUE.
5201 (wait_for_event): Likewise.
5202 * server.c (main): Call initialize_event_loop.
5203 * server.h (initialize_event_loop): Declare.
5205 2013-01-18 Yao Qi <yao@codesourcery.com>
5207 * ax.h (struct eval_agent_expr_context): New.
5208 (gdb_eval_agent_expr): Update declaration.
5209 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5210 TFRAME. Add new argument CTX.
5211 * server.h (struct eval_agent_expr_context): Declare.
5212 (agent_mem_read, agent_tsv_read): Update declaration.
5213 (agent_mem_read_string): Likewise.
5214 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5215 (add_traceframe_block): Add new argument TPOINT.
5216 Increase TPOINT->traceframe_usage.
5217 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5218 eval_tracepoint_agent_expr.
5219 (condition_true_at_tracepoint): Likewise.
5220 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5221 (agent_mem_read_string, agent_tsv_read): Likewise.
5223 2013-01-16 Yao Qi <yao@codesourcery.com>
5225 * linux-low.c (linux_resume_one_lwp): Don't check
5226 'lwp->bp_reinsert != 0'.
5228 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5229 Pedro Alves <palves@redhat.com>
5231 * lynx-low.c (ptrace_request_to_str): Define a temporary
5232 macro and use it to simplify this function's implementation.
5234 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5236 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5239 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5241 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5243 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5245 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5247 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5249 * lynx-low.c (lynx_resume): Use the resume_info parameter
5250 to determine the ptid for the lynx_ptrace call, unless
5251 it is equal to minus_one_ptid, in which case we use the
5252 ptid of the current_inferior.
5253 (lynx_wait_1): After having received a thread create/exit
5254 event, resume the inferior's execution using the signaling
5255 thread's ptid, rather than the old ptid.
5257 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5259 * lynx-low.c (lynx_resume): Delete variable ret.
5261 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5263 * gdbreplay.c (gdbreplay_version): Update copyright year.
5264 * server.c (gdbserver_version): Likewise.
5266 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5268 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5271 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5273 * lynx-low.c (ptrace_request_to_str): Add handling for
5276 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5278 * lynx-low.c (lynx_attach): Delete variable new_process.
5280 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5282 * lynx-low.c (lynx_create_inferior): Delete variable
5285 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5287 * lynx-low.c (ptrace_request_to_str): Do not handle
5288 PTRACE_GETTHREADLIST if this macro does not exist.
5290 2012-12-15 Yao Qi <yao@codesourcery.com>
5292 * Makefile.in (OBS): Add notif.o.
5293 * notif.c, notif.h: New.
5294 * server.c: Include "notif.h".
5295 (struct vstop_notif) <next>: Remove.
5297 (queue_stop_reply): Update.
5298 (push_event, send_next_stop_reply): Remove.
5299 (discard_queued_stop_replies): Update.
5300 (notif_stop): New variable.
5301 (handle_v_stopped): Remove.
5302 (handle_v_requests): Don't call handle_v_stopped. Call
5303 handle_ack_notif instead.
5304 (queue_stop_reply_callback): Call notif_event_enque instead
5305 of queue_stop_reply.
5306 (handle_status): Don't call send_next_stop_reply, call
5307 notif_write_event instead.
5308 (kill_inferior_callback): Likewise.
5309 (detach_or_kill_inferior_callback): Likewise.
5310 (main): Call initialize_notif.
5311 (process_serial_event): Call QUEUE_is_empty.
5312 (handle_target_event): Call notif_push instead of push event.
5313 * server.h (push_event): Remove declaration.
5315 2012-12-10 Tom Tromey <tromey@redhat.com>
5317 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5318 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5321 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5322 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5323 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5324 (amd64-linux-ipa.o, ax.o): Rewrite.
5325 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5326 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5327 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5328 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5329 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5330 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5331 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5332 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5333 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5334 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5335 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5336 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5337 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5338 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5339 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5340 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5341 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5342 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5343 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5344 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5345 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5346 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5347 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5348 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5349 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5350 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5351 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5352 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5353 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5354 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5355 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5356 (reg-tilegx.o): Remove.
5357 (all_object_files): New macro.
5358 Include .deps files.
5359 * aclocal.m4, configure: Rebuild.
5360 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5361 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5362 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5364 2012-12-05 Tom Tromey <tromey@redhat.com>
5367 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5369 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5371 * configure.ac: Check for linux/perf_event.h.
5372 * config.in: Regenerated.
5373 * configure: Regenerated.
5375 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5377 * hostio.c (handle_readlink): Decrease buffer size
5378 parameter passed to readlink by one byte.
5380 2012-11-26 Yao Qi <yao@codesourcery.com>
5382 * configure.ac (build_warnings): Append '-Wempty-body'.
5383 * configure: Regenerated.
5384 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5387 2012-11-15 Pierre Muller <muller@sourceware.org>
5389 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5390 * config.in: Regenerate.
5391 * configure: Regenerate.
5392 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5393 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5394 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5395 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5397 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5398 instead of <sys/wait.h> header.
5399 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5401 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5403 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5404 (various make rules): Remove -DGDBSERVER
5406 2012-11-09 Yao Qi <yao@codesourcery.com>
5408 * spu-low.c (current_ptid): Move it to ..
5409 * gdbthread.h: ... here. New.
5410 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5411 * server.c (myresume, process_serial_event): Likewise.
5412 * thread-db.c (thread_db_find_new_threads): Likewise.
5413 * tracepoint.c (run_inferior_command): Likewise.
5415 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5417 * server.c (handle_search_memory_1): Include access length in
5420 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5422 * linux-crisv32-low.c: Fix compile errors.
5424 2012-09-04 Yao Qi <yao@codesourcery.com>
5426 * tracepoint.c (cmd_qtsv): Adjust debug message.
5427 Don't check CUR_TPOINT.
5429 2012-08-28 Yao Qi <yao@codesourcery.com>
5431 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5432 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5433 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5434 Remove declarations of xmalloc, xreallloc, xstrdup and
5436 * Makefile.in (libiberty_h): New.
5437 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5438 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5440 2012-08-23 Yao Qi <yao@codesourcery.com>
5442 * server.h: Remove declaration of 'xsnprintf'.
5444 2012-08-22 Keith Seitz <keiths@redhat.com>
5446 * server.h: Include build-gnulib-gbserver/config.h.
5447 * gdbreplay.c: Likewise.
5449 2012-08-08 Doug Evans <dje@google.com>
5451 * Makefile.in (SFILES): Add gdb_vecs.c.
5452 (OBS): Add gdb_vecs.o.
5453 (gdb_vecs_h, host_defs_h): New variables.
5454 (thread-db.o): Add $(gdb_vecs_h) dependency.
5455 (gdb_vecs.o): New rule.
5456 * thread-db.c: #include "gdb_vecs.h".
5457 (thread_db_load_search): Use a vector to iterate over path elements.
5458 Handle text appearing after "$pdir".
5460 * configure.ac: Add check for strstr.
5461 * config.in: Regenerate.
5462 * configure: Regenerate.
5464 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5466 * hostio.c (handle_pread): If pread fails, fall back to attempting
5468 (handle_pwrite): Likewise for pwrite.
5470 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5472 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5473 between unsupported TYPE and unimplementable ADDR/LEN combination.
5474 (arm_insert_point): Act on new return value.
5476 2012-07-31 Pedro Alves <palves@redhat.com>
5478 * server.c (process_point_options): Only skip tokens if we find
5479 one that is unrecognized. Don't treat 'X' specially while
5480 skipping unrecognized tokens.
5482 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5484 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5485 to 4-byte-align HW breakpoint addresses for Thumb.
5487 2012-07-27 Yao Qi <yao@codesourcery.com>
5491 * server.h: Declare gdb_agent_about_to_close.
5492 * target.c (kill_inferior): Include "agent.h".
5493 New. Send command 'kill'.
5494 * target.h (kill_inferior): Removed macro.
5495 * tracepoint.c (gdb_agent_about_to_close): New.
5496 (gdb_agent_helper_thread): Handle command 'close'.
5497 Wait endlessly until the inferior stops.
5498 Install gdb_agent_remove_socket to atexit hook.
5499 (agent_socket_name): New static variable.
5500 (gdb_agent_socket_init): Replace local variable 'name' with
5501 'agent_socket_name'.
5502 (gdb_agent_remove_socket): New.
5504 2012-07-27 Yao Qi <yao@codesourcery.com>
5506 * server.c (process_point_options): Stop at 'X' when parsing.
5508 2012-07-19 Michael Eager <eager@eagercon.com>
5510 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5512 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5513 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5514 hardware breakpoint.
5516 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5518 * gdbserver/linux-low.c (initialize_low): Call
5519 linux_ptrace_init_warnings.
5521 2012-07-02 Doug Evans <dje@google.com>
5523 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5526 2012-07-02 Stan Shebs <stan@codesourcery.com>
5528 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5529 (ax.o): Add it to build rule.
5531 (OBS): Add format.o.
5532 (IPA_OBS): Add format.o.
5533 * server.c (handle_query): Claim support for breakpoint commands.
5534 (process_point_options): Add command case.
5535 (process_serial_event): Leave running if there are printfs in
5537 * mem-break.h (any_persistent_commands): Declare.
5538 (add_breakpoint_commands): Declare.
5539 (gdb_no_commands_at_breakpoint): Declare.
5540 (run_breakpoint_commands): Declare.
5541 * mem-break.c (struct point_command_list): New struct.
5542 (struct breakpoint): New field command_list.
5543 (any_persistent_commands): New function.
5544 (add_commands_to_breakpoint): New function.
5545 (add_breakpoint_commands): New function.
5546 (gdb_no_commands_at_breakpoint): New function.
5547 (run_breakpoint_commands): New function.
5548 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5550 * ax.c: Include format.h.
5551 (ax_printf): New function.
5552 (gdb_eval_agent_expr): Add printf opcode.
5554 2012-06-13 Yao Qi <yao@codesourcery.com>
5556 * server.c (start_inferior): Remove duplicated writes to fields
5557 'last_resume_kind' and 'last_status' of 'current_inferior'.
5559 2012-06-12 Yao Qi <yao@codesourcery.com>
5560 Pedro Alves <palves@redhat.com>
5562 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5564 * server.c (handle_v_cont): Extend comment.
5566 2012-06-11 Yao Qi <yao@codesourcery.com>
5568 * linux-low.c (linux_attach): Add 'static'.
5570 2012-06-06 Yao Qi <yao@codesourcery.com>
5572 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5574 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5576 Fix gcc -flto compilation warning.
5577 * server.c (main): Make variable multi_mode and attach volatile.
5579 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5581 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5582 if the platform doesn't know about it.
5584 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5586 * Makefile.in (SFILES): Add linux-tile-low.c.
5587 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5588 * configure.srv: Handle tilegx-*-linux*.
5589 * linux-tile-low.c: New file.
5591 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5593 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5595 2012-05-24 Pedro Alves <palves@redhat.com>
5599 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5601 2012-05-24 Pedro Alves <palves@redhat.com>
5605 Replace target_signal with gdb_signal throughout.
5607 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5609 * linux-low.c (linux_store_registers): Avoid the copying sequence
5610 when no data has been retrieved by ptrace.
5612 2012-05-22 Will Deacon <will.deacon@arm.com>
5614 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5615 Include asm/ptrace.h.
5616 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5619 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5621 * linux-low.c (linux_store_registers): Don't re-retrieve data
5622 with ptrace that has already been obtained from /proc. Always
5623 copy any data retrieved with ptrace to the buffer supplied.
5625 2012-05-11 Yao Qi <yao@codesourcery.com>
5626 Pedro Alves <palves@redhat.com>
5628 * linux-low.c (enum stopping_threads_kind): New.
5629 (stopping_threads): Change type to `enum stopping_threads_kind'.
5630 (handle_extended_wait): If stopping and suspending threads, leave
5631 the new_lwp suspended too.
5632 (linux_wait_for_event): Adjust.
5633 (stop_all_lwps): Set `stopping_threads' to
5634 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5635 whether we're suspending threads or just stopping them. Assert no
5638 2012-04-29 Yao Qi <yao@codesourcery.com>
5640 * server.h: Move some code to ...
5641 * gdbthread.h: ... here. New.
5642 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5643 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5644 (nto-low.o, win32-low.o): Likewise.
5645 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5646 * regcache.c, remote-utils.c, server.c: Likewise.
5647 * target.c, tracepoint.c, win32-low.c: Likewise.
5649 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5651 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5652 (PTRACE_ARG4_TYPE): Likewise.
5653 (PTRACE_XFER_TYPE): Likewise.
5654 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5655 ptrace to PTRACE_ARG3_TYPE.
5656 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5657 (PTRACE_ARG4_TYPE): Likewise.
5658 (PTRACE_XFER_TYPE): Likewise.
5659 (linux_detach_one_lwp): Cast fourth argument of
5660 ptrace to long then PTRACE_ARG4_TYPE.
5661 (regsets_fetch_inferior_registers): Cast third argument of
5662 ptrace to long then PTRACE_ARG3_TYPE.
5663 (regsets_store_inferior_registers): Likewise.
5665 2012-04-20 Pedro Alves <palves@redhat.com>
5667 * configure: Regenerate.
5669 2012-04-19 Pedro Alves <palves@redhat.com>
5671 * Makefile.in (GNULIB_BUILDDIR): New.
5672 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5673 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5674 (all, install-only, uninstall, clean-info, all-lib, clean): No
5675 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5676 (maintainer-clean realclean distclean): Use subdir_do.
5678 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5679 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5680 * acinclude.m4: Include acx_configure_dir.m4.
5681 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5682 calls. Call AC_PROG_RANLIB. Configure gnulib using
5685 (GNULIB_STDINT_H): Adjust.
5686 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5687 * gdbreplay.c: Include build-gnulib/config.h.
5688 * server.h: Likewise.
5689 * aclocal.m4: Regenerate.
5690 * config.in: Regenerate.
5691 * configure: Regenerate.
5693 2012-04-19 Pedro Alves <palves@redhat.com>
5695 * Makefile.in (LIBGNU, INCGNU): Adjust.
5696 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5697 (all, install-only, uninstall, clean-info, all-lib, clean)
5698 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5699 * configure.ac: Adjust AC_OUTPUT output.
5700 * aclocal.m4: Regenerate.
5701 * configure: Regenerate.
5703 2012-04-19 Pedro Alves <palves@redhat.com>
5705 * Makefile.in (generated_files): New.
5706 (server_h): Remove the explicit dependency on config.h, and depend
5707 on $generated_files.
5709 2012-04-19 Pedro Alves <palves@redhat.com>
5711 * Makefile.in (INCGNU): Add -Ignulib.
5713 2012-04-19 Pedro Alves <palves@redhat.com>
5715 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5716 (INCGNU): ... this, and spell out -I here.
5717 (GNULIB_LIB): Rename to ...
5719 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5721 2012-04-19 Pedro Alves <palves@redhat.com>
5723 * config.in: Regenerate.
5725 2012-04-19 Pedro Alves <palves@redhat.com>
5727 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5728 * server.h (memmem): Remove declaration.
5729 * config.in: Regenerate.
5730 * configure: Regenerate.
5732 2012-04-19 Yao Qi <yao@codesourcery.com>
5734 * Makefile.in (SFILES): Add common/vec.c.
5738 2012-04-19 Yao Qi <yao@codesourcery.com>
5740 * remote-utils.c (prepare_resume_reply): Replace with macro
5741 target_core_of_thread.
5742 * server.c (handle_qxfer_threads_proper): Likewise.
5743 * target.h (traget_core_of_thread): New macro.
5745 2012-04-18 Pedro Alves <palves@redhat.com>
5747 * aclocal.m4: Regenerate.
5748 * configure: Regenerate.
5750 2012-04-16 Yao Qi <yao@codesourcery.com>
5752 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5753 duplicated on address.
5755 2012-04-16 Yao Qi <yao@codesourcery.com>
5757 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5758 (struct tracepoint_action_ops) <send>: New field.
5759 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5760 (agent_expr_send, x_tracepoint_action_send): New.
5761 (l_tracepoint_action_send): New.
5762 (cmd_qtdp): Download and install tracepoint
5763 according to `use_agent'.
5764 (run_inferior_command): Add one more parameter `len'.
5766 (tracepoint_send_agent): New.
5767 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5769 2012-04-16 Yao Qi <yao@codesourcery.com>
5771 * tracepoint.c (download_tracepoints): Moved to ...
5772 (cmd_qtstart): ... here.
5774 2012-04-14 Yao Qi <yao@codesourcery.com>
5776 * tracepoint.c: Include inttypes.h.
5777 (struct collect_memory_action): Use sized types.
5778 (struct tracepoint): Likewise.
5779 (cmd_qtdp, stop_tracing): Update print specifiers.
5780 (cmd_qtp, response_tracepoint): Likewise.
5781 (collect_data_at_tracepoint): Likewise.
5782 (collect_data_at_step): Likewise.
5784 2012-04-14 Yao Qi <yao@codesourcery.com>
5786 Import gnulib module inttypes.
5787 * aclocal.m4, config.in, configure: Regenerated.
5789 2012-04-14 Yao Qi <yao@codesourcery.com>
5791 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5792 Makefile and config.status at last.
5794 2012-04-13 Yao Qi <yao@codesourcery.com>
5796 * tracepoint.c: Include stdint.h unconditionally.
5798 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5800 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5801 on BFD_HAVE_SYS_PROCFS_TYPE.
5802 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5803 * configure: Regenerate.
5804 * config.in: Likewise.
5806 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5808 * Makefile.in (clean): Also remove x32.c x32-linux.c
5809 x32-avx.c x32-avx-linux.c.
5810 (x32.o): New target.
5812 (x32-linux.o): Likewise.
5813 (x32-linux.c): Likewise.
5814 (x32-avx.o): Likewise.
5815 (x32-avx.c): Likewise.
5816 (x32-avx-linux.o): Likewise.
5817 (x32-avx-linux.c): Likewise.
5819 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5820 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5821 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5822 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5823 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5824 i386/x32-avx-linux.xml.
5826 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5827 (init_registers_x32_avx_linux): Likwise.
5828 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5829 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5831 2012-04-13 Pedro Alves <palves@redhat.com>
5833 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5834 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5835 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5836 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5839 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5841 * linux-x86-low.c (compat_x32_clock_t): New.
5842 (compat_x32_siginfo_t): Likewise.
5843 (compat_x32_siginfo_from_siginfo): Likewise.
5844 (siginfo_from_compat_x32_siginfo): Likewise.
5845 (linux_is_elf64): Likewise.
5846 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5847 and siginfo_from_compat_x32_siginfo for x32.
5848 (x86_arch_setup): Set linux_is_elf64.
5850 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5853 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5855 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5856 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5857 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5858 compatible with process.
5860 2012-04-12 Yao Qi <yao@codesourcery.com>
5862 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5863 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5864 (install-only, install-info, clean): Handle sub dir gnulib.
5865 (all-lib, am--refresh): New targets.
5866 (memmem.o): Remove target.
5867 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5868 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5869 (AC_REPLACE_FUNCS): Remove memmem.
5870 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5871 (AC_OUTPUT): Generate Makefile in gnulib/.
5872 * aclocal.m4, config.in, configure: Regenerated.
5874 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5876 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5878 2012-04-05 Pedro Alves <palves@redhat.com>
5880 -Werror=strict-aliasing
5882 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5885 2012-04-04 Pedro Alves <palves@redhat.com>
5887 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5888 (sparc_store_gregset_from_stack, sparc_store_gregset)
5889 (sparc_breakpoint_at): Fix formatting.
5891 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5893 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5895 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5896 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5897 * config.in: Regenerate.
5898 * configure: Likewise.
5900 2012-03-29 Pedro Alves <palves@redhat.com>
5902 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5903 Correct ptrace arguments.
5905 2012-03-28 Pedro Alves <palves@redhat.com>
5907 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5908 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5909 (IA64_FR1_REGNUM): New defines.
5910 (ia64_fetch_register): New.
5911 (the_low_target): Install it.
5912 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5914 * linux-low.c (linux_fetch_registers): Try the
5915 the_low_target.fetch_register hook first.
5917 * linux-arm-low.c (the_low_target): Adjust.
5918 * linux-bfin-low.c (the_low_target): Adjust.
5919 * linux-cris-low.c (the_low_target): Adjust.
5920 * linux-crisv32-low.c (the_low_target): Adjust.
5921 * linux-m32r-low.c (the_low_target): Adjust.
5922 * linux-m68k-low.c (the_low_target): Adjust.
5923 * linux-mips-low.c (the_low_target): Adjust.
5924 * linux-ppc-low.c (the_low_target): Adjust.
5925 * linux-s390-low.c (the_low_target): Adjust.
5926 * linux-sh-low.c (the_low_target): Adjust.
5927 * linux-sparc-low.c (the_low_target): Adjust.
5928 * linux-tic6x-low.c (the_low_target): Adjust.
5929 * linux-x86-low.c (the_low_target): Adjust.
5930 * linux-xtensa-low.c (the_low_target): Adjust.
5932 2012-03-26 Pedro Alves <palves@redhat.com>
5934 * server.c (handle_qxfer_libraries): Don't bail early if
5935 the_target->qxfer_libraries_svr4 is not NULL.
5937 2012-03-26 Pedro Alves <palves@redhat.com>
5939 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5941 2012-03-23 Pedro Alves <palves@redhat.com>
5943 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5944 "library-list-svr4" element's start tag when the the DSO list is
5947 2012-03-23 Pedro Alves <palves@redhat.com>
5949 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5950 a variable whose type size is the same as the inferior's pointer
5953 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5955 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5957 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5958 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5959 * linux-low.h: Include <signal.h>.
5960 (struct siginfo): Remove forward declaration.
5961 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5964 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5966 * .gitignore: Ignore more files.
5968 2012-03-19 Pedro Alves <palves@redhat.com>
5969 Jan Kratochvil <jan.kratochvil@redhat.com>
5971 * server.c (cont_thread, general_thread): Add describing comments.
5972 (start_inferior): Clear `cont_thread'.
5973 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5976 2012-03-15 Yao Qi <yao@codesourcery.com>
5978 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5980 (cmd_qtdp): ... here.
5982 2012-03-15 Yao Qi <yao@codesourcery.com>
5984 * tracepoint.c (struct tracepoint_action_ops): New.
5985 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5986 (m_tracepoint_action_download): New.
5987 (r_tracepoint_action_download): New.
5988 (x_tracepoint_action_download): New.
5989 (l_tracepoint_action_download): New.
5990 (add_tracepoint_action): Install `action->ops' according type.
5991 (download_tracepoint_1): Move code `download' function pointer
5992 of various tracepoint_action_ops.
5994 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5996 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5997 linux_ptrace_attach_warnings.
5999 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6001 * Makefile.in (linux-ptrace.o): New.
6002 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6003 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6004 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6005 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6006 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6008 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6010 2012-03-08 Yao Qi <yao@codesourcery.com>
6011 Pedro Alves <palves@redhat.com>
6013 Fix PR server/13392.
6014 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6016 * tracepoint.c (remove_tracepoint): New.
6017 (cmd_qtdp): Call remove_tracepoint when failed to install.
6019 2012-03-07 Pedro Alves <palves@redhat.com>
6021 * linux-low.c (get_detach_signal): New.
6022 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6023 Pass on pending signals to PTRACE_DETACH. Check the result of the
6025 * server.c (program_signals, program_signals_p): New.
6026 (handle_general_set): Handle QProgramSignals.
6027 * server.h (program_signals, program_signals_p): Declare.
6029 2012-03-05 Pedro Alves <palves@redhat.com>
6030 Jan Kratochvil <jan.kratochvil@redhat.com>
6032 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6035 2012-03-03 Yao Qi <yao@codesourcery.com>
6037 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6038 agent_look_up_symbols.
6040 2012-03-03 Yao Qi <yao@codesourcery.com>
6042 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6043 (linux-x86-low.o): Likewise.
6044 * server.h: Remove in_process_agent_loaded.
6045 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6049 2012-03-03 Yao Qi <yao@codesourcery.com>
6051 * tracepoint.c (gdb_agent_capability): New global.
6052 (in_process_agent_loaded_ust): Renamed to
6053 `in_process_agent_supports_ust'.
6055 (in_process_agent_supports_ust): Call agent_capability_check.
6056 (clear_installed_tracepoints): Assert that agent supports
6059 2012-03-03 Yao Qi <yao@codesourcery.com>
6061 * linux-low.c (linux_supports_agent): New.
6062 (linux_target_ops): Initialize field `supports_agent' with
6063 linux_supports_agent.
6064 * target.h (struct target_ops) <supports_agent>: New.
6065 (target_supports_agent): New macro.
6066 * server.c (handle_general_set): Handle packet 'QAgent'.
6067 (handle_query): Send `QAgent+'.
6068 * Makefile.in (server.o): Depends on agent.h.
6070 2012-03-03 Yao Qi <yao@codesourcery.com>
6072 * Makefile.in (OBS): Add agent.o.
6073 Add new rule for agent.o.
6074 Track dependence of tracepoint.c on agent.h.
6075 * tracepoint.c (run_inferior_command_1):
6076 (run_inferior_command): Call agent_run_command.
6077 (gdb_ust_connect_sync_socket): Deleted. Move it to
6079 (resume_thread, stop_thread): Likewise.
6080 (gdb_ust_socket_init): Renamed to ...
6081 (gdb_agent_socket_init): ... New.
6082 (gdb_ust_thread): Renamed to ...
6083 (gdb_agent_helper_thread): ... New.
6084 (gdb_ust_init): Move some code to ...
6085 (gdb_agent_init): ... here. New.
6086 [HAVE_UST]: Call gdb_ust_init.
6087 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6088 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6089 * config.in, configure: Regenerated.
6091 2012-03-02 Pedro Alves <palves@redhat.com>
6093 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6094 * linux-low.c (struct simple_pid_list): New.
6095 (stopped_pids): New a struct simple_pid_list pointer.
6096 (add_to_pid_list, pull_pid_from_list): New.
6097 (handle_extended_wait): Don't assume the first signal new children
6098 report is SIGSTOP. Adjust call to pull_pid_from_list.
6099 (linux_wait_for_lwp): Adjust.
6101 2012-03-02 Yao Qi <yao@codesourcery.com>
6103 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6106 2012-03-02 Yao Qi <yao@codesourcery.com>
6108 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6109 `stop_pc' and `tpoint'. Update caller.
6111 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6113 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6114 * linux-low.c (use_linux_regsets): New macro.
6115 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6116 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6117 (linux_register_in_regsets): New function.
6118 (usr_fetch_inferior_registers): Skip registers covered by
6120 (usr_store_inferior_registers): Likewise.
6121 (usr_fetch_inferior_registers): New macro.
6122 (usr_store_inferior_registers): Likewise.
6123 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6124 (linux_store_registers): Likewise.
6125 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6127 (init_registers_mips64_dsp_linux): Likewise.
6128 (init_registers_mips_linux): New macro.
6129 (init_registers_mips_dsp_linux): Likewise.
6130 (mips_dsp_num_regs): Likewise.
6131 (DSP_BASE, DSP_CONTROL): New fallback macros.
6132 (mips_base_regs): New macro.
6133 (mips_regmap): Use it. Fix the size.
6134 (mips_dsp_regmap): New variable.
6135 (mips_dsp_regset_bitmap): Likewise.
6136 (mips_arch_setup): New function.
6137 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6139 (mips_cannot_store_register): Likewise.
6140 (the_low_target): Update .arch_setup, .num_regs and .regmap
6141 initializers. Add .regset_bitmap initializer.
6142 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6144 * linux-bfin-low.c (the_low_target): Likewise.
6145 * linux-cris-low.c (the_low_target): Likewise.
6146 * linux-crisv32-low.c (the_low_target): Likewise.
6147 * linux-ia64-low.c (the_low_target): Likewise.
6148 * linux-m32r-low.c (the_low_target): Likewise.
6149 * linux-m68k-low.c (the_low_target): Likewise.
6150 * linux-ppc-low.c (the_low_target): Likewise.
6151 * linux-s390-low.c (the_low_target): Likewise.
6152 * linux-sh-low.c (the_low_target): Likewise.
6153 * linux-sparc-low.c (the_low_target): Likewise.
6154 * linux-tic6x-low.c (the_low_target): Likewise.
6155 * linux-x86-low.c (the_low_target): Likewise.
6156 * linux-xtensa-low.c (the_low_target): Likewise.
6157 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6158 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6159 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6161 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6162 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6164 2012-02-29 Yao Qi <yao@codesourcery.com>
6165 Pedro Alves <palves@redhat.com>
6167 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6168 `step_over_finished' is true.
6170 2012-02-27 Pedro Alves <palves@redhat.com>
6172 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6173 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6175 2012-02-27 Pedro Alves <palves@redhat.com>
6178 * linux-low.c (pid_is_stopped): New.
6179 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6181 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6183 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6186 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6188 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6190 2012-02-24 Luis Machado <lgustavo@codesourcery>
6192 * server.c (handle_query): Advertise support for target-side
6193 breakpoint condition evaluation.
6194 (process_point_options): New function.
6195 (process_serial_event): When inserting a breakpoint, check for
6196 a target-side condition that should be evaluated.
6198 * mem-break.c: Include regcache.h and ax.h.
6199 (point_cond_list_t): New data structure.
6200 (breakpoint) <cond_list>: New field.
6201 (find_gdb_breakpoint_at): Make non-static.
6202 (delete_gdb_breakpoint_at): Clear any target-side
6204 (clear_gdb_breakpoint_conditions): New function.
6205 (add_condition_to_breakpoint): Likewise.
6206 (add_breakpoint_condition): Likewise.
6207 (gdb_condition_true_at_breakpoint): Likewise.
6208 (gdb_breakpoint_here): Return result directly instead
6209 of going through a local variable.
6211 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6212 (clear_gdb_breakpoint_conditions): Likewise.
6213 (add_breakpoint_condition): Likewise.
6214 (gdb_condition_true_at_breakpoint): Likewise.
6216 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6217 (need_step_over_p): Take target-side breakpoint condition into
6220 2012-02-24 Luis Machado <lgustavo@codesourcery>
6222 * server.h: Include tracepoint.h.
6223 (agent_mem_read, agent_get_trace_state_variable_value,
6224 agent_set_trace_state_variable_value,
6225 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6226 get_set_tsv_func_addr): New prototypes.
6228 * ax.h: New include file.
6229 * ax.c: New source file.
6231 * tracepoint.c: Include ax.h.
6232 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6233 agent_expr, eval_result_type): Move to ax.h.
6234 (parse_agent_expr): Rename to ...
6235 (gdb_parse_agent_expr): ... this, make it non-static and move
6237 (unparse_agent_expr) Rename to ...
6238 (gdb_unparse_agent_expr): ... this, make it non-static and move
6240 (eval_agent_expr): Rename to ...
6241 (eval_tracepoint_agent_expr): ... this.
6242 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6243 forward declarations.
6244 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6245 (agent_get_trace_state_variable_value): New function.
6246 (agent_set_trace_state_variable_value): New function.
6247 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6248 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6249 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6250 (condition_true_at_tracepoint): Likewise.
6251 (parse_agent_expr): Rename to ...
6252 (gdb_parse_agent_expr): ... this and move to ax.c.
6253 (unparse_agent_expr): Rename to ...
6254 (gdb_unparse_agent_expr): ... this and move to ax.c.
6255 (gdb_agent_op_name): Move to ax.c.
6256 (eval_agent_expr): Rename to ...
6257 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6259 (eval_tracepoint_agent_expr): New function.
6260 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6262 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6264 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6265 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6266 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6267 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6268 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6269 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6270 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6271 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6272 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6273 (compile_bytecodes): Remove forward declaration.
6274 (is_goto_target): Move to ax.c.
6275 (compile_bytecodes): Move to ax.c and call
6276 agent_get_trace_state_variable_value (...) and
6277 agent_set_trace_state_variable_value (...).
6279 * Makefile.in: Update ax.c and IPA dependencies.
6281 2012-02-24 Pedro Alves <palves@redhat.com>
6283 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6284 (cmd_bigqtbuffer_circular): ... this. Only handle
6285 'QTBuffer:circular:'.
6286 (handle_tracepoint_general_set): Adjust.
6288 2012-02-16 Yao Qi <yao@codesourcery.com>
6290 * inferiors.c: Move code to ...
6291 * dll.c: .... here. New.
6292 * server.h: Declare clear_dlls.
6293 * Makefile.in (SFILES): Add dll.c.
6297 2012-02-11 Yao Qi <yao@codesourcery.com>
6299 * server.c: (handle_monitor_command): Add a new parameter
6301 (handle_query): Update caller.
6303 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6305 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6306 * configure, config.in: Regenerate.
6307 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6310 2012-02-02 Pedro Alves <palves@redhat.com>
6312 Try SIGKILL first, then PTRACE_KILL.
6313 * linux-low.c (linux_kill_one_lwp): New.
6314 (linux_kill_one_lwp): Rename to ...
6315 (kill_one_lwp_callback): ... this. Use the new
6318 2012-02-02 Pedro Alves <palves@redhat.com>
6320 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6323 2012-01-27 Pedro Alves <palves@redhat.com>
6325 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6326 (elf_64_file_p): Make static.
6327 (linux_pid_exe_is_elf_64_file): New.
6328 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6329 Delete declarations.
6330 (linux_pid_exe_is_elf_64_file): Declare.
6331 * linux-x86-low.c (x86_arch_setup): Use
6332 linux_pid_exe_is_elf_64_file.
6334 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6336 * linux-low.c (linux_wait_for_event_1): Rename to ...
6337 (linux_wait_for_event): ... here and merge it with former
6338 linux_wait_for_event - new variable wait_ptid, use it.
6339 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6341 2012-01-23 Pedro Alves <palves@redhat.com>
6343 * server.c (main): Avoid yet another case of infinite loop while
6344 detaching/killing after a longjmp.
6346 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6349 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6351 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6353 * hostio.c (handle_readlink): New function.
6354 (handle_vFile): Call it to handle "vFile:readlink" packets.
6356 2012-01-20 Pedro Alves <palves@redhat.com>
6357 Ulrich Weigand <ulrich.weigand@linaro.org>
6359 * server.c (handle_v_requests): Only support vAttach and vRun to
6360 start multiple processes when in extended protocol mode.
6362 2012-01-17 Pedro Alves <palves@redhat.com>
6364 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6365 memalign plus mprotect to allocate the scratch buffer.
6367 2012-01-13 Pedro Alves <palves@redhat.com>
6369 * server.c (attach_inferior): Clear `cont_thread'.
6371 2012-01-13 Pedro Alves <palves@redhat.com>
6373 * server.c (main): Avoid infinite loop while detaching/killing
6376 2012-01-09 Doug Evans <dje@google.com>
6378 * server.c (start_inferior): Set last_ptid in --wrapper case.
6380 2012-01-06 Yao Qi <yao@codesourcery.com>
6382 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6384 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6386 2012-01-04 Yao Qi <yao@codesourcery.com>
6388 * tracepoint.c (cmd_qtdp): Print debug message
6389 for static tracepoint.
6391 2012-01-04 Yao Qi <yao@codesourcery.com>
6393 * tracepoint.c (trace_vdebug): Differentiate debug message
6394 between gdbserver and IPA.
6396 2012-01-03 Yao Qi <yao@codesourcery.com>
6398 * tracepoint.c (tracepoint_was_hit): Don't collect for
6401 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6403 * terminal.h: Reformat copyright header.
6405 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6407 * server.c (gdbserver_version): Update copyright year.
6408 * gdbreplay.c (gdbreplay_version): Likewise.
6410 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6412 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6415 2011-12-18 Hui Zhu <teawater@gmail.com>
6416 * linux-low.c (linux_create_inferior): Save return value to ret.
6418 2011-12-18 Hui Zhu <teawater@gmail.com>
6420 * linux-low.c (linux_create_inferior): Save return value to ret.
6422 2011-12-16 Doug Evans <dje@google.com>
6424 * linux-low.c (linux_create_inferior): If stdio connection,
6425 redirect stdin from /dev/null, stdout to stderr.
6426 * remote-utils.c (remote_is_stdio): New static global.
6427 (remote_connection_is_stdio): New function.
6428 (remote_prepare): Handle stdio connection.
6429 (remote_open): Ditto.
6430 (remote_close): Don't close stdin for stdio connections.
6431 (read_prim,write_prim): New functions. Replace all calls to
6432 read/write to these.
6433 * server.c (main): Watch for "-" argument. Move call to
6434 remote_prepare before start_inferior.
6435 * server.h (STDIO_CONNECTION_NAME): New macro.
6436 (remote_connection_is_stdio): Declare.
6438 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6439 in debugging output.
6441 2011-12-15 Yao Qi <yao@codesourcery.com>
6443 * tracepoint.c: Include sys/syscall.h.
6444 (gdb_ust_thread): Remove preprocessor conditional.
6446 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6448 * linux-low.c (linux_detach_one_lwp): Call
6449 the_low_target.prepare_to_resume before detaching.
6451 2011-12-14 Yao Qi <yao@codesourcery.com>
6453 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6456 2011-12-14 Yao Qi <yao@codesourcery.com>
6458 * i386-low.c (i386_low_stopped_data_address): Initialize local
6461 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6465 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6466 DR_CONTROL unless necessary. Extend comments.
6467 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6468 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6470 2011-12-13 Yao Qi <yao@codesourcery.com>
6472 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6474 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6476 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6478 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6479 Print new debug message for such case.
6481 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6483 Fix overlapping memcpy.
6484 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6485 the read_inferior_memory transfer.
6486 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6487 write_inferior_memory transfer.
6488 (set_fast_tracepoint_jump): New variable buf. Use it for the
6489 read_inferior_memory and write_inferior_memory transfers.
6490 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6491 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6492 Use it for the write_inferior_memory transfer.
6493 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6496 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6498 * linux-low.c (fetch_register, store_register): Make code
6499 consistent, fix formatting.
6501 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6503 * linux-low.c (usr_store_inferior_registers): Factor out code
6504 to handle individual registers into...
6505 (store_register): ... this new function.
6507 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6509 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6510 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6511 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6512 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6513 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6514 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6515 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6516 (srv_xmlfiles): Add new XML files.
6518 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6520 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6521 (init_registers_s390_linux32v1): Add prototype.
6522 (init_registers_s390_linux32v2): Likewise.
6523 (init_registers_s390_linux64v1): Likewise.
6524 (init_registers_s390_linux64v2): Likewise.
6525 (init_registers_s390x_linux64v1): Likewise.
6526 (init_registers_s390x_linux64v2): Likewise.
6527 (s390_num_regs): Increment to 52.
6528 (s390_regmap): Add orig_r2 register.
6529 (s390_num_regs_3264): Increment to 68.
6530 (s390_regmap_3264): Add orig_r2 register.
6531 (s390_collect_ptrace_register): Handle orig_r2 register.
6532 (s390_supply_ptrace_register): Likewise.
6533 (s390_fill_last_break): New function.
6534 (s390_store_last_break): Likewise.
6535 (s390_fill_system_call): New function.
6536 (s390_store_system_call): Likewise.
6537 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6539 (s390_check_regset): New function.
6540 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6541 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6542 Update target_regsets for available register sets.
6544 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6545 Jan Kratochvil <jan.kratochvil@redhat.com>
6547 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6548 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6550 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6551 * linux-low.h (struct process_info_private): New member r_debug.
6552 * server.c (handle_qxfer_libraries): Call
6553 the_target->qxfer_libraries_svr4.
6554 (handle_qxfer_libraries_svr4): New function.
6555 (qxfer_packets): New entry "libraries-svr4".
6556 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6557 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6558 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6559 PACKET_qXfer_libraries_svr4.
6561 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6563 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6564 PSW address/mask between 8-byte and 16-byte formats.
6565 (s390_supply_ptrace_register): Likewise.
6566 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6567 basic addressing mode bit.
6569 2011-11-24 Stan Shebs <stan@codesourcery.com>
6571 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6573 2011-11-17 Stan Shebs <stan@codesourcery.com>
6575 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6576 (tracing_start_time): New global.
6577 (tracing_stop_time): New global.
6578 (tracing_user_name): New global.
6579 (tracing_notes): New global.
6580 (tracing_stop_note): New global.
6581 (cmd_qtstart): Set traceframe_usage, start_time.
6582 (stop_tracing): Set stop_time.
6583 (cmd_qtstatus): Report additional status.
6584 (cmd_qtp): New function.
6585 (handle_tracepoint_query): Call it.
6586 (cmd_qtnotes): New function.
6587 (handle_tracepoint_general_set): Call it.
6588 (get_timestamp): Rename from tsv_get_timestamp.
6590 2011-11-14 Stan Shebs <stan@codesourcery.com>
6591 Kwok Cheung Yeung <kcy@codesourcery.com>
6593 * linux-x86-low.c (small_jump_insn): New.
6594 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6595 trampoline and error message, build a trampoline and issue a small
6596 jump instruction to it.
6597 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6598 trampoline and error message.
6599 (x86_get_min_fast_tracepoint_insn_len): New.
6600 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6601 * linux-low.h (struct linux_target_ops): Add arguments to
6602 install_fast_tracepoint_jump_pad operation, add new operation.
6603 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6605 (linux_get_min_fast_tracepoint_insn_len): New function.
6606 (linux_target_op): Add new operation.
6607 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6608 (gdb_trampoline_buffer_end): Ditto.
6609 (gdb_trampoline_buffer_error): Ditto.
6610 (struct ipa_sym_addresses): Add fields for new IPA variables.
6611 (symbol_list): Add entries for new IPA variables.
6612 (struct tracepoint): Add fields to hold the address range of the
6613 trampoline used by the tracepoint.
6614 (trampoline_buffer_head): New static variable.
6615 (trampoline_buffer_tail): Ditto.
6616 (claim_trampoline_space): New function.
6617 (have_fast_tracepoint_trampoline_buffer): New function.
6618 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6620 (install_fast_tracepoint): Ditto, also add error buffer argument.
6621 (cmd_qtminftpilen): New function.
6622 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6623 (fast_tracepoint_from_trampoline_address): New function.
6624 (fast_tracepoint_collecting): Handle trampoline as part of jump
6626 (set_trampoline_buffer_space): New function.
6627 (initialize_tracepoint): Initialize new IPA variables.
6628 * target.h (struct target_ops): Add arguments to
6629 install_fast_tracepoint_jump_pad operation, add new
6630 get_min_fast_tracepoint_insn_len operation.
6631 (target_get_min_fast_tracepoint_insn_len): New.
6632 (install_fast_tracepoint_jump_pad): Add arguments.
6633 * server.h (IPA_BUFSIZ): Define.
6634 * linux-i386-ipa.c: Include extra header files.
6635 (initialize_fast_tracepoint_trampoline_buffer): New function.
6636 (initialize_low_tracepoint): Call it.
6637 * server.h (set_trampoline_buffer_space): Declare.
6638 (claim_trampoline_space): Ditto.
6639 (have_fast_tracepoint_trampoline_buffer): Ditto.
6641 2011-11-14 Yao Qi <yao@codesourcery.com>
6643 * server.c (handle_query): Handle InstallInTrace for qSupported.
6644 * tracepoint.c (add_tracepoint): Sort list.
6645 (install_tracepoint, download_tracepoint): New.
6646 (cmd_qtdp): Call them to install and download tracepoints.
6647 (sort_tracepoints): Removed.
6648 (cmd_qtstart): Update.
6650 2011-11-14 Yao Qi <yao@codesourcery.com>
6652 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6653 * mem-break.h: Declare.
6654 * tracepoint.c (cmd_qtstart): Move some code to ...
6655 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6657 (download_tracepoints): Move some code to ...
6658 (download_tracepoint_1): ... here. New.
6660 2011-11-08 Yao Qi <yao@codesourcery.com>
6662 * remote-utils.c (relocate_instruction): A comment fix.
6664 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6666 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6667 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6668 dr_status_mirror and dr_control_mirror from debug_reg_state.
6669 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6670 (i386_initial_stuff): Remove use of deleted globals.
6671 (i386_get_thread_context, i386_set_thread_context,
6672 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6673 from debug_reg_state.
6675 2011-11-05 Yao Qi <yao@codesourcery.com>
6677 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6678 address as TPOINT's.
6680 2011-11-02 Stan Shebs <stan@codesourcery.com>
6682 * tracepoint.c (agent_mem_read_string): New function.
6683 (eval_agent_expr): Call it for tracenz.
6684 * server.c (handle_query): Report support for tracenz.
6686 2011-11-02 Yao Qi <yao@codesourcery.com>
6688 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6690 2011-11-02 Yao Qi <yao@codesourcery.com>
6692 * target.h: Fix a typo in comment.
6694 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6696 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6697 clobber the breakpoints' shadows with fast tracepoint jumps.
6698 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6699 * target.c (write_inferior_memory): Also pass MYADDR down to
6702 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6704 * configure.ac: Check support for personality routine.
6705 * configure: Regenerate.
6706 * config.in: Likewise.
6707 * linux-low.c: Include <sys/personality.h>.
6708 Define ADDR_NO_RANDOMIZE if necessary.
6709 (linux_create_inferior): Disable address space randomization when
6710 forking inferior, if requested.
6711 (linux_supports_disable_randomization): New function.
6712 (linux_target_ops): Install it.
6713 * server.h (disable_randomization): Declare.
6714 * server.c (disable_randomization): New global variable.
6715 (handle_general_set): Handle QDisableRandomization.
6716 (handle_query): Likewise for qSupported.
6717 (main): Support --disable-randomization and --no-disable-randomization
6718 command line arguments.
6719 * target.h (struct target_ops): Add supports_disable_randomization.
6720 (target_supports_disable_randomization): New macro.
6722 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6724 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6726 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6727 [!PT_GETDSBT] (target_loadmap): New definition.
6728 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6729 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6730 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6731 and PT_GETDSBT to LINUX_LOADMAP.
6732 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6733 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6735 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6737 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6738 (arm_linux_hwbp_cap): New static variable.
6739 (arm_linux_get_hwbp_cap): Replace by ...
6740 (arm_linux_init_hwbp_cap): ... this new function.
6741 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6742 (arm_linux_get_hw_watchpoint_count): Likewise.
6743 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6744 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6745 (arm_prepare_to_resume): Use perror_with_name instead of error.
6747 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6749 * linux-arm-low.c: Include <signal.h>.
6750 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6751 (struct arm_linux_hwbp_cap): New data type.
6752 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6753 (struct arm_linux_hw_breakpoint): New data type.
6754 (MAX_BPTS, MAX_WPTS): Define.
6755 (struct arch_process_info, struct arch_lwp_info): New data types.
6756 (arm_linux_get_hwbp_cap): New function.
6757 (arm_linux_get_hw_breakpoint_count): Likewise.
6758 (arm_linux_get_hw_watchpoint_count): Likewise.
6759 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6760 (arm_hwbp_control_initialize): Likewise.
6761 (arm_hwbp_control_is_enabled): Likewise.
6762 (arm_hwbp_control_is_initialized): Likewise.
6763 (arm_hwbp_control_disable): Likewise.
6764 (arm_linux_hw_breakpoint_equal): Likewise.
6765 (arm_linux_hw_point_initialize): Likewise.
6766 (struct update_registers_data): New data structure.
6767 (update_registers_callback: New function.
6768 (arm_insert_point): Likewise.
6769 (arm_remove_point): Likewise.
6770 (arm_stopped_by_watchpoint): Likewise.
6771 (arm_stopped_data_address): Likewise.
6772 (arm_new_process): Likewise.
6773 (arm_new_thread): Likewise.
6774 (arm_prepare_to_resume): Likewise.
6775 (the_low_target): Register arm_insert_point, arm_remove_point,
6776 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6777 arm_new_thread, and arm_prepare_to_resume.
6779 2011-09-15 Stan Shebs <stan@codesourcery.com>
6781 * server.h (struct emit_ops): Add compare-goto fields.
6782 * tracepoint.c (gdb_agent_op_sizes): New table.
6783 (emit_eq_goto): New function.
6784 (emit_ne_goto): New function.
6785 (emit_lt_goto): New function.
6786 (emit_le_goto): New function.
6787 (emit_gt_goto): New function.
6788 (emit_ge_goto): New function.
6789 (is_goto_target): New function.
6790 (compile_bytecodes): Recognize special cases of compare-goto
6791 combinations and call specialized emitters for them.
6792 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6793 (amd64_emit_ne_goto): New function.
6794 (amd64_emit_lt_goto): New function.
6795 (amd64_emit_le_goto): New function.
6796 (amd64_emit_gt_goto): New function.
6797 (amd64_emit_ge_goto): New function.
6798 (amd64_emit_ops): Add the new functions.
6799 (i386_emit_eq_goto): New function.
6800 (i386_emit_ne_goto): New function.
6801 (i386_emit_lt_goto): New function.
6802 (i386_emit_le_goto): New function.
6803 (i386_emit_gt_goto): New function.
6804 (i386_emit_ge_goto): New function.
6805 (i386_emit_ops): Add the new functions.
6807 2011-09-08 Stan Shebs <stan@codesourcery.com>
6809 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6810 (i386_emit_epilogue): Restore %ebx.
6812 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6814 * server.c (step_thread): Remove definition.
6815 (process_serial_event): Don't handle Hs.
6816 * server.h (step_thread): Remove declaration.
6817 * target.c (set_desired_inferior): Remove use of step_thread.
6819 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6821 * linux-low.c: Include linux-procfs.h.
6822 (linux_attach_lwp_1): Update comments.
6823 (linux_attach): Scan for existing threads when attaching to a
6824 process that is the tgid.
6825 * Makefile.in: Update dependencies.
6827 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6829 * configure.srv: Add linux-procfs.o dependencies.
6831 2011-08-14 Yao Qi <yao@codesourcery.com>
6833 * target.h (struct target_ops): Fix indent.
6834 * win32-low.c (win32_target_ops): Fix comment.
6836 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6837 Yao Qi <yao@codesourcery.com>
6839 * Makefile.in (clean): Remove tic6x-*.c files.
6840 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6841 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6842 (tic6x-c64xp-linux.c): Likewise.
6843 * configure.srv: Add support for tic6x-*-uclinux.
6844 * linux-tic6x-low.c: New.
6845 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6847 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6848 Yao Qi <yao@codesourcery.com>
6850 * target.h (struct target_ops): Add read_loadmap.
6851 * linux-low.c (struct target_loadseg): New type.
6852 (struct target_loadmap): New type.
6853 (linux_read_loadmap): New function.
6854 (linux_target_ops): Add linux_read_loadmap.
6855 * server.c (handle_query): Support qXfer:fdpic:read packet.
6856 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6859 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6861 * win32-low.c: Include <stdint.h>.
6863 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6865 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6866 to the inferior here.
6867 (i386_remove_aligned_watchpoint): Ditto.
6868 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6869 fit part of the watchpoint in the debug registers.
6870 (i386_update_inferior_debug_regs): New.
6871 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6872 registers, and only update the inferior on success.
6873 (i386_low_remove_watchpoint): Ditto.
6875 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6877 * linux-low.c (compare_ints, unique, list_threads, show_process,
6878 linux_core_of_thread): Delete.
6879 (linux_target_ops): Change linux_core_of_thread to
6880 linux_common_core_of_thread.
6881 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6882 * utils.c (malloc_failure): Change type of argument.
6883 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6884 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6885 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6886 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6887 (IPA_OBJS): Add common-utils-ipa.o.
6888 (ptid_h, linux_osdata_h): New macros.
6889 (server_h): Add common/common-utils.h, common/xml-utils.h,
6890 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6892 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6893 ptid.o, buffer.o): New rules.
6894 (linux-low.o): Add common/linux-osdata.h as a dependency.
6895 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6896 * configure.ac: Add AC_HEADER_DIRENT check.
6897 * config.in: Regenerate.
6898 * configure: Regenerate.
6899 * remote-utils.c (xml_escape_text): Delete.
6900 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6901 buffer_xml_printf): Move to common/buffer.c.
6902 * server.c (main): Remove call to initialize_inferiors.
6903 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6904 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6905 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6906 internal_error, gdb_assert, gdb_assert_fail): Delete.
6907 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6908 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6910 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6911 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6912 initialize_inferiors): Delete.
6914 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6916 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6919 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6921 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6923 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6925 2011-05-26 Yao Qi <yao@codesourcery.com>
6927 * Makefile.in (thread-db.o): Track dependence to
6928 common/gdb_thread_db.h.
6929 * thread-db.c: include gdb_thread_db.h from right place.
6931 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6933 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6934 __FILE__ and __LINE__ to internal_error.
6936 2011-05-13 Doug Evans <dje@google.com>
6938 * thread-db.c (try_thread_db_load_from_sdir): New function.
6939 (try_thread_db_load_from_dir): New function.
6940 (thread_db_load_search): Handle $sdir, ignore $pdir.
6941 Remove trying of system directories if search of
6942 libthread-db-search-path fails, that is now done via $sdir.
6944 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6946 * server.c (handle_query): Add EnableDisableTracepoints to the list
6947 of supported features.
6948 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6950 (cmd_qtenable_disable): New.
6951 (cmd_qtstart): Install tracepoints even if disabled.
6952 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6953 receiving a QTEnable or QTDisable packet.
6954 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6955 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6957 (gdb_probe): Skip data collection if static tracepoint is disabled.
6959 2011-05-10 Doug Evans <dje@google.com>
6961 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6963 2011-05-04 Doug Evans <dje@google.com>
6965 * linux-low.c (linux_join): Skip process lookup.
6966 * spu-low.c (spu_join): Ditto.
6967 * server.c (join_inferiors_callback): Delete.
6968 (process_serial_event): For 'D' packet (detach) call join_inferior
6971 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6973 * README: Don't mention xscale*-*-linux*.
6974 * configure.srv (xscale*-*-linux*): Don't handle target.
6976 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6978 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6980 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6981 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6982 (i386_emit_void_call_2): Likewise.
6984 2011-04-26 Yao Qi <yao@codesourcery.com>
6986 * linux-low.c: Move common macros to linux-ptrace.h.
6987 Include linux-ptrace.h.
6988 * Makefile.in (linux_ptrace_h): New.
6989 (linux-low.o): Depends on linux-ptrace.h.
6991 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6993 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6994 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6995 (remote_prepare): New function with most of the TCP code from ...
6996 (remote_open): ... here. Detect PORT here unconditionally. Move also
6997 setting transport_is_reliable.
6998 * server.c (run_once): New variable.
6999 (gdbserver_usage): Document it.
7000 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7001 the first run if RUN_ONCE.
7002 * server.h (run_once, remote_prepare): New declarations.
7004 2011-04-19 Tom Tromey <tromey@redhat.com>
7006 * win32-low.c (handle_load_dll): Remove duplicate "the".
7008 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7010 Remove support for old Cygwin 1.5 versions.
7011 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7012 function to avoid warning.
7013 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7016 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7018 * gdbserver/server.h (Macro _): Define it if not available.
7020 2011-03-14 Michael Snyder <msnyder@vmware.com>
7022 * hostio.c (handle_close): Remove unnecessary null test.
7024 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7026 * Makefile.in (maintainer-clean realclean distclean): Remove
7027 "make ... subdir_do" command.
7029 2011-03-10 Michael Snyder <msnyder@vmware.com>
7031 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7033 * server.c (handle_v_run): Free alloced buffer on early return.
7035 2011-03-09 Yao Qi <yao@codesourcery.com>
7038 2011-03-04 Yao Qi <yao@codesourcery.com>
7040 * Makefile.in: Remove GNU make feature --directory.
7042 2011-03-05 Yao Qi <yao@codesourcery.com>
7044 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7045 (subdir_do): New make target. Copied from gdb/Makefile.
7046 (maintainer-clean, realclean, distclean, clean): Call corresponding
7047 make targets in common/Makefile.
7049 2011-02-11 Yao Qi <yao@codesourcery.com>
7051 * configure.ac: Call AC_PROG_RANLIB.
7052 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7053 * configure: Regenerate.
7055 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7057 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7059 2011-03-06 Yao Qi <yao@codesourcery.com>
7061 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7063 2011-03-05 Yao Qi <yao@codesourcery.com>
7065 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7066 (subdir_do): New make target. Copied from gdb/Makefile.
7067 (maintainer-clean, realclean, distclean, clean): Call corresponding
7068 make targets in common/Makefile.
7070 2011-03-04 Yao Qi <yao@codesourcery.com>
7072 * Makefile.in: Remove GNU make feature --directory.
7074 2011-03-04 Michael Snyder <msnyder@vmware.com>
7076 * server.c (queue_stop_reply): Call xmalloc not malloc.
7078 2011-03-02 Michael Snyder <msnyder@vmware.com>
7080 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7082 2011-02-28 Michael Snyder <msnyder@vmware.com>
7084 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7085 (cmd_qtframe): Ditto.
7086 (cmd_qtbuffer): Ditto.
7087 (cmd_bigqtbuffer): Ditto.
7089 * utils.c (decimal2str): Initialize 'width' to nine, then
7092 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7094 * hostio.c (require_data): Free *data, not data.
7096 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7098 * hostio.c (require_data): Use free, not xfree.
7100 2011-02-27 Michael Snyder <msnyder@vmware.com>
7102 * server.c (handle_query): Discard unused value.
7104 * hostio.c (require_data): Free malloc memory before returning
7107 2011-02-26 Michael Snyder <msnyder@vmware.com>
7109 * linux-low.c (list_threads): Call closedir for dirent.
7111 2011-02-27 Michael Snyder <msnyder@vmware.com>
7113 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7114 a case statement falls through.
7116 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7118 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7121 2011-02-26 Michael Snyder <msnyder@vmware.com>
7123 * utils.c (decimal2str): Eliminate dead code and dead param.
7124 (pulongest): Drop dead param from call to decimal2str.
7127 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7129 Revert the following patch (not approved yet):
7130 2011-02-21 Hui Zhu <teawater@gmail.com>
7131 * tracepoint.c (tp_printf): New function.
7132 (eval_agent_expr): Handle gdb_agent_op_printf.
7134 2011-02-21 Hui Zhu <teawater@gmail.com>
7136 * tracepoint.c (tp_printf): New function.
7137 (eval_agent_expr): Handle gdb_agent_op_printf.
7139 2011-02-18 Tom Tromey <tromey@redhat.com>
7141 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7142 (tracepoint.o): Likewise.
7143 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7144 (gdb_agent_op_names): Likewise.
7146 2011-02-18 Tom Tromey <tromey@redhat.com>
7148 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7149 gdb_agent_op_rot>: New constants.
7150 (gdb_agent_op_names): Add pick and roll.
7151 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7154 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7156 * aclocal.m4: Regenerated with aclocal-1.11.1.
7158 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7160 * server.c (handle_qxfer_traceframe_info): New.
7161 (qxfer_packets): Register "traceframe-info".
7162 (handle_query): Report support for qXfer:traceframe-info:read+.
7163 * tracepoint.c (match_blocktype): New.
7164 (traceframe_find_block_type): Rename to ...
7165 (traceframe_walk_blocks): ... this. Add callback filter argument,
7167 (traceframe_find_block_type): New, reimplemented on top of
7168 traceframe_walk_blocks.
7169 (build_traceframe_info_xml): New.
7170 (traceframe_read_info): New.
7171 * server.h (traceframe_read_info): Declare.
7173 2011-02-11 Yao Qi <yao@codesourcery.com>
7175 * configure.ac: Call AC_PROG_RANLIB.
7176 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7177 * configure: Regenerate.
7179 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7181 * server.c (gdb_read_memory): Change return semantics to allow
7183 (handle_search_memory_1): Adjust.
7184 (process_serial_event) <'m' packet>: Handle partial transfers.
7185 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7187 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7189 * regcache.c (init_register_cache): Initialize
7190 regcache->register_status.
7191 (free_register_cache): Release regcache->register_status.
7192 (regcache_cpy): Copy register_status.
7193 (registers_to_string): Print 'x's for unavailable registers.
7194 (supply_register): Mark the register's status valid or
7195 unavailable, depending on whether a buffer was passed in or not.
7196 (supply_register_zeroed): New.
7197 (supply_regblock): Mark the registers' status valid or
7198 unavailable, depending on whether a buffer was passed in or not.
7199 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7200 (struct regcache): New `register_status' field.
7201 (supply_register_zeroed): Declare.
7202 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7203 supply_register_zeroed, rather than passing a NULL buffer to
7205 * tracepoint.c (fetch_traceframe_registers): Update comment.
7207 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7209 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7212 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7214 * server.h (decode_xfer_write): Change prototype.
7215 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7216 and don't extract the annex here.
7217 * server.c (decode_xfer_read): Remove `annex' parameter,
7218 and don't extract the annex here.
7220 (struct qxfer): New.
7221 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7222 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7223 (handle_qxfer_statictrace): New functions, abstracted out from
7224 handle_query, and made to use the struct qxfer interface.
7225 (handle_threads_qxfer_proper): Rename to ...
7226 (handle_qxfer_threads_proper): ... this.
7227 (handle_threads_qxfer): Rename to ...
7228 (handle_qxfer_threads): ... this. Adjust.
7229 (qxfer_packets): New array.
7230 (handle_qxfer): New function.
7231 (handle_query): Use handle_qxfer.
7233 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7235 * gdbreplay.c: Shorten lines of >= 80 columns.
7236 * linux-low.c: Ditto.
7237 * linux-ppc-low.c: Ditto.
7238 * linux-s390-low.c: Ditto.
7239 * linux-sparc-low.c: Ditto.
7240 * linux-x86-low.c: Ditto.
7241 * linux-xtensa-low.c: Ditto.
7242 * mem-break.c: Ditto.
7244 * regcache.h: Ditto.
7245 * remote-utils.c: Ditto.
7248 * thread-db.c: Ditto.
7249 * tracepoint.c: Ditto.
7251 * win32-low.h: Ditto.
7253 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7255 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7258 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7260 * server.c (gdbserver_version): Update copyright year in version
7262 * gdbreplay.c (gdbreplay_version): Ditto.
7264 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7266 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7267 * linux-bfin-low.c: New file.
7268 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7269 PT_DATA_ADDR for BFIN targets.
7270 * Makefile.in (SFILES): Add linux-bfin-low.c.
7271 (clean): Remove reg-bfin.c.
7272 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7273 * README: Mention supported Blackfin targets.
7275 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7277 * .gitignore: New file.
7279 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7281 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7283 2010-10-22 Jie Zhang <jie@codesourcery.com>
7285 * Makefile.in: Add FLAGS_TO_PASS variable.
7286 (install): Remove dependency of install-only and recursively
7287 invoke make for install-only.
7289 2010-10-04 Doug Evans <dje@google.com>
7291 * Makefile.in (uninstall): Use $(DESTDIR).
7293 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7297 * linux-x86-low.c (compat_siginfo_from_siginfo)
7298 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7299 si_code is < 0. Check for si_code == SI_TIMER before checking for
7302 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7304 * lynx-i386-low.c: New file.
7305 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7307 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7309 * lynx-low.c (ptrace_request_to_str): Remove handling for
7310 request values that have been removed in LynxOS 5.x.
7312 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7314 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7317 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7319 * configure.ac: Add --enable-inprocess-agent option.
7320 * configure: Rebuilt.
7322 2010-09-06 Yao Qi <yao@codesourcery.com>
7324 * linux-low.c (linux_kill): Remove unused variable.
7325 (linux_stabilize_threads): Likewise.
7326 * server.c (start_inferior): Likewise.
7327 (queue_stop_reply_callback): Likewise.
7328 * tracepoint.c (do_action_at_tracepoint): Likewise.
7330 2010-09-06 Yao Qi <yao@codesourcery.com>
7332 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7335 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7337 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7339 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7341 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7344 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7346 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7347 gdbserver/lynx-ppc-low.c: New files.
7348 * Makefile.in (lynx_low_h): New variable.
7349 (lynx-low.o, lynx-ppc-low.o): New rules.
7350 * configure.ac: On LynxOS, link with -lnetinet.
7351 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7352 * configure: regenerate.
7354 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7356 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7357 * configure.ac: Add check for vasprintf and vsnprintf.
7358 * configure, config.in: Regenerate.
7359 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7361 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7363 * gdbreplay.c: Move include of alloca.h up, next to include of
7365 * server.h: Add include of malloc.h.
7366 * mem-break.c: Remove include of malloc.h.
7367 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7369 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7371 * Makefile.in (memmem.o): Build with -Wno-error.
7373 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7375 * utils.c (xsnprintf): Make non-static.
7376 * server.h: Add xsnprintf declaration.
7377 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7378 replace calls to snprintf by calls to xsnprintf throughout.
7380 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7382 * configure.ac: Add configure check for alloca.
7383 * configure, config.in: Regenerate.
7384 * server.h: Include alloca.h if it exists.
7385 * gdbreplay.c: Include alloca.h if it exists.
7387 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7389 * linux-low.c (__SIGRTMIN): Define if not already defined.
7390 (linux_create_inferior): Check for __ANDROID__ rather than
7392 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7393 are already deferred.
7394 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7395 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7396 stopped and already has a pending signal to report.
7397 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7398 a pending signal to report or is moving out of a jump pad.
7399 (linux_init_signals): Check for __ANDROID__ rather than
7402 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7404 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7405 debug_threads check. Avoid a linear search when not doing debug
7408 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7410 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7411 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7412 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7413 (process_event): Change local fd's type to gdb_fildes_t.
7414 (create_file_handler): Adjust prototype.
7415 (delete_file_handler): Adjust prototype.
7416 (handle_file_event): Adjust prototype. Use pfildes.
7417 (create_file_event): Adjsut prototype.
7418 * remote-utils.c (remote_desc, listen_desc): Change type to
7420 * server.h: New gdb_fildes_t typedef.
7421 [USE_WIN32API]: Include winsock2.h.
7422 (delete_file_handler, add_file_handler): Adjust prototypes.
7424 * utils.c (pfildes): New.
7426 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7428 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7429 * configure: Regenerate.
7431 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7433 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7434 (linux_done_accessing_memory): ... this.
7435 (linux_target_ops): Adjust.
7436 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7437 * nto-low.c (nto_target_ops): Adjust comment.
7438 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7439 * spu-low.c (spu_target_ops): Adjust comment.
7440 * target.h (target_ops): Rename unprepare_to_access_memory field
7441 to done_accessing_memory.
7442 (unprepare_to_access_memory): Rename to ...
7443 (done_accessing_memory): ... this.
7445 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7447 * linux-low.c (linux_prepare_to_access_memory): New.
7448 (linux_unprepare_to_access_memory): New.
7449 (linux_target_ops): Install them.
7450 * server.c (read_memory): Rename to ...
7451 (gdb_read_memory): ... this. Use
7452 prepare_to_access_memory/prepare_to_access_memory.
7453 (write_memory): Rename to ...
7454 (gdb_write_memory): ... this. Use
7455 prepare_to_access_memory/prepare_to_access_memory.
7456 (handle_search_memory_1): Adjust.
7457 (process_serial_event): Adjust.
7458 * target.h (struct target_ops): New fields
7459 prepare_to_access_memory and unprepare_to_access_memory.
7460 (prepare_to_access_memory, unprepare_to_access_memory): New.
7461 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7462 prepare_to_access_memory/prepare_to_access_memory.
7463 * nto-low.c (nto_target_ops): Adjust.
7464 * spu-low.c (spu_target_ops): Adjust.
7465 * win32-low.c (win32_target_ops): Adjust.
7467 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7469 * Makefile.in (WARN_CFLAGS): Get it from configure.
7470 (WERROR_CFLAGS): New.
7471 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7472 * configure.ac: Introduce --enable-werror, which adds -Werror to
7473 the compiler command line. Enabled by default. Disable with
7474 --disable-werror. Add -Wdeclaration-after-statement
7475 Wpointer-arith and -Wformat-nonliteral to warning flags.
7476 * configure: Regenerate.
7478 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7480 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7482 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7484 * gdbreplay.c (remote_error): New.
7486 (expect): Use gdbchar. Check for error reading from GDB.
7487 Clarify sync error output.
7488 (play): Check for errors writing to GDB.
7489 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7490 * remote-utils.c (getpkt): Check for errors writing to the remote
7493 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7495 * linux-low.c (linux_wait_1): Move non-debugging code out of
7496 `debug_threads' control.
7498 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7500 * linux-low.c (linux_wait_1): Don't set last_status here.
7501 * server.c (push_event, queue_stop_reply_callback): Assert we're
7502 not pushing a TARGET_WAITKIND_IGNORE event.
7503 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7504 (myresume, handle_target_event): Set the thread's last_resume_kind
7505 and last_status from the target returned status.
7507 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7511 * linux-x86-low.c (update_debug_registers_callback): New.
7512 (i386_dr_low_set_addr): Use it.
7513 (i386_dr_low_get_addr): New.
7514 (i386_dr_low_set_control): Use update_debug_registers_callback.
7515 (i386_dr_low_get_control): New.
7516 (i386_dr_low_get_status): Adjust.
7517 * linux-low.c (linux_stop_lwp): New.
7518 * linux-low.h (linux_stop_lwp): Declare.
7520 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7521 argument instead of a i386_debug_reg_state.
7522 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7523 a i386_debug_reg_state.
7524 (i386_insert_aligned_watchpoint): Adjust.
7525 (i386_remove_aligned_watchpoint): Adjust.
7526 (i386_low_stopped_data_address): Read the debug registers from the
7527 inferior instead of from the mirrors.
7528 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7529 (i386_dr_low_get_addr): Declare.
7530 (i386_dr_low_get_control): Declare.
7531 (i386_dr_low_get_status): Change prototype.
7533 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7534 (i386_dr_low_get_addr): New.
7535 (i386_dr_low_get_control): New.
7536 (i386_dr_low_get_status): Adjust prototype. Return
7538 (i386_initial_stuff): Clear dr_status_mirror and
7540 (i386_get_thread_context): Adjust.
7541 (i386_set_thread_context): Adjust.
7542 (i386_thread_added): Adjust.
7544 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7546 * linux-low.h (linux_thread_area): Delete declaration.
7548 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7550 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7551 after its termination.
7553 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7555 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7556 (gdb_wants_all_stopped): Delete.
7557 (linux_wait_1): Don't call them.
7558 * server.c (handle_v_cont): Tag all threads as want-stopped.
7559 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7560 stopped as "client-wants-stopped".
7562 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7564 * Makefile.in (signals_h): New.
7565 (server_h): Depend on it.
7566 (server.o): Don't depend on $(signals_def).
7567 (signals.o): Depend on $(signals_def).
7569 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7571 * Makefile.in (signals_def): New.
7572 (server_h): Append include/gdb/signals.h and signals_def.
7573 (server.o): Append signals_def.
7575 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7577 * server.c (handle_target_event): Use target_signal_to_host for
7578 resume_info.sig initialization.
7579 * target.h (struct thread_resume) <sig>: New comment.
7581 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7583 * server.c (handle_query): strcpy() the returned string from paddress()
7584 instead of sprintf().
7585 * utils.c (paddress): Return phex_nz().
7587 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7589 * server.c (handle_v_cont): Call mourn_inferior if process
7591 (myresume): Likewise.
7593 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7595 Static tracepoints, and integration with UST.
7597 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7598 * mem-break.c (uninsert_all_breakpoints)
7599 (reinsert_all_breakpoints): New.
7600 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7601 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7602 (gdb_agent_ust_loaded, helper_thread_id)
7603 (gdb_agent_helper_thread_id): New macros.
7604 (struct ipa_sym_addresses): Add addr_ust_loaded,
7605 addr_helper_thread_id, addr_cmd_buf.
7606 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7607 (in_process_agent_loaded_ust): New.
7608 (write_e_ust_not_loaded): New.
7609 (maybe_write_ipa_ust_not_loaded): New.
7610 (struct collect_static_trace_data_action): New.
7611 (enum tracepoint_type) <static_tracepoint>: New.
7612 (struct tracepoint) <handle>: Mention static tracepoints.
7613 (struct static_tracepoint_ctx): New.
7614 (CMD_BUF_SIZE): New.
7615 (add_tracepoint_action): Handle static tracepoint actions.
7616 (unprobe_marker_at): New.
7617 (clear_installed_tracepoints): Handle static tracepoints.
7618 (cmd_qtdp): Handle static tracepoints.
7619 (probe_marker_at): New.
7620 (cmd_qtstart): Handle static tracepoints.
7621 (response_tracepoint): Handle static tracepoints.
7622 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7623 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7624 (get_context_regcache): Handle static tracepoints.
7625 (do_action_at_tracepoint): Handle static tracepoint actions.
7626 (traceframe_find_block_type): Handle static trace data blocks.
7627 (traceframe_read_sdata): New.
7628 (download_tracepoints): Download static tracepoint actions.
7629 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7630 (GDB_PROBE_NAME): New.
7635 (ust_marker_to_static_tracepoint): New.
7637 (collect_ust_data_at_tracepoint): New.
7638 (gdb_ust_probe): New.
7639 (UNIX_PATH_MAX, SOCK_DIR): New.
7640 (gdb_ust_connect_sync_socket): New.
7641 (resume_thread, stop_thread): New.
7642 (run_inferior_command): New.
7643 (init_named_socket): New.
7644 (gdb_ust_socket_init): New.
7645 (cstr_to_hexstr): New.
7647 (first_marker, next_marker): New.
7648 (response_ust_marker): New.
7649 (cmd_qtfstm, cmd_qtsstm): New.
7650 (unprobe_marker_at, probe_marker_at): New.
7651 (cmd_qtstmat, gdb_ust_thread): New.
7652 (gdb_ust_init): New.
7653 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7654 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7656 (x86_64_st_collect_regmap): New.
7657 (X86_64_NUM_ST_COLLECT_GREGS): New.
7658 (AMD64_RIP_REGNUM): New.
7659 (supply_static_tracepoint_registers): New.
7660 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7662 (i386_st_collect_regmap): New.
7663 (i386_NUM_ST_COLLECT_GREGS): New.
7664 (supply_static_tracepoint_registers): New.
7665 * server.c (handle_query): Handle qXfer:statictrace:read.
7666 <qSupported>: Report support for StaticTracepoints, and
7667 qXfer:statictrace:read features.
7668 * server.h (traceframe_read_sdata)
7669 (supply_static_tracepoint_registers): Declare.
7670 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7671 (unpack_varlen_hex): Include in IPA build.
7672 * Makefile.in (ustlibs, ustinc): New.
7673 (IPA_OBJS): Add remote-utils-ipa.o.
7674 ($(IPA_LIB)): Link -ldl and -lpthread.
7676 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7677 * config.in, configure: Regenerate.
7679 2010-06-20 Ian Lance Taylor <iant@google.com>
7680 Pedro Alves <pedro@codesourcery.com>
7682 * linux-x86-low.c (always_true): Delete.
7683 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7684 trying to fool the compiler with always_true.
7686 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7688 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7689 conditions in gdbserver.
7691 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7693 * spu-low.c (spu_read_memory): Wrap around local store limit.
7694 (spu_write_memory): Likewise.
7696 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7698 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7699 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7701 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7703 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7704 uses with LONGEST uses.
7706 2010-06-14 Stan Shebs <stan@codesourcery.com>
7707 Pedro Alves <pedro@codesourcery.com>
7711 * linux-x86-low.c: Include limits.h.
7716 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7717 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7718 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7719 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7720 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7721 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7722 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7723 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7724 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7725 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7726 (amd64_emit_void_call_2): New.
7727 (amd64_emit_ops): New.
7728 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7729 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7730 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7731 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7732 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7733 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7734 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7735 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7736 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7737 (i386_emit_stack_adjust, i386_emit_int_call_1)
7738 (i386_emit_void_call_2): New.
7739 (i386_emit_ops): New.
7740 (x86_emit_ops): New.
7741 (the_low_target): Install x86_emit_ops.
7742 * server.h (struct emit_ops): New.
7743 (get_raw_reg_func_addr): Declare.
7744 (current_insn_ptr, emit_error): Declare.
7745 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7746 (set_trace_state_variable_value): New defines.
7747 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7748 addr_get_trace_state_variable_value and
7749 addr_set_trace_state_variable_value.
7750 (symbol_list): New fields for get_raw_reg,
7751 get_trace_state_variable_value and set_trace_state_variable_value.
7752 (condfn): New typedef.
7753 (struct tracepoint): New field `compiled_cond'.
7754 (do_action_at_tracepoint): Clear compiled_cond.
7755 (get_trace_state_variable_value, set_trace_state_variable_value):
7757 (condition_true_at_tracepoint): If there's a compiled condition,
7759 (current_insn_ptr, emit_error): New globals.
7760 (struct bytecode_address): New.
7761 (get_raw_reg_func_addr): New.
7762 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7763 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7764 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7765 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7766 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7767 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7768 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7769 (compile_tracepoint_condition, compile_bytecodes): New.
7770 * target.h (emit_ops): Forward declare.
7771 (struct target_ops): New field emit_ops.
7772 (target_emit_ops): New.
7773 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7774 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7775 * linux-low.c (linux_emit_ops): New.
7776 (linux_target_ops): Install it.
7777 * linux-low.h (struct linux_target_ops): New field emit_ops.
7779 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7781 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7782 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7784 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7785 Stan Shebs <stan@codesourcery.com>
7787 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7788 (all): Depend on $(extra_libraries).
7789 (install-only): Install the IPA.
7790 (IPA_OBJS, IPA_LIB): New.
7791 (clean): Remove the IPA lib.
7792 (IPAGENT_CFLAGS): New.
7793 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7794 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7795 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7796 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7797 * configure.ac: Check for atomic builtins support in the compiler.
7798 (IPA_DEPFILES, extra_libraries): Define.
7799 * configure.srv (ipa_obj): Add description.
7800 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7801 (i[34567]86-*-linux*): Set ipa_obj.
7802 (x86_64-*-linux*): Set ipa_obj.
7803 * linux-low.c (stabilizing_threads): New.
7804 (supports_fast_tracepoints): New.
7805 (linux_detach): Stabilize threads before detaching.
7806 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7807 the lwp is either not stabilizing, or is moving out of a jump pad.
7808 (linux_fast_tracepoint_collecting): New.
7809 (maybe_move_out_of_jump_pad): New.
7810 (enqueue_one_deferred_signal): New.
7811 (dequeue_one_deferred_signal): New.
7812 (linux_wait_for_event_1): If moving out of a jump pad, defer
7813 pending signals to later.
7814 (linux_stabilize_threads): New.
7815 (linux_wait_1): Check if threads need moving out of jump pads, and
7817 (stuck_in_jump_pad_callback): New.
7818 (move_out_of_jump_pad_callback): New.
7820 (linux_resume_one_lwp): Handle moving out of jump pads.
7821 (linux_set_resume_request): Dequeue deferred signals.
7822 (need_step_over_p): Also step over fast tracepoint jumps.
7823 (start_step_over): Also uninsert fast tracepoint jumps.
7824 (finish_step_over): Also reinsert fast tracepoint jumps.
7825 (linux_install_fast_tracepoint_jump): New.
7826 (linux_target_ops): Install linux_stabilize_threads and
7827 linux_install_fast_tracepoint_jump_pad.
7828 * linux-low.h (linux_target_ops) <get_thread_area,
7829 install_fast_tracepoint_jump_pad>: New fields.
7830 (struct lwp_info) <collecting_fast_tracepoint,
7831 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7832 (linux_get_thread_area): Declare.
7833 * linux-x86-low.c (jump_insn): New.
7834 (x86_get_thread_area): New.
7835 (append_insns): New.
7837 (amd64_install_fast_tracepoint_jump_pad): New.
7838 (i386_install_fast_tracepoint_jump_pad): New.
7839 (x86_install_fast_tracepoint_jump_pad): New.
7840 (the_low_target): Install x86_get_thread_area and
7841 x86_install_fast_tracepoint_jump_pad.
7842 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7843 (struct fast_tracepoint_jump): New.
7844 (fast_tracepoint_jump_insn): New.
7845 (fast_tracepoint_jump_shadow): New.
7846 (find_fast_tracepoint_jump_at): New.
7847 (fast_tracepoint_jump_here): New.
7848 (delete_fast_tracepoint_jump): New.
7849 (set_fast_tracepoint_jump): New.
7850 (uninsert_fast_tracepoint_jumps_at): New.
7851 (reinsert_fast_tracepoint_jumps_at): New.
7852 (set_breakpoint_at): Use write_inferior_memory.
7853 (uninsert_raw_breakpoint): Use write_inferior_memory.
7854 (check_mem_read): Mask out fast tracepoint jumps.
7855 (check_mem_write): Mask out fast tracepoint jumps.
7856 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7857 (set_fast_tracepoint_jump): Declare.
7858 (delete_fast_tracepoint_jump)
7859 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7860 (reinsert_fast_tracepoint_jumps_at): Declare.
7861 * regcache.c: Don't compile many functions when building the
7862 in-process agent library.
7863 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7864 the register buffer in the heap.
7865 (free_register_cache): If the register buffer isn't owned by the
7866 regcache, don't free it.
7867 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7868 pre-existing register caches.
7869 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7871 (convert_ascii_to_int): : Constify `from' parameter type.
7872 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7873 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7874 the needed buffer in-place.
7875 (relocate_instruction): New.
7876 * server.c (handle_query) <qSymbols>: If the target supports
7877 tracepoints, give it a chance of looking up symbols. Report
7878 support for fast tracepoints.
7879 (handle_status): Stabilize threads.
7880 (process_serial_event): Adjust.
7881 * server.h (struct fast_tracepoint_jump): Forward declare.
7882 (struct process_info) <fast_tracepoint_jumps>: New field.
7883 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7884 (decode_X_packet, decode_M_packet): Adjust.
7885 (relocate_instruction): Declare.
7886 (in_process_agent_loaded): Declare.
7887 (tracepoint_look_up_symbols): Declare.
7888 (struct fast_tpoint_collect_status): Declare.
7889 (fast_tracepoint_collecting): Declare.
7890 (force_unlock_trace_buffer): Declare.
7891 (handle_tracepoint_bkpts): Declare.
7892 (initialize_low_tracepoint)
7893 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7894 * target.h (struct target_ops) <stabilize_threads,
7895 install_fast_tracepoint_jump_pad>: New fields.
7896 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7897 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7898 [HAVE_STDINT_H]: Include stdint.h.
7899 (trace_debug_1): Rename to ...
7900 (trace_vdebug): ... this.
7901 (trace_debug): Rename to ...
7902 (trace_debug_1): ... this. Add `level' parameter.
7904 (ATTR_USED, ATTR_NOINLINE): New.
7905 (IP_AGENT_EXPORT): New.
7906 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7907 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7908 (about_to_request_buffer_space, trace_buffer_is_full)
7909 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7910 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7911 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7912 (traceframe_write_count, traceframes_created)
7913 (trace_state_variables)
7914 New renaming defines.
7915 (struct ipa_sym_addresses): New.
7916 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7918 (ipa_sym_addrs): New.
7919 (all_tracepoint_symbols_looked_up): New.
7920 (in_process_agent_loaded): New.
7921 (write_e_ipa_not_loaded): New.
7922 (maybe_write_ipa_not_loaded): New.
7923 (tracepoint_look_up_symbols): New.
7924 (debug_threads) [IN_PROCESS_AGENT]: New.
7925 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7926 (UNKNOWN_SIDE_EFFECTS): New.
7927 (stop_tracing): New.
7928 (flush_trace_buffer): New.
7929 (stop_tracing_bkpt): New.
7930 (flush_trace_buffer_bkpt): New.
7931 (read_inferior_integer): New.
7932 (read_inferior_uinteger): New.
7933 (read_inferior_data_pointer): New.
7934 (write_inferior_data_pointer): New.
7935 (write_inferior_integer): New.
7936 (write_inferior_uinteger): New.
7937 (struct collect_static_trace_data_action): Delete.
7938 (enum tracepoint_type): New.
7939 (struct tracepoint) <type>: New field `type'.
7940 <actions_str, step_actions, step_actions_str>: Only include in
7942 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7943 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7944 (tracepoints): Use IP_AGENT_EXPORT.
7945 (last_tracepoint): Don't include in the IPA.
7946 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7947 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7948 (alloced_trace_state_variables): New.
7949 (trace_state_variables): Use IP_AGENT_EXPORT.
7950 (traceframe_t): Delete unused variable.
7951 (circular_trace_buffer): Don't include in the IPA.
7952 (trace_buffer_start): Delete.
7953 (struct trace_buffer_control): New.
7954 (trace_buffer_free): Delete.
7955 (struct ipa_trace_buffer_control): New.
7956 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7957 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7959 (trace_buffer_ctrl): New.
7960 (TRACE_BUFFER_CTRL_CURR): New.
7961 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7962 Reimplement as macros.
7963 (trace_buffer_wrap): Delete.
7964 (traceframe_write_count, traceframe_read_count)
7965 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7966 (struct tracepoint_hit_ctx) <type>: New field.
7967 (struct fast_tracepoint_ctx): New.
7968 (memory_barrier): New.
7970 (record_tracepoint_error): Update atomically in the IPA.
7971 (clear_inferior_trace_buffer): New.
7972 (about_to_request_buffer_space): New.
7973 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7974 updating the same buffer.
7975 (add_tracepoint): Default the tracepoint's type to trap
7976 tracepoint, and orig_size to -1.
7977 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7979 (create_trace_state_variable): New parameter `gdb'. Handle it.
7980 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7981 (cmd_qtdp): Handle fast tracepoints.
7983 (max_jump_pad_size): New.
7984 (gdb_jump_pad_head): New.
7985 (get_jump_space_head): New.
7986 (claim_jump_space): New.
7987 (sort_tracepoints): New.
7988 (MAX_JUMP_SIZE): New.
7989 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7991 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7992 support. Upload fast traceframes, and delete internal IPA
7994 (stop_tracing_handler): New.
7995 (flush_trace_buffer_handler): New.
7996 (cmd_qtstop): Upload fast tracepoints.
7997 (response_tracepoint): Handle fast tracepoints.
7998 (tracepoint_finished_step): Upload fast traceframes. Set the
7999 tracepoint hit context's tracepoint type.
8000 (handle_tracepoint_bkpts): New.
8001 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8002 type. Add comment about fast tracepoints.
8003 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8004 non-existing action_str field.
8005 (get_context_regcache): Handle fast tracepoints.
8006 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8008 (fast_tracepoint_from_jump_pad_address): New.
8009 (fast_tracepoint_from_ipa_tpoint_address): New.
8010 (collecting_t): New.
8011 (force_unlock_trace_buffer): New.
8012 (fast_tracepoint_collecting): New.
8015 (write_inferior_data_ptr): New.
8016 (target_tp_heap): New.
8017 (target_malloc): New.
8018 (download_agent_expr): New.
8020 (download_tracepoints): New.
8021 (download_trace_state_variables): New.
8022 (upload_fast_traceframes): New.
8023 (IPA_FIRST_TRACEFRAME): New.
8024 (IPA_NEXT_TRACEFRAME_1): New.
8025 (IPA_NEXT_TRACEFRAME): New.
8026 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8027 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8028 (gdb_jump_pad_buffer_end): New.
8029 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8030 (initialize_tracepoint): Adjust.
8031 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8032 buffer. Initialize the low module.
8033 * utils.c (PREFIX, TOOLNAME): New.
8034 (malloc_failure): Use PREFIX.
8035 (error): In the IPA, an error causes an exit.
8036 (fatal, warning): Use PREFIX.
8037 (internal_error): Use TOOLNAME.
8038 (NUMCELLS): Increase to 10.
8039 * configure, config.in: Regenerate.
8041 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8043 * server.c (handle_query) <qSupported>: Do two passes over the
8044 qSupported string to avoid nesting strtok.
8046 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8048 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8050 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8052 * configure: Regenerate.
8053 * proc-service.list: New.
8055 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8057 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8060 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8062 * gdbreplay.c (remote_open): Check error return from socket() call by
8063 its equality to -1 not by it being negative.
8064 * remote-utils.c (remote_open): Likewise.
8066 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8068 * config.h: Regenerate.
8070 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8072 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8073 doesn't provide PTRACE_GET_THREAD_AREA.
8075 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8077 * linux-m68k-low.c: Include <asm/ptrace.h>
8078 (ps_get_thread_area): Implement.
8080 2010-05-03 Doug Evans <dje@google.com>
8082 * event-loop.c (struct callback_event): New struct.
8083 (callback_list): New global.
8084 (append_callback_event, delete_callback_event): New functions.
8085 (process_callback): New function.
8086 (start_event_loop): Call it.
8087 * remote-utils.c (NOT_SCHEDULED): Define.
8088 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8089 moved out of readchar.
8090 (readchar): Rewrite. Call reschedule before returning.
8091 (reset_readchar): New function.
8092 (remote_close): Call it.
8093 (process_remaining, reschedule): New functions.
8094 * server.h (callback_handler_func): New typedef.
8095 (append_callback_event, delete_callback_event): Declare.
8097 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8099 * proc-service.c (ps_pglobal_lookup): Use
8100 thread_db_look_up_one_symbol.
8101 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8102 parameter. Use it instead of all_symbols_looked_up.
8103 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8105 (all_symbols_looked_up): Don't declare.
8106 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8107 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8109 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8110 Set all_symbols_looked_up here.
8111 (thread_db_look_up_one_symbol): New.
8112 (thread_db_get_tls_address): Adjust.
8113 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8114 thread_db object on the heap, and tentatively set it in the
8116 (thread_db_init): Don't set all_symbols_looked_up here.
8117 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8119 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8121 * linux-low.c (linux_kill, linux_detach): Adjust.
8122 (status_pending_p_callback): Remove redundant statement. Check
8123 for !TARGET_WAITIKIND_IGNORE, instead of
8124 TARGET_WAITKIND_STOPPED.
8125 (handle_tracepoints): Make sure LWP is locked. Adjust.
8126 (linux_wait_for_event_1): Adjust.
8127 (linux_cancel_breakpoints): New.
8128 (unsuspend_one_lwp): New.
8129 (unsuspend_all_lwps): New.
8130 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8131 (send_sigstop_callback): Change return type to int, add new
8132 `except' parameter and handle it.
8133 (suspend_and_send_sigstop_callback): New.
8134 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8135 pass them down. If SUSPEND, also increment the lwp's suspend
8137 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8138 (need_step_over_p): Don't consider suspended LWPs.
8139 (start_step_over): Adjust.
8140 (proceed_one_lwp): Change return type to int, add new `except'
8141 parameter and handle it.
8142 (unsuspend_and_proceed_one_lwp): New.
8143 (proceed_all_lwps): Use find_inferior instead of
8145 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8146 also decrement the suspend count of LWPs. Pass `except' down,
8147 instead of hacking its suspend count.
8148 (linux_pause_all): Add `freeze' parameter. Adjust.
8149 (linux_unpause_all): New.
8150 (linux_target_ops): Install linux_unpause_all.
8151 * server.c (handle_status): Adjust.
8152 * target.h (struct target_ops): New fields `unpause_all' and
8153 `cancel_breakpoints'. Add new parameter to `pause_all'.
8154 (pause_all): Add new `freeze' parameter.
8156 (cancel_breakpoints): New.
8157 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8159 (cmd_qtstart): Pause threads.
8160 (stop_tracing): Pause threads, and cancel breakpoints.
8161 * win32-low.c (win32_target_ops): Adjust.
8163 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8165 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8166 the inferior right away from here...
8167 (linux_wait_1): ... to here, and adjust to check the thread's
8168 last_resume_kind instead of the lwp's step or stop_expected flags.
8170 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8172 * README: Use consistent `GDB' and `GDBserver' spellings.
8174 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8176 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8177 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8178 (linux_detach_one_lwp): Assume the lwp is stopped.
8179 (any_thread_of): Delete.
8180 (linux_detach): Stop all lwps here. Don't blindly delete all
8182 (delete_lwp_callback): New.
8183 (linux_mourn): Delete all lwps of the process that is gone.
8184 (linux_wait_1): Don't delete the last lwp of the process here.
8185 * mem-break.h (mark_breakpoints_out): Declare.
8186 * mem-break.c (mark_breakpoints_out): New.
8187 (free_all_breakpoints): Use it.
8188 * server.c (handle_target_event): If the process is gone, mark
8190 * thread-db.c (struct thread_db) <create_bp>: New field.
8191 (thread_db_enable_reporting): Fix prototype. Store a thread event
8192 breakpoint reference in the thread_db struct.
8193 (thread_db_load_search): Clear the thread_db object.
8194 (try_thread_db_load_1): Ditto.
8195 (switch_to_process): New.
8196 (disable_thread_event_reporting): Use it.
8197 (remove_thread_event_breakpoints): New.
8198 (thread_db_detach, thread_db_mourn): Use it.
8200 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8202 * linux-low.c (linux_enable_event_reporting): New.
8203 (linux_wait_for_event_1, handle_extended_wait): Use it.
8205 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8207 * linux-low.c (linux_kill_one_lwp, linux_kill)
8208 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8209 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8210 SIGSTOP even if the LWP is stopped.
8211 (send_sigstop_callback): New.
8212 (stop_all_lwps): Use send_sigstop_callback instead.
8213 (linux_resume_one_thread): Adjust.
8214 (proceed_one_lwp): Still proceed an LWP that the client has
8215 requested to stop, if we haven't reported it as stopped yet. Make
8216 sure that LWPs the client want stopped, have a pending SIGSTOP.
8218 2010-04-26 Doug Evans <dje@google.com>
8220 * server.c (handle_general_set): Make static.
8222 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8223 Print received char after testing for error/eof instead of before.
8224 (input_interrupt): Tweak comment.
8226 2010-04-23 Doug Evans <dje@google.com>
8228 * server.c (start_inferior): Print inferior argv if --debug.
8230 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8232 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8233 * nto-x86-low.c: Include server.h
8235 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8237 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8238 be consistent with other sources of this directory.
8239 (init_registers_amd64): Correct name of source file of this function
8242 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8244 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8247 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8249 * win32-i386-low.c: Add 64-bit support.
8250 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8251 (init_registers_amd64): Declare.
8252 (mappings): Add 64-bit version of array.
8253 (init_windows_x86): New function.
8254 (the_low_target): Change init_arch field to init_windows_x86.
8256 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8258 * win32-low.c: Adapt to support also 64-bit architecture.
8259 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8260 (get_image_name): Use SIZE_T type for local variable `done'.
8261 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8262 (toolhelp_get_dll_name): Idem.
8263 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8264 Use uintptr_t typecast to avoid warning.
8265 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8266 (handle_exception): Use phex_nz to avoid warning.
8267 (win32_wait): Remove unused local variable `process'.
8269 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8271 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8274 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8276 * configure.ac: Use `ws2_32' library for srv_mingw.
8277 * configure: Regenerate.
8278 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8279 * remote-utils.c: Likewise.
8281 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8283 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8284 if __x86_64__ is defined.
8286 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8288 * configure: Regenerate.
8290 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8292 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8293 * target.h (target_ops): New get_tib_address field.
8294 * win32-low.h (win32_thread_info): Add thread_local_base field.
8295 * win32-low.c (child_add_thread): Add tlb argument.
8296 Set thread_local_base field to TLB.
8297 (get_child_debug_event): Adapt to child_add_thread change.
8298 (win32_get_tib_address): New function.
8299 (win32_target_ops): Set get_tib_address field to
8300 win32_get_tib_address.
8301 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8303 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8305 * linux-low.c (linux_mourn): Also remove the process.
8306 * server.c (handle_target_event): Don't remove the process here.
8307 * nto-low.c (nto_mourn): New.
8308 (nto_target_ops): Install it.
8309 * spu-low.c (spu_mourn): New.
8310 (spu_target_ops): Install it.
8311 * win32-low.c (win32_mourn): New.
8312 (win32_target_ops): Install it.
8314 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8316 * server.h (buffer_xml_printf): Remove redundant `;'.
8318 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8320 * regcache.c (set_register_cache): Invalidate regcaches before
8321 changing the register cache layout.
8322 (regcache_invalidate_one): Allow a NULL regcache.
8323 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8324 regcaches before changing the register cache layout or the target
8327 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8329 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8330 variable warning on Linux/x86-64.
8332 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8334 GDBserver disconnected tracing support.
8336 * linux-low.c (linux_remove_process): Delete.
8337 (add_lwp): Don't set last_resume_kind here.
8338 (linux_kill): Use `mourn'.
8339 (linux_detach): Use `thread_db_detach', and `mourn'.
8341 (linux_attach_lwp_1): Adjust comment.
8342 (linux_attach): last_resume_kind moved the thread_info; adjust.
8343 (status_pending_p_callback): Adjust.
8344 (linux_wait_for_event_1): Adjust.
8345 (count_events_callback, select_singlestep_lwp_callback)
8346 (select_event_lwp_callback, cancel_breakpoints_callback)
8347 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8348 (proceed_one_lwp): Adjust.
8349 (linux_async): Add debug output.
8350 (linux_thread_stopped): New.
8351 (linux_pause_all): New.
8352 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8354 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8355 (thread_db_free): Delete declaration.
8356 (thread_db_detach, thread_db_mourn): Declare.
8357 * thread-db.c (thread_db_init): Use thread_db_mourn.
8358 (thread_db_free): Delete, split in two.
8359 (disable_thread_event_reporting): New.
8360 (thread_db_detach): New.
8361 (thread_db_mourn): New.
8363 * server.h (struct thread_info) <last_resume_kind>: New field.
8364 <attached>: Add comment.
8365 <gdb_detached>: New field.
8366 (handler_func): Change return type to int.
8367 (handle_serial_event, handle_target_event): Ditto.
8368 (gdb_connected): Declare.
8370 (disconnected_tracing): Declare.
8371 (stop_tracing): Declare.
8373 * server.c (handle_query) <qSupported>: Report support for
8374 disconnected tracing.
8375 (queue_stop_reply_callback): Account for running threads.
8376 (gdb_wants_thread_stopped): New.
8377 (gdb_wants_all_threads_stopped): New.
8378 (gdb_reattached_process): New.
8379 (handle_status): Clear the `gdb_detached' flag of all processes.
8380 In all-stop, stop all threads.
8381 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8382 (process_serial_event): If the remote connection breaks, or if an
8383 exit was forced with "monitor exit", force an event loop exit.
8384 Handle disconnected tracing on detach.
8385 (handle_serial_event): Adjust.
8386 (handle_target_event): If GDB isn't connected, forward events back
8387 to the inferior, unless the last process exited, in which case,
8388 exit gdbserver. Adjust interface.
8390 * remote-utils.c (remote_open): Don't block in accept. Instead
8391 register an event loop source on the listen socket file
8392 descriptor. Refactor bits into ...
8393 (listen_desc): ... this new global.
8394 (gdb_connected): ... this new function.
8395 (enable_async_notification): ... this new function.
8396 (handle_accept_event): ... this new function.
8397 (remote_close): Clear remote_desc.
8399 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8401 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8403 (mourn_inferior): Define.
8404 (target_process_qsupported): Avoid the dangling else problem.
8405 (thread_stopped): Define.
8406 (pause_all): Define.
8407 (target_waitstatus_to_string): Declare.
8408 * target.c (target_waitstatus_to_string): New.
8410 * tracepoint.c (tracing): Make extern.
8411 (disconnected_tracing): New.
8412 (stop_tracing): Make extern. Handle tracing stops due to GDB
8414 (cmd_qtdisconnected): New.
8415 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8416 (handle_tracepoint_general_set): Handle QTDisconnected.
8418 * event-loop.c (event_handler_func): Change return type to int.
8419 (process_event): Bail out if the event handler wants the event
8421 (handle_file_event): Ditto.
8422 (start_event_loop): Bail out if the event handler wants the event
8425 * nto-low.c (nto_target_ops): Adjust.
8426 * spu-low.c (spu_wait): Don't remove the process here.
8427 (spu_target_ops): Adjust.
8428 * win32-low.c (win32_wait): Don't remove the process here.
8429 (win32_target_ops): Adjust.
8431 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8433 * regcache.c (realloc_register_cache): Invalidate inferior's
8434 regcache before recreating it.
8436 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8438 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8440 2010-04-09 Stan Shebs <stan@codesourcery.com>
8441 Pedro Alves <pedro@codesourcery.com>
8443 * server.h (LONGEST): New.
8444 (struct thread_info) <while_stepping>: New field.
8445 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8447 (initialize_tracepoint, handle_tracepoint_general_set)
8448 (handle_tracepoint_query, tracepoint_finished_step)
8449 (tracepoint_was_hit, release_while_stepping_state_list):
8450 (current_traceframe): Declare.
8451 * server.c (handle_general_set): Handle tracepoint packets.
8453 (write_memory): New.
8454 (handle_search_memory_1): Use read_memory.
8455 (handle_query): Report support for conditional tracepoints, trace
8456 state variables, and tracepoint sources. Handle tracepoint
8458 (main): Initialize the tracepoints module.
8459 (process_serial_event): Handle traceframe reads/writes.
8461 * linux-low.c (handle_tracepoints): New.
8462 (linux_wait_1): Call it.
8463 (linux_resume_one_lwp): Handle while-stepping.
8464 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8465 (linux_target_ops): Install them.
8466 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8468 * linux-x86-low.c (x86_supports_tracepoints): New.
8469 (the_low_target). Install it.
8471 * mem-break.h (delete_breakpoint): Declare.
8472 * mem-break.c (delete_breakpoint): Make external.
8474 * target.h (struct target_ops): Add `supports_tracepoints',
8475 `read_pc', and `write_pc' fields.
8476 (target_supports_tracepoints): Define.
8477 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8480 * regcache.h (struct regcache) <registers_owned>: New field.
8481 (init_register_cache, regcache_cpy): Declare.
8482 (regcache_read_pc, regcache_write_pc): Declare.
8483 (register_cache_size): Declare.
8484 (supply_regblock): Declare.
8485 * regcache.c (init_register_cache): New.
8486 (new_register_cache): Use it.
8487 (regcache_cpy): New.
8488 (register_cache_size): New.
8489 (supply_regblock): New.
8490 (regcache_read_pc, regcache_write_pc): New.
8492 * tracepoint.c: New.
8494 * Makefile.in (OBS): Add tracepoint.o.
8495 (tracepoint.o): New rule.
8497 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8499 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8501 (i386-mmx.c): Likewise.
8502 (i386-mmx-linux.o): Likewise.
8503 (i386-mmx-linux.c): Likewise.
8505 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8506 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8507 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8508 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8510 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8511 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8512 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8514 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8516 * Makefile.in (clean): Updated.
8518 (i386-avx.c): Likewise.
8519 (i386-avx-linux.o): Likewise.
8520 (i386-avx-linux.c): Likewise.
8521 (amd64-avx.o): Likewise.
8522 (amd64-avx.c): Likewise.
8523 (amd64-avx-linux.o): Likewise.
8524 (amd64-avx-linux.c): Likewise.
8526 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8527 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8528 (srv_amd64_regobj): Add amd64-avx.o.
8529 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8530 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8531 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8532 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8533 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8534 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8535 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8537 * i387-fp.c: Include "i386-xstate.h".
8539 (i387_cache_to_xsave): Likewise.
8540 (i387_xsave_to_cache): Likewise.
8541 (x86_xcr0): Likewise.
8543 * i387-fp.h (i387_cache_to_xsave): Likewise.
8544 (i387_xsave_to_cache): Likewise.
8545 (x86_xcr0): Likewise.
8547 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8548 * linux-crisv32-low.c (target_regsets): Likewise.
8549 * linux-m68k-low.c (target_regsets): Likewise.
8550 * linux-mips-low.c (target_regsets): Likewise.
8551 * linux-ppc-low.c (target_regsets): Likewise.
8552 * linux-s390-low.c (target_regsets): Likewise.
8553 * linux-sh-low.c (target_regsets): Likewise.
8554 * linux-sparc-low.c (target_regsets): Likewise.
8555 * linux-xtensa-low.c (target_regsets): Likewise.
8557 * linux-low.c: Include <sys/uio.h>.
8558 (regsets_fetch_inferior_registers): Support nt_type.
8559 (regsets_store_inferior_registers): Likewise.
8560 (linux_process_qsupported): New.
8561 (linux_target_ops): Add linux_process_qsupported.
8563 * linux-low.h (regset_info): Add nt_type.
8564 (linux_target_ops): Add process_qsupported.
8566 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8568 (init_registers_i386_avx_linux): New.
8569 (init_registers_amd64_avx_linux): Likewise.
8570 (xmltarget_i386_linux_no_xml): Likewise.
8571 (xmltarget_amd64_linux_no_xml): Likewise.
8572 (PTRACE_GETREGSET): Likewise.
8573 (PTRACE_SETREGSET): Likewise.
8574 (x86_fill_xstateregset): Likewise.
8575 (x86_store_xstateregset): Likewise.
8576 (use_xml): Likewise.
8577 (x86_linux_update_xmltarget): Likewise.
8578 (x86_linux_process_qsupported): Likewise.
8579 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8580 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8581 init_registers_i386_linux here. Call
8582 x86_linux_update_xmltarget.
8583 (the_low_target): Add x86_linux_process_qsupported.
8585 * server.c (handle_query): Call target_process_qsupported.
8587 * target.h (target_ops): Add process_qsupported.
8588 (target_process_qsupported): New.
8590 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8592 * inferiors.c (add_thread): Set last_status kind to
8593 TARGET_WAITKIND_IGNORE.
8594 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8595 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8596 (linux_wait_1): Move `thread' local definition to block that uses
8597 it. Don't NULL initialize `event_child'.
8598 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8599 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8600 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8602 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8604 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8605 an extended waitstatus, or by a watchpoint.
8606 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8607 thread was stepping or has been stopped by a watchpoint.
8609 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8611 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8612 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8613 of another, then delete the previous, and validate all
8615 (validate_inserted_breakpoint): New.
8616 (delete_disabled_breakpoints): New.
8617 (validate_breakpoints): New.
8618 (check_mem_read): Validate breakpoints before trusting their
8619 shadow. Delete disabled breakpoints.
8620 (check_mem_write): Validate breakpoints before trusting they
8621 should be inserted. Delete disabled breakpoints.
8622 * mem-break.h (validate_breakpoints):
8623 * server.c (handle_query): Validate breakpoints when we see a
8626 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8628 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8629 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8630 if we could tell there's a GDB breakpoint at stop_pc.
8631 (need_step_over_p): Don't do a step over if we find a GDB
8632 breakpoint at the resume PC.
8634 * mem-break.c (struct raw_breakpoint): New.
8635 (enum bkpt_type): New type `gdb_breakpoint'.
8636 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8637 fields. New field `raw'.
8638 (find_raw_breakpoint_at): New.
8639 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8641 (set_breakpoint_at): Adjust.
8642 (delete_raw_breakpoint): New.
8643 (release_breakpoint): New.
8644 (delete_breakpoint): Rename to...
8645 (delete_breakpoint_1): ... this. Add proc parameter. Use
8646 release_breakpoint. Return ENOENT.
8647 (delete_breakpoint): Reimplement.
8648 (find_breakpoint_at): Delete.
8649 (find_gdb_breakpoint_at): New.
8650 (delete_breakpoint_at): Delete.
8651 (set_gdb_breakpoint_at): New.
8652 (delete_gdb_breakpoint_at): New.
8653 (gdb_breakpoint_here): New.
8654 (set_reinsert_breakpoint): Use release_breakpoint.
8655 (uninsert_breakpoint): Rename to ...
8656 (uninsert_raw_breakpoint): ... this.
8657 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8658 (reinsert_raw_breakpoint): Change parameter type to
8660 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8662 (check_breakpoints): Adjust. Use release_breakpoint.
8663 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8664 (breakpoint_inserted_here): Ditto.
8665 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8666 Don't trust the breakpoint's shadow if it is not inserted.
8667 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8668 (delete_all_breakpoints): Adjust.
8669 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8670 use delete_breakpoint_1.
8672 * mem-break.h (breakpoints_supported): Delete declaration.
8673 (set_gdb_breakpoint_at): Declare.
8674 (gdb_breakpoint_here): Declare.
8675 (delete_breakpoint_at): Delete.
8676 (delete_gdb_breakpoint_at): Declare.
8678 * server.h (struct raw_breakpoint): Forward declare.
8679 (struct process_info): New field `raw_breakpoints'.
8681 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8684 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8686 * linux-low.c (status_pending_p_callback): Fix comment.
8687 (linux_wait_for_event_1): Move most of the internal breakpoint
8688 handling from here...
8689 (linux_wait_1): ... to here.
8690 (count_events_callback): New.
8691 (select_singlestep_lwp_callback): New.
8692 (select_event_lwp_callback): New.
8693 (cancel_breakpoints_callback): New.
8694 (select_event_lwp): New.
8695 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8696 priority to all LWPs that have had events that should be reported
8697 to the client. Cancel breakpoints when about to reporting the
8698 event to the client, not while stopping lwps. No longer cancel
8699 finished single-steps here.
8700 (cancel_finished_single_step): Delete.
8701 (cancel_finished_single_steps): Delete.
8703 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8705 * mem-break.c (enum bkpt_type): New.
8706 (struct breakpoint): New field `type'.
8707 (set_breakpoint_at): Change return type to struct breakpoint
8708 pointer. Set type to `other_breakpoint' by default.
8709 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8710 in the breakpoint list.
8711 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8712 (reinsert_breakpoint): Rename to ...
8713 (reinsert_raw_breakpoint): ... this.
8714 (reinsert_breakpoints_at): Adjust.
8715 * mem-break.h (struct breakpoint): Declare.
8716 (set_breakpoint_at): Change return type to struct breakpoint
8719 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8721 * server.c (handle_query): Assign, not compare.
8723 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8725 Teach linux gdbserver to step-over-breakpoints.
8727 * linux-low.c (can_hardware_single_step): New.
8728 (supports_breakpoints): New.
8729 (handle_extended_wait): If stopping threads, read the stop pc of
8732 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8733 low target doesn't support retrieving the PC.
8734 (add_lwp): Set last_resume_kind to resume_continue.
8735 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8736 (linux_attach): Don't clear stop_expected. Set the lwp's
8737 last_resume_kind to resume_stop.
8738 (linux_detach_one_lwp): Don't check for removed breakpoints.
8739 (check_removed_breakpoint): Delete.
8740 (status_pending_p): Rename to ...
8741 (status_pending_p_callback): ... this. Don't check for removed
8742 breakpoints. Don't consider threads that are stopped from GDB's
8744 (linux_wait_for_lwp): Always read the stop_pc here.
8745 (cancel_breakpoint): New.
8746 (step_over_bkpt): New global.
8747 (linux_wait_for_event_1): Implement stepping over breakpoints.
8748 (gdb_wants_lwp_stopped): New.
8749 (gdb_wants_all_stopped): New.
8750 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8751 single-step traps here. Store the thread's last reported target
8753 (send_sigstop): Don't clear stop_expected. Always set it,
8755 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8756 (cancel_finished_single_step): New.
8757 (cancel_finished_single_steps): New.
8758 (wait_for_sigstop): Don't cancel finished single-step traps here.
8759 (linux_resume_one_lwp): Don't check for removed breakpoints.
8760 Don't set `step' on non-hardware step archs.
8761 (linux_set_resume_request): Ignore resume_stop requests if already
8762 stopping or stopped. Set the lwp's last_resume_kind.
8763 (resume_status_pending_p): Don't check for removed breakpoints.
8764 (need_step_over_p): New.
8765 (start_step_over): New.
8766 (finish_step_over): New.
8767 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8768 requests. Clear the thread's last reported target waitstatus.
8769 Don't use the `suspended' flag. Don't consider pending breakpoints.
8770 (linux_resume): Start a step-over if necessary.
8771 (proceed_one_lwp): New.
8772 (proceed_all_lwps): New.
8773 (unstop_all_lwps): New.
8774 * linux-low.h (struct lwp_info): Rewrite comment for the
8775 `suspended' flag. Add the `stop_pc' field. Delete the
8776 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8777 Add `'last_resume_kind' and `need_step_over' fields.
8778 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8779 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8780 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8781 (set_raw_breakpoint_at): New.
8782 (set_breakpoint_at): Rewrite to use it.
8783 (reinsert_breakpoint_handler): Delete.
8784 (set_reinsert_breakpoint): New.
8785 (reinsert_breakpoint_by_bp): Delete.
8786 (delete_reinsert_breakpoints): New.
8787 (uninsert_breakpoint): Rewrite.
8788 (uninsert_breakpoints_at): New.
8789 (reinsert_breakpoint): Rewrite.
8790 (reinsert_breakpoints_at): New.
8791 (check_breakpoints): Rewrite.
8792 (breakpoint_here): New.
8793 (breakpoint_inserted_here): New.
8794 (check_mem_read): Adjust.
8795 * mem-break.h (breakpoints_supported, breakpoint_here)
8796 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8797 (reinsert_breakpoint_by_bp): Delete declaration.
8798 (delete_reinsert_breakpoints): Declare.
8799 (reinsert_breakpoint): Delete declaration.
8800 (reinsert_breakpoints_at): Declare.
8801 (uninsert_breakpoint): Delete declaration.
8802 (uninsert_breakpoints_at): Declare.
8803 (check_breakpoints): Adjust prototype.
8804 * server.h: Adjust include order.
8805 (struct thread_info): Declare here. Add a `last_status' field.
8807 2010-03-23 Michael Snyder <msnyder@vmware.com>
8809 * server.c (crc32): New function.
8810 (handle_query): Add handling for 'qCRC:' request.
8812 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8814 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8815 lwp had been stopped by a watchpoint.
8817 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8819 * server.h (internal_error): Declare.
8820 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8821 * utils.c (internal_error): New function.
8823 2010-03-15 Andreas Schwab <schwab@redhat.com>
8825 * configure.srv: Fix typo setting srv_regobj.
8827 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8829 * linux-low.c (fetch_register): Avoid passing a non string literal
8831 (usr_store_inferior_registers): Ditto.
8833 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8835 * linux-low.c (linux_write_memory): Bail out early if peeking
8838 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8840 * linux-low.h (struct lwp_info): New fields
8841 `stopped_by_watchpoint' and `stopped_data_address'.
8842 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8843 here, and cache them in the lwp object.
8844 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8846 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8848 (linux_stopped_by_watchpoint): Rewrite.
8849 (linux_stopped_data_address): Rewrite.
8851 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8853 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8854 switching the current inferior, not before.
8856 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8858 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8859 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8860 i386-linux.c and amd64-linux.c.
8861 (reg-i386.o): Removed.
8862 (reg-i386.c): Likewise.
8863 (reg-i386-linux.o): Likewise.
8864 (reg-i386-linux.c): Likewise.
8865 (reg-x86-64.o): Likewise.
8866 (reg-x86-64.c): Likewise.
8867 (reg-x86-64-linux.o): Likewise.
8868 (reg-x86-64-linux.c): Likewise.
8871 (i386-linux.o): Likewise.
8872 (i386-linux.c): Likewise.
8873 (amd64.o): Likewise.
8874 (amd64.c): Likewise.
8875 (amd64-linux.o): Likewise.
8876 (amd64-linux.c): Likewise.
8878 * configure.srv (srv_i386_regobj): New.
8879 (srv_i386_linux_regobj): Likewise.
8880 (srv_amd64_regobj): Likewise.
8881 (srv_amd64_linux_regobj): Likewise.
8882 (srv_i386_32bit_xmlfiles): Likewise.
8883 (srv_i386_64bit_xmlfiles): Likewise.
8884 (srv_i386_xmlfiles): Likewise.
8885 (srv_amd64_xmlfiles): Likewise.
8886 (srv_i386_linux_xmlfiles): Likewise.
8887 (srv_amd64_linux_xmlfiles): Likewise.
8888 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8889 srv_xmlfiles to $srv_i386_xmlfiles.
8890 (i[34567]86-*-mingw32ce*): Likewise.
8891 (i[34567]86-*-mingw*): Likewise.
8892 (i[34567]86-*-nto*): Likewise.
8893 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8894 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8895 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8896 (x86_64-*-linux*): Likewise.
8898 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8899 (init_registers_amd64_linux): New.
8900 (x86_arch_setup): Replace init_registers_x86_64_linux with
8901 init_registers_amd64_linux.
8903 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8905 * configure.ac: Check for libdl. If it is not available link against
8906 static libthread_db.
8907 * configure: Regenerate.
8909 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8913 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8914 handing a read watchpoint.
8915 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8917 2010-02-12 Doug Evans <dje@google.com>
8919 * linux-low.c (linux_supports_tracefork_flag): Document.
8920 (linux_look_up_symbols): Add comment.
8922 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8924 * regcache.c (supply_register): Clear regcache if buf is NULL.
8926 2010-02-02 Nicolas Roche <roche@sourceware.org>
8927 Joel Brobecker <brobecker@adacore.com>
8929 * inferiors.c (find_inferior): Add function documentation.
8930 (unloaded_dll): Handle the case where the unloaded dll has not
8931 been previously registered in the dll list.
8933 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8935 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8936 (thumb2_breakpoint): New.
8937 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8939 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8941 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8942 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8945 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8947 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8949 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8951 * linux-s390-low.c (s390_collect_ptrace_register)
8952 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8954 2010-01-21 Doug Evans <dje@google.com>
8956 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8957 (PTRACE_ARG4_TYPE): New macro.
8958 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8959 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8960 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8961 (usr_store_inferior_registers): Ditto.
8962 (linux_read_memory, linux_write_memory): Ditto.
8963 (linux_test_for_tracefork): Ditto.
8965 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8966 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8968 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8970 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8973 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8975 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8976 prototype to take a regcache. Adjust.
8978 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8980 * regcache.h (struct thread_info): Forward declare.
8981 (struct regcache): New.
8982 (new_register_cache): Adjust prototype.
8983 (get_thread_regcache): Declare.
8984 (free_register_cache): Adjust prototype.
8985 (registers_to_string, registers_from_string): Ditto.
8986 (supply_register, supply_register_by_name, collect_register)
8987 (collect_register_as_string, collect_register_by_name): Ditto.
8988 * regcache.c (struct inferior_regcache_data): Delete.
8989 (get_regcache): Rename to ...
8990 (get_thread_regcache): ... this. Adjust. Switch inferior before
8992 (regcache_invalidate_one): Adjust.
8993 (regcache_invalidate): Fix prototype.
8994 (new_register_cache): Return the new register cache.
8995 (free_register_cache): Change prototype.
8996 (realloc_register_cache): Adjust.
8997 (registers_to_string): Change prototype to take a regcache. Adjust.
8998 (registers_from_string): Ditto.
8999 (register_data): Ditto.
9000 (supply_register): Ditto.
9001 (supply_register_by_name): Ditto.
9002 (collect_register): Ditto.
9003 (collect_register_as_string): Ditto.
9004 (collect_register_by_name): Ditto.
9005 * server.c (process_serial_event): Adjust.
9006 * linux-low.h (regset_fill_func, regset_store_func): Change
9008 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9010 * linux-low.c (get_stop_pc): Adjust.
9011 (check_removed_breakpoint): Adjust.
9012 (linux_wait_for_event): Adjust.
9013 (linux_resume_one_lwp): Adjust.
9014 (fetch_register): Add regcache parameter. Adjust.
9015 (usr_store_inferior_registers): Ditto.
9016 (regsets_fetch_inferior_registers): Ditto.
9017 (regsets_store_inferior_registers): Ditto.
9018 (linux_fetch_registers, linux_store_registers): Ditto.
9019 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9021 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9023 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9024 prototype to take a regcache.
9025 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9026 * remote-utils.c (convert_ascii_to_int, outreg)
9027 (prepare_resume_reply): Change prototype to take a regcache.
9029 * target.h (struct target_ops) <fetch_registers, store_registers>:
9030 Change prototype to take a regcache.
9031 (fetch_inferior_registers, store_inferior_registers): Change
9032 prototype to take a regcache. Adjust.
9033 * proc-service.c (ps_lgetregs): Adjust.
9034 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9035 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9036 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9037 take a regcache. Adjust.
9038 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9039 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9040 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9041 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9042 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9043 (cris_cannot_fetch_register):
9044 (cris_breakpoint_at): Change prototype to take a regcache.
9046 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9047 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9048 to take a regcache. Adjust.
9049 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9051 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9052 take a regcache. Adjust.
9053 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9054 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9055 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9056 * linux-mips-low.c (mips_get_pc):
9057 (mips_set_pc): Change prototype to take a regcache. Adjust.
9058 (mips_reinsert_addr): Adjust.
9059 (mips_collect_register): Change prototype to take a regcache.
9061 (mips_supply_register):
9062 (mips_collect_register_32bit, mips_supply_register_32bit)
9063 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9064 (mips_store_fpregset): Ditto.
9065 * linux-ppc-low.c (ppc_supply_ptrace_register)
9066 (ppc_supply_ptrace_register): Ditto.
9067 (parse_spufs_run): Adjust.
9068 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9069 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9070 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9071 take a regcache. Adjust.
9072 * linux-s390-low.c (s390_collect_ptrace_register)
9073 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9074 (s390_set_pc): Change prototype to take a regcache. Adjust.
9075 (s390_arch_setup): Adjust.
9076 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9077 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9078 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9079 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9080 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9082 (sparc_breakpoint_at): Adjust.
9083 * linux-xtensa-low.c (xtensa_fill_gregset):
9084 (xtensa_store_gregset):
9085 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9086 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9087 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9088 prototype to take a regcache. Adjust.
9089 * win32-arm-low.c (arm_fetch_inferior_register)
9090 (arm_store_inferior_register): Change prototype to take a
9092 * win32-i386-low.c (i386_fetch_inferior_register)
9093 (i386_store_inferior_register): Change prototype to take a
9095 * win32-low.c (child_fetch_inferior_registers)
9096 (child_store_inferior_registers): Change prototype to take a
9098 (win32_wait): Adjust.
9099 (win32_fetch_inferior_registers): Change prototype to take a
9101 (win32_store_inferior_registers): Adjust.
9102 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9103 store_inferior_register>: Change prototype to take a regcache.
9105 2010-01-20 Doug Evans <dje@google.com>
9107 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9109 (linux_wait_for_event1, linux_init_signals): Ditto.
9110 (W_STOPCODE): Provide definition if missing.
9112 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9114 * linux-low.c (linux_core_of_thread): New.
9115 (compare_ints, show_process, list_threads): New.
9116 (linux_qxfer_osdata): Report threads and cores.
9117 (linux_target_op): Register linux_core_of_thread.
9118 * remote-utils.c (prepare_resume_reply): Report the core.
9119 (buffer_xml_printf): Support %d specifier.
9120 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9122 (handle_query): Handle qXfer:threads. Announce availability
9124 * target.h (struct target_ops): New field core_of_thread.
9126 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9128 * Makefile.in (clean): Remove new generated files.
9129 (reg-s390.o, reg-s390.c): Remove rules.
9130 (reg-s390x.o, reg-s390x.c): Likewise.
9131 (s390-linux32.o, s390-linux32.c): Add rules.
9132 (s390-linux64.o, s390-linux64.c): Likewise.
9133 (s390x-linux64.o, s390x-linux64.c): Likewise.
9134 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9135 * linux-s390-low.c: Include <elf.h>.
9136 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9137 (init_registers_s390): Remove prototype.
9138 (init_registers_s390x): Likewise.
9139 (init_registers_s390_linux32): Add prototype.
9140 (init_registers_s390_linux64): Likewise.
9141 (init_registers_s390x_linux64): Likewise.
9142 (s390_num_regs_3264): New define.
9143 (s390_regmap_3264): New global variable.
9144 (s390_cannot_fetch_register): Remove obsolete check.
9145 (s390_cannot_store_register): Likewise.
9146 (s390_collect_ptrace_register): Handle upper/lower register halves.
9147 (s390_supply_ptrace_register): Likewise.
9148 (s390_fill_gregset): Update to register number changes.
9149 (s390_get_hwcap): New routine.
9150 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9151 Install appropriate regmap and register set.
9153 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9155 * server.c (gdbserver_version): Update copyright year to 2010.
9156 * gdbreplay.c (gdbreplay_version): Likewise.
9158 2009-12-28 Doug Evans <dje@google.com>
9160 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9161 elf/external.h. Include <elf.h> instead but only if necessary.
9163 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9165 * linux-low.c (linux_remove_process): Remove `detaching'
9166 parameter. Don't release/detach from thread_db here.
9167 (linux_kill): Release/detach from thread_db here, ...
9168 (linux_detach): ... and here, before actually detaching.
9169 (linux_wait_1): ... and here, when a process exits.
9170 * thread-db.c (any_thread_of): New.
9171 (thread_db_free): Switch the current inferior to a thread of the
9174 2009-12-21 Doug Evans <dje@google.com>
9176 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9178 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9179 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9180 warning ifndef __NR_tkill. Move setting of errno there too.
9181 Delete unnecessary resetting of errno after syscall.
9182 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9184 * configure.ac: Check for dladdr.
9185 * config.in: Regenerate.
9186 * configure: Regenerate.
9187 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9188 (try_thread_db_load): Update.
9190 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9192 2009-12-18 Doug Evans <dje@google.com>
9194 * event-loop.c: Include unistd.h if it exists.
9196 * linux-low.c (my_waitpid): Move definition away from being in
9197 between linux_tracefork_child/linux_test_for_tracefork.
9199 * gdb_proc_service.h (psaddr_t): Fix type.
9200 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9201 signature to match glibc.
9203 2009-12-16 Doug Evans <dje@google.com>
9205 * linux-low.c (linux_read_memory): Fix argument to read.
9207 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9209 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9210 events, don't leave current_inferior pointing at null.
9212 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9214 * win32-low.c (LOG): Delete.
9215 (OUTMSG): Output to stderr.
9216 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9217 on compile time LOG macro.
9218 (win32_wait): Fix debug output.
9220 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9222 * win32-low.c (win32_add_one_solib): If the dll name is
9223 "ntdll.dll", prepend the system directory to the dll path.
9225 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9227 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9229 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9230 Vladimir Prus <vladimir@codesourcery.com>
9232 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9233 * configure.ac: Check for __mcoldfire__ and set
9234 gdb_cv_m68k_is_coldfire.
9235 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9236 reg-cf.o and reg-m68k.o.
9237 * configure: Regenerated.
9239 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9241 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9242 Pass it to thread_db_free.
9243 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9244 proper `detaching' argument to linux_remove_process.
9245 * linux-low.h (thread_db_free): Add `detaching' parameter.
9246 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9248 (thread_db_free): Add `detaching' parameter. Only
9249 call td_ta_clear_event if detaching from process.
9251 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9253 * thread-db.c (thread_db_free): Fix typo.
9255 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9258 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9260 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9262 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9263 with an i686 compiler.
9264 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9266 * configure: Rebuilt.
9268 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9272 * server.c (handle_search_memory_1): Correct read_addr initialization
9273 in loop for searching subsequent chunks.
9275 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9277 * configure.ac: New --with-libthread-db option.
9278 * thread-db.c: Allow direct dependence on libthread_db.
9279 (thread_db_free): Adjust.
9280 * config.in: Regenerate.
9281 * configure: Likewise.
9283 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9286 * thread-db.c (attach_thread): New function.
9287 (maybe_attach_thread): Return success/failure.
9288 (find_new_threads_callback): Adjust.
9289 (thread_db_find_new_threads): Loop until no new threads.
9291 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9293 * proc-service.c (ps_lgetregs): Formatting.
9295 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9297 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9298 * configure.ac: Adjust.
9299 * linux-low.h (struct process_info_private): Move members to struct
9301 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9302 * linux-low.c (linux_remove_process): Adjust.
9303 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9304 * server.c (handle_query): Move code ...
9305 (handle_monitor_command): ... here. New function.
9306 * target.h (struct target_ops): New member.
9307 * thread-db.c (struct thread_db): New.
9308 (libthread_db_search_path): New variable.
9309 (thread_db_create_event, thread_db_enable_reporting)
9310 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9311 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9312 (try_thread_db_load_1, dladdr_to_soname): New functions.
9313 (try_thread_db_load, thread_db_load_search): New functions.
9314 (thread_db_init): Search for libthread_db.
9315 (thread_db_free): New function.
9316 (thread_db_handle_monitor_command): Likewise.
9317 * config.in: Regenerate.
9318 * configure: Regenerate.
9320 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9322 * spu-low.c (spu_kill): Wait for inferior to terminate.
9323 Call clear_inferiors.
9324 (spu_detach): Call clear_inferiors.
9326 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9328 * aclocal.m4: Regenerate.
9329 * config.in: Likewise.
9330 * configure: Likewise.
9332 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9334 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9335 (parse_spufs_run): New function.
9336 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9337 (ppc_breakpoint_at): Handle SPU breakpoints.
9339 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9341 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9342 (SPUFS_MAGIC): Define.
9343 (spu_enumerate_spu_ids): New function.
9344 (linux_qxfer_spu): New function.
9345 (linux_target_ops): Install linux_qxfer_spu.
9347 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9349 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9350 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9351 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9352 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9353 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9354 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9355 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9356 (init_registers_powerpc_cell32l): Add prototype.
9357 (init_registers_powerpc_cell64l): Likewise.
9358 (ppc_arch_setup): Detect Cell/B.E. architecture.
9360 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9362 * Makefile.in (datarootdir): New variable.
9364 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9366 * linux-low.c (linux_write_memory): Update debugging output.
9367 * Makefile.in (clean): Add new descriptions.
9368 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9369 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9370 * configure.srv: Add new files for arm*-*-linux*.
9371 * linux-arm-low.c: Add new declarations.
9372 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9373 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9374 (HWCAP_VFPv3D16): New.
9375 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9376 instead of __IWMMXT__.
9377 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9378 (arm_arch_setup): New.
9379 (target_regsets): Remove #ifdef. Add VFP regset.
9380 (the_low_target): Use arm_arch_setup.
9382 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9384 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9385 the main thread again.
9387 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9389 Adding Neutrino gdbserver.
9390 * configure: Regenerated.
9391 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9392 * configure.srv (i[34567]86-*-nto*): New target.
9393 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9394 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9395 (nto_comctrl) [__QNX__]: New function.
9396 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9398 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9400 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9403 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9404 Pedro Alves <pedro@codesourcery.com>
9406 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9407 don't support CONTEXT_EXTENDED_REGISTERS.
9408 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9409 (the_low_target): Install them.
9410 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9411 failing with ERROR_PIPE_NOT_CONNECTED.
9413 2009-06-30 Doug Evans <dje@google.com>
9414 Pierre Muller <muller@ics.u-strasbg.fr>
9416 Add h/w watchpoint support to x86-linux, win32-i386.
9417 * Makefile.in (SFILES): Add i386-low.c
9418 (i386_low_h): Define.
9419 (i386-low.o): Add dependencies.
9420 (linux-x86-low.o): Add i386-low.h dependency.
9421 (win32-i386-low.o): Ditto.
9422 * i386-low.c: New file.
9423 * i386-low.h: New file.
9424 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9425 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9426 * linux-low.c (linux_add_process): Initialize arch_private.
9427 (linux_remove_process): Free arch_private.
9428 (add_lwp): Initialize arch_private.
9429 (delete_lwp): Free arch_private.
9430 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9432 * linux-low.h (process_info_private): New member arch_private.
9433 (lwp_info): New member arch_private.
9434 (linux_target_ops): New members new_process, new_thread,
9436 (ptid_of): New macro.
9437 * linux-x86-low.c: Include stddef.h, i386-low.h.
9438 (arch_process_info): New struct.
9439 (arch_lwp_info): New struct.
9440 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9441 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9442 (i386_dr_low_get_status): New function.
9443 (x86_insert_point, x86_remove_point): New functions.
9444 (x86_stopped_by_watchpoint): New function.
9445 (x86_stopped_data_address): New function.
9446 (x86_linux_new_process, x86_linux_new_thread): New functions.
9447 (x86_linux_prepare_to_resume): New function.
9448 (the_low_target): Add entries for insert_point, remove_point,
9449 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9451 * server.c (debug_hw_points): New global.
9452 (monitor_show_help): Document set debug-hw-points.
9453 (handle_query): Process "set debug-hw-points".
9454 * server.h (debug_hw_points): Declare.
9455 (paddress): Declare.
9456 * utils.c (NUMCELLS, CELLSIZE): New macros.
9457 (get_sell, xsnprintf, paddress): New functions.
9458 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9459 remove_point, stopped_by_watchpoint, stopped_data_address.
9460 * win32-i386-low.c: Include i386-low.h.
9461 (debug_reg_state): Replaces dr.
9462 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9463 (i386_dr_low_get_status): New function.
9464 (i386_insert_point, i386_remove_point): New functions.
9465 (i386_stopped_by_watchpoint): New function.
9466 (i386_stopped_data_address): New function.
9467 (i386_initial_stuff): Update.
9468 (get_thread_context,set_thread_context,i386_thread_added): Update.
9469 (the_low_target): Add entries for insert_point,
9470 remove_point, stopped_by_watchpoint, stopped_data_address.
9471 * win32-low.c (win32_insert_watchpoint): New function.
9472 (win32_remove_watchpoint): New function.
9473 (win32_stopped_by_watchpoint): New function.
9474 (win32_stopped_data_address): New function.
9475 (win32_target_ops): Add entries for insert_watchpoint,
9476 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9477 * win32-low.h (win32_target_ops): New members insert_point,
9478 remove_point, stopped_by_watchpoint, stopped_data_address.
9480 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9482 * server.c (process_serial_event): Re-return unsupported, not
9483 error, if the type isn't recognized. Re-allow supporting only
9484 insert or remove packets. Also call require_running for
9485 breakpoints. Add missing break statement to default case. Tidy.
9486 * target.h (struct target_ops): Rename insert_watchpoint to
9487 insert_point, and remove_watchpoint to remove_point.
9489 * linux-low.h (struct linux_target_ops): Likewise.
9490 * linux-low.c (linux_insert_watchpoint): Rename to ...
9491 (linux_insert_point): ... this. Adjust.
9492 (linux_remove_watchpoint): Rename to ...
9493 (linux_remove_point): ... this. Adjust.
9494 (linux_target_ops): Adjust.
9495 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9496 (cris_insert_point): ... this.
9497 (cris_remove_watchpoint): Rename to ...
9498 (cris_remove_point): ... this.
9499 (the_low_target): Adjust.
9501 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9503 * server.c (handle_v_kill): Pass signal_pid to
9504 kill_inferior if multi_process is zero.
9506 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9508 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9509 * target.h (target_ops): Comment for *_watchpoint to make it clear
9510 the functions can get types '0' and '1'.
9512 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9514 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9515 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9516 * regcache.c (get_regcache): Likewise.
9517 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9518 * win32-low.c (child_fetch_inferior_registers): Remove check for
9521 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9522 Pedro Alves <pedro@codesourcery.com>
9524 * target.h (struct target_ops) <supports_multi_process>: New
9526 (target_supports_multi_process): New.
9527 * server.c (handle_query): Even if GDB reports support, only
9528 enable multi-process if the target also supports it. Report
9529 multi-process support only if the target backend supports it.
9530 * linux-low.c (linux_supports_multi_process): New function.
9531 (linux_target_ops): Install it as target_supports_multi_process
9534 2009-05-24 Doug Evans <dje@google.com>
9536 Global renaming of find_thread_pid to find_thread_ptid.
9537 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9538 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9539 All callers updated.
9541 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9542 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9545 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9546 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9547 (linux_resume_one_lwp): Ditto.
9549 2009-05-23 Doug Evans <dje@google.com>
9551 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9552 from struct inferior_list_entry * to struct lwp_info *.
9553 All callers updated.
9555 2009-05-13 Doug Evans <dje@google.com>
9557 * linux-x86-low.c: Don't include assert.h.
9558 (x86_siginfo_fixup): Use fatal, not assert.
9559 (x86_arch_setup): Fix comment.
9561 2009-05-12 Doug Evans <dje@google.com>
9563 Biarch support for i386/amd64 gdbserver.
9564 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9565 Add linux-x86-low.c.
9566 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9567 (linux-x86-low.o): Add.
9568 * linux-x86-64-low.c: Delete.
9569 * linux-i386-low.c: Delete.
9570 * linux-x86-low.c: New file.
9571 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9573 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9575 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9576 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9577 (linux_child_pid_to_exec_file): New function.
9578 (elf_64_header_p, elf_64_file_p): New functions.
9579 (siginfo_fixup): New function.
9580 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9581 give target a chance to convert layout.
9582 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9583 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9585 2009-05-07 Doug Evans <dje@google.com>
9587 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9588 (regsets_store_inferior_registers): Ditto.
9590 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9594 * linux-low.c (must_set_ptrace_flags): Delete.
9595 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9597 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9598 `lwp->must_set_ptrace_flags' instead.
9599 (linux_wait_for_event_1): Set ptrace options here.
9600 (linux_wait_1): ... not here.
9602 2009-04-30 Doug Evans <dje@google.com>
9604 * inferiors.c (started_inferior_callback): New function.
9605 (attached_inferior_callback): New function.
9606 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9607 * server.c (print_started_pid, print_attached_pid): New functions.
9608 (detach_or_kill_for_exit): New function.
9609 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9610 * server.h (have_started_inferiors_p): Declare.
9611 (have_attached_inferiors_p): Declare.
9613 * inferiors.c (remove_process): Fix memory leak, free process.
9614 * linux-low.c (linux_remove_process): New function.
9615 (linux_kill): Call it instead of remove_process.
9616 (linux_detach, linux_wait_1): Ditto.
9618 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9620 * configure.srv: Add x86 Windows CE target.
9622 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9624 * inferiors.c (get_thread_process): Make global.
9625 * server.h (get_thread_process): Add prototype.
9626 * thread-db.c (find_one_thread): Use get_thread_process
9627 instead of current_process.
9628 (thread_db_get_tls_address): Do not crash if called when
9629 thread layer is not yet initialized.
9631 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9633 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9634 * spu-low.c (current_tid): Rename to ...
9635 (current_ptid): ... this.
9636 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9637 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9638 ptid_get_lwp (current_ptid) instead of current_tid.
9639 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9640 instead of current_tid. Use find_process_pid to verify pid
9641 argument is valid. Pass proper argument to remove_process.
9642 (spu_thread_alive): Compare current_ptid instead of current_tid.
9643 (spu_resume): Likewise.
9645 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9647 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9650 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9652 Implement the multiprocess extensions, and add linux multiprocess
9655 * server.h (ULONGEST): Declare.
9656 (struct ptid, ptid_t): New.
9657 (minus_one_ptid, null_ptid): Declare.
9658 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9659 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9660 (struct inferior_list_entry): Change `id' type from unsigned from
9662 (struct sym_cache, struct breakpoint, struct
9663 process_info_private): Forward declare.
9664 (struct process_info): Declare.
9665 (current_process): Declare.
9666 (all_processes): Declare.
9667 (initialize_inferiors): Declare.
9668 (add_thread): Adjust to use ptid_t.
9669 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9670 (add_process, remove_process, find_thread_pid): Declare.
9671 (find_inferior_id): Adjust to use ptid_t.
9672 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9673 (multi_process): Declare.
9674 (push_event): Adjust to use ptid_t.
9675 (read_ptid, write_ptid): Declare.
9676 (prepare_resume_reply): Adjust to use ptid_t.
9677 (clear_symbol_cache): Declare.
9678 * inferiors.c (all_processes): New.
9679 (null_ptid, minus_one_ptid): New.
9680 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9681 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9682 (add_thread): Change unsigned long to ptid. Remove gdb_id
9684 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9685 (gdb_id_to_thread): Rename to ...
9686 (find_thread_pid): ... this. Change unsigned long to ptid.
9687 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9688 (loaded_dll, pull_pid_from_list): Adjust.
9689 (add_process, remove_process, find_process_pid)
9690 (get_thread_process, current_process, initialize_inferiors): New.
9691 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9692 (struct target_waitstatus) <related_pid>: Ditto.
9693 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9695 (struct target_ops) <join>: Add `pid' argument.
9696 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9697 (struct target_ops) <wait>: Add `ptid' field. Change return type
9699 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9700 (mywait): Add `ptid' argument. Change return type to ptid_t.
9701 (target_pid_to_str): Declare.
9702 * target.c (set_desired_inferior): Adjust to use ptids.
9703 (mywait): Add new `ptid' argument. Adjust.
9704 (target_pid_to_str): New.
9705 * mem-break.h (free_all_breakpoints): Declare.
9706 * mem-break.c (breakpoints): Delelete.
9707 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9708 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9709 to use per-process breakpoint list.
9710 (free_all_breakpoints): New.
9711 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9712 (symbol_cache, all_symbols_looked_up): Delete.
9714 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9716 (prepare_resume_reply): Change ptid argument's type from unsigned
9717 long to ptid_t. Adjust. Implement W;process and X;process.
9718 (free_sym_cache, clear_symbol_cache): New.
9719 (look_up_one_symbol): Adjust to per-process symbol cache. *
9720 * server.c (cont_thread, general_thread, step_thread): Change type
9723 (multi_process): New.
9724 (last_ptid): Change type to ptid_t.
9725 (struct vstop_notif) <ptid>: Change type to ptid_t.
9726 (queue_stop_reply, push_event): Change `ptid' argument's type to
9728 (discard_queued_stop_replies): Add `pid' argument.
9729 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9730 changes. Don't reference the `attached' global.
9731 (attach_inferior): Adjust to mywait interface changes.
9732 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9733 features. Handle and report "multiprocess+". Handle
9735 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9737 (handle_v_kill): New.
9738 (handle_v_stopped): Adjust to use target_pid_to_str.
9739 (handle_v_requests): Allow multiple attaches and runs when
9740 multiprocess extensions are in effect. Handle "vKill".
9741 (myresume): Adjust to use ptids.
9742 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9743 (handle_status): Adjust to discard_queued_stop_replies interface
9745 (first_thread_of, kill_inferior_callback)
9746 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9747 (main): Call initialize_inferiors. Adjust to use ptids, killing
9748 and detaching from all inferiors. Handle multiprocess packet
9750 * linux-low.h: Include gdb_proc_service.h.
9751 (struct process_info_private): New.
9752 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9753 <lwpid_of>: Use ptid_get_lwp.
9754 (get_lwp_thread): Adjust.
9755 (struct lwp_info): Add `dead' member.
9756 (find_lwp_pid): Declare.
9757 * linux-low.c (thread_db_active): Delete.
9758 (new_inferior): Adjust comment.
9759 (inferior_pid): Delete.
9760 (linux_add_process): New.
9761 (handle_extended_wait): Adjust.
9762 (add_lwp): Change unsigned long to ptid.
9763 (linux_create_inferior): Add process to processes table. Adjust
9764 to use ptids. Don't set new_inferior here.
9765 (linux_attach_lwp): Rename to ...
9766 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9767 it. Adjust to use ptids.
9768 (linux_attach_lwp): New.
9769 (linux_attach): Add process to processes table. Don't set
9771 (struct counter): New.
9772 (second_thread_of_pid_p, last_thread_of_process_p): New.
9773 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9775 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9776 processes. Remove process from process table.
9777 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9778 to multiple processes.
9779 (any_thread_of): New.
9780 (linux_detach): Add `pid' argument, and handle it. Remove process
9781 from processes table.
9782 (linux_join): Add `pid' argument. Handle it.
9783 (linux_thread_alive): Change unsighed long argument to ptid_t.
9784 Consider dead lwps as not being alive.
9785 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9786 threads we're not interested in.
9787 (same_lwp, find_lwp_pid): New.
9788 (linux_wait_for_lwp): Change `pid' argument's type from int to
9790 (linux_wait_for_event): Rename to ...
9791 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9792 from int to ptid_t. Adjust.
9793 (linux_wait_for_event): New.
9794 (linux_wait_1): Add `ptid' argument. Change return type to
9795 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9796 that exit from the process table.
9797 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9799 (mark_lwp_dead): New.
9800 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9801 stopping all threads, mark its main lwp as dead.
9802 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9804 (fetch_register, usr_store_inferior_registers)
9805 (regsets_fetch_inferior_registers)
9806 (regsets_store_inferior_registers, linux_read_memory)
9807 (linux_write_memory): Inline `inferior_pid'.
9808 (linux_look_up_symbols): Adjust to use per-process
9810 (linux_request_interrupt): Adjust to use ptids.
9811 (linux_read_auxv): Inline `inferior_pid'.
9812 (initialize_low): Don't reference thread_db_active.
9813 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9814 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9815 (ps_getpid): Return the pid of the current inferior.
9816 * thread-db.c (proc_handle, thread_agent): Delete.
9817 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9819 (find_one_thread): Change argument type to ptid_t. Adjust to
9821 (maybe_attach_thread): Adjust to per-process data and ptids.
9822 (thread_db_find_new_threads): Ditto.
9823 (thread_db_init): Ditto.
9824 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9825 processes table. Adjust to use ptids.
9826 (spu_kill, spu_detach): Adjust interface. Remove process from
9828 (spu_join, spu_thread_alive): Adjust interface.
9829 (spu_wait): Adjust interface. Remove process from processes
9830 table. Adjust to use ptids.
9831 * win32-low.c (current_inferior_tid): Delete.
9832 (current_inferior_ptid): New.
9833 (debug_event_ptid): New.
9834 (thread_rec): Take a ptid. Adjust.
9835 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9836 (child_delete_thread): Ditto.
9837 (do_initial_child_stuff): Add `attached' argument. Add process to
9839 (child_fetch_inferior_registers, child_store_inferior_registers):
9841 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9842 (win32_attach): Pass 1 to do_initial_child_stuff.
9843 (win32_kill): Adjust interface. Remove process from processes
9845 (win32_detach): Ditto.
9846 (win32_join): Adjust interface.
9847 (win32_thread_alive): Take a ptid.
9848 (win32_resume): Adjust to use ptids.
9849 (get_child_debug_event): Ditto.
9850 (win32_wait): Adjust interface. Remove exiting process from
9853 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9855 Non-stop mode support.
9857 * server.h (non_stop): Declare.
9858 (gdb_client_data, handler_func): Declare.
9859 (delete_file_handler, add_file_handler, start_event_loop):
9861 (handle_serial_event, handle_target_event, push_event)
9862 (putpkt_notif): Declare.
9863 * target.h (enum resume_kind): New.
9864 (struct thread_resume): Replace `step' field by `kind' field.
9865 (TARGET_WNOHANG): Define.
9866 (struct target_ops) <wait>: Add `options' argument.
9867 <supports_non_stop, async, start_non_stop>: New fields.
9868 (target_supports_non_stop, target_async): New.
9869 (start_non_stop): Declare.
9870 (mywait): Add `options' argument.
9871 * target.c (mywait): Add `options' argument. Print child exit
9873 (start_non_stop): New.
9874 * server.c (non_stop, own_buf, mem_buf): New globals.
9875 (struct vstop_notif): New.
9876 (notif_queue): New global.
9877 (queue_stop_reply, push_event, discard_queued_stop_replies)
9878 (send_next_stop_reply): New.
9879 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9881 (attach_inferior): In non-stop mode, don't wait for the target
9883 (handle_general_set): Handle QNonStop.
9884 (handle_query): When handling qC, return the current general
9885 thread, instead of the first thread of the list.
9886 (handle_query): If the backend supports non-stop mode, include
9887 QNonStop+ in the qSupported query response.
9888 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9890 (handle_v_attach, handle_v_run): Handle non-stop mode.
9891 (handle_v_stopped): New.
9892 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9893 (myresume): Adjust to use resume_kind. Handle non-stop.
9894 (queue_stop_reply_callback): New.
9895 (handle_status): Handle non-stop mode.
9896 (main): Clear non_stop flag on reconnection. Use the event-loop.
9897 Refactor serial protocol handling from here ...
9898 (process_serial_event): ... to this new function. When GDB
9899 selects any thread, select one here. In non-stop mode, wait until
9900 GDB acks all pending events before exiting.
9901 (handle_serial_event, handle_target_event): New.
9902 * remote-utils.c (remote_open): Install remote_desc in the event
9904 (remote_close): Remove remote_desc from the event loop.
9905 (putpkt_binary): Rename to...
9906 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9907 (putpkt_binary): New as wrapper around putpkt_binary_1.
9908 (putpkt_notif): New.
9909 (prepare_resume_reply): In non-stop mode, don't change the
9911 * event-loop.c: New.
9912 * Makefile.in (OBJ): Add event-loop.o.
9913 (event-loop.o): New rule.
9915 * linux-low.h (pid_of): Moved here.
9917 (get_lwp_thread): Use lwpid_of.
9918 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9919 * linux-low.c (pid_of): Delete.
9920 (inferior_pid): Use lwpid_of.
9921 (linux_event_pipe): New.
9922 (target_is_async_p): New.
9924 (handle_extended_wait): Use lwpid_of.
9925 (add_lwp): Don't set lwpid field.
9926 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9927 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9928 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9929 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9930 first. Adjust to linux_wait_for_event interface changes. Use
9932 (linux_detach): Don't delete the main lwp here.
9933 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9934 (status_pending_p): Don't consider explicitly suspended lwps.
9935 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9936 pointer. Add OPTIONS argument. Change return type to int. Use
9937 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9938 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9939 pointer. Add status pointer argument. Return a pid instead of a
9940 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9941 changes. In non-stop mode, don't switch to a random thread.
9942 (linux_wait): Rename to...
9943 (linux_wait_1): ... this. Add target_options argument, and handle
9944 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9945 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9946 clean exit and signal exit code. Don't stop all threads in
9947 non-stop mode. In all-stop mode, only stop all threads when
9948 reporting a stop to GDB. Handle explicit thread stop requests.
9949 (async_file_flush, async_file_mark): New.
9951 (send_sigstop): Use lwpid_of.
9952 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9953 interface changes. In non-stop mode, don't switch to a random
9955 (linux_resume_one_lwp): Use lwpid_of.
9956 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9957 (linux_resume_one_thread): ... this. Handle resume_stop. In
9958 non-stop mode, don't look for pending flag in all threads.
9959 (resume_status_pending_p): Don't consider explicitly suspended
9961 (my_waitpid): Reimplement. Emulate __WALL.
9962 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9964 (sigchld_handler, linux_supports_non_stop, linux_async)
9965 (linux_start_non_stop): New.
9966 (linux_target_ops): Register linux_supports_non_stop, linux_async
9967 and linux_start_non_stop.
9968 (initialize_low): Install SIGCHLD handler.
9969 * thread-db.c (thread_db_create_event, find_one_thread)
9970 (thread_db_get_tls_address): Use lwpid_of.
9971 * win32-low.c (win32_detach): Adjust to use resume_kind.
9972 (win32_wait): Add `options' argument.
9973 * spu-low.c (spu_resume): Adjust to use resume_kind.
9974 (spu_wait): Add `options' argument.
9976 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9978 Decouple target code from remote protocol.
9980 * target.h (enum target_waitkind): New.
9981 (struct target_waitstatus): New.
9982 (struct target_ops) <wait>: Return an unsigned long. Take a
9983 target_waitstatus pointer instead of a char pointer.
9985 * target.c (mywait): Change prototype to return an unsigned long.
9986 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9987 * server.h (thread_from_wait, old_thread_from_wait): Delete
9989 (prepare_resume_reply): Change prototype to take a
9991 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9992 (last_status, last_ptid): New.
9993 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9994 pid instead of a signal.
9995 (attach_inferior): Remove "status" and "signal" parameters.
9997 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9999 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10000 (handle_v_requests, myresume): Remove "status" and "signal"
10001 parameters. Adjust.
10002 (handle_status): New.
10003 (main): Delete local `status'. Adjust.
10004 * remote-utils.c: Include target.h.
10005 (prepare_resume_reply): Change prototype to take a
10006 target_waitstatus. Adjust.
10008 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10010 * spu-low.c (spu_wait): Adjust.
10011 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10013 (win32_wait): Adjust.
10015 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10017 * target.h (struct thread_resume): Delete leave_stopped member.
10018 (struct target_ops): Add a `n' argument to the `resume' callback.
10019 * server.c (start_inferior): Adjust.
10020 (handle_v_cont, myresume): Adjust.
10021 * linux-low.c (check_removed_breakpoint): Adjust to resume
10022 interface change, and to removed leave_stopped field.
10023 (resume_ptr): Delete.
10024 (struct thread_resume_array): New.
10025 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10026 resume interface change.
10027 (linux_continue_one_thread, linux_queue_one_thread)
10028 (resume_status_pending_p): Check if the resume field is NULL
10029 instead of checking the leave_stopped member.
10030 (linux_resume): Adjust to the target resume interface change.
10031 * spu-low.c (spu_resume): Adjust to the target resume interface
10033 * win32-low.c (win32_detach, win32_resume): Ditto.
10035 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10037 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10039 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10041 (linux_continue_one_thread): Only preserve the stepping flag if
10042 there's a pending breakpoint.
10044 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10046 * server.c (main): After the inferior having exited, call
10047 remote_close before exiting gdbserver.
10049 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10051 Fix size of FPSCR in Power 7 processors.
10052 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10053 (PPC_FEATURE_HAS_DFP): New #define.
10054 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10057 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10059 * server.c (handle_query) Whitespace and formatting.
10061 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10063 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10064 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10065 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10066 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10067 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10068 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10069 Makefile.in, configure.ac: Fix whitespace throughout.
10070 * configure: Regenerate.
10072 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10074 * inferiors.c (find_inferior): Make it safe for the callback
10075 function to delete the currently iterated inferior.
10077 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10079 * Makefile.in (linuw_low_h): Move higher.
10080 (thread-db.o): Depend on $(linux_low_h).
10082 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10084 Rename "process" to "lwp" throughout.
10086 * linux-low.c (all_processes): Rename to...
10087 (all_lwps): ... this.
10088 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10089 (add_process): Rename to ...
10090 (add_lwp): ... this. Adjust.
10091 (linux_create_inferior): Adjust.
10092 (linux_attach_lwp): Adjust.
10093 (linux_attach): Adjust.
10094 (linux_kill_one_process): Rename to ...
10095 (linux_kill_one_lwp): ... this. Adjust.
10096 (linux_kill): Adjust.
10097 (linux_detach_one_process): Rename to ...
10098 (linux_detach_one_lwp): ... this. Adjust.
10099 (linux_detach): Adjust.
10100 (check_removed_breakpoint): Adjust.
10101 (status_pending_p): Adjust.
10102 (linux_wait_for_process): Rename to ...
10103 (linux_wait_for_lwp): ... this. Adjust.
10104 (linux_wait_for_event): Adjust.
10105 (send_sigstop): Adjust.
10106 (wait_for_sigstop): Adjust.
10107 (stop_all_processes): Rename to ...
10108 (stop_all_lwps): ... this.
10109 (linux_resume_one_process): Rename to ...
10110 (linux_resume_one_lwp): ... this. Adjust.
10111 (linux_set_resume_request, linux_continue_one_thread)
10112 (linux_queue_one_thread, resume_status_pending_p)
10113 (usr_store_inferior_registers, regsets_store_inferior_registers)
10114 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10116 * linux-low.h (get_process): Rename to ...
10117 (get_lwp): ... this. Adjust.
10118 (get_thread_process): Rename to ...
10119 (get_thread_lwp): ... this. Adjust.
10120 (get_process_thread): Rename to ...
10121 (get_lwp_thread): ... this. Adjust.
10122 (struct process_info): Rename to ...
10123 (struct lwp_info): ... this.
10124 (all_processes): Rename to ...
10125 (all_lwps): ... this.
10126 * proc-service.c (ps_lgetregs): Adjust.
10127 * thread-db.c (thread_db_create_event, find_one_thread)
10128 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10130 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10132 * server.c (handle_query): Handle "qAttached".
10134 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10136 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10137 GPLv3, update license URL.
10139 2009-03-01 Doug Evans <dje@google.com>
10141 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10142 (server_h): Add gdb_signals.h.
10143 (signals.o): Update.
10144 * server.h (target_signal_from_host,target_signal_to_host_p)
10145 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10147 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10149 * remote-utils.c (getpkt): Also generate remote-debug
10150 information if noack_mode is set.
10152 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10154 * server.c (handle_query): Report qXfer:siginfo:read and
10155 qXfer:siginfo:write as supported and handle them.
10156 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10157 * linux-low.c (linux_xfer_siginfo): New.
10158 (linux_target_ops): Set it.
10160 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10162 * server.c (gdbserver_usage): Mention --remote-debug.
10163 (main): Accept '--remote-debug' switch.
10165 2009-01-18 Doug Evans <dje@google.com>
10167 * regcache.c (new_register_cache): No need to check result of xcalloc.
10168 * server.c (handle_search_memory): Back out calls to xmalloc,
10169 result is checked and error is returned to user upon failure.
10170 (handle_query): Ditto. Add more checks for result of malloc.
10171 (handle_v_cont): Check result of malloc, report error back to
10173 (handle_v_run): Ditto. Call freeargv.
10174 * server.h (freeargv): Declare.
10175 * utils.c (freeargv): New fn.
10177 2009-01-15 Doug Evans <dje@google.com>
10179 * gdbreplay.c (perror_with_name): Make arg const char *.
10180 * server.h (target_signal_to_name): Make return type const char *.
10181 * thread-db.c (thread_db_err_str): Make return type const char *.
10182 * utils.c (perror_with_name): Make arg const char *.
10184 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10186 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10187 when handling a EXIT_PROCESS_DEBUG_EVENT.
10189 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10191 * gdbreplay.c (gdbreplay_version): Update copyright year.
10192 * server.c (gdbserver_version): Likewise.
10194 2009-01-05 Doug Evans <dje@google.com>
10196 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10197 (handle_extended_wait): Improve comment.
10199 2008-12-13 Doug Evans <dje@google.com>
10201 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10202 * server.h (ATTR_MALLOC): New macro.
10203 (xmalloc,xcalloc,xstrdup): Declare.
10204 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10205 * inferiors.c: Ditto.
10206 * linux-low.c: Ditto.
10207 * mem-break.c: Ditto.
10208 * regcache.c: Ditto.
10209 * remote-utils.c: Ditto.
10212 * win32-low.c: Ditto.
10214 2008-12-12 Doug Evans <dje@google.com>
10216 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10217 in debugging printf.
10219 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10221 2008-12-09 Doug Evans <dje@google.com>
10223 * linux-low.h (struct process_info): Delete member tid, unused.
10224 * thread-db.c (find_one_thread): Update.
10225 (maybe_attach_thread): Update.
10227 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10229 * target.h (struct target_ops): Add qxfer_osdata member.
10230 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10232 (linux_qxfer_osdata): New functions.
10233 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10235 * server.c (handle_query): Handle "qXfer:osdata:read:".
10236 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10237 (buffer_xml_printf): New functions.
10238 * server.h (struct buffer): New.
10239 (buffer_grow_str, buffer_grow_str0): New macros.
10240 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10241 (buffer_xml_printf): Declare.
10243 2008-11-24 Doug Evans <dje@google.com>
10245 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10247 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10249 * server.c (handle_v_run): Always use the supplied argument list.
10251 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10253 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10254 (xtensa_regmap_table): Add entry for scompare1.
10256 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10258 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10259 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10260 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10261 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10262 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10263 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10264 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10265 XML target descriptions.
10266 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10267 when inferior is running on an ISA 2.05 or later processor. Add
10268 special case to return offset for full 64-bit slot of FPSCR when
10271 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10273 * Makefile.in (SFILES, clean): Added sparc64 files.
10274 (reg-sparc64.o, reg-sparc64.c): New.
10275 * configure.srv (sparc*-*-linux*): New configuration.
10276 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10277 syscall arguments for SPARC.
10278 (regsets_store_inferior_registers): Likewise.
10279 * linux-sparc-low.c: New file.
10281 2008-10-21 Doug Evans <dje@google.com>
10283 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10284 (READLINE_DIR,READLINE_DEP): Delete.
10285 (INTERNAL_CFLAGS): Update.
10286 (LINTFLAGS): Update.
10288 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10290 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10291 whole argv from the last run, not just argv[0].
10293 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10295 * regcache.c (new_register_cache): Return NULL if the register
10296 cache size isn't known yet.
10297 (free_register_cache): Avoid dereferencing a NULL regcache.
10299 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10301 * configure.srv: Merge MIPS and MIPS64.
10303 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10305 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10307 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10309 * Makefile.in: Add required vsx dependencies.
10311 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10312 Declare init_registers_powerpc_vsx32l.
10313 Declare init_registers_powerpc_vsx64l.
10314 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10315 (ppc_arch_setup): Check for VSX in hwcap.
10316 (ppc_fill_vsxregset): New function.
10317 (ppc_store_vsxregset): New function.
10318 Add new VSX entry in regset_info target_regsets.
10320 * configure.srv: Add new VSX dependencies.
10322 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10324 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10325 (remote_open): Set or clear transport_is_reliable.
10326 (putpkt_binary): Don't expect acks in noack mode.
10327 (getpkt): Don't send ack/nac in noack mode.
10328 * server.c (handle_general_set): Handle QStartNoAckMode.
10329 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10331 (main): Reset noack_mode on every connection.
10332 * server.h (noack_mode): Declare.
10334 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10336 * Makefile.in (GDBREPLAY_OBS): New variable.
10337 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10339 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10340 Daniel Jacobowitz <dan@codesourcery.com>
10342 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10343 (usr_store_inferior_registers): Likewise.
10344 (regsets_store_inferior_registers): Likewise.
10346 2008-07-31 Rolf Jansen <rj@surtec.com>
10347 Pedro Alves <pedro@codesourcery.com>
10349 * configure.ac: Check for memmem declaration.
10350 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10351 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10352 (disable_packet_qfThreadInfo): Unconditionally compile.
10353 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10354 * configure, config.in: Regenerate.
10356 2008-07-28 Doug Kwan <dougkwan@google.com>
10358 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10359 (linux_write_memory): Remove declaration of errno.
10361 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10363 * linux-low.c (handle_extended_wait): Do not use "status"
10364 variable uninitialized.
10366 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10368 * server.c (handle_v_attach): Inhibit reporting dll changes.
10370 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10372 * remote-utils.c (prepare_resume_reply): If requested, don't
10373 output "thread:TID" in the T stop reply.
10375 * server.c (disable_packet_vCont, disable_packet_Tthread)
10376 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10377 (handle_query): If requested, disable support for qC, qfThreadInfo
10379 (handle_v_requests): If requested, disable support for vCont.
10380 (gdbserver_show_disableable): New.
10381 (main): Handle --disable-packet and --disable-packet=LIST.
10383 * server.h (disable_packet_vCont, disable_packet_Tthread)
10384 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10386 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10388 * server.c (gdbserver_usage): Mention --version.
10390 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10392 * Makefile.in (gdbreplay.o): New rule.
10394 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10396 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10397 message, not gdbserver.
10399 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10400 Nathan Sidwell <nathan@codesourcery.com>
10401 Joseph Myers <joseph@codesourcery.com>
10403 * acinclude.m4: Include ../../config/acx.m4.
10404 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10405 * configure, config.in: Regenerate.
10406 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10407 * server.c (gdbserver_version): Print PKGVERSION.
10408 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10409 (main): Adjust gdbserver_usage calls.
10410 * gdbreplay.c (version, host_name): Add declarations.
10411 (gdbreplay_version, gdbreplay_usage): New.
10412 (main): Accept --version and --help options.
10414 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10416 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10417 (arm_breakpoint_at): Handle Thumb.
10418 (the_low_target): Add comment.
10420 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10422 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10424 2008-05-09 Doug Evans <dje@google.com>
10426 * server.h (decode_search_memory_packet): Declare.
10427 * remote-utils.c (decode_search_memory_packet): New fn.
10428 * server.c (handle_search_memory_1): New fn.
10429 (handle_search_memory): New fn.
10430 (handle_query): Process qSearch:memory packets.
10432 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10434 * regcache.c (registers_length): Remove.
10435 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10436 full register packet.
10437 * regcache.h (registers_length): Remove prototype.
10438 * server.h (PBUFSIZ): Define to 16384.
10440 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10442 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10443 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10444 powerpc-64l.o, and powerpc-altivec64l.o.
10445 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10446 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10447 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10448 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10449 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10452 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10453 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10454 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10455 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10456 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10457 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10458 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10459 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10460 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10461 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10464 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10465 (init_registers_powerpc_32l): ... this new prototype.
10466 (init_registers_powerpc_32): Remove, replace by ...
10467 (init_registers_powerpc_altivec32l): ... this new prototype.
10468 (init_registers_powerpc_e500): Remove, replace by ...
10469 (init_registers_powerpc_e500l): ... this new prototype.
10470 (init_registers_ppc64): Remove, replace by ...
10471 (init_registers_powerpc_64l): ... this new prototype.
10472 (init_registers_powerpc_64): Remove, replace by ...
10473 (init_registers_powerpc_altivec64l): ... this new prototype.
10474 (ppc_num_regs): Set to 73.
10475 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10476 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10477 (ppc_cannot_store_register): Handle orig_r3 and trap.
10478 (ppc_arch_setup): Update init_registers_... calls.
10479 (ppc_fill_gregset): Handle orig_r3 and trap.
10481 * inferiors.c (clear_inferiors): Reset current_inferior.
10483 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10485 * acinclude.m4: Add override.m4.
10486 * configure: Regenerate.
10488 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10490 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10491 initial call to init_register_ppc64.
10493 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10495 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10496 single powerpc*-*-linux* case.
10497 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10499 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10501 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10502 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10504 * linux-ppc-low.c: Include <elf.h>.
10505 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10506 (ppc_hwcap): New global variable.
10507 (ppc_regmap): Remove __SPE__ #ifdef sections.
10508 (ppc_regmap_e500): New global variable.
10509 (ppc_cannot_store_register): Update __SPE__ special case.
10510 (ppc_get_hwcap): New function.
10511 (ppc_arch_setup): Use it to determine whether inferior supports
10512 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10513 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10514 Do not access registers if target does not support AltiVec.
10515 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10516 Do not access registers if target does not support SPE.
10517 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10519 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10521 * linux-low.c (disabled_regsets, num_regsets): New.
10522 (use_regsets_p): Delete.
10523 (linux_wait_for_process): Clear disabled_regsets.
10524 (regsets_fetch_inferior_registers): Check and set it.
10525 (regsets_store_inferior_registers): Likewise.
10526 (linux_fetch_registers, linux_store_registers): Do not use
10528 (initialize_low): Allocate disabled_regsets.
10530 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10532 * Makefile.in (LIBOBJS): New.
10533 (OBS): Use LIBOBJS.
10534 (memmem.o): New rule.
10535 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10536 * configure: Regenerated.
10538 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10540 * server.c (handle_query): Never return "unsupported" for
10541 qXfer:features:read queries.
10543 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10545 * server.c (get_features_xml): Fix inverted condition.
10546 (handle_query): Always support qXfer:feature:read.
10548 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10550 * server.c (wrapper_argv): New.
10551 (start_inferior): Handle wrapper_argv. If set, expect an extra
10553 (gdbserver_usage): Document --wrapper.
10554 (main): Parse --wrapper.
10556 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10558 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10559 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10560 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10561 (ppc_set_pc): Likewise.
10562 (ppc_arch_setup): New function.
10563 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10564 of collect_register.
10565 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10567 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10569 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10570 instead of linux-ppc64-low.o.
10571 * linux-ppc64-low.c: Remove file.
10572 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10573 (linux-ppc64-low.o): Remove rule.
10575 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10576 (init_registers_powerpc_64): Likewise.
10577 (ppc_regmap): Conditionally define depending on __powerpc64__.
10578 (ppc_cannot_store_register): Do not special-case "fpscr" when
10579 compiled on __powerpc64__.
10580 (ppc_collect_ptrace_register): New function.
10581 (ppc_supply_ptrace_register): New function.
10582 (ppc_breakpoint): Change type to "unsigned int".
10583 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10584 (the_low_target): Conditionally provide initializers for the
10585 arch_setup member depending on __powerpc64__. Install
10586 collect_ptrace_register and supply_ptrace_register members.
10588 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10590 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10591 * server.c (gdbserver_xmltarget): Define.
10592 (get_features_xml): Use it to replace "target.xml" and arch_string.
10594 * configure.srv: Remove srv_xmltarget. Add XML files that were
10595 mentioned there to srv_xmlfiles instead. Remove conditional tests
10596 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10597 srv_xmlfiles and srv_regobj to include all possible choices.
10598 * configure.ac (srv_xmltarget): Remove.
10599 (srv_xmlfiles): Do not add "target.xml".
10600 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10601 checks for supplementary target information.
10602 * configure: Regenerate.
10603 * Makefile.in (XML_TARGET): Remove.
10604 (target.xml): Remove rule.
10605 (clean): Do not clean up target.xml.
10606 (.PRECIOUS): Do not mention target.xml.
10608 * target.h (struct target_ops): Remove arch_string member.
10609 * linux-low.c (linux_arch_string): Remove.
10610 (linux_target_ops): Remove arch_string initializer.
10611 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10612 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10613 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10614 * spu-low.c (spu_arch_string): Remove.
10615 (spu_target_ops): Remove arch_string initializer.
10616 * win32-low.c (win32_arch_string): Remove.
10617 (win32_target_ops): Remove arch_string initializer.
10618 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10619 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10620 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10622 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10624 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10625 by collect_ptrace_register and supply_ptrace_register hooks.
10626 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10627 instead of checking for the_low_target.left_pad_xfer.
10628 (usr_store_inferior_registers): Use collect_ptrace_register callback
10629 instead of checking for the_low_target.left_pad_xfer.
10631 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10632 (s390_supply_ptrace_register): Likewise.
10633 (s390_fill_gregset): Call s390_collect_ptrace_register.
10634 (the_low_target): Update.
10636 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10637 (ppc_supply_ptrace_register): Likewise.
10638 (the_low_target): Update.
10640 * linux-i386-low.c (the_low_target): Update.
10641 * linux-x86-64-low.c (the_low_target): Update.
10643 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10645 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10646 reg-s390.o and reg-s390x.o.
10648 * linux-low.c (new_inferior): New global variable.
10649 (linux_create_inferior, linux_attach): Set it.
10650 (linux_wait_for_process): Call the_low_target.arch_setup after the
10651 target has stopped for the first time.
10652 (initialize_low): Do not call the_low_target.arch_setup.
10654 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10655 (s390_set_pc): Likewise.
10656 (s390_arch_setup): New function.
10657 (the_low_target): Use s390_arch_setup as arch_setup routine.
10659 * regcache.c (realloc_register_cache): New function.
10660 (set_register_cache): Call it for each existing regcache.
10662 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10664 * server.h (init_registers): Remove prototype.
10666 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10667 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10668 instead of init_registers ().
10669 * linux-arm-low.c (init_registers_arm): Add prototype.
10670 (init_registers_arm_with_iwmmxt): Likewise.
10671 (the_low_target): Add initializer for arch_setup field.
10672 * linux-cris-low.c (init_registers_cris): Add prototype.
10673 (the_low_target): Add initializer for arch_setup field.
10674 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10675 (the_low_target): Add initializer for arch_setup field.
10676 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10677 (the_low_target): Add initializer for arch_setup field.
10678 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10679 (the_low_target): Add initializer for arch_setup field.
10680 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10681 (the_low_target): Add initializer for arch_setup field.
10682 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10683 (the_low_target): Add initializer for arch_setup field.
10684 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10685 (init_registers_mips64_linux): Likewise.
10686 (the_low_target): Add initializer for arch_setup field.
10687 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10688 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10689 (the_low_target): Add initializer for arch_setup field.
10690 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10691 (init_registers_powerpc_64): Likewise.
10692 (the_low_target): Add initializer for arch_setup field.
10693 * linux-s390-low.c (init_registers_s390): Add prototype.
10694 (init_registers_s390x): Likewise.
10695 (the_low_target): Add initializer for arch_setup field.
10696 * linux-sh-low.c (init_registers_sh): Add prototype.
10697 (the_low_target): Add initializer for arch_setup field.
10698 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10699 (the_low_target): Add initializer for arch_setup field.
10700 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10701 (the_low_target): Add initializer for arch_setup field.
10703 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10704 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10705 instead of init_registers ().
10706 * win32-arm-low.c (init_registers_arm): Add prototype.
10707 (the_low_target): Add initializer for arch_setup field.
10708 * win32-i386-low.c (init_registers_i386): Add prototype.
10709 (the_low_target): Add initializer for arch_setup field.
10711 * spu-low.c (init_registers_spu): Add prototype.
10712 (initialize_low): Call initialie_registers_spu () instead of
10713 initialize_registers ().
10715 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10717 * server.c (handle_v_requests): When handling the vRun and vAttach
10718 packets, if already debugging a process, don't kill it. Return an
10721 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10723 * server.c (handle_query): Correct length check.
10725 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10727 * win32-low.c (do_initial_child_stuff): Add process handle
10728 parameter. Set current_process_handle and current_process_id from the
10729 parameters. Clear globals.
10730 (win32_create_inferior): Don't set current_process_handle and
10731 current_process_id here. Instead pass them on the call to
10732 do_initial_child_stuff.
10733 (win32_attach): Likewise.
10734 (win32_clear_inferiors): New.
10735 (win32_kill): Don't close the current process handle or the
10736 current thread handle here. Instead call win32_clear_inferiors.
10737 (win32_detach): Don't open a new handle to the process. Call
10738 win32_clear_inferiors.
10739 (win32_join): Don't rely on current_process_handle; open a new
10740 handle using the process id.
10741 (win32_wait): Call win32_clear_inferiors when the inferior process
10744 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10746 * server.c (monitor_show_help): Add "exit".
10748 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10750 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10751 (clean): Add reg-xtensa.c.
10752 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10753 * configure.srv (xtensa*-*-linux*) New target.
10754 * linux-xtensa-low.c: New.
10755 * xtensa-xtregs.c: New.
10757 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10759 * hostio.c: Don't include errno.h.
10760 (errno_to_fileio_errno): Move to hostio-errno.
10761 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10762 error number outputting to the target->hostio_last_error callback.
10763 (hostio_packet_error): Use FILEIO_EINVAL directly.
10764 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10765 calls to hostio_error.
10766 * hostio-errno.c: New.
10767 * server.h (hostio_last_error_from_errno): Declare.
10768 * target.h (target_ops): Add hostio_last_error member.
10769 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10770 as hostio_last_error handler.
10771 * spu-low.c (spu_target_ops): Likewise.
10772 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10773 (wince_hostio_last_error): New functions.
10774 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10775 as hostio_last_error handler.
10776 (win32_target_ops) [!_WIN32_WCE]: Register
10777 hostio_last_error_from_errno as hostio_last_error handler.
10778 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10779 (hostio-errno.o): New rule.
10780 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10781 * configure.srv (srv_hostio_err_objs): New variable. Default to
10783 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10784 * configure: Regenerate.
10786 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10788 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10789 (linux_kill, linux_detach): Clean up the process list.
10790 * remote-utils.c (remote_open): Improve port number parsing.
10791 (putpkt_binary, input_interrupt): Only send interrupts if the target
10793 * server.c (extended_protocol): Make static.
10794 (attached): Define earlier.
10795 (exit_requested, response_needed, program_argv): New variables.
10796 (target_running): New.
10797 (start_inferior): Clear attached here.
10798 (attach_inferior): Set attached here.
10799 (require_running): Define.
10800 (handle_query): Use require_running and target_running. Implement
10802 (handle_v_attach, handle_v_run): New.
10803 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10804 (gdbserver_usage): Update.
10805 (main): Redo argument parsing. Handle --debug and --multi. Handle
10806 --attach along with other options or after the port. Save
10807 program_argv. Support no initial program. Resynchronize
10808 communication with GDB after an error. Handle "monitor exit".
10809 Use require_running and target_running. Always allow the extended
10810 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10811 restart in extended mode.
10812 * README: Refer to the GDB manual. Update --attach usage.
10814 2007-12-20 Andreas Schwab <schwab@suse.de>
10816 * linux-low.c (STACK_SIZE): Define.
10817 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10818 (linux_test_for_tracefork): Likewise.
10820 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10822 * linux-low.c (linux_wait_for_event): Update messages. Do not
10823 reinsert auto-delete breakpoints.
10824 * mem-break.c (struct breakpoint): Change return type of handler to
10826 (set_breakpoint_at): Update handler type.
10827 (reinsert_breakpoint_handler): Return 1 instead of calling
10829 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10831 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10832 * mem-break.h (set_breakpoint_at): Update handler type.
10833 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10834 * win32-low.c (auto_delete_breakpoint): New.
10835 (get_child_debug_event): Use it.
10837 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10839 * configure.ac: Check for pread and pwrite.
10840 * hostio.c (handle_pread): Fall back to lseek and read.
10841 (handle_pwrite): Fall back to lseek and write.
10842 * config.in, configure: Regenerated.
10844 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10846 * server.c (myresume): Add own_buf argument.
10847 (main): Update calls.
10849 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10851 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10852 * remote-utils.c (remote_open): Do not call disable_async_io.
10853 (block_async_io): Delete.
10854 (unblock_async_io): Make static.
10855 (initialize_async_io): New.
10856 * server.c (handle_v_cont): Handle async I/O here.
10857 (myresume): Likewise. Move other common resume tasks here...
10858 (main): ... from here. Call initialize_async_io. Disable async
10859 I/O before the main loop.
10860 * server.h (initialize_async_io): Declare.
10861 (block_async_io, unblock_async_io): Delete prototypes.
10862 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10864 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10866 * remote-utils.c (readchar): Allow binary data in received messages.
10868 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10870 * win32-low.c (attaching): New global.
10871 (win32_create_inferior): Clear the `attaching' global.
10872 (win32_attach): Set the `attaching' global.
10873 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10874 attaching. Only set a breakpoint at the entry point if not
10877 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10879 * server.c (main): Don't report dll events on the initial
10880 connection on attaches.
10882 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10884 * server.c (main): Relax numerical bases supported for the pid of
10885 the --attach command line argument.
10887 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10889 * win32-low.c (win32_attach): Call OpenProcess before
10890 DebugActiveProcess, not after. Add last error output to error
10893 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10895 * win32-low.c (win32_get_thread_context)
10896 (win32_set_thread_context): New functions.
10897 (thread_rec): Use win32_get_thread_context.
10898 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10899 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10902 2007-12-03 Leo Zayas
10903 Pedro Alves <pedro_alves@portugalmail.pt>
10905 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10907 (child_add_thread): Minor cleanup.
10908 (child_continue): Resume artificially suspended threads before
10909 calling ContinueDebugEvent.
10910 (suspend_one_thread): New.
10911 (fake_breakpoint_event): New.
10912 (get_child_debug_event): Change return type to int. Check here if
10913 gdb sent an interrupt request. If a soft interrupt was requested,
10914 fake a breakpoint event. Return 0 if there is no event to handle,
10916 (win32_wait): Don't check here if gdb sent an interrupt request.
10917 Ensure there is a valid event to handle.
10918 (win32_request_interrupt): Add soft interruption method as last
10921 2007-12-03 Leo Zayas
10922 Pedro Alves <pedro_alves@portugalmail.pt>
10924 * win32-low.h (win32_thread_info): Add descriptions to the
10925 structure members. Replace `suspend_count' counter by a
10927 * win32-low.c (thread_rec): Update condition of when to get the
10928 context from the inferior. Rely on ContextFlags being set if it
10929 has already been retrieved. Only suspend the inferior thread if
10930 we haven't already. Warn if that fails.
10931 (continue_one_thread): s/suspend_count/suspended/. Only call
10932 ResumeThread once. Warn if that fails.
10934 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10936 * win32-low.c (win32_wait): Don't read from the inferior when it
10937 has already exited.
10939 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10941 * Makefile.in (win32_low_h): New variable.
10942 (win32-low.o): Add dependency on $(win32_low_h).
10943 (win32-arm-low.o, win32-i386-low.o): New rules.
10945 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10947 * hostio.c: Correct copyright year.
10949 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10951 * Makefile.in (OBS): Add hostio.o.
10952 (hostio.o): New rule.
10953 * server.h (handle_vFile): Declare.
10954 * hostio.c: New file.
10955 * server.c (handle_v_requests): Take packet_len and new_packet_len
10956 for binary packets. Call handle_vFile.
10957 (main): Update call to handle_v_requests.
10959 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10961 * linux-low.c: Include <sched.h>.
10963 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10965 * linux-low.c (linux_tracefork_grandchild): New.
10966 (linux_tracefork_child): Use clone.
10967 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10969 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10971 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10973 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10975 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10977 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10979 * inferiors.c (change_inferior_id): Delete.
10980 (add_pid_to_list, pull_pid_from_list): New.
10981 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10982 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10983 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10984 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10985 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10986 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10987 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10988 (using_threads): Always set to 1.
10989 (handle_extended_wait): New.
10990 (add_process): Do not set TID.
10991 (linux_create_inferior): Set must_set_ptrace_flags.
10992 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10993 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10994 (linux_thread_alive): Rename TID argument to LWPID.
10995 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10996 (linux_wait_for_event): Do not use TID or check using_threads. Update
10997 call to dead_thread_notify. Call handle_extended_wait.
10998 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10999 (send_sigstop): Delete sigstop_sent.
11000 (wait_for_sigstop): Avoid TID.
11001 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11002 (linux_test_for_tracefork): New.
11003 (linux_lookup_signals): Use thread_db_active and
11004 linux_supports_tracefork_flag.
11005 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11006 * linux-low.h (get_process_thread): Avoid TID.
11007 (struct process_ifo): Move thread_known and tid to the end. Remove
11009 (linux_attach_lwp, thread_db_init): Update prototypes.
11010 * server.h (change_inferior_id): Delete prototype.
11011 (add_pid_to_list, pull_pid_from_list): New prototypes.
11012 * thread-db.c (thread_db_use_events): New.
11013 (find_first_thread): Rename to...
11014 (find_one_thread): ...this. Update callers and messages. Do not
11015 call fatal. Check thread_db_use_events. Do not call
11016 change_inferior_id or new_thread_notify.
11017 (maybe_attach_thread): Update. Do not call new_thread_notify.
11018 (thread_db_init): Set thread_db_use_events. Check use_events.
11019 * utils.c (fatal, warning): Correct message prefix.
11021 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11023 * Makefile.in (clean): Remove new files.
11024 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11025 (powerpc-64.o, powerpc-64.c): New rules.
11026 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11027 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11029 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11031 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11032 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11033 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11034 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11035 (target_regsets): Add AltiVec and SPE register sets.
11036 * configure.ac: Check for AltiVec and SPE.
11037 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11038 (ppc_fill_vrregset, ppc_store_vrregset): New.
11039 (target_regsets): Add AltiVec register set.
11040 * configure: Regenerated.
11042 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11044 * linux-low.c (O_LARGEFILE): Define.
11045 (linux_read_memory): Use /proc/PID/mem.
11046 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11047 * configure, config.in: Regenerated.
11049 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11051 * linux-low.c (linux_wait_for_event): Do not pass signals while
11054 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11056 * win32-low.c (create_process): New.
11057 (win32_create_inferior): Use create_process instead of
11058 CreateProcess. If create_process failed retry appending an ".exe"
11059 suffix. Store the GetLastError result immediatelly after
11060 create_process calls and use it on the call to error.
11062 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11064 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11066 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11068 * configure.ac: Switch license to GPLv3.
11070 2007-08-01 Michael Snyder <msnyder@access-company.com>
11072 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11074 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11076 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11078 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11079 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11080 CloseToolhelp32Snapshot.
11081 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11082 CloseToolhelp32Snapshot.
11084 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11086 * server.c (main): Check for inferior exit before main loop.
11088 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11090 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11091 instead of on tmp_desc.
11093 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11094 Daniel Jacobowitz <dan@codesourcery.com>
11096 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11097 (add_thread): Minor cleanups.
11098 (clear_inferiors): Move lower in the file. Clear the DLL
11100 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11101 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11102 (xml_escape_text): New.
11103 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11105 (handle_v_cont): Report errors.
11106 (gdbserver_version): Update.
11107 (main): Correct size of own_buf. Do not report initial DLL events.
11108 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11109 (unloaded_dll, xml_escape_text): New.
11110 * win32-low.c (enum target_waitkind): Update comments.
11111 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11112 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11113 (win32_EnumProcessModules, win32_GetModuleInformation)
11114 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11115 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11116 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11117 (win32_Module32First, win32_Module32Next, load_toolhelp)
11118 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11119 (get_child_debug_event): Handle DLL events.
11120 (win32_wait): Likewise.
11122 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11124 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11125 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11127 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11129 * win32-low.c (handle_output_debug_string): Ignore event if not
11132 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11134 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11136 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11138 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11140 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11142 * inferiors.c (change_inferior_id): Add comment.
11143 * linux-low.c (check_removed_breakpoint): Add an early
11144 prototype. Improve debug output.
11145 (linux_attach): Doc update.
11146 (linux_detach_one_process, linux_detach): Clean up before releasing
11148 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11149 * linux-low.h (struct process_info): Doc improvement.
11150 * mem-break.c (delete_all_breakpoints): New.
11151 * mem-break.h (delete_all_breakpoints): New prototype.
11152 * thread-db.c (find_first_thread): New.
11153 (thread_db_create_event): Call it instead of
11154 thread_db_find_new_threads. Clean up unused variables.
11155 (maybe_attach_thread): Remove first thread handling.
11156 (thread_db_find_new_threads): Use find_first_thread.
11157 (thread_db_get_tls_address): Likewise.
11159 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11161 * thread-db.c (thread_db_find_new_threads): Add prototype.
11162 (thread_db_create_event): Check for the main thread before adding
11164 (maybe_attach_thread): Only enable event reporting if TID == 0.
11165 (thread_db_get_tls_address): Check for new threads.
11167 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11169 * linux-low.c (linux_create_inferior): Try execv before execvp.
11170 * spu-low.c (spu_create_inferior): Likewise.
11172 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11174 * linux-low.c (linux_create_inferior): Change execv to execvp.
11175 * spu-low.c (spu_create_inferior): Likewies.
11177 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11179 * Makefile.in (clean): Clean new files instead of deleted ones.
11180 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11181 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11183 * configure.srv: Specify XML files and new regformats for MIPS and
11185 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11186 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11187 an entry for the restart register.
11188 (mips_cannot_fetch_register, mips_cannot_store_register)
11189 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11190 register names to match the XML descriptions.
11191 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11192 restart register instead of $0.
11194 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11195 Markus Deuling <deuling@de.ibm.com>
11197 * remote-utils.c (decode_xfer_write): New function.
11198 * server.h (decode_xfer_write): Add prototype.
11199 * server.c (handle_query): Add PACKET_LEN argument. Support
11200 qXfer:spu:read and qXfer:spu:write packets.
11201 (main): Pass packet_len to handle_query.
11202 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11203 * target.h (target_ops): Add qxfer_spu.
11205 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11207 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11208 accessing non-seekable spufs files.
11210 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11212 * server.c (handle_query): Add reply for qC packet.
11214 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11215 Leo Zayas <lerele@champenstudios@com>
11217 * server.h (check_remote_input_interrupt_request): New function.
11218 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11219 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11220 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11221 (check_remote_input_interrupt_request): New function.
11222 * server.h (check_remote_input_interrupt_request): Declare.
11223 * win32-low.c (winapi_DebugBreakProcess,
11224 winapi_GenerateConsoleCtrlEvent): New typedefs.
11225 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11227 (win32_wait): Check for remote interrupt request
11228 with check_remote_input_interrupt_request.
11229 (win32_request_interrupt): New function.
11230 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11232 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11234 * win32-low.c (debug_registers_changed,
11235 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11236 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11237 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11238 (thread_rec): Get context using the low target.
11239 (child_add_thread): Call thread_added on the low target,
11240 which does the same thing.
11242 (do_initial_child_stuff): Remove debug registers references.
11243 Set context using the low target. Resume threads after
11244 setting the contexts.
11245 (child_continue): Remove dead variable. Remove debug
11246 registers references.
11247 (child_fetch_inferior_registers): Go through the low target.
11248 (do_child_store_inferior_registers): Remove.
11249 (child_store_inferior_registers): Go through the low target.
11250 (win32_resume): Remove debug registers references.
11251 Set context using the low target.
11252 (handle_exception): Change return type to void. Don't record
11253 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11254 first chance exception.
11255 (get_child_debug_event): Change return type to void. Remove
11256 goto loop. Always return after waiting for debug event.
11257 (win32_wait): Convert to switch statement. Handle spurious
11260 * win32-i386-low.c (debug_registers_changed,
11261 debug_registers_used): New.
11262 (initial_stuff): Rename to ...
11263 (i386_initial_stuff): ... this. Clear debug registers
11265 (store_debug_registers): Delete.
11266 (i386_get_thread_context): New.
11267 (load_debug_registers): Delete.
11268 (i386_set_thread_context): New.
11269 (i386_thread_added): New.
11270 (single_step): Rename to ...
11271 (i386_single_step): ... this.
11272 (do_fetch_inferior_registers): Rename to ...
11273 (i386_fetch_inferior_register): ... this.
11274 (i386_store_inferior_register): New.
11275 (the_low_target): Adapt to new interface.
11277 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11278 (arm_get_thread_context): New.
11279 (arm_set_thread_context): New.
11281 (do_fetch_inferior_registers): Rename to ...
11282 (arm_fetch_inferior_register): ... this.
11283 (arm_store_inferior_register): New.
11284 (arm_wince_breakpoint): Reimplement as unsigned long.
11285 (arm_wince_breakpoint_len): Define.
11286 (the_low_target): Adapt to new interface.
11288 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11289 load_debug_registers. Add get_thread_context, set_thread_context,
11290 thread_added and store_inferior_register. Rename
11291 fetch_inferior_registers to fetch_inferior_register.
11292 (regptr): Remove declaration.
11294 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11296 * linux-low.c (linux_detach): Change return type to int. Return 0.
11297 * spu-low.c (spu_detach): Likewise.
11299 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11301 * target.h (target_ops): Change return type of detach to int.
11303 (join_inferior): New.
11304 * server.c (main): Don't skip detach support on mingw32.
11305 If the inferior doesn't support detaching return error.
11306 Call join_inferior instead of using waitpid.
11307 * linux-low.c (linux_join): New.
11308 (linux_target_op): Add linux_join.
11309 * spu-low.c (spu_join): New.
11310 (spu_target_ops): Add spu_join.
11311 * win32-low.c (win32_detach): Adapt to new interface.
11312 Reopen current_process_handle before detaching. Issue a child
11313 resume before detaching.
11315 (win32_target_op): Add win32_join.
11317 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11319 * win32-low.c (win32-attach): Fix return value.
11320 * target.h (target_ops): Describe ATTACH return values.
11322 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11324 * win32-low.c (GETPROCADDRESS): Define.
11325 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11326 (winapi_DebugSetProcessKillOnExit): Likewise.
11327 (win32_create_inferior): Force usage of ansi CreateProcessA.
11328 (win32_attach): Use GETPROCADDRESS.
11329 (win32_detach): Likewise.
11331 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11333 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11335 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11337 * win32-low.c: Commit leftover changes from 2007-03-29.
11339 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11341 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11342 fields short instead of int. Add explicit padding.
11343 (i387_cache_to_fsave): Remove unnecessary casts.
11344 (i387_fsave_to_cache): Doc fix.
11345 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11347 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11349 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11350 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11352 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11354 * configure.srv (arm*-*-mingw32ce*): Move near the other
11357 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11359 * configure.ac: Add errno checking.
11360 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11361 sys/file.h and malloc.h.
11362 (AC_CHECK_DECLS): Add perror.
11363 (srv_mingwce): Handle.
11364 * configure.srv (i[34567]86-*-cygwin*): Add
11365 win32-i386-low.o to srv_tgtobj.
11366 (i[34567]86-*-mingw*): Likewise.
11367 (arm*-*-mingw32ce*): Add case.
11368 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11369 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11370 [__MINGW32CE__] (strerror): New function.
11371 [__MINGW32CE__] (errno): Define to GetLastError.
11372 [__MINGW32CE__] (COUNTOF): New macro.
11373 (remote_open): Remove extra close call.
11374 * mem-break.c (delete_breakpoint_at): New function.
11375 * mem-break.h (delete_breakpoint_at): Declare.
11376 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11377 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11378 [USE_WIN32API] (read, write): Add char* casts.
11379 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11380 * server.h: Include wincecompat.h on Windows CE.
11381 [HAVE_ERRNO_H]: Check.
11382 (perror): Declare if not declared.
11383 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11384 (perror_with_name): Remove errno declaration.
11385 * wincecompat.h: New.
11386 * wincecompat.c: New.
11387 * win32-low.h: New.
11388 * win32-arm-low.c: New.
11389 * win32-i386-low.c: New.
11390 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11391 (OUTMSG2): Make it safe.
11393 (COUNTOF): New macro.
11394 (NUM_REGS): Get it from the low target.
11395 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11396 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11397 (thread_rec): Let low target handle debug registers.
11398 (child_add_thread): Likewise.
11399 (child_init_thread_list): Likewise.
11400 (continue_one_thread): Likewise.
11402 (do_child_fetch_inferior_registers): Move to ...
11403 * win32-i386-low.c: ... here, and rename to ...
11404 (do_fetch_inferior_registers): ... this.
11405 * win32-low.c (child_fetch_inferior_registers):
11406 Go through the low target.
11407 (do_child_store_inferior_registers): Use regptr.
11408 (strwinerror): New function.
11409 (win32_create_inferior): Handle Windows CE.
11410 Use strwinerror instead of strerror on Windows error
11411 codes. Add program to the error output.
11412 Don't close the main thread handle on Windows CE.
11413 (win32_attach): Use coredll.dll on Windows CE.
11414 (win32_kill): Close current process and current
11416 (win32_detach): Use coredll.dll on Windows CE.
11417 (win32_resume): Let low target handle debug registers, and
11419 (handle_exception): Add/Remove initial breakpoint. Avoid
11420 non-existant WSTOPSIG on Windows CE.
11421 (win32_read_inferior_memory): Cast to remove warning.
11422 (win32_arch_string): Go through the low target.
11423 (initialize_low): Call set_breakpoint_data with the low
11424 target's breakpoint.
11425 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11426 FOP_REGNUM, mappings): Move to ...
11427 * win32-i386-low.c: ... here.
11428 * win32-low.c (win32_thread_info): Move to ...
11429 * win32-low.h: ... here.
11430 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11431 win32-arm-low.c and wincecompat.c.
11432 (all:): Add $EXEEXT.
11433 (install-only:): Likewise.
11434 (gdbserver:): Likewise.
11435 (gdbreplay:): Likewise.
11436 * config.in: Regenerate.
11437 * configure: Regenerate.
11439 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11441 * win32-low.c: Rename typedef thread_info to
11442 win32_thread_info throughout.
11444 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11446 * win32-i386-low.c: Rename to ...
11447 * win32-low.c: ... this.
11448 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11449 * Makefile.in: Likewise.
11451 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11453 * remote-utils.c (monitor_output): Constify msg parameter.
11454 * server.h (monitor_output): Likewise.
11455 * win32-i386-low.c (handle_output_debug_string): New.
11456 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11457 handle_output_debug_string.
11458 (get_child_debug_event): Likewise.
11460 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11462 * server.c (main): Correct strtoul check.
11464 2007-03-27 Jon Ringle <jon@ringle.org>
11466 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11468 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11470 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11472 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11474 * terminal.h: Check HAVE_SGTTY_H.
11476 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11478 * remote-utils.c (remote_open): Print out the assigned port number.
11480 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11482 * remote-utils.c (monitor_output): New function.
11483 * server.c (debug_threads): Define here.
11484 (monitor_show_help): New function.
11485 (handle_query): Handle qRcmd.
11486 (main): Do not handle 'd' packet.
11487 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11488 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11491 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11493 * Makefile.in (EXEEXT): New.
11494 (clean): Use $(EXEEXT).
11496 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11498 * target.h (target_ops): Rename send_signal to request_interrupt,
11499 and remove enum target_signal parameter.
11500 * linux-low.c (linux_request_interrupt): Rename from
11501 linux_send_signal, and always send SIGINT.
11502 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11503 and always send SIGINT.
11504 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11506 (input_interrupt): Likewise.
11508 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11510 * server.c (get_features_xml): Check if target implemented
11512 * win32-i386-low.c (win32_arch_string): New.
11513 (win32_target_ops): Add win32_arch_string as arch_string member.
11515 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11517 * spu-low.c (spu_arch_string): New.
11518 (spu_target_ops): Add spu_arch_string.
11520 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11522 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11523 * configure.ac: Do not check for terminal.h.
11524 * configure, config.in: Regenerated.
11526 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11528 * Makefile.in (OBS): Add $(XML_BUILTIN).
11529 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11531 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11532 (arm-with-iwmmxt.c): New.
11533 * config.in, configure: Regenerate.
11534 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11535 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11536 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11537 (arm*-*-linux*): Add iWMMXt and regset support.
11538 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11539 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11540 (arm_store_wmmxregset, target_regsets): New.
11541 * server.c (get_features_xml): Take annex argument. Check builtin
11543 (handle_query): Handle multiple annexes.
11545 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11547 * remote-utils.c [USE_WIN32API] (read, write): Define.
11548 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11551 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11553 * linux-i386-low.c (the_low_target): Set arch_string.
11554 * linux-x86-64-low.c (the_low_target): Likewise.
11555 * linux-low.c (linux_arch_string): New.
11556 (linux_target_ops): Add it.
11557 * linux-low.h (struct linux_target_ops): Add arch_string.
11558 * server.c (write_qxfer_response): Use const void * for DATA.
11559 (get_features_xml): New.
11560 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11561 * target.h (struct target_ops): Add arch_string method.
11563 2007-01-03 Denis Pilat <denis.pilat@st.com>
11564 Daniel Jacobowitz <dan@codesourcery.com>
11566 * linux-low.c (linux_kill): Handle being called with no threads.
11567 * win32-i386-low.c (win32_kill): Likewise.
11568 (get_child_debug_event): Clear current_process_handle.
11570 2006-12-30 Denis PILAT <denis.pilat@st.com>
11571 Daniel Jacobowitz <dan@codesourcery.com>
11573 * remote-utils.c (remote_open): Check the type of specified
11574 serial port devices before opening them.
11575 * server.c (main): Kill the inferior if an error occurs during
11576 the first remote_open.
11578 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11580 * README: Update supported targets.
11582 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11584 * Makefile.in (clean): Remove reg-mips64.c.
11585 (reg-mips64.c, reg-mips64.o): New rules.
11586 * configure.srv: Handle mips64. Include regset support for mips.
11587 * linux-mips-low.c (union mips_register): New.
11588 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11589 (mips_breakpoint, mips_breakpoint_at): Use int.
11590 (mips_collect_register, mips_supply_register)
11591 (mips_collect_register_32bit, mips_supply_register_32bit)
11592 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11593 (mips_store_fpregset, target_regsets): New.
11594 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11596 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11598 * configure.srv: Add target "spu*-*-*".
11599 * Makefile.in (clean): Remove reg-spu.c.
11600 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11601 * spu-low.c: New file.
11603 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11605 * configure.ac: Correct td_thr_tls_get_addr test.
11606 * configure: Regenerated.
11608 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11610 * linux-low.c (linux_wait_for_event): Reformat. Use the
11611 pass_signals array.
11612 * remote-utils.c (decode_address_to_semicolon): New.
11613 * server.c (pass_signals, handle_general_set): New.
11614 (handle_query): Mention QPassSignals for qSupported.
11615 (main): Call handle_general_set.
11616 * server.h (pass_signals, decode_address_to_semicolon): New.
11618 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11620 * server.c (handle_query): Correct error handling for read_auxv.
11622 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11624 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11625 and srv_linux_thread_db to yes.
11626 * linux-s390-low.c (s390_fill_gregset): New function.
11627 (target_regsets): Define data structure.
11629 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11631 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11632 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11633 * config.in, configure: Regenerated.
11634 * inferiors.c (gdb_id_to_thread): New function.
11635 (gdb_id_to_thread_id): Use it.
11636 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11637 * linux-low.h (struct process_info): Add th member.
11638 (thread_db_get_tls_address): New prototype.
11639 * remote-utils.c (decode_address): Make non-static.
11640 * server.c (handle_query): Handle qGetTLSAddr.
11641 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11642 * target.h (struct target_ops): Add get_tls_address.
11643 * thread-db.c (maybe_attach_thread): Save the thread handle.
11644 (thread_db_get_tls_address): New.
11646 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11648 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11649 (linux_resume_one_process): Take a siginfo_t *. Update all
11650 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11651 (struct pending_signals): Add a siginfo_t.
11652 (linux_wait_for_process): Always set last_status.
11653 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11654 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11655 * linux-low.h (struct process_info): Add last_status.
11657 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11659 * remote-utils.c (try_rle): New function.
11660 (putpkt_binary): Use it.
11662 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11664 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11665 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11666 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11667 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11668 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11671 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11673 * server.c (terminal_fd): New variable.
11674 (old_foreground_pgrp): Likewise.
11675 (restore_old_foreground_pgrp): New function.
11676 (start_inferior): Record the terminal file descriptor in terminal_fd
11677 and its original foreground group in old_foreground_pgrp. Register
11678 restore_old_foreground_pgrp with atexit().
11680 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11682 * server.c (handle_query): Correct qPart to qXfer.
11684 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11686 * configure.ac: Check for more headers which are missing on
11687 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11688 * configure.srv: Add Cygwin and mingw32.
11689 * remote-utils.c: Don't include headers unconditionally which
11690 are missing on mingw32. Include <winsock.h> for mingw32.
11691 (remote_open): Adjust for mingw32 support. Flush
11692 standard error after writing to it.
11693 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11694 (unblock_async_io, enable_async_io, disable_async_io)
11695 (readchar, getpkt): Update for Winsock support.
11696 (prepare_resume_reply): Expect a protocol signal number.
11697 * server.c: Disable <sys/wait.h> on mingw32.
11698 (start_inferior): Adjust for mingw32 support. Flush
11699 standard error after writing to it.
11700 (attach_inferior): Likewise. Use protocol signal
11702 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11704 * win32-i386-low.c: New file.
11705 * Makefile.in (XM_CLIBS): Set.
11706 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11707 (win32-i386-low.o): New dependency rule.
11708 * linux-low.c (linux_wait): Use target signal numbers.
11709 * target.h (struct target_ops): Doc fix.
11710 * server.h (target_signal_to_name): New prototype.
11711 * gdbreplay.c: Don't include headers unconditionally which
11712 are missing on mingw32. Include <winsock.h> for mingw32.
11713 (remote_close, remote_open): Adjust for Winsock support.
11714 * configure, config.in: Regenerated.
11716 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11718 * server.c (decode_xfer_read, write_qxfer_response): New.
11719 (handle_query): Take a packet length argument. Handle
11720 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11721 the qSupported response.
11722 (main): Update call to handle_query.
11724 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11726 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11727 (putpkt_binary): Renamed from putpkt and adjusted for binary
11729 (putpkt): New wrapper for putpkt_binary.
11730 (readchar): Don't mask off the high bit.
11731 (decode_X_packet): New function.
11732 * server.c (main): Call putpkt_binary if a handler sets the packet
11733 length. Save the length of the incoming packet. Handle 'X'.
11734 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11736 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11738 * server.c (handle_query): Handle qSupported.
11740 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11742 * remote-utils.c (all_symbols_looked_up): New variable.
11743 (look_up_one_symbol): Check it.
11744 * server.h (look_up_one_symbol): New declaration.
11745 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11747 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11749 * Makefile.in (linux-arm-low.o): Update dependencies.
11750 * linux-arm-low.c: Include "gdb_proc_service.h".
11751 (PTRACE_GET_THREAD_AREA): Define.
11752 (ps_get_thread_area): New function.
11754 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11756 * configure.srv (m68k*-*-uclinux*): New target.
11757 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11758 (linux_resume_one_process): Remove extraneous cast.
11759 (linux_read_offsets): New.
11760 (linux_target_op): Add linux_read_offsets on mmuless systems.
11761 * server.c (handle_query): Add qOffsets logic.
11762 * target.h (struct target_ops): Add read_offsets.
11764 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11766 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11767 (PTRACE_GET_THREAD_AREA): Define.
11768 (ps_get_thread_area): New function.
11769 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11770 (linux-x86-64-low.o): Update.
11772 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11774 * configure.ac: Remove checks for prfpregset_t.
11775 * gdb_proc_service.h: New file.
11776 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11777 new "gdb_proc_service.h".
11778 * proc-service.c: Likewise.
11779 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11780 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11781 * Makefile.in (gdb_proc_service_h): Updated.
11782 * configure, config.in: Regenerated.
11784 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11786 * remote-utils.c (prepare_resume_reply): Move declaration
11787 of gdb_id_from_wait to the top of the block.
11789 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11791 * linux-low.c (regsets_store_inferior_registers): Read the regset
11792 from the target before filling it.
11794 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11796 * server.c (attach_inferior): Return SIGTRAP for a successful
11799 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11801 * Makefile.in (OBS): Add version.o.
11802 (STAGESTUFF): Delete.
11803 (version.o): Add dependencies.
11804 (version.c): Replace rule.
11805 (clean): Remove version.c.
11806 * server.c (gdbserver_version): New.
11807 (gdbserver_usage): Use printf.
11808 (main): Handle --version and --help.
11809 * server.h (version, host_name): Add declarations.
11811 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11823 * linux-x86-64-low.c:
11825 * linux-s390-low.c:
11826 * linux-ppc64-low.c:
11828 * linux-mips-low.c:
11829 * linux-m68k-low.c:
11830 * linux-m32r-low.c:
11833 * linux-ia64-low.c:
11834 * linux-i386-low.c:
11835 * linux-crisv32-low.c:
11847 * gdbserver.1: Add (C) after Copyright. Update the FSF
11850 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11852 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11853 (arm_breakpoint_at): Recognize both breakpoints.
11854 (the_low_target): Use the correct breakpoint instruction.
11856 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11858 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11859 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11860 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11861 (the_low_target): Update.
11863 2005-10-25 Andreas Schwab <schwab@suse.de>
11865 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11867 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11868 (ia64_num_regs): Reduce to 462.
11870 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11872 * acinclude.m4: Correct quoting.
11873 * aclocal.m4: Regenerated.
11875 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11876 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11877 (thread_db_init): Call thread_db_err_str.
11878 * configure.ac: Check for TD_VERSION.
11879 * config.in, configure: Regenerated.
11881 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11883 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11885 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11887 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11888 is not available. Define HAVE_PTRACE_GETREGS if it is.
11889 * config.in, configure: Regenerated.
11890 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11891 * linux-i386-low.c, linux-m68k-low.c: Update to use
11892 HAVE_PTRACE_GETREGS.
11893 * linux-low.c (regsets_fetch_inferior_registers)
11894 (regsets_store_inferior_registers): Only return 0 if we processed
11896 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11897 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11899 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11901 * inferiors.c (struct thread_info): Add gdb_id.
11902 (add_thread): Add gdb_id argument.
11903 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11904 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11905 calls to add_thread.
11906 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11907 * server.c (handle_query): Use thread_to_gdb_id.
11908 (handle_v_cont, main): Use gdb_id_to_thread_id.
11909 * server.h (add_thread): Update prototype.
11910 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11913 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11915 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11916 left-padded registers.
11917 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11918 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11920 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11922 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11923 * configure: Regenerate.
11924 * config.in: Regenerate.
11925 * server.h (NEED_DECLARATION_STRERROR):
11926 Replace with !HAVE_DECL_STRERROR.
11928 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11930 * linux-low.c (linux_wait, linux_send_signal): Don't test
11931 an unsigned long variable for > 0 if it could be MAX_ULONG.
11932 * server.c (myresume): Likewise.
11933 * target.c (set_desired_inferior): Likewise.
11935 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11937 * configure.ac: Simplify and improve check for socklen_t.
11938 * configure, config.in: Regenerate.
11940 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11942 * acconfig.h: Remove.
11943 * configure.ac: Add a test for socklen_t. Use three-argument
11944 AC_DEFINE throughout.
11945 * config.in: Regenerated using autoheader 2.59.
11946 * configure: Regenerated.
11948 * gdbreplay.c (socklen_t): Provide a default.
11949 (remote_open): Use socklen_t.
11950 * remote-utils.c (socklen_t): Provide a default.
11951 (remote_open): Use socklen_t.
11952 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11955 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11957 * linux-low.c (linux_read_memory, linux_write_memory)
11958 (linux_read_auxv): Likewise.
11959 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11960 (check_mem_write): Likewise.
11961 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11963 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11964 (registers_from_string, register_data): Likewise.
11965 * server.c (handle_query, main): Likewise.
11966 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11967 (decode_M_packet): Likewise.
11968 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11969 * target.h (struct target_ops): Update read_memory, write_memory,
11971 (read_inferior_memory, write_inferior_memory): Update.
11972 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11973 to unsigned char *.
11974 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11975 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11976 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11977 linux-s390-low.c, linux-sh-low.c: Update for changes in
11978 read_inferior_memory and the_low_target->breakpoint.
11980 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11982 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11983 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11984 * configure.srv: Add powerpc64-*-linux*.
11985 * linux-ppc64-low.c: New file.
11987 2005-05-23 Orjan Friberg <orjanf@axis.com>
11989 * linux-cris-low.c: New file with support for CRIS.
11990 * linux-crisv32-low.c: Ditto for CRISv32.
11991 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11992 (clean): Add reg-cris.c and reg-crisv32.c.
11993 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11994 reg-crisv32.o, and reg-crisv32.c to make rules.
11995 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11996 recognized targets.
11998 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12000 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12001 of sizeof (PTRACE_XFER_TYPE).
12002 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12004 2005-05-12 Orjan Friberg <orjanf@axis.com>
12006 * target.h (struct target_ops): Add insert_watchpoint,
12007 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12008 pointers for hardware watchpoint support.
12009 * linux-low.h (struct linux_target_ops): Ditto.
12010 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12011 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12012 to linux_target_ops.
12013 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12015 * server.c (main): Recognize 'Z' and 'z' packets.
12017 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12019 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12020 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12021 (the_low_target): Add new members.
12023 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12025 * proc-service.c (ps_lgetregs): Search all_processes instead of
12028 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12030 * server.c (start_inferior): Change return type to int.
12031 (attach_inferior): Change sigptr to int *.
12032 (handle_v_cont, handle_v_requests): Change signal to int *.
12033 (main): Change signal to int.
12035 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12037 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12038 * configure.srv: Add m32r*-*-linux*.
12039 * linux-m32r-low.c: New file.
12041 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12043 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12045 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12047 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12048 Take unsigned long arguments for PIDs.
12049 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12050 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12051 (wait_for_sigstop, linux_resume_one_process)
12052 (regsets_fetch_inferior_registers, linux_send_signal)
12053 (linux_read_auxv): Likewise. Update the types of variables holding
12054 PIDs. Update format string specifiers.
12055 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12056 * remote-utils.c (prepare_resume_reply): Likewise.
12057 * server.c (cont_thread, general_thread, step_thread)
12058 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12060 (handle_query): Update format specifiers.
12061 (handle_v_cont, main): Use strtoul for thread IDs.
12062 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12063 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12064 (general_thread, step_thread, thread_from_wait)
12065 (old_thread_from_wait): Update.
12066 * target.h (struct thread_resume): Use unsigned long for THREAD.
12067 (struct target_ops): Use unsigned long for arguments to attach and
12070 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12072 * acinclude.m4: Include bfd/bfd.m4 directly.
12073 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12074 <agriffis@toolchain.org>.
12075 * aclocal.m4, configure: Regenerated.
12077 2005-01-07 Andrew Cagney <cagney@gnu.org>
12079 * configure.ac: Rename configure.in, require autoconf 2.59.
12080 * configure: Re-generate.
12082 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12084 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12085 LIBS when finished.
12086 * aclocal.m4: Regenerated.
12087 * configure: Regenerated.
12089 2004-11-21 Andreas Schwab <schwab@suse.de>
12091 * linux-m68k-low.c (m68k_num_gregs): Define.
12092 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12093 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12094 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12095 (m68k_breakpoint_at): New. Add to the_low_target.
12097 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12098 srv_linux_thread_db to yes.
12100 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12102 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12103 (ARCH_SET_FS): Likewise.
12104 (ARCH_GET_FS): Likewise.
12105 (ARCH_GET_GS): Likewise.
12107 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12109 * linux-i386-low.c (ps_get_thread_area): New.
12110 * linux-x86-64-low.c (ps_get_thread_area): New.
12111 * linux-low.c: Include <sys/syscall.h>.
12112 (linux_kill_one_process): Don't kill the first thread here.
12113 (linux_kill): Kill the first thread here.
12114 (kill_lwp): New function.
12115 (send_sigstop, linux_send_signal): Use it.
12116 * proc-service.c: Clean up #ifdefs.
12117 (fpregset_info): Delete.
12118 (ps_lgetregs): Update and enable implementation.
12119 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12121 * remote-utils.c (struct sym_cache, symbol_cache): New.
12122 (input_interrupt): Print a clearer message.
12123 (async_io_enabled): New variable.
12124 (enable_async_io, disable_async_io): Use it. Update comments.
12125 (look_up_one_symbol): Use the symbol cache.
12126 * thread-db.c (thread_db_look_up_symbols): New function.
12127 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12129 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12131 * configure.in: Test for -rdynamic.
12132 * configure: Regenerated.
12133 * Makefile (INTERNAL_LDFLAGS): New.
12134 (gdbserver, gdbreplay): Use it.
12136 2004-09-02 Andrew Cagney <cagney@gnu.org>
12138 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12140 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12142 * linux-low.c (linux_wait): Clear all_processes list also.
12144 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12146 * linux-low.c: Include <errno.h>. Remove extern declaration of
12149 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12151 * gdbreplay.c, server.h, utils.c: Update copyright years.
12153 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12155 * server.c (main): Print child status or termination signal from
12156 variable 'signal', not 'sig'.
12158 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12160 * linux-low.c (linux_read_memory): Change return type to
12161 int. Check for and return error from ptrace().
12162 * target.c (read_inferior_memory): Change return type to int. Pass
12163 back return status from the_target->read_memory().
12164 * target.h (struct target_ops): Adapt *read_memory() prototype.
12166 (read_inferior_memory): Adapt prototype.
12167 * server.c (main): Return an error packet if
12168 read_inferior_memory() returns an error.
12170 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12172 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12173 Unify with other clean targets.
12175 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12177 * server.c (handle_v_cont): Call set_desired_inferior.
12179 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12181 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12183 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12185 * linux-low.c (linux_wait): Unblock async I/O.
12186 (linux_resume): Block and enable async I/O.
12187 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12188 * server.h (block_async_io, unblock_async_io): Add prototypes.
12190 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12192 * remote-utils.c (remote_open): Print a status notice after
12193 opening a TCP port.
12194 * server.c (attach_inferior): Print a status notice after
12197 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12199 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12201 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12203 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12205 * server.c, target.h: Update copyright years.
12207 2004-02-25 Roland McGrath <roland@redhat.com>
12209 * target.h (struct target_ops): New member `read_auxv'.
12210 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12211 * linux-low.c (linux_read_auxv): New function.
12212 (linux_target_ops): Initialize `read_auxv' member to that.
12214 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12216 Committed by Jim Blandy <jimb@redhat.com>.
12218 * linux-s390-low.c (s390_num_regs): Update.
12219 (s390_regmap): Remove control registers. Use __s390x__ predefine
12220 instead of GPR_SIZE to distiguish s390 and s390x targets.
12222 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12224 * linux-low.c: Update copyright year.
12225 (check_removed_breakpoint): Clear pending_is_breakpoint.
12226 (linux_set_resume_request, linux_queue_one_thread)
12227 (resume_status_pending_p): New functions.
12228 (linux_continue_one_thread): Use process->resume.
12229 (linux_resume): Only resume threads if there are no pending events.
12230 * linux-low.h (struct process_info): Add resume request
12233 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12235 * regcache.c (new_register_cache): Clear the allocated register
12236 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12238 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12240 * linux-low.c (linux_resume): Take a struct thread_resume *
12242 (linux_wait): Update call.
12243 (resume_ptr): New static variable.
12244 (linux_continue_one_thread): Renamed from
12245 linux_continue_one_process. Use resume_ptr.
12246 (linux_resume): Use linux_continue_one_thread.
12247 * server.c (handle_v_cont, handle_v_requests): New functions.
12248 (myresume): New function.
12249 (main): Handle 'v' case.
12250 * target.h (struct thread_resume): New type.
12251 (struct target_ops): Change argument of "resume" to struct
12253 (myresume): Delete macro.
12255 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12257 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12258 (uninstall): Support DESTDIR.
12260 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12262 * configure.srv: Add xscale*linux copy of arm*linux entry.
12264 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12266 * linux-arm-low.c (arm_reinsert_addr): New function.
12267 (the_low_target): Add arm_reinsert_addr.
12269 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12271 * mem-break.c: Remove whitespace at end of file.
12273 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12275 * configure.in: Check whether we need to prototype strerror.
12276 * server.h: Optionally prototype strerror.
12277 * gdbreplay.c (perror_with_name): Use strerror.
12278 * linux-low.c (linux_attach_lwp): Use strerror.
12279 * utils.c (perror_with_name): Use strerror.
12280 * config.in, configure: Regenerated.
12282 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12284 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12285 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12287 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12289 * Makefile.in (SFILES): Update.
12290 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12291 low-sun3.c: Remove files.
12293 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12295 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12296 (linux_detach_one_process, linux_detach): New functions.
12297 (linux_target_ops): Add linux_detach.
12298 * server.c (main): Handle 'D' packet.
12299 * target.h (struct target_ops): Add "detach" member.
12300 (detach_inferior): Define.
12302 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12304 From Kelley Cook <kelleycook@wideopenwest.com>:
12305 * configure.srv: Accept i[34567]86 variants.
12307 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12309 * linux-low.c (linux_wait_for_event): Correct comment typos.
12310 (linux_resume_one_process): Call check_removed_breakpoint.
12311 (linux_send_signal): New function.
12312 (linux_target_ops): Add linux_send_signal.
12313 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12315 * target.h (struct target_ops): Add send_signal.
12317 2003-05-29 Jim Blandy <jimb@redhat.com>
12319 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12320 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12321 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12322 away part of the register's value.
12324 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12326 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12327 (linux_wait_for_event, linux_init_signals): Likewise.
12329 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12331 * configure.in: Check for stdlib.h.
12332 * configure: Regenerated.
12333 * config.in: Regenerated.
12335 2003-01-04 Andreas Schwab <schwab@suse.de>
12337 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12339 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12341 * Makefile.in: Remove obsolete code.
12343 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12345 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12346 defined(PT_FPR0_HI).
12348 2002-11-17 Stuart Hughes <seh@zee2.com>
12350 * linux-arm-low.c (arm_num_regs): Increase.
12351 (arm_regmap): Include status register.
12353 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12355 * linux-low.c (register_addr): Remove incorrect -1 check.
12357 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12359 * linux-low.c (linux_create_inferior): Call setpgid. Return
12361 (unstopped_p, linux_signal_pid): Remove.
12362 (linux_target_ops): Remove linux_signal_pid.
12363 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12364 global instead of target method.
12365 * target.h (struct target_ops): Remove signal_pid. Update comment
12366 for create_inferior.
12367 * server.c (signal_pid): New variable.
12368 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12369 gdbserver. Set the child to be the foreground process group.
12370 (attach_inferior): Set signal_pid.
12372 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12374 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12376 2002-08-20 Jim Blandy <jimb@redhat.com>
12378 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12381 2002-08-01 Andrew Cagney <cagney@redhat.com>
12383 * Makefile.in: Make chill references obsolete.
12385 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12387 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12388 * configure: Regenerate.
12389 * config.in: Regenerate.
12391 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12393 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12394 (perror_with_name, remote_close, remote_open, expect, play): Static.
12396 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12398 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12399 byte offsets instead of an array of indexes.
12400 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12402 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12404 * regcache.c: Add comment.
12406 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12408 * thread-db.c: New file.
12409 * proc-service.c: New file.
12410 * acinclude.m4: New file.
12411 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12412 proc-service.o, and thread-db.o.
12413 (linux-low.o): Add USE_THREAD_DB.
12414 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12415 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12416 * aclocal.m4: Regenerated.
12417 * config.in: Regenerated.
12418 * configure: Regenerated.
12419 * configure.in: Check for proc_service.h, sys/procfs.h,
12420 thread_db.h, and linux/elf.h headrs.
12421 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12422 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12423 Check for -lthread_db and thread support.
12424 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12425 PowerPC, and SuperH.
12426 * i387-fp.c: Constify arguments.
12427 * i387-fp.h: Likewise.
12428 * inferiors.c: (struct thread_info): Renamed from
12429 `struct inferior_info'. Remove PID member. Use generic inferior
12430 list header. All uses updated.
12431 (inferiors, signal_pid): Removed.
12432 (all_threads): New variable.
12433 (get_thread): Define.
12434 (add_inferior_to_list): New function.
12435 (for_each_inferior): New function.
12436 (change_inferior_id): New function.
12437 (add_inferior): Removed.
12438 (remove_inferior): New function.
12439 (add_thread): New function.
12440 (free_one_thread): New function.
12441 (remove_thread): New function.
12442 (clear_inferiors): Use for_each_inferior and free_one_thread.
12443 (find_inferior): New function.
12444 (find_inferior_id): New function.
12445 (inferior_target_data): Update argument type.
12446 (set_inferior_target_data): Likewise.
12447 (inferior_regcache_data): Likewise.
12448 (set_inferior_regcache_data): Likewise.
12449 * linux-low.c (linux_bp_reinsert): Remove.
12450 (all_processes, stopping_threads, using_thrads)
12451 (struct pending_signals, debug_threads, pid_of): New.
12452 (inferior_pid): Replace with macro.
12453 (struct inferior_linux_data): Remove.
12454 (get_stop_pc, add_process): New functions.
12455 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12456 Use add_process and add_thread.
12457 (linux_attach_lwp): New function, based on old linux_attach. Use
12458 add_process and add_thread. Set stop_expected for new threads.
12459 (linux_attach): New function.
12460 (linux_kill_one_process): New function.
12461 (linux_kill): Kill all LWPs.
12462 (linux_thread_alive): Use find_inferior_id.
12463 (check_removed_breakpoints, status_pending_p): New functions.
12464 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12465 Update. Use WNOHANG. Wait for cloned processes also. Update process
12466 struct for the found process.
12467 (linux_wait_for_event): New function.
12468 (linux_wait): Use it. Support LWPs.
12469 (send_sigstop, wait_for_sigstop, stop_all_processes)
12470 (linux_resume_one_process, linux_continue_one_process): New functions.
12471 (linux_resume): Support LWPs.
12472 (REGISTER_RAW_SIZE): Remove.
12473 (fetch_register): Use register_size instead. Call supply_register.
12474 (usr_store_inferior_registers): Likewise. Call collect_register.
12475 Fix recursive case.
12476 (regsets_fetch_inferior_registers): Improve error message.
12477 (regsets_store_inferior_registers): Add debugging.
12478 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12479 (unstopped_p, linux_signal_pid): New functions.
12480 (linux_target_ops): Add linux_signal_pid.
12481 (linux_init_signals): New function.
12482 (initialize_low): Call it. Initialize using_threads.
12483 * regcache.c (inferior_regcache_data): Add valid
12485 (get_regcache): Fetch registers lazily. Add fetch argument
12486 and update all callers.
12487 (regcache_invalidate_one, regcache_invalidate): New
12489 (new_register_cache): Renamed from create_register_cache.
12490 Return the new regcache.
12491 (free_register_cache): Change argument to a void *.
12492 (registers_to_string, registers_from_string): Call get_regcache
12493 with fetch flag set.
12494 (register_data): Make static. Pass fetch flag to get_regcache.
12495 (supply_register): Call get_regcache with fetch flag clear.
12496 (collect_register): Call get_regcache with fetch flag set.
12497 (collect_register_as_string): New function.
12498 * regcache.h: Update.
12499 * remote-utils.c (putpkt): Flush after debug output and use
12501 Handle input interrupts while waiting for an ACK.
12502 (input_interrupt): Use signal_pid method.
12503 (getpkt): Flush after debug output and use stderr.
12504 (outreg): Use collect_register_as_string.
12505 (new_thread_notify, dead_thread_notify): New functions.
12506 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12507 and general_thread.
12508 (look_up_one_symbol): Flush after debug output.
12509 * server.c (step_thread, server_waiting): New variables.
12510 (start_inferior): Don't use signal_pid. Update call to mywait.
12511 (attach_inferior): Update call to mywait.
12512 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12513 (main): Don't fetch/store registers explicitly. Use
12514 set_desired_inferior. Support proposed ``Hs'' packet. Update
12516 * server.h: Update.
12517 (struct inferior_list, struct_inferior_list_entry): New.
12518 * target.c (set_desired_inferior): New.
12519 (write_inferior_memory): Constify.
12520 (mywait): New function.
12521 * target.h: Update.
12522 (struct target_ops): New signal_pid method.
12523 (mywait): Removed macro, added prototype.
12525 * linux-low.h (regset_func): Removed.
12526 (regset_fill_func, regset_store_func): New.
12527 (enum regset_type): New.
12528 (struct regset_info): Add type field. Use new operation types.
12529 (struct linux_target_ops): stop_pc renamed to get_pc.
12530 Add decr_pc_after_break and breakpoint_at.
12531 (get_process, get_thread_proess, get_process_thread)
12532 (strut process_info, all_processes, linux_attach_lwp)
12533 (thread_db_init): New.
12535 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12536 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12537 (the_low_target): Add new members.
12538 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12539 (i386_store_fpxregset): Constify.
12540 (target_regsets): Add new kind identifier.
12541 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12542 (i386_set_pc): Add debugging.
12543 (i386_breakpoint_at): New function.
12544 (the_low_target): Add new members.
12545 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12546 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12547 (mips_breakpoint_at): New.
12548 (the_low_target): Add new members.
12549 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12550 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12551 (the_low_target): Add new members.
12552 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12553 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12554 (the_low_target): Add new members.
12555 * linux-x86-64-low.c (target_regsets): Add new kind
12558 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12560 From Martin Pool <mbp@samba.org>:
12561 * server.c (gdbserver_usage): New function.
12564 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12566 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12567 stop_at -> stop_pc.
12569 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12571 * Makefile.in: Remove obsolete code.
12573 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12575 * linux-low.c (regsets_fetch_inferior_registers),
12576 (regsets_store_inferior_registers): Removed cast to int from
12578 * regcache.h: Added declaration of struct inferior_info.
12580 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12582 * inferiors.c (struct inferior_info): Add regcache_data.
12583 (add_inferior): Call create_register_cache.
12584 (clear_inferiors): Call free_register_cache.
12585 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12586 * regcache.c (struct inferior_regcache_data): New.
12587 (registers): Remove.
12588 (get_regcache): New function.
12589 (create_register_cache, free_register_cache): New functions.
12590 (set_register_cache): Don't initialize the register cache here.
12591 (registers_to_string, registers_from_string, register_data): Call
12593 * regcache.h: Add prototypes.
12594 * server.h: Likewise.
12596 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12598 * mem-break.c: New file.
12599 * mem-break.h: New file.
12600 * Makefile.in: Add mem-break.o rule; update server.h
12602 * inferiors.c (struct inferior_info): Add target_data
12604 (clear_inferiors): Free target_data member if set.
12605 (inferior_target_data, set_inferior_target_data): New functions.
12606 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12607 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12608 * linux-low.c (linux_bp_reinsert): New variable.
12609 (struct inferior_linux_data): New.
12610 (linux_create_inferior): Use set_inferior_target_data.
12611 (linux_attach): Likewise. Call add_inferior.
12612 (linux_wait_for_one_inferior): New function.
12613 (linux_wait): Call it.
12614 (linux_write_memory): Add const.
12615 (initialize_low): Call set_breakpoint_data.
12616 * linux-low.h (struct linux_target_ops): Add breakpoint
12618 * server.c (attach_inferior): Remove extra add_inferior
12620 * server.h: Include mem-break.h. Update inferior.c
12622 * target.c (read_inferior_memory)
12623 (write_inferior_memory): New functions.
12624 * target.h (read_inferior_memory)
12625 (write_inferior_memory): Change macros to prototypes.
12626 (struct target_ops): Update comments. Add const to write_memory
12629 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12631 * linux-low.c (usr_store_inferior_registers): Support
12632 registers which are allowed to fail to store.
12633 * linux-low.h (linux_target_ops): Likewise.
12634 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12635 (ppc_cannot_store_register): FPSCR may not be storable.
12637 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12639 * server.h: Include <string.h> if HAVE_STRING_H.
12640 * ChangeLog: Correct paths in last ChangeLog entry.
12642 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12644 * linux-low.h: Remove obsolete prototypes.
12645 (struct linux_target_ops): New.
12646 (extern the_low_target): New.
12647 * linux-low.c (num_regs, regmap): Remove declarations.
12648 (register_addr): Use the_low_target explicitly.
12649 (fetch_register): Likewise.
12650 (usr_fetch_inferior_registers): Likewise.
12651 (usr_store_inferior_registers): Likewise.
12652 * linux-arm-low.c (num_regs): Remove.
12653 (arm_num_regs): Define.
12654 (arm_regmap): Renamed from regmap, made static.
12655 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12657 (arm_cannot_store_register): Renamed from cannot_store_register,
12659 (the_low_target): New.
12660 * linux-i386-low.c (num_regs): Remove.
12661 (i386_num_regs): Define.
12662 (i386_regmap): Renamed from regmap, made static.
12663 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12665 (i386_cannot_store_register): Renamed from cannot_store_register,
12667 (the_low_target): New.
12668 * linux-ia64-low.c (num_regs): Remove.
12669 (ia64_num_regs): Define.
12670 (ia64_regmap): Renamed from regmap, made static.
12671 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12673 (ia64_cannot_store_register): Renamed from cannot_store_register,
12675 (the_low_target): New.
12676 * linux-m68k-low.c (num_regs): Remove.
12677 (m68k_num_regs): Define.
12678 (m68k_regmap): Renamed from regmap, made static.
12679 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12681 (m68k_cannot_store_register): Renamed from cannot_store_register,
12683 (the_low_target): New.
12684 * linux-mips-low.c (num_regs): Remove.
12685 (mips_num_regs): Define.
12686 (mips_regmap): Renamed from regmap, made static.
12687 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12689 (mips_cannot_store_register): Renamed from cannot_store_register,
12691 (the_low_target): New.
12692 * linux-ppc-low.c (num_regs): Remove.
12693 (ppc_num_regs): Define.
12694 (ppc_regmap): Renamed from regmap, made static.
12695 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12697 (ppc_cannot_store_register): Renamed from cannot_store_register,
12699 (the_low_target): New.
12700 * linux-s390-low.c (num_regs): Remove.
12701 (s390_num_regs): Define.
12702 (s390_regmap): Renamed from regmap, made static.
12703 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12705 (s390_cannot_store_register): Renamed from cannot_store_register,
12707 (the_low_target): New.
12708 * linux-sh-low.c (num_regs): Remove.
12709 (sh_num_regs): Define.
12710 (sh_regmap): Renamed from regmap, made static.
12711 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12713 (sh_cannot_store_register): Renamed from cannot_store_register,
12715 (the_low_target): New.
12716 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12717 (the_low_target): New.
12719 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12721 * Makefile.in: Add stamp-h target.
12722 * configure.in: Create stamp-h.
12723 * configure: Regenerated.
12725 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12727 * inferiors.c: New file.
12728 * target.c: New file.
12729 * target.h: New file.
12730 * Makefile.in: Add target.o and inferiors.o. Update
12732 * linux-low.c (inferior_pid): New static variable,
12733 moved from server.c.
12734 (linux_create_inferior): Renamed from create_inferior.
12735 Call add_inferior. Return 0 on success instead of a PID.
12736 (linux_attach): Renamed from myattach.
12737 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12738 (linux_thread_alive): Renamed from mythread_alive.
12739 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12741 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12742 (regsets_store_inferior_registers): Correct error message.
12743 Add missing ``return 0''.
12744 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12745 (linux_store_registers): Renamed from store_inferior_registers.
12746 (linux_read_memory): Renamed from read_inferior_memory.
12747 (linux_write_memory): Renamed from write_inferior_memory.
12748 (linux_target_ops): New structure.
12749 (initialize_low): Call set_target_ops ().
12750 * remote-utils.c (unhexify): New function.
12751 (hexify): New function.
12752 (input_interrupt): Send signals to ``signal_pid''.
12753 * server.c (inferior_pid): Remove.
12754 (start_inferior): Update create_inferior call.
12755 (attach_inferior): Call add_inferior.
12756 (handle_query): New function.
12757 (main): Call handle_query for `q' packets.
12758 * server.h: Include "target.h". Remove obsolete prototypes.
12759 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12761 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12763 * Makefile.in: Add WARN_CFLAGS. Update configury
12765 * configure.in: Check for <string.h>
12766 * configure: Regenerate.
12767 * config.in: Regenerate.
12768 * gdbreplay.c: Include needed system headers.
12769 (remote_open): Remove strchr prototype.
12770 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12771 * regcache.c (supply_register): Change buf argument to const void *.
12772 (supply_register_by_name): Likewise.
12773 (collect_register): Change buf argument to void *.
12774 (collect_register_by_name): Likewise.
12775 * regcache.h: Add missing prototypes.
12776 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12777 * server.c (handle_query): New function.
12778 (attached): New static variable, moved out of main.
12779 (main): Quiet longjmp clobber warnings.
12780 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12781 * utils.c (error): Remove NORETURN.