1 2015-11-30 Pedro Alves <palves@redhat.com>
4 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5 report TARGET_WAITKIND_NO_RESUMED.
6 * remote-utils.c (prepare_resume_reply): Handle
7 TARGET_WAITKIND_NO_RESUMED.
8 * server.c (report_no_resumed): New global.
9 (handle_query) <qSupported>: Handle "no-resumed+". Report
10 "no-resumed+" support.
11 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
12 return error if the client doesn't support no-resumed events.
13 (push_stop_notification): New function.
14 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
15 events if the client supports them.
17 2015-11-30 Pedro Alves <palves@redhat.com>
19 * linux-low.c (thread_still_has_status_pending_p): Don't check
21 (lwp_resumed): New function.
22 (status_pending_p_callback): Return early if the LWP is not
23 supposed to be resumed.
25 2015-11-30 Pedro Alves <palves@redhat.com>
27 * linux-low.c (handle_extended_wait): Assert that the LWP's
28 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
29 thread create events, leave the new child's status pending.
30 (linux_low_filter_event): If GDB wants to hear about thread exit
31 events, leave the LWP marked dead and don't delete it.
32 (linux_wait_for_event_filtered): Don't check for thread exit.
33 (filter_exit_event): New function.
34 (linux_wait_1): Use it, when returning an exit event.
35 (linux_resume_one_lwp_throw): Assert that the LWP's
36 waitstatus is TARGET_WAITKIND_IGNORE.
37 * remote-utils.c (prepare_resume_reply): Handle
38 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
39 * server.c (report_thread_events): New global.
40 (handle_general_set): Handle QThreadEvents.
41 (handle_query) <qSupported>: Handle and report QThreadEvents+;
42 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
43 TARGET_WAITKIND_THREAD_EXITED.
44 * server.h (report_thread_events): Declare.
46 2015-11-30 Pedro Alves <palves@redhat.com>
48 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
49 the thread's last_resume_kind was resume_stop.
51 2015-11-30 Pedro Alves <palves@redhat.com>
53 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
56 2015-11-30 Pedro Alves <palves@redhat.com>
58 * server.c (handle_v_requests): Handle vCtrlC.
60 2015-11-30 Pedro Alves <palves@redhat.com>
62 * gdbthread.h (find_any_thread_of_pid): Declare.
63 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
65 * server.c (handle_query): If current_thread is NULL, look for
66 another thread of the selected process.
68 2015-11-26 Daniel Colascione <dancol@dancol.org>
69 Simon Marchi <simon.marchi@ericsson.com>
71 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
72 * server.c (handle_qxfer_threads_worker): Refactor to include thread
74 * target.h (struct target_ops) <thread_name>: New field.
75 (target_thread_name): New macro.
77 2015-11-23 Joel Brobecker <brobecker@adacore.com>
79 * regcache.h (regcache_invalidate_pid): Add declaration.
80 * regcache.c (regcache_invalidate_pid): New function, extracted
81 from regcache_invalidate.
82 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
83 Add trivial documentation comment.
84 * lynx-low.c: Use regcache_invalidate_pid instead of
87 2015-11-23 Joel Brobecker <brobecker@adacore.com>
89 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
90 and Elf64_auxv_t if the target is Android.
92 2015-11-22 Doug Evans <xdje42@gmail.com>
94 * target.h: #include <sys/types.h>.
96 2015-11-19 Pedro Alves <palves@redhat.com>
98 * linux-low.c (linux_process_qsupported): Change prototype.
100 * linux-low.h (struct linux_target_ops) <process_qsupported>:
102 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
103 and adjust to loop over all features.
104 * server.c (handle_query) <qSupported>: Adjust to call
105 target_process_qsupported once, passing it a vector of unprocessed
107 * target.h (struct target_ops) <process_qsupported>: Change
109 (target_process_qsupported): Adjust.
111 2015-11-19 Pedro Alves <palves@redhat.com>
113 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
115 * configure: Regenerate.
117 2015-11-19 Pedro Alves <palves@redhat.com>
119 * configure: Regenerate.
121 2015-11-19 Yao Qi <yao.qi@linaro.org>
123 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
126 2015-11-19 Yao Qi <yao.qi@linaro.org>
128 * linux-aarch64-low.c (enum aarch64_operand_type): New.
129 (struct aarch64_operand): Move enum out.
131 2015-11-19 Yao Qi <yao.qi@linaro.org>
133 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
134 struct user_fpsimd_state *.
135 (aarch64_store_fpregset): Likewise.
137 2015-11-19 Yao Qi <yao.qi@linaro.org>
139 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
140 struct user_pt_regs *.
141 (aarch64_store_gregset): Likewise.
143 2015-11-18 Pedro Alves <palves@redhat.com>
145 * Makefile.in (all_object_files): Add $IPA_OBJS.
147 2015-11-17 Pedro Alves <palves@redhat.com>
149 * win32-low.c (win32_resume): Use gdb_signal_from_host,
150 GDB_SIGNAL_0 and gdb_signal_to_string.
152 2015-11-17 Pedro Alves <palves@redhat.com>
154 * win32-low.c (handle_output_debug_string): Remove parameter.
155 (win32_kill): Remove our_status local and adjust call to
156 handle_output_debug_string.
157 (get_child_debug_event): Adjust call to
158 handle_output_debug_string.
160 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
162 * linux-mips-low.c (mips_fill_gregset): Add cast.
163 (mips_store_gregset): Likewise.
164 (mips_fill_fpregset): Likewise.
165 (mips_store_fpregset): Likewise.
167 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
169 * linux-mips-low.c (mips_add_watchpoint): Rename private to
172 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
174 * linux-mips-low.c (mips_linux_new_thread): Change type of
175 watch_type to enum target_hw_bp_type.
177 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
179 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
180 Change return type to arm_hwbp_type.
182 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
184 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
185 (arm_store_gregset): Likewise.
186 * linux-arm-low.c (arm_get_hwcap): Likewise.
187 (arm_read_description): Likewise.
189 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
191 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
193 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
195 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
196 (ppc_fill_vsxregset): Likewise.
197 (ppc_store_vsxregset): Likewise.
198 (ppc_fill_vrregset): Likewise.
199 (ppc_store_vrregset): Likewise.
200 (ppc_fill_evrregset): Likewise.
201 (ppc_store_evrregset): Likewise.
203 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
205 * linux-ppc-low.c (ppc_usrregs_info): Remove
207 (ppc_arch_setup): Move lower in file.
209 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
211 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
212 (ps_pdwrite): Likewise.
214 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
216 * linux-arm-low.c (arm_new_thread): Move pointer dereference
217 to after assert checks.
219 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
221 * proc-service.c (ps_pdread): Add/adjust casts.
222 (ps_pdwrite): Add/adjust casts.
224 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
226 * server.c (handle_search_memory_1): Cast return value of
229 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
231 * server.c (write_qxfer_response): Change type of data to
234 2015-10-29 Pedro Alves <palves@redhat.com>
236 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
238 2015-10-29 Pedro Alves <palves@redhat.com>
240 * tracepoint.c (clear_installed_tracepoints): Add casts.
242 2015-10-29 Pedro Alves <palves@redhat.com>
244 * server.c (handle_v_cont, process_serial_event): Add enum
245 gdb_signal casts to signal parsing code.
247 2015-10-29 Pedro Alves <palves@redhat.com>
249 * linux-low.h (NULL_REGSET): Define.
250 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
251 * linux-arm-low.c (arm_regsets): Likewise.
252 * linux-crisv32-low.c (cris_regsets): Likewise.
253 * linux-m68k-low.c (m68k_regsets): Likewise.
254 * linux-mips-low.c (mips_regsets): Likewise.
255 * linux-nios2-low.c (nios2_regsets): Likewise.
256 * linux-ppc-low.c (ppc_regsets): Likewise.
257 * linux-s390-low.c (s390_regsets): Likewise.
258 * linux-sh-low.c (sh_regsets): Likewise.
259 * linux-sparc-low.c (sparc_regsets): Likewise.
260 * linux-tic6x-low.c (tic6x_regsets): Likewise.
261 * linux-tile-low.c (tile_regsets): Likewise.
262 * linux-x86-low.c (x86_regsets): Likewise.
263 * linux-xtensa-low.c (xtensa_regsets): Likewise.
265 2015-10-29 Pedro Alves <palves@redhat.com>
267 * linux-low.h (NULL_REGSET): Define.
268 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
269 * linux-arm-low.c (arm_regsets): Likewise.
270 * linux-crisv32-low.c (cris_regsets): Likewise.
271 * linux-m68k-low.c (m68k_regsets): Likewise.
272 * linux-mips-low.c (mips_regsets): Likewise.
273 * linux-nios2-low.c (nios2_regsets): Likewise.
274 * linux-ppc-low.c (ppc_regsets): Likewise.
275 * linux-s390-low.c (s390_regsets): Likewise.
276 * linux-sh-low.c (sh_regsets): Likewise.
277 * linux-sparc-low.c (sparc_regsets): Likewise.
278 * linux-tic6x-low.c (tic6x_regsets): Likewise.
279 * linux-tile-low.c (tile_regsets): Likewise.
280 * linux-x86-low.c (x86_regsets): Likewise.
281 * linux-xtensa-low.c (xtensa_regsets): Likewise.
283 2015-10-26 Doug Evans <dje@google.com>
285 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
287 2015-10-26 Doug Evans <dje@google.com>
289 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
291 2015-10-26 Doug Evans <dje@google.com>
293 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
295 (attach_thread, find_new_threads_callback): Ditto.
297 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
299 * mem-break.h (set_breakpoint_data): Remove.
301 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
303 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
304 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
305 (initialize_low): Remove set_breakpoint_data call.
306 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
307 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
308 (initialize_low): Remove set_breakpoint_data call.
309 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
310 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
311 (initialize_low): Remove set_breakpoint_data call.
313 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
315 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
316 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
317 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
318 * target.h (target_breakpoint_kind_from_pc): New macro.
320 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
322 * linux-low.c (default_breakpoint_kind_from_pc): New function.
323 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
324 the default breakpoint kind.
326 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
328 * linux-arm-low.c (arm_supports_z_point_type): Add software
331 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
333 * linux-arm-low.c: Refactor breakpoint definitions.
334 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
335 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
337 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
339 * Makefile.in: Add arm.c/o.
340 * configure.srv: Likewise.
341 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
342 (arm_breakpoint_kind_from_pc): New function.
343 (arm_sw_breakpoint_from_kind): Return proper kind.
344 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
346 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
348 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
350 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
351 (struct raw_breakpoint) <size>: Remove.
352 (struct raw_breakpoint) <kind>: Add.
353 (bp_size): New function.
354 (bp_opcode): Likewise.
355 (find_raw_breakpoint_at): Adjust for kind.
356 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
357 (remove_memory_breakpoint): Adjust for kind call bp_size.
358 (set_raw_breakpoint_at): Adjust for kind.
359 (set_breakpoint): Likewise.
360 (set_breakpoint_at): Call breakpoint_kind_from_pc.
361 (delete_raw_breakpoint): Adjust for kind.
362 (delete_breakpoint): Likewise.
363 (find_gdb_breakpoint): Likewise.
364 (set_gdb_breakpoint_1): Likewise.
365 (set_gdb_breakpoint): Likewise.
366 (delete_gdb_breakpoint_1): Likewise.
367 (delete_gdb_breakpoint): Likewise.
368 (uninsert_raw_breakpoint): Likewise.
369 (reinsert_raw_breakpoint): Likewise.
370 (set_breakpoint_data): Remove.
371 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
372 (check_mem_read): Adjust for kind call bp_size.
373 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
374 (clone_one_breakpoint): Adjust for kind.
375 * mem-break.h (set_gdb_breakpoint): Likewise.
376 (delete_gdb_breakpoint): Likewise.
377 * server.c (process_serial_event): Likewise.
379 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
381 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
382 (struct linux_target_ops) <breakpoint>: Remove.
383 (struct linux_target_ops) <breakpoint_len>: Remove.
384 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
385 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
386 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
387 (arm_sw_breakpoint_from_kind): New function.
388 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
389 (struct linux_target_ops) <breakpoint>: Remove.
390 (struct linux_target_ops) <breakpoint_len>: Remove.
391 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
392 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
393 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
394 (struct linux_target_ops) <breakpoint>: Remove.
395 (struct linux_target_ops) <breakpoint_len>: Remove.
396 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
397 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
398 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
399 (struct linux_target_ops) <breakpoint>: Remove.
400 (struct linux_target_ops) <breakpoint_len>: Remove.
401 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
402 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
403 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
404 and sw_breakpoint_from_kind to increment the pc.
405 (linux_breakpoint_kind_from_pc): New function.
406 (linux_sw_breakpoint_from_kind): New function.
407 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
408 (initialize_low): Call breakpoint_kind_from_pc and
409 sw_breakpoint_from_kind to replace breakpoint_data/len.
410 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
412 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
413 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
414 (struct linux_target_ops) <breakpoint>: Remove.
415 (struct linux_target_ops) <breakpoint_len>: Remove.
416 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
417 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
418 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
419 (struct linux_target_ops) <breakpoint>: Remove.
420 (struct linux_target_ops) <breakpoint_len>: Remove.
421 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
422 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
423 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
424 (struct linux_target_ops) <breakpoint>: Remove.
425 (struct linux_target_ops) <breakpoint_len>: Remove.
426 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
427 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
428 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
429 (struct linux_target_ops) <breakpoint>: Remove.
430 (struct linux_target_ops) <breakpoint_len>: Remove.
431 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
432 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
433 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
434 (struct linux_target_ops) <breakpoint>: Remove.
435 (struct linux_target_ops) <breakpoint_len>: Remove.
436 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
437 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
438 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
439 (struct linux_target_ops) <breakpoint>: Remove.
440 (struct linux_target_ops) <breakpoint_len>: Remove.
441 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
442 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
443 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
444 (struct linux_target_ops) <breakpoint>: Remove.
445 (struct linux_target_ops) <breakpoint_len>: Remove.
446 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
447 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
448 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
449 (struct linux_target_ops) <breakpoint>: Remove.
450 (struct linux_target_ops) <breakpoint_len>: Remove.
451 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
452 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
453 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
454 (struct linux_target_ops) <breakpoint>: Remove.
455 (struct linux_target_ops) <breakpoint_len>: Remove.
456 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
457 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
458 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
459 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
460 (struct linux_target_ops) <breakpoint>: Remove.
461 (struct linux_target_ops) <breakpoint_len>: Remove.
462 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
463 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
464 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
465 (struct linux_target_ops) <breakpoint>: Remove.
466 (struct linux_target_ops) <breakpoint_len>: Remove.
467 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
468 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
470 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
472 * linux-cris-low.c (cris_get_pc): Remove void arg.
474 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
476 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
479 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
481 * inferiors.c (thread_pid_matches_callback): New function.
482 (find_thread_process): New function.
483 (remove_thread): Reset current_thread.
484 (remove_process): Assert threads have been removed first.
486 2015-10-15 Yao Qi <yao.qi@linaro.org>
488 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
490 (aarch64_remove_point): Likewise.
491 * regcache.c (regcache_register_size): New function.
493 2015-10-12 Yao Qi <yao.qi@linaro.org>
495 * linux-aarch64-low.c: Update all callers as emit_load_store
496 is renamed to aarch64_emit_load_store.
498 2015-10-12 Yao Qi <yao.qi@linaro.org>
500 * linux-aarch64-low.c: Update all callers of function renaming
501 from emit_insn to aarch64_emit_insn.
503 2015-10-12 Yao Qi <yao.qi@linaro.org>
505 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
507 (struct aarch64_memory_operand): Likewise.
509 (emit_insn): Move to arch/aarch64-insn.c.
510 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
511 (emit_load_store): Move to arch/aarch64-insn.c.
512 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
513 (can_encode_int32): Remove.
515 2015-10-12 Yao Qi <yao.qi@linaro.org>
517 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
518 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
519 (aarch64_relocate_instruction): Likewise.
520 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
521 (struct aarch64_insn_visitor): Likewise.
523 2015-10-12 Yao Qi <yao.qi@linaro.org>
525 * linux-aarch64-low.c (struct aarch64_insn_data): New.
526 (struct aarch64_insn_visitor): New.
527 (struct aarch64_insn_relocation_data): New.
528 (aarch64_ftrace_insn_reloc_b): New function.
529 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
530 (aarch64_ftrace_insn_reloc_cb): Likewise.
531 (aarch64_ftrace_insn_reloc_tb): Likewise.
532 (aarch64_ftrace_insn_reloc_adr): Likewise.
533 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
534 (aarch64_ftrace_insn_reloc_others): Likewise.
536 (aarch64_relocate_instruction): Use visitor.
538 2015-10-12 Yao Qi <yao.qi@linaro.org>
540 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
541 int. Add argument buf.
542 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
543 aarch64_relocate_instruction.
545 2015-10-12 Yao Qi <yao.qi@linaro.org>
547 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
548 argument insn. Remove local variable insn. Don't call
550 (aarch64_install_fast_tracepoint_jump_pad): Call
553 2015-09-30 Yao Qi <yao.qi@linaro.org>
555 * linux-aarch64-low.c (emit_movk): Shorten a long line.
556 (emit_load_store_pair): Likewise.
558 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
560 * dll.c (match_dll): Add cast(s).
561 (unloaded_dll): Likewise.
562 * linux-low.c (second_thread_of_pid_p): Likewise.
563 (delete_lwp_callback): Likewise.
564 (count_events_callback): Likewise.
565 (select_event_lwp_callback): Likewise.
566 (linux_set_resume_request): Likewise.
567 * server.c (accumulate_file_name_length): Likewise.
568 (emit_dll_description): Likewise.
569 (handle_qxfer_threads_worker): Likewise.
570 (visit_actioned_threads): Likewise.
571 * thread-db.c (any_thread_of): Likewise.
572 * tracepoint.c (same_process_p): Likewise.
573 (match_blocktype): Likewise.
574 (build_traceframe_info_xml): Likewise.
576 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
578 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
580 (gdb_unparse_agent_expr): Likewise.
581 * hostio.c (require_data): Likewise.
582 (handle_pread): Likewise.
583 * linux-low.c (disable_regset): Likewise.
584 (fetch_register): Likewise.
585 (store_register): Likewise.
586 (get_dynamic): Likewise.
587 (linux_qxfer_libraries_svr4): Likewise.
588 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
589 (set_fast_tracepoint_jump): Likewise.
590 (uninsert_fast_tracepoint_jumps_at): Likewise.
591 (reinsert_fast_tracepoint_jumps_at): Likewise.
592 (validate_inserted_breakpoint): Likewise.
593 (clone_agent_expr): Likewise.
594 * regcache.c (init_register_cache): Likewise.
595 * remote-utils.c (putpkt_binary_1): Likewise.
596 (decode_M_packet): Likewise.
597 (decode_X_packet): Likewise.
598 (look_up_one_symbol): Likewise.
599 (relocate_instruction): Likewise.
600 (monitor_output): Likewise.
601 * server.c (handle_search_memory): Likewise.
602 (handle_qxfer_exec_file): Likewise.
603 (handle_qxfer_libraries): Likewise.
604 (handle_qxfer): Likewise.
605 (handle_query): Likewise.
606 (handle_v_cont): Likewise.
607 (handle_v_run): Likewise.
608 (captured_main): Likewise.
609 * target.c (write_inferior_memory): Likewise.
610 * thread-db.c (try_thread_db_load_from_dir): Likewise.
611 * tracepoint.c (init_trace_buffer): Likewise.
612 (add_tracepoint_action): Likewise.
613 (add_traceframe): Likewise.
614 (add_traceframe_block): Likewise.
615 (cmd_qtdpsrc): Likewise.
616 (cmd_qtdv): Likewise.
617 (cmd_qtstatus): Likewise.
618 (response_source): Likewise.
619 (response_tsv): Likewise.
620 (cmd_qtnotes): Likewise.
621 (gdb_collect): Likewise.
622 (initialize_tracepoint): Likewise.
624 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
626 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
627 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
628 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
630 (enum aarch64_condition_codes): New enum.
631 (w0): New static global.
634 (struct aarch64_memory_operand) <type>: New
635 MEMORY_OPERAND_POSTINDEX type.
636 (postindex_memory_operand): New helper function.
637 (emit_ret): New function.
638 (emit_load_store_pair): New function, factored out of emit_stp
639 with support for MEMORY_OPERAND_POSTINDEX.
640 (emit_stp): Rewrite using emit_load_store_pair.
641 (emit_ldp): New function.
642 (emit_load_store): Likewise.
643 (emit_ldr): Mention post-index instruction in comment.
644 (emit_ldrh): New function.
645 (emit_ldrb): New function.
646 (emit_ldrsw): Mention post-index instruction in comment.
647 (emit_str): Likewise.
648 (emit_subs): New function.
649 (emit_cmp): Likewise.
650 (emit_and): Likewise.
651 (emit_orr): Likewise.
652 (emit_orn): Likewise.
653 (emit_eor): Likewise.
654 (emit_mvn): Likewise.
655 (emit_lslv): Likewise.
656 (emit_lsrv): Likewise.
657 (emit_asrv): Likewise.
658 (emit_mul): Likewise.
659 (emit_sbfm): Likewise.
660 (emit_sbfx): Likewise.
661 (emit_ubfm): Likewise.
662 (emit_ubfx): Likewise.
663 (emit_csinc): Likewise.
664 (emit_cset): Likewise.
665 (emit_nop): Likewise.
666 (emit_ops_insns): New helper function.
667 (emit_pop): Likewise.
668 (emit_push): Likewise.
669 (aarch64_emit_prologue): New function.
670 (aarch64_emit_epilogue): Likewise.
671 (aarch64_emit_add): Likewise.
672 (aarch64_emit_sub): Likewise.
673 (aarch64_emit_mul): Likewise.
674 (aarch64_emit_lsh): Likewise.
675 (aarch64_emit_rsh_signed): Likewise.
676 (aarch64_emit_rsh_unsigned): Likewise.
677 (aarch64_emit_ext): Likewise.
678 (aarch64_emit_log_not): Likewise.
679 (aarch64_emit_bit_and): Likewise.
680 (aarch64_emit_bit_or): Likewise.
681 (aarch64_emit_bit_xor): Likewise.
682 (aarch64_emit_bit_not): Likewise.
683 (aarch64_emit_equal): Likewise.
684 (aarch64_emit_less_signed): Likewise.
685 (aarch64_emit_less_unsigned): Likewise.
686 (aarch64_emit_ref): Likewise.
687 (aarch64_emit_if_goto): Likewise.
688 (aarch64_emit_goto): Likewise.
689 (aarch64_write_goto_address): Likewise.
690 (aarch64_emit_const): Likewise.
691 (aarch64_emit_call): Likewise.
692 (aarch64_emit_reg): Likewise.
693 (aarch64_emit_pop): Likewise.
694 (aarch64_emit_stack_flush): Likewise.
695 (aarch64_emit_zero_ext): Likewise.
696 (aarch64_emit_swap): Likewise.
697 (aarch64_emit_stack_adjust): Likewise.
698 (aarch64_emit_int_call_1): Likewise.
699 (aarch64_emit_void_call_2): Likewise.
700 (aarch64_emit_eq_goto): Likewise.
701 (aarch64_emit_ne_goto): Likewise.
702 (aarch64_emit_lt_goto): Likewise.
703 (aarch64_emit_le_goto): Likewise.
704 (aarch64_emit_gt_goto): Likewise.
705 (aarch64_emit_ge_got): Likewise.
706 (aarch64_emit_ops_impl): New static global variable.
707 (aarch64_emit_ops): New target function, return
708 &aarch64_emit_ops_impl.
709 (struct linux_target_ops): Install it.
711 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
713 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
714 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
716 * linux-aarch64-ipa.c: New file.
717 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
719 (aarch64_get_thread_area): New target method.
720 (extract_signed_bitfield): New helper function.
721 (aarch64_decode_ldr_literal): New function.
722 (enum aarch64_opcodes): New enum.
723 (struct aarch64_register): New struct.
724 (struct aarch64_operand): New struct.
725 (x0): New static global.
734 (aarch64_register): New helper function.
735 (register_operand): Likewise.
736 (immediate_operand): Likewise.
737 (struct aarch64_memory_operand): New struct.
738 (offset_memory_operand): New helper function.
739 (preindex_memory_operand): Likewise.
740 (enum aarch64_system_control_registers): New enum.
742 (emit_insn): New helper function.
743 (emit_b): New function.
744 (emit_bcond): Likewise.
747 (emit_blr): Likewise.
748 (emit_stp): Likewise.
749 (emit_ldp_q_offset): Likewise.
750 (emit_stp_q_offset): Likewise.
751 (emit_load_store): Likewise.
752 (emit_ldr): Likewise.
753 (emit_ldrsw): Likewise.
754 (emit_str): Likewise.
755 (emit_ldaxr): Likewise.
756 (emit_stxr): Likewise.
757 (emit_stlr): Likewise.
758 (emit_data_processing_reg): Likewise.
759 (emit_data_processing): Likewise.
760 (emit_add): Likewise.
761 (emit_sub): Likewise.
762 (emit_mov): Likewise.
763 (emit_movk): Likewise.
764 (emit_mov_addr): Likewise.
765 (emit_mrs): Likewise.
766 (emit_msr): Likewise.
767 (emit_sevl): Likewise.
768 (emit_wfe): Likewise.
769 (append_insns): Likewise.
770 (can_encode_int32_in): New helper function.
771 (aarch64_relocate_instruction): New function.
772 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
773 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
774 (struct linux_target_ops): Install aarch64_get_thread_area,
775 aarch64_install_fast_tracepoint_jump_pad and
776 aarch64_get_min_fast_tracepoint_insn_len.
778 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
780 * Makefile.in (aarch64-insn.o): New rule.
781 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
783 2015-09-21 Yao Qi <yao.qi@linaro.org>
785 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
787 2015-09-21 Yao Qi <yao.qi@linaro.org>
789 * tracepoint.c (max_jump_pad_size): Remove.
791 2015-09-18 Yao Qi <yao.qi@linaro.org>
793 * linux-aarch64-low.c: Don't include sys/uio.h.
794 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
796 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
798 * tracepoint.c (eval_result_type): Change prototype.
799 (condition_true_at_tracepoint): Fix argument to compiled_cond.
801 2015-09-15 Pedro Alves <palves@redhat.com>
803 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
804 Check whether to report exec events instead of checking whether
805 multiprocess is enabled.
807 2015-09-15 Pedro Alves <palves@redhat.com>
810 * remote-utils.c (prepare_resume_reply): Merge
811 TARGET_WAITKIND_VFORK_DONE switch case with the
812 TARGET_WAITKIND_FORKED case.
814 2015-09-15 Yao Qi <yao.qi@linaro.org>
816 * server.c (handle_query): Check string comparison using
817 "else if" instead of "if".
819 2015-09-15 Yao Qi <yao.qi@linaro.org>
821 * server.c (vCont_supported): New global variable.
822 (handle_query): Set vCont_supported to 1 if "vContSupported+"
823 matches. Append ";vContSupported+" to own_buf.
824 (handle_v_requests): Append ";s;S" to own_buf if target supports
825 hardware single step or vCont_supported is false.
826 (capture_main): Set vCont_supported to zero.
828 2015-09-15 Yao Qi <yao.qi@linaro.org>
830 * linux-low.c (linux_supports_conditional_breakpoints): Rename
832 (linux_supports_hardware_single_step): ... New function.
833 (linux_target_ops): Update.
834 * lynx-low.c (lynx_target_ops): Set field
835 supports_hardware_single_step to target_can_do_hardware_single_step.
836 * nto-low.c (nto_target_ops): Likewise.
837 * spu-low.c (spu_target_ops): Likewise.
838 * win32-low.c (win32_target_ops): Likewise.
839 * target.c (target_can_do_hardware_single_step): New function.
840 * target.h (struct target_ops) <supports_conditional_breakpoints>:
841 Remove. <supports_hardware_single_step>: New field.
842 (target_supports_conditional_breakpoints): Remove.
843 (target_supports_hardware_single_step): New macro.
844 (target_can_do_hardware_single_step): Declare.
845 * server.c (handle_query): Use target_supports_hardware_single_step
846 instead of target_supports_conditional_breakpoints.
848 2015-09-15 Yao Qi <yao.qi@linaro.org>
850 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
852 (struct linux_target_ops the_low_target): Install
853 aarch64_linux_siginfo_fixup.
855 2015-09-11 Don Breazeal <donb@codesourcery.com>
856 Luis Machado <lgustavo@codesourcery.com>
858 * linux-low.c (linux_mourn): Static declaration.
859 (linux_arch_setup): Move in front of
860 handle_extended_wait.
861 (linux_arch_setup_thread): New function.
862 (handle_extended_wait): Handle exec events. Call
863 linux_arch_setup_thread. Make event_lwp argument a
864 pointer-to-a-pointer.
865 (check_zombie_leaders): Do not check stopped threads.
866 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
867 (linux_low_filter_event): Add lwp and thread for exec'ing
868 non-leader thread if leader thread has been deleted.
869 Refactor code into linux_arch_setup_thread and call it.
870 Pass child lwp pointer by reference to handle_extended_wait.
871 (linux_wait_for_event_filtered): Update comment.
872 (linux_wait_1): Prevent clobbering exec event status.
873 (linux_supports_exec_events): New function.
874 (linux_target_ops) <supports_exec_events>: Initialize new member.
875 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
877 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
878 * server.c (report_exec_events): New global variable.
879 (handle_query): Handle qSupported query for exec-events feature.
880 (captured_main): Initialize report_exec_events.
881 * server.h (report_exec_events): Declare new global variable.
882 * target.h (struct target_ops) <supports_exec_events>: New
884 (target_supports_exec_events): New macro.
885 * win32-low.c (win32_target_ops) <supports_exec_events>:
886 Initialize new member.
888 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
890 * linux-low.c (linux_low_enable_btrace): Remove.
891 (linux_target_ops): Replace linux_low_enable_btrace with
894 2015-09-03 Yao Qi <yao.qi@linaro.org>
896 * linux-aarch64-low.c (aarch64_insert_point): Call
897 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
900 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
902 * linux-low.c (check_stopped_by_breakpoint): Use
903 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
905 2015-08-27 Pedro Alves <palves@redhat.com>
907 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
909 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
911 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
912 the XNEW-family equivalent.
913 (compile_bytecodes): Likewise.
914 * dll.c (loaded_dll): Likewise.
915 * event-loop.c (append_callback_event): Likewise.
916 (create_file_handler): Likewise.
917 (create_file_event): Likewise.
918 * hostio.c (handle_open): Likewise.
919 * inferiors.c (add_thread): Likewise.
920 (add_process): Likewise.
921 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
922 * linux-arm-low.c (arm_new_process): Likewise.
923 (arm_new_thread): Likewise.
924 * linux-low.c (add_to_pid_list): Likewise.
925 (linux_add_process): Likewise.
926 (handle_extended_wait): Likewise.
928 (enqueue_one_deferred_signal): Likewise.
929 (enqueue_pending_signal): Likewise.
930 (linux_resume_one_lwp_throw): Likewise.
931 (linux_resume_one_thread): Likewise.
932 (linux_read_memory): Likewise.
933 (linux_write_memory): Likewise.
934 * linux-mips-low.c (mips_linux_new_process): Likewise.
935 (mips_linux_new_thread): Likewise.
936 (mips_add_watchpoint): Likewise.
937 * linux-x86-low.c (initialize_low_arch): Likewise.
938 * lynx-low.c (lynx_add_process): Likewise.
939 * mem-break.c (set_raw_breakpoint_at): Likewise.
940 (set_breakpoint): Likewise.
941 (add_condition_to_breakpoint): Likewise.
942 (add_commands_to_breakpoint): Likewise.
943 (clone_agent_expr): Likewise.
944 (clone_one_breakpoint): Likewise.
945 * regcache.c (new_register_cache): Likewise.
946 * remote-utils.c (look_up_one_symbol): Likewise.
947 * server.c (queue_stop_reply): Likewise.
948 (start_inferior): Likewise.
949 (queue_stop_reply_callback): Likewise.
950 (handle_target_event): Likewise.
951 * spu-low.c (fetch_ppc_memory): Likewise.
952 (store_ppc_memory): Likewise.
953 * target.c (set_target_ops): Likewise.
954 * thread-db.c (thread_db_load_search): Likewise.
955 (try_thread_db_load_1): Likewise.
956 * tracepoint.c (add_tracepoint): Likewise.
957 (add_tracepoint_action): Likewise.
958 (create_trace_state_variable): Likewise.
959 (cmd_qtdpsrc): Likewise.
960 (cmd_qtro): Likewise.
961 (add_while_stepping_state): Likewise.
962 * win32-low.c (child_add_thread): Likewise.
963 (get_image_name): Likewise.
965 2015-08-25 Yao Qi <yao.qi@linaro.org>
967 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
969 2015-08-25 Yao Qi <yao.qi@linaro.org>
971 * Makefile.in (aarch64-linux.o): New rule.
972 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
974 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
975 (aarch64_init_debug_reg_state): Make it extern.
976 (aarch64_linux_prepare_to_resume): Remove.
978 2015-08-25 Yao Qi <yao.qi@linaro.org>
980 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
981 lwp_arch_private_info and ptid_of_lwp.
983 2015-08-25 Yao Qi <yao.qi@linaro.org>
985 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
986 Find proc_info by find_process_pid. All callers updated.
988 2015-08-25 Yao Qi <yao.qi@linaro.org>
990 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
992 (debug_reg_change_callback): Remove.
993 (aarch64_notify_debug_reg_change): Remove.
995 2015-08-25 Yao Qi <yao.qi@linaro.org>
997 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
998 Call current_lwp_ptid.
1000 2015-08-25 Yao Qi <yao.qi@linaro.org>
1002 * linux-aarch64-low.c (debug_reg_change_callback): Use
1005 2015-08-25 Yao Qi <yao.qi@linaro.org>
1007 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1009 2015-08-25 Yao Qi <yao.qi@linaro.org>
1011 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1013 2015-08-25 Yao Qi <yao.qi@linaro.org>
1015 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1018 2015-08-25 Yao Qi <yao.qi@linaro.org>
1020 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1022 (debug_reg_change_callback): Remove argument entry and add argument
1023 lwp. Remove local variable thread. Don't print thread id in the
1024 debugging output. Don't check whether pid of thread equals to pid.
1025 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1026 iterate_over_lwps instead find_inferior.
1028 2015-08-24 Pedro Alves <palves@redhat.com>
1030 * inferiors.c (get_first_process): New function.
1031 * inferiors.h (get_first_process): New declaration.
1032 * remote-utils.c (read_ptid): Default to the first process in the
1033 list, instead of to the current thread's process.
1035 2015-08-24 Pedro Alves <palves@redhat.com>
1037 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1038 * event-loop.c: Likewise.
1039 * remote-utils.c: Likewise.
1040 * tracepoint.c: Likewise.
1042 2015-08-24 Pedro Alves <palves@redhat.com>
1044 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1047 2015-08-21 Pedro Alves <palves@redhat.com>
1049 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1050 instead of literal 1.
1052 2015-08-21 Pedro Alves <palves@redhat.com>
1054 * tdesc.c (default_description): Explicitly zero-initialize.
1056 2015-08-21 Pedro Alves <palves@redhat.com>
1059 * inferiors.c (remove_thread): Discard any pending stop reply for
1061 * server.c (remove_all_on_match_pid): Rename to ...
1062 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1064 (discard_queued_stop_replies): Change parameter to a ptid. Now
1066 (handle_v_kill, kill_inferior_callback, captured_main)
1067 (process_serial_event): Adjust.
1068 * server.h (discard_queued_stop_replies): Declare.
1070 2015-08-21 Pedro Alves <palves@redhat.com>
1072 * linux-low.c (wait_for_sigstop): Always switch to no thread
1073 selected if the previously current thread dies.
1074 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1075 process instead of the current thread's.
1076 * remote-utils.c (input_interrupt): Don't check if there's no
1078 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1079 current thread to the general thread fails, error out.
1080 (handle_qxfer_auxv, handle_qxfer_libraries)
1081 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1082 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1083 (handle_query): Check if there's a thread selected instead of
1084 checking whether there's any thread in the thread list.
1085 (handle_qxfer_threads, handle_qxfer_btrace)
1086 (handle_qxfer_btrace_conf): Don't error out early if there's no
1087 thread in the thread list.
1088 (handle_v_cont, myresume): Don't set the current thread to the
1090 (process_serial_event) <Hg handling>: Also set thread_id if the
1091 previous general thread is still alive.
1092 (process_serial_event) <g/G handling>: If setting the current
1093 thread to the general thread fails, error out.
1094 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1095 thread's lwp instead of the current thread's.
1096 * target.c (set_desired_thread): If the desired thread was not
1097 found, leave the current thread pointing to NULL. Return an int
1098 (boolean) indicating success.
1099 * target.h (set_desired_thread): Change return type to int.
1101 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1103 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1104 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1106 (ps_get_thread_area): New function.
1108 2015-08-19 Gary Benson <gbenson@redhat.com>
1110 * hostio.c (handle_pread): Do not attempt to read more data
1111 than hostio_reply_with_data can fit in a packet.
1113 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1115 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1117 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1119 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1121 2015-08-06 Pedro Alves <palves@redhat.com>
1123 * tracepoint.c (expr_eval_result): Now an int.
1125 2015-08-06 Pedro Alves <palves@redhat.com>
1127 * gdbthread.h (struct regcache): Forward declare.
1128 (struct thread_info) <regcache_data>: Now a struct regcache
1130 * inferiors.c (inferior_regcache_data)
1131 (set_inferior_regcache_data): Now work with struct regcache
1133 * inferiors.h (struct regcache): Forward declare.
1134 (inferior_regcache_data, set_inferior_regcache_data): Now work
1135 with struct regcache pointers.
1136 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1137 (free_register_cache_thread): Remove struct regcache pointer
1140 2015-08-06 Pedro Alves <palves@redhat.com>
1142 * server.c (captured_main): On error, print the exception message
1143 to stderr, and if run_once is set, throw a quit.
1145 2015-08-06 Pedro Alves <palves@redhat.com>
1147 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1150 2015-08-06 Pedro Alves <palves@redhat.com>
1152 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1153 reading beyond the passed in buffer length.
1155 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1157 * tracepoint.c (symbol_list) <required>: Remove.
1159 2015-08-06 Pedro Alves <palves@redhat.com>
1161 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1162 count if stopping and suspending threads.
1163 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1164 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1165 (linux_detach): Complete an ongoing step-over.
1166 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1168 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1169 (linux_wait_1): If passing a signal to the inferior after
1170 finishing a step-over, unsuspend and re-resume all lwps. If we
1171 see a single-step event but the thread should be continuing, don't
1172 pass the trap to gdb.
1173 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1174 internal_error instead of gdb_assert.
1175 (enqueue_pending_signal): New function.
1176 (check_ptrace_stopped_lwp_gone): Add debug output.
1177 (start_step_over): Use internal_error instead of gdb_assert.
1178 (complete_ongoing_step_over): New function.
1179 (linux_resume_one_thread): Don't resume a suspended thread.
1180 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1183 2015-08-06 Pedro Alves <palves@redhat.com>
1185 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1186 (linux_thread_alive): Use lwp_is_marked_dead.
1187 (extended_event_reported): Delete.
1188 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1189 instead of extended_event_reported.
1190 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1192 (lwp_is_marked_dead): New function.
1193 (lwp_running): Use lwp_is_marked_dead.
1194 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1197 2015-08-06 Pedro Alves <palves@redhat.com>
1199 * linux-low.c (linux_wait_1): Move fork event output out of the
1200 !report_to_gdb check. Pass event_child->waitstatus to
1201 target_waitstatus_to_string instead of ourstatus.
1203 2015-08-04 Yao Qi <yao.qi@linaro.org>
1205 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1206 if current_thread is 32 bit.
1208 2015-08-04 Yao Qi <yao.qi@linaro.org>
1210 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1211 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1212 * server.c (extended_protocol): Remove "static".
1213 * server.h (extended_protocol): Declare it.
1215 2015-08-04 Yao Qi <yao.qi@linaro.org>
1217 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1218 both aarch64 and aarch32.
1219 (aarch64_set_pc): Likewise.
1221 2015-08-04 Yao Qi <yao.qi@linaro.org>
1223 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1224 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1225 arm-with-neon.xml to srv_xmlfiles.
1226 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1227 (is_64bit_tdesc): New function.
1228 (aarch64_linux_read_description): New function.
1229 (aarch64_arch_setup): Call aarch64_linux_read_description.
1230 (regs_info): Rename to regs_info_aarch64.
1231 (aarch64_regs_info): Return right regs_info.
1232 (initialize_low_arch): Call initialize_low_arch_aarch32.
1234 2015-08-04 Yao Qi <yao.qi@linaro.org>
1236 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1237 * linux-aarch32-low.c: New file.
1238 * linux-aarch32-low.h: New file.
1239 * linux-arm-low.c (arm_fill_gregset): Move it to
1240 linux-aarch32-low.c.
1241 (arm_store_gregset): Likewise.
1242 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1243 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1244 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1245 (regs_info): Rename to regs_info_arm.
1246 (arm_regs_info): Return regs_info_aarch32 if
1247 have_ptrace_getregset is 1 and target description is
1248 arm_with_neon or arm_with_vfpv3.
1249 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1250 Call initialize_low_arch_aarch32 instead.
1252 2015-08-04 Yao Qi <yao.qi@linaro.org>
1254 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1255 * linux-low.c: ... here.
1256 * linux-low.h (have_ptrace_getregset): Declare it.
1258 2015-08-04 Pedro Alves <palves@redhat.com>
1260 * thread-db.c (struct thread_db): Use new typedefs.
1261 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1263 (disable_thread_event_reporting): Cast result of dlsym to
1264 destination function pointer type.
1265 (thread_db_mourn): Use td_ta_delete_ftype.
1267 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1269 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1271 (CDX_BREAKPOINT): Define for R2.
1272 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1273 (the_low_target): Add comments.
1275 2015-07-30 Yao Qi <yao.qi@linaro.org>
1277 * linux-arm-low.c (arm_hwcap): Remove it.
1278 (arm_read_description): New local variable arm_hwcap. Don't
1279 set arm_hwcap to zero.
1281 2015-07-30 Yao Qi <yao.qi@linaro.org>
1283 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1284 Use regcache->tdesc instead.
1285 (arm_store_wmmxregset): Likewise.
1286 (arm_fill_vfpregset): Likewise.
1287 (arm_store_vfpregset): Likewise.
1289 2015-07-30 Yao Qi <yao.qi@linaro.org>
1291 * linux-arm-low.c: Include arch/arm.h.
1292 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1293 (arm_store_gregset): Likewise.
1295 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1297 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1298 ptrace's 4th parameter.
1300 2015-07-27 Yao Qi <yao.qi@linaro.org>
1302 * configure.srv (case aarch64*-*-linux*): Don't set
1305 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1307 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1309 * linux-arm-low.c: Likewise.
1310 * linux-cris-low.c: Likewise.
1311 * linux-crisv32-low.c: Likewise.
1312 * linux-low.c: Likewise.
1313 * linux-m68k-low.c: Likewise.
1314 * linux-mips-low.c: Likewise.
1315 * linux-nios2-low.c: Likewise.
1316 * linux-s390-low.c: Likewise.
1317 * linux-sparc-low.c: Likewise.
1318 * linux-tic6x-low.c: Likewise.
1319 * linux-tile-low.c: Likewise.
1320 * linux-x86-low.c: Likewise.
1322 2015-07-24 Pedro Alves <palves@redhat.com>
1324 * config.in: Regenerate.
1325 * configure: Regenerate.
1327 2015-07-24 Pedro Alves <palves@redhat.com>
1329 * acinclude.m4: Include ../ptrace.m4.
1330 * configure.ac: Call GDB_AC_PTRACE.
1331 * config.in, configure: Regenerate.
1333 2015-07-24 Yao Qi <yao.qi@linaro.org>
1335 * linux-low.c (linux_create_inferior): Remove setting to
1336 proc->priv->new_inferior.
1337 (linux_attach): Likewise.
1338 (linux_low_filter_event): Likewise.
1339 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1341 2015-07-24 Yao Qi <yao.qi@linaro.org>
1343 * linux-low.c (linux_arch_setup): New function.
1344 (linux_low_filter_event): If proc->tdesc is NULL and
1345 proc->attached is true, call the_low_target.arch_setup.
1346 Otherwise, keep status pending, and return.
1347 (linux_resume_one_lwp_throw): Don't call get_pc if
1348 thread->while_stepping isn't NULL. Don't call
1349 get_thread_regcache if proc->tdesc is NULL.
1350 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1351 (linux_target_ops): Install arch_setup.
1352 * server.c (start_inferior): Call the_target->arch_setup.
1353 * target.h (struct target_ops) <arch_setup>: New field.
1354 (target_arch_setup): New marco.
1355 * lynx-low.c (lynx_target_ops): Update.
1356 * nto-low.c (nto_target_ops): Update.
1357 * spu-low.c (spu_target_ops): Update.
1358 * win32-low.c (win32_target_ops): Update.
1360 2015-07-24 Yao Qi <yao.qi@linaro.org>
1362 * linux-low.c (linux_add_process): Don't set
1363 proc->priv->new_inferior.
1364 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1365 (linux_attach): Likewise.
1367 2015-07-24 Yao Qi <yao.qi@linaro.org>
1369 * server.c (start_inferior): Code refactor.
1371 2015-07-24 Yao Qi <yao.qi@linaro.org>
1373 * server.c (process_serial_event): Set general_thread.
1375 2015-07-21 Yao Qi <yao.qi@linaro.org>
1377 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1378 aarch64_linux_get_debug_reg_capacity.
1380 2015-07-17 Yao Qi <yao.qi@linaro.org>
1382 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1383 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1384 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1385 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1386 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1387 (AARCH64_HWP_ALIGNMENT): Likewise.
1388 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1389 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1390 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1391 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1392 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1393 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1394 (struct aarch64_debug_reg_state): Likewise.
1395 (struct arch_lwp_info): Likewise.
1396 (aarch64_align_watchpoint): Likewise.
1397 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1398 (aarch64_watchpoint_length): Likewise.
1399 (aarch64_point_encode_ctrl_reg): Likewise
1400 (aarch64_point_is_aligned): Likewise.
1401 (aarch64_align_watchpoint): Likewise.
1402 (aarch64_linux_set_debug_regs):
1403 (aarch64_dr_state_insert_one_point): Likewise.
1404 (aarch64_dr_state_remove_one_point): Likewise.
1405 (aarch64_handle_breakpoint): Likewise.
1406 (aarch64_handle_aligned_watchpoint): Likewise.
1407 (aarch64_handle_unaligned_watchpoint): Likewise.
1408 (aarch64_handle_watchpoint): Likewise.
1410 2015-07-17 Yao Qi <yao.qi@linaro.org>
1412 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1413 and don't aarch64_get_debug_reg_state. All callers update.
1414 (aarch64_handle_aligned_watchpoint): Likewise.
1415 (aarch64_handle_unaligned_watchpoint): Likewise.
1416 (aarch64_handle_watchpoint): Likewise.
1417 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1418 (aarch64_remove_point): Likewise.
1420 2015-07-17 Yao Qi <yao.qi@linaro.org>
1422 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1424 (aarch64_handle_unaligned_watchpoint): Likewise.
1426 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1428 Revert the previous 3 commits:
1429 Move gdb_regex* to common/
1430 Move linux_find_memory_regions_full & co.
1431 gdbserver build-id attribute generator
1433 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1434 Jan Kratochvil <jan.kratochvil@redhat.com>
1436 gdbserver build-id attribute generator.
1437 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1438 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1439 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1441 (get_dynamic): Use find_pdhr to traverse program headers.
1442 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1443 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1444 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1445 (get_hex_build_id): New.
1446 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1447 to reply XML document.
1449 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1450 Jan Kratochvil <jan.kratochvil@redhat.com>
1452 * target.c: Include target/target-utils.h and fcntl.h.
1453 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1454 (target_fileio_read_stralloc): New functions.
1456 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1458 * Makefile.in (OBS): Add gdb_regex.o.
1460 * config.in: Rebuilt.
1461 * configure: Rebuilt.
1463 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1464 Jan Kratochvil <jan.kratochvil@redhat.com>
1466 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1467 * Makefile.in (OBS): Add target-utils.o.
1468 (linux-maps.o, target-utils.o): New.
1469 * configure.srv (srv_linux_obj): Add linux-maps.o.
1471 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1473 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1475 (the_low_target): Install it.
1477 2015-07-14 Pedro Alves <palves@redhat.com>
1479 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1480 Instead, ignore ECHILD, and throw an error for other errnos.
1482 2015-07-10 Pedro Alves <palves@redhat.com>
1484 * event-loop.c (struct callback_event) <data>: Change type to
1485 gdb_client_data instance instead of gdb_client_data pointer.
1486 (append_callback_event): Adjust.
1488 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1490 * linux-aarch64-low.c: Add comments for each linux_target_ops
1491 method. Remove comments already covered in target_ops and
1492 linux_target_ops definitions.
1493 (the_low_target): Add comments for each unimplemented method.
1495 2015-07-09 Yao Qi <yao.qi@linaro.org>
1497 * linux-aarch64-low.c (aarch64_regmap): Remove.
1498 (aarch64_usrregs_info): Remove.
1499 (regs_info): Set field usrregs to NULL.
1501 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1503 * linux-low.c: Include "rsp-low.h"
1504 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1505 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1506 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1507 (handle_btrace_enable_pt): New.
1508 (handle_btrace_general_set): Support "pt".
1509 (handle_btrace_conf_general_set): Support "pt:size".
1511 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1513 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1516 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1518 * linux-aarch64-low.c: Remove comment about endianness.
1519 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1520 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1523 2015-06-24 Gary Benson <gbenson@redhat.com>
1525 * linux-i386-ipa.c (stdint.h): Do not include.
1526 * lynx-i386-low.c (stdint.h): Likewise.
1527 * lynx-ppc-low.c (stdint.h): Likewise.
1528 * mem-break.c (stdint.h): Likewise.
1529 * thread-db.c (stdint.h): Likewise.
1530 * tracepoint.c (stdint.h): Likewise.
1531 * win32-low.c (stdint.h): Likewise.
1533 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1535 * server.c (write_qxfer_response): Update call to
1536 remote_escape_output.
1538 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1539 Jan Kratochvil <jan.kratochvil@redhat.com>
1541 Merge multiple hex conversions.
1542 * gdbreplay.c (tohex): Rename to 'fromhex'.
1543 (logchar): Use fromhex.
1545 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1547 * server.c (handle_qxfer_libraries): Set `version' attribute for
1550 2015-06-10 Gary Benson <gbenson@redhat.com>
1552 * target.h (struct target_ops) <multifs_open>: New field.
1553 <multifs_unlink>: Likewise.
1554 <multifs_readlink>: Likewise.
1555 * linux-low.c (nat/linux-namespaces.h): New include.
1556 (linux_target_ops): Initialize the_target->multifs_open,
1557 the_target->multifs_unlink and the_target->multifs_readlink.
1558 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1559 * hostio.c (hostio_fs_pid): New static variable.
1560 (hostio_handle_new_gdb_connection): New function.
1561 (handle_setfs): Likewise.
1562 (handle_open): Use the_target->multifs_open as appropriate.
1563 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1564 (handle_readlink): Use the_target->multifs_readlink as
1566 (handle_vFile): Handle vFile:setfs packets.
1567 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1568 after target_handle_new_gdb_connection.
1570 2015-06-10 Gary Benson <gbenson@redhat.com>
1572 * configure.ac (AC_CHECK_FUNCS): Add setns.
1573 * config.in: Regenerate.
1574 * configure: Likewise.
1575 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1576 (linux-namespaces.o): New rule.
1577 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1579 2015-06-09 Gary Benson <gbenson@redhat.com>
1581 * hostio.c (handle_open): Process mode argument with
1582 fileio_to_host_mode.
1584 2015-06-01 Yao Qi <yao.qi@linaro.org>
1586 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1587 * linux-x86-low.c: Likewise.
1589 2015-05-28 Don Breazeal <donb@codesourcery.com>
1591 * linux-low.c (handle_extended_wait): Initialize
1592 thread_info.last_resume_kind for new fork children.
1594 2015-05-15 Pedro Alves <palves@redhat.com>
1596 * target.h (target_handle_new_gdb_connection): Rewrite using if
1597 wrapped in do/while.
1599 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1601 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1602 * configure, config.in: Regenerate.
1603 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1606 2015-05-12 Don Breazeal <donb@codesourcery.com>
1608 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1609 PTRACE_EVENT_VFORK_DONE.
1610 (linux_low_ptrace_options, extended_event_reported): Add vfork
1612 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1613 and "vforkdone" for RSP 'T' Stop Reply Packet.
1614 * server.h (report_vfork_events): Declare
1617 2015-05-12 Don Breazeal <donb@codesourcery.com>
1619 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1620 (the_low_target) <new_fork>: Initialize new member.
1621 * linux-arm-low.c (arm_new_fork): New function.
1622 (the_low_target) <new_fork>: Initialize new member.
1623 * linux-low.c (handle_extended_wait): Call new target function
1625 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1626 * linux-mips-low.c (mips_add_watchpoint): New function
1627 extracted from mips_insert_point.
1628 (the_low_target) <new_fork>: Initialize new member.
1629 (mips_linux_new_fork): New function.
1630 (mips_insert_point): Call mips_add_watchpoint.
1631 * linux-x86-low.c (x86_linux_new_fork): New function.
1632 (the_low_target) <new_fork>: Initialize new member.
1634 2015-05-12 Don Breazeal <donb@codesourcery.com>
1636 * linux-low.c (handle_extended_wait): Implement return value,
1637 rename argument 'event_child' to 'event_lwp', handle
1638 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1639 (linux_low_ptrace_options): New function.
1640 (linux_low_filter_event): Call linux_low_ptrace_options,
1641 use different argument fo linux_enable_event_reporting,
1642 use return value from handle_extended_wait.
1643 (extended_event_reported): New function.
1644 (linux_wait_1): Call extended_event_reported and set
1645 status to report fork events.
1646 (linux_write_memory): Add pid to debug message.
1647 (reset_lwp_ptrace_options_callback): New function.
1648 (linux_handle_new_gdb_connection): New function.
1649 (linux_target_ops): Initialize new structure member.
1650 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1651 * lynx-low.c: Initialize new structure member.
1652 * remote-utils.c (prepare_resume_reply): Implement stop reason
1653 "fork" for "T" stop message.
1654 * server.c (handle_query): Call handle_new_gdb_connection.
1655 * server.h (report_fork_events): Declare global flag.
1656 * target.h (struct target_ops) <handle_new_gdb_connection>:
1658 (target_handle_new_gdb_connection): New macro.
1659 * win32-low.c: Initialize new structure member.
1661 2015-05-12 Don Breazeal <donb@codesourcery.com>
1663 * mem-break.c (APPEND_TO_LIST): Define macro.
1664 (clone_agent_expr): New function.
1665 (clone_one_breakpoint): New function.
1666 (clone_all_breakpoints): New function.
1667 * mem-break.h: Declare new functions.
1669 2015-05-12 Don Breazeal <donb@codesourcery.com>
1671 * linux-low.c (linux_supports_fork_events): New function.
1672 (linux_supports_vfork_events): New function.
1673 (linux_target_ops): Initialize new structure members.
1674 (initialize_low): Call linux_check_ptrace_features.
1675 * lynx-low.c (lynx_target_ops): Initialize new structure
1677 * server.c (report_fork_events, report_vfork_events):
1679 (handle_query): Add new features to qSupported packet and
1681 (captured_main): Initialize new global variables.
1682 * target.h (struct target_ops) <supports_fork_events>:
1684 <supports_vfork_events>: New member.
1685 (target_supports_fork_events): New macro.
1686 (target_supports_vfork_events): New macro.
1687 * win32-low.c (win32_target_ops): Initialize new structure
1690 2015-05-12 Gary Benson <gbenson@redhat.com>
1692 * server.c (handle_qxfer_exec_file): Use current process
1695 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1697 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1698 Remove HAVE_PTRACE_GETREGS conditionals.
1699 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1700 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1702 2015-05-08 Yao Qi <yao.qi@linaro.org>
1704 * linux-low.c (linux_supports_conditional_breakpoints): New
1706 (linux_target_ops): Install new target method.
1707 * lynx-low.c (lynx_target_ops): Install NULL hook for
1708 supports_conditional_breakpoints.
1709 * nto-low.c (nto_target_ops): Likewise.
1710 * spu-low.c (spu_target_ops): Likewise.
1711 * win32-low.c (win32_target_ops): Likewise.
1712 * server.c (handle_query): Check
1713 target_supports_conditional_breakpoints.
1714 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1716 (target_supports_conditional_breakpoints): New macro.
1718 2015-05-06 Pedro Alves <palves@redhat.com>
1721 * server.c (start_inferior): If the process exits, mourn it.
1723 2015-04-21 Gary Benson <gbenson@redhat.com>
1725 * hostio.c (fileio_open_flags_to_host): Factored out to
1726 fileio_to_host_openflags in common/fileio.c. Single use
1729 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1731 * linux-xtensa-low.c (xtensa_fill_gregset)
1732 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1735 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1737 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1738 (regs_info): Replace usrregs pointer with NULL.
1740 2015-04-17 Gary Benson <gbenson@redhat.com>
1742 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1743 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1744 * server.c (handle_qxfer_exec_file): New function.
1745 (qxfer_packets): Add exec-file entry.
1746 (handle_query): Report qXfer:exec-file:read as supported packet.
1748 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1750 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1752 2015-04-09 Gary Benson <gbenson@redhat.com>
1754 * hostio-errno.c (errno_to_fileio_error): Remove function.
1755 Update caller to use remote_fileio_to_fio_error.
1757 2015-04-09 Yao Qi <yao.qi@linaro.org>
1759 * linux-low.c (linux_insert_point): Call
1760 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1761 (linux_remove_point): Call remove_memory_breakpoint if type is
1763 * linux-x86-low.c (x86_insert_point): Don't call
1764 insert_memory_breakpoint.
1765 (x86_remove_point): Don't call remove_memory_breakpoint.
1767 2015-04-01 Pedro Alves <palves@redhat.com>
1768 Cleber Rosa <crosa@redhat.com>
1770 * server.c (gdbserver_usage): Reorganize and extend the usage
1773 2015-03-24 Pedro Alves <palves@redhat.com>
1775 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1776 output. Also dump TRAP_TRACE.
1777 (linux_low_filter_event): In debug output, distinguish a
1778 resume_stop SIGSTOP from a delayed SIGSTOP.
1780 2015-03-24 Gary Benson <gbenson@redhat.com>
1782 * linux-x86-low.c (x86_linux_new_thread): Moved to
1784 (x86_linux_prepare_to_resume): Likewise.
1786 2015-03-24 Gary Benson <gbenson@redhat.com>
1788 * Makefile.in (x86-linux-dregs.o): New rule.
1789 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1790 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1791 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1792 (x86_linux_dr_get): Likewise.
1793 (x86_linux_dr_set): Likewise.
1794 (update_debug_registers_callback): Likewise.
1795 (x86_linux_dr_set_addr): Likewise.
1796 (x86_linux_dr_get_addr): Likewise.
1797 (x86_linux_dr_set_control): Likewise.
1798 (x86_linux_dr_get_control): Likewise.
1799 (x86_linux_dr_get_status): Likewise.
1800 (x86_linux_update_debug_registers): Likewise.
1802 2015-03-24 Gary Benson <gbenson@redhat.com>
1804 * linux-x86-low.c (x86_linux_update_debug_registers):
1805 New function, factored out from...
1806 (x86_linux_prepare_to_resume): ...this.
1808 2015-03-24 Gary Benson <gbenson@redhat.com>
1810 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1811 (x86_linux_dr_set): Likewise.
1812 (update_debug_registers_callback): Likewise.
1813 (x86_linux_dr_set_addr): Likewise.
1814 (x86_linux_dr_get_addr): Likewise.
1815 (x86_linux_dr_set_control): Likewise.
1816 (x86_linux_dr_get_control): Likewise.
1817 (x86_linux_dr_get_status): Likewise.
1818 (x86_linux_prepare_to_resume): Likewise.
1820 2015-03-24 Gary Benson <gbenson@redhat.com>
1822 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1823 Use perror_with_name. Pass string through gettext.
1824 (x86_linux_dr_set): Likewise.
1826 2015-03-24 Gary Benson <gbenson@redhat.com>
1828 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1829 (x86_linux_dr_set_addr): ...this.
1830 (x86_dr_low_get_addr): Rename to...
1831 (x86_linux_dr_get_addr): ...this.
1832 (x86_dr_low_set_control): Rename to...
1833 (x86_linux_dr_set_control): ...this.
1834 (x86_dr_low_get_control): Rename to...
1835 (x86_linux_dr_get_control): ...this.
1836 (x86_dr_low_get_status): Rename to...
1837 (x86_linux_dr_get_status): ...this.
1838 (x86_dr_low): Update with new function names.
1840 2015-03-24 Gary Benson <gbenson@redhat.com>
1842 * Makefile.in (x86-linux.o): New rule.
1843 * configure.srv: Add x86-linux.o to relevant targets.
1844 * linux-low.c (lwp_set_arch_private_info): New function.
1845 (lwp_arch_private_info): Likewise.
1846 * linux-x86-low.c: Include nat/x86-linux.h.
1847 (arch_lwp_info): Removed structure.
1848 (update_debug_registers_callback):
1849 Use lwp_set_debug_registers_changed.
1850 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1851 and lwp_set_debug_registers_changed.
1852 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1854 2015-03-24 Gary Benson <gbenson@redhat.com>
1856 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1857 * linux-arm-low.c (arm_new_thread): Likewise.
1858 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1859 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1860 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1861 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1863 2015-03-24 Gary Benson <gbenson@redhat.com>
1865 * linux-low.c (ptid_of_lwp): New function.
1866 (lwp_is_stopped): Likewise.
1867 (lwp_stop_reason): Likewise.
1868 * linux-x86-low.c (update_debug_registers_callback):
1870 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1873 2015-03-24 Gary Benson <gbenson@redhat.com>
1875 * linux-low.h (linux_stop_lwp): Remove declaration.
1877 2015-03-24 Gary Benson <gbenson@redhat.com>
1879 * linux-low.h: Include nat/linux-nat.h.
1880 * linux-low.c (iterate_over_lwps_args): New structure.
1881 (iterate_over_lwps_filter): New function.
1882 (iterate_over_lwps): Likewise.
1883 * linux-x86-low.c (update_debug_registers_callback):
1884 Update signature to what iterate_over_lwps expects.
1885 Remove PID check that iterate_over_lwps now performs.
1886 (x86_dr_low_set_addr): Use iterate_over_lwps.
1887 (x86_dr_low_set_control): Likewise.
1889 2015-03-24 Gary Benson <gbenson@redhat.com>
1891 * linux-x86-low.c (x86_debug_reg_state): New function.
1892 (x86_linux_prepare_to_resume): Use the above.
1894 2015-03-24 Gary Benson <gbenson@redhat.com>
1896 * linux-low.c (current_lwp_ptid): New function.
1897 * linux-x86-low.c: Include nat/linux-nat.h.
1898 (x86_dr_low_get_addr): Use current_lwp_ptid.
1899 (x86_dr_low_get_control): Likewise.
1900 (x86_dr_low_get_status): Likewise.
1902 2015-03-20 Pedro Alves <palves@redhat.com>
1904 * tracepoint.c (cmd_qtstatus): Make "str" const.
1906 2015-03-20 Pedro Alves <palves@redhat.com>
1908 * server.c (handle_general_set): Make "req_str" const.
1910 2015-03-19 Pedro Alves <palves@redhat.com>
1912 * linux-low.c (linux_resume_one_lwp): Rename to ...
1913 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1914 instead call perror_with_name.
1915 (check_ptrace_stopped_lwp_gone): New function.
1916 (linux_resume_one_lwp): Reimplement as wrapper around
1917 linux_resume_one_lwp_throw that swallows errors if the LWP is
1920 2015-03-19 Pedro Alves <palves@redhat.com>
1922 * linux-low.c (count_events_callback, select_event_lwp_callback):
1923 No longer check whether the thread has resume_stop as last resume
1926 2015-03-19 Pedro Alves <palves@redhat.com>
1928 * linux-low.c (count_events_callback, select_event_lwp_callback):
1929 Use the lwp's status_pending_p field, not the thread's.
1931 2015-03-19 Pedro Alves <palves@redhat.com>
1933 * linux-low.c (select_event_lwp_callback): Update comments to
1934 no longer mention SIGTRAP.
1936 2015-03-18 Gary Benson <gbenson@redhat.com>
1938 * server.c (handle_query): Do not report vFile:fstat as supported.
1940 2015-03-11 Gary Benson <gbenson@redhat.com>
1942 * hostio.c (sys/types.h): New include.
1943 (sys/stat.h): Likewise.
1944 (common-remote-fileio.h): Likewise.
1945 (handle_fstat): New function.
1946 (handle_vFile): Handle vFile:fstat packets.
1948 2015-03-11 Gary Benson <gbenson@redhat.com>
1950 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1951 struct stat.st_blocks and struct stat.st_blksize.
1952 * configure: Regenerate.
1953 * config.in: Likewise.
1954 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1955 (OBS): Add common-remote-fileio.o.
1956 (common-remote-fileio.o): New rule.
1958 2015-03-09 Pedro Alves <palves@redhat.com>
1960 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1961 'struct sockaddr' pointer in 'accept' call.
1963 2015-03-09 Pedro Alves <palves@redhat.com>
1966 2015-03-07 Pedro Alves <palves@redhat.com>
1967 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1968 or <winsock2.h> here. Instead include "gdb_socket.h".
1969 (remote_open): Use union gdb_sockaddr_u.
1970 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1971 or <winsock2.h> here. Instead include "gdb_socket.h".
1972 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1973 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1975 (init_named_socket, gdb_agent_helper_thread): Use union
1978 2015-03-07 Pedro Alves <palves@redhat.com>
1980 * configure.ac (build_warnings): Move
1981 -Wdeclaration-after-statement to the C-specific set.
1982 * configure: Regenerate.
1984 2015-03-07 Pedro Alves <palves@redhat.com>
1986 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1987 or <winsock2.h> here. Instead include "gdb_socket.h".
1988 (remote_open): Use union gdb_sockaddr_u.
1989 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1990 or <winsock2.h> here. Instead include "gdb_socket.h".
1991 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1992 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1994 (init_named_socket, gdb_agent_helper_thread): Use union
1997 2015-03-07 Pedro Alves <palves@redhat.com>
1999 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2002 2015-03-06 Yao Qi <yao.qi@linaro.org>
2004 * linux-aarch64-low.c (aarch64_insert_point): Use
2005 show_debug_regs as a boolean.
2006 (aarch64_remove_point): Likewise.
2008 2015-03-05 Pedro Alves <palves@redhat.com>
2010 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2011 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2012 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2013 * nto-low.c (nto_target_ops): Likewise.
2014 * spu-low.c (spu_target_ops): Likewise.
2015 * win32-low.c (win32_target_ops): Likewise.
2017 2015-03-04 Pedro Alves <palves@redhat.com>
2019 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2020 Decide whether a breakpoint triggered based on the SIGTRAP's
2022 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2023 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2024 (linux_low_filter_event): Check for breakpoints before checking
2026 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2028 (linux_stopped_by_sw_breakpoint)
2029 (linux_supports_stopped_by_sw_breakpoint)
2030 (linux_stopped_by_hw_breakpoint)
2031 (linux_supports_stopped_by_hw_breakpoint): New functions.
2032 (linux_target_ops): Install new target methods.
2034 2015-03-04 Pedro Alves <palves@redhat.com>
2036 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2037 * server.c (swbreak_feature, hwbreak_feature): New globals.
2038 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2039 (captured_main): Clear swbreak_feature and hwbreak_feature.
2040 * server.h (swbreak_feature, hwbreak_feature): Declare.
2041 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2042 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2043 supports_stopped_by_hw_breakpoint>: New fields.
2044 (target_supports_stopped_by_sw_breakpoint)
2045 (target_stopped_by_sw_breakpoint)
2046 (target_supports_stopped_by_hw_breakpoint)
2047 (target_stopped_by_hw_breakpoint): Declare.
2049 2015-03-04 Pedro Alves <palves@redhat.com>
2051 enum lwp_stop_reason -> enum target_stop_reason
2052 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2053 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2054 (linux_wait_1, stuck_in_jump_pad_callback)
2055 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2056 (linux_stopped_by_watchpoint):
2057 * linux-low.h (enum lwp_stop_reason): Delete.
2058 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2059 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2061 2015-03-04 Yao Qi <yao.qi@linaro.org>
2063 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2065 2015-03-03 Gary Benson <gbenson@redhat.com>
2067 * hostio.c (handle_vFile): Fix prefix lengths.
2069 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2071 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2074 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2076 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2077 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2078 (clean): Add "rm -f" for above C files.
2079 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2080 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2081 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2082 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2083 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2084 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2085 (init_registers_s390x_vx_linux64)
2086 (init_registers_s390x_tevx_linux64)
2087 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2088 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2090 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2091 (s390_store_vxrs_high): New functions.
2092 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2094 (s390_arch_setup): Add logic for selecting one of the new target
2095 descriptions. Activate the new vector regsets if applicable.
2096 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2097 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2098 and init_registers_s390x_tevx_linux64.
2100 2015-03-01 Pedro Alves <palves@redhat.com>
2102 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2105 2015-02-27 Pedro Alves <palves@redhat.com>
2107 * linux-x86-low.c (u_debugreg_offset): New function.
2108 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2110 2015-02-27 Pedro Alves <palves@redhat.com>
2112 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2113 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2114 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2115 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2116 (ps_lsetfpregs, ps_getpid)
2117 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2118 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2119 (ps_lsetxregs, ps_plog): Declare.
2121 2015-02-27 Pedro Alves <palves@redhat.com>
2123 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2124 IP_AGENT_EXPORT_FUNC.
2125 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2126 IP_AGENT_EXPORT_FUNC.
2127 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2128 (IP_AGENT_EXPORT): Delete.
2129 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2130 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2131 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2132 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2133 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2134 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2135 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2136 (traceframe_read_count, traceframe_write_count)
2137 (traceframes_created, trace_state_variables, get_raw_reg)
2138 (get_trace_state_variable_value, set_trace_state_variable_value)
2139 (ust_loaded, helper_thread_id, cmd_buf): Use
2140 IPA_SYM_EXPORTED_NAME.
2141 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2142 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2143 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2144 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2145 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2146 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2147 EXTERN_C_PUSH/EXTERN_C_POP.
2148 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2149 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2150 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2151 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2152 (traceframe_write_count, traceframe_read_count)
2153 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2154 (about_to_request_buffer_space, get_trace_state_variable_value)
2155 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2156 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2157 EXTERN_C_PUSH/EXTERN_C_POP.
2158 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2159 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2160 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2161 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2162 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2163 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2164 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2165 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2167 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2168 (IP_AGENT_EXPORT_VAR_DECL): Define.
2170 (gdb_agent_get_raw_reg): Declare.
2172 2015-02-27 Tom Tromey <tromey@redhat.com>
2173 Pedro Alves <palves@redhat.com>
2175 Rename symbols whose names are reserved C++ keywords throughout.
2177 2015-02-27 Pedro Alves <palves@redhat.com>
2179 * Makefile.in (COMPILER): New, get it from autoconf.
2180 (CXX): Get from autoconf instead.
2181 (COMPILE.pre): Use COMPILER.
2182 (CC-LD): Rename to ...
2183 (CC_LD): ... this. Use COMPILER.
2184 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2185 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2186 * acinclude.m4: Include build-with-cxx.m4.
2187 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2188 Disable -Werror by default if building in C++ mode.
2189 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2190 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2191 the C++ compiler. Save/restore CXXFLAGS too.
2192 * configure: Regenerate.
2194 2015-02-27 Pedro Alves <palves@redhat.com>
2196 * acinclude.m4: Include libiberty.m4.
2197 * configure.ac: Call libiberty_INIT.
2198 * config.in, configure: Regenerate.
2200 2015-02-26 Pedro Alves <palves@redhat.com>
2202 * linux-low.c (linux_wait_1): When incrementing the PC past a
2203 program breakpoint always use the_low_target.breakpoint_len as
2204 increment, rather than the maximum between that and
2205 the_low_target.decr_pc_after_break.
2207 2015-02-23 Pedro Alves <palves@redhat.com>
2209 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2210 thread was doing a step-over; always adjust the PC if
2211 we stepped over a permanent breakpoint.
2212 (linux_wait_1): If we stepped over breakpoint that was on top of a
2213 permanent breakpoint, manually advance the PC past it.
2215 2015-02-23 Pedro Alves <palves@redhat.com>
2217 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2219 (x86_fill_gregset, x86_store_gregset): Use it when handling
2222 2015-02-20 Pedro Alves <palves@redhat.com>
2224 * thread-db.c: Include "nat/linux-procfs.h".
2225 (thread_db_init): Skip listing new threads if the kernel supports
2226 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2228 2015-02-20 Pedro Alves <palves@redhat.com>
2230 * linux-low.c (status_pending_p_callback): Use ptid_match.
2232 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2234 PR breakpoints/16812
2235 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2236 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2237 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2239 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2241 PR breakpoints/15956
2242 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2244 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2246 * linux-low.c (linux_low_btrace_conf): Print size.
2247 * server.c (handle_btrace_conf_general_set): New.
2248 (hanle_general_set): Call handle_btrace_conf_general_set.
2249 (handle_query): Report Qbtrace-conf:bts:size as supported.
2251 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2253 * linux-low.c (linux_low_enable_btrace): Update parameters.
2254 (linux_low_btrace_conf): New.
2255 (linux_target_ops)<to_btrace_conf>: Initialize.
2256 * server.c (current_btrace_conf): New.
2257 (handle_btrace_enable): Rename to ...
2258 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2259 to target_enable_btrace. Update comment. Update users.
2260 (handle_qxfer_btrace_conf): New.
2261 (qxfer_packets): Add btrace-conf entry.
2262 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2263 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2264 (target_ops)<read_btrace_conf>: New.
2265 (target_enable_btrace): Update parameters.
2266 (target_read_btrace_conf): New.
2268 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2270 * server.c (handle_btrace_general_set): Remove call to
2271 target_supports_btrace.
2272 (supported_btrace_packets): New.
2273 (handle_query): Call supported_btrace_packets.
2274 * target.h: include btrace-common.h.
2275 (btrace_target_info): Removed.
2276 (supports_btrace, target_supports_btrace): Update parameters.
2278 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2280 * Makefile.in (SFILES): Add common/btrace-common.c.
2281 (OBS): Add common/btrace-common.o.
2282 (btrace-common.o): Add build rules.
2283 * linux-low: Include btrace-common.h.
2284 (linux_low_read_btrace): Use struct btrace_data. Call
2285 btrace_data_init and btrace_data_fini.
2287 2015-02-06 Pedro Alves <palves@redhat.com>
2289 * thread-db.c (find_new_threads_callback): Add debug output.
2291 2015-02-04 Pedro Alves <palves@redhat.com>
2293 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2294 (resume_stopped_resumed_lwps): New function.
2295 (linux_wait_for_event_filtered): Use it.
2297 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2299 * Makefile.in (SFILES): Add linux-personality.c.
2300 (linux-personality.o): New rule.
2301 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2302 list of objects to be built.
2303 * linux-low.c: Include nat/linux-personality.h.
2304 (linux_create_inferior): Remove code to disable address space
2305 randomization (moved to ../nat/linux-personality.c). Create
2306 cleanup to disable address space randomization.
2308 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2310 * Makefile.in (posix-strerror.o): New rule.
2311 (mingw-strerror.o): Likewise.
2312 * configure: Regenerated.
2313 * configure.ac: Source file ../common/common.host. Initialize new
2314 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2316 2015-01-14 Yao Qi <yao@codesourcery.com>
2318 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2319 (ppc-linux.o): New rule.
2320 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2321 * configure.ac: AC_CHECK_FUNCS(getauxval).
2322 * config.in: Re-generated.
2323 * configure: Re-generated.
2324 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2325 ppc64_64bit_inferior_p
2327 2015-01-14 Yao Qi <yao@codesourcery.com>
2329 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2330 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2331 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2332 (PT_ORIG_R3, PT_TRAP): Likewise.
2333 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2334 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2335 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2337 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2339 * i387-fp.c (i387_cache_to_xsave): In look over
2340 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2341 zmmh_low_space field by use of zmmh_high_space.
2343 2015-01-09 Pedro Alves <palves@redhat.com>
2345 * linux-low.c (step_over_bkpt): Move higher up in the file.
2346 (handle_extended_wait): Don't store the stop_pc here.
2347 (get_stop_pc): Adjust comments and rename to ...
2348 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2349 stopped for a software breakpoint or hardware breakpoint.
2350 (thread_still_has_status_pending_p): New function.
2351 (status_pending_p_callback): Use
2352 thread_still_has_status_pending_p. If the event is no longer
2353 interesting, resume the LWP.
2354 (handle_tracepoints): Add assert.
2355 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2356 (wstatus_maybe_breakpoint): New function.
2357 (cancel_breakpoint): Delete function.
2358 (check_stopped_by_watchpoint): New function, factored out from
2359 linux_low_filter_event.
2360 (lp_status_maybe_breakpoint): Delete function.
2361 (linux_low_filter_event): Remove filter_ptid argument.
2362 Leave thread group exits pending here. Store the LWP's stop PC.
2363 Always leave events pending.
2364 (linux_wait_for_event_filtered): Pull all events out of the
2365 kernel, and leave them all pending.
2366 (count_events_callback, select_event_lwp_callback): Consider all
2368 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2369 (select_event_lwp): Only give preference to the stepping LWP in
2370 all-stop mode. Adjust comments.
2371 (ignore_event): New function.
2372 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2373 references to cancel_breakpoints. Adjust to renames. Also give
2374 equal priority to all LWPs that have had events in non-stop mode.
2375 If reporting a software breakpoint event, unadjust the LWP's PC.
2376 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2377 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2379 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2380 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2381 (linux_stopped_by_watchpoint): Adjust.
2382 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2383 * linux-low.h (enum lwp_stop_reason): New.
2384 (struct lwp_info) <stop_pc>: Adjust comment.
2385 <stopped_by_watchpoint>: Delete field.
2386 <stop_reason>: New field.
2387 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2388 * mem-break.c (software_breakpoint_inserted_here)
2389 (hardware_breakpoint_inserted_here): New function.
2390 * mem-break.h (software_breakpoint_inserted_here)
2391 (hardware_breakpoint_inserted_here): Declare.
2392 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2393 (cancel_breakpoints): Delete.
2394 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2395 (upload_fast_traceframes): Remove references to
2398 2015-01-09 Pedro Alves <palves@redhat.com>
2400 * thread-db.c (find_new_threads_callback): Ignore thread if the
2401 kernel thread ID is -1.
2403 2015-01-09 Pedro Alves <palves@redhat.com>
2405 * linux-low.c (linux_attach_fail_reason_string): Move to
2406 nat/linux-ptrace.c, and rename.
2407 (linux_attach_lwp): Update comment.
2408 (attach_proc_task_lwp_callback): New function.
2409 (linux_attach): Adjust to rename and use
2410 linux_proc_attach_tgid_threads.
2411 (linux_attach_fail_reason_string): Delete declaration.
2413 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2415 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2416 * server.c (gdbserver_version): Likewise.
2418 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2420 * remote-utils.c: Include ctype.h.
2421 (input_interrupt): Explicitly handle the case when the char
2422 received is the NUL byte. Improve the printing of non-ASCII
2425 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2427 * linux-low.c (linux_low_filter_event): Update call to
2428 linux_enable_event_reporting following the addition of
2429 a new parameter to that function.
2431 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2434 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2435 (AARCH64_FPCR_REGNO): Likewise.
2436 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2437 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2438 (aarch64_store_fpregset): Likewise.
2440 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2442 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2443 Remove FIXME comment about assumption about N.
2445 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2447 * configure.ac: If large-file support is disabled in GDBserver,
2448 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2449 * configure: Regenerate.
2451 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2453 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2454 warning upon ENODATA from ptrace.
2455 * linux-s390-low.c (s390_store_tdb): New.
2456 (s390_regsets): Add regset for NT_S390_TDB.
2458 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2460 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2461 without a fill_function.
2462 * linux-s390-low.c (s390_fill_last_break): Remove.
2463 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2464 (s390_arch_setup): Use regset's size instead of fill_function for
2467 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2469 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2470 the regset's store function when ptrace returned an error.
2471 * regcache.c (get_thread_regcache): Invalidate register cache
2472 before fetching inferior's registers.
2474 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2476 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2477 while-loop as for-loop.
2478 (regsets_store_inferior_registers): Likewise.
2480 2014-11-28 Yao Qi <yao@codesourcery.com>
2482 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2483 * config.in, configure: Re-generate.
2484 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2487 2014-11-21 Yao Qi <yao@codesourcery.com>
2489 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2490 (AC_CHECK_HEADERS): Remove malloc.h.
2491 * configure: Re-generated.
2492 * config.in: Re-generated.
2493 * server.h: Don't include alloca.h and malloc.h.
2494 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2495 Don't include malloc.h.
2497 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2499 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2500 corresponding ERRNO check in same block.
2502 2014-11-12 Pedro Alves <palves@redhat.com>
2504 * server.c (cont_thread): Update comment.
2505 (start_inferior, attach_inferior): No longer clear cont_thread.
2506 (handle_v_cont): No longer set cont_thread.
2507 (captured_main): Clear cont_thread each time a GDB connects.
2509 2014-11-12 Pedro Alves <palves@redhat.com>
2511 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2512 thread, and don't resume all threads if the Hc thread has exited.
2514 2014-11-12 Pedro Alves <palves@redhat.com>
2516 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2517 the process group instead of to a specific LWP.
2519 2014-10-15 Pedro Alves <palves@redhat.com>
2522 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2524 (arm_set_thread_context): Delete.
2525 (the_low_target): Adjust.
2526 * win32-i386-low.c (debug_registers_changed)
2527 (debug_registers_used): Delete.
2528 (update_debug_registers_callback): New function.
2529 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2530 needing to update their debug registers.
2531 (win32_get_current_dr): New function.
2532 (x86_dr_low_get_addr, x86_dr_low_get_control)
2533 (x86_dr_low_get_status): Fetch the debug register from the thread
2535 (i386_initial_stuff): Adjust.
2536 (i386_get_thread_context): Remove current_event parameter. Don't
2537 clear debug_registers_changed nor copy DR values to
2539 (i386_set_thread_context): Delete.
2540 (i386_prepare_to_resume): New function.
2541 (i386_thread_added): Mark the thread as needing to update irs
2543 (the_low_target): Remove i386_set_thread_context and install
2544 i386_prepare_to_resume.
2545 * win32-low.c (win32_get_thread_context): Adjust.
2546 (win32_set_thread_context): Use SetThreadContext
2548 (win32_prepare_to_resume): New function.
2549 (win32_require_context): New function, factored out from ...
2550 (thread_rec): ... this.
2551 (continue_one_thread): Call win32_prepare_to_resume on each thread
2552 we're about to continue.
2553 (win32_resume): Call win32_prepare_to_resume on the event thread.
2554 * win32-low.h (struct win32_thread_info)
2555 <debug_registers_changed>: New field.
2556 (struct win32_target_ops): Change prototype of set_thread_context,
2557 delete set_thread_context and add prepare_to_resume.
2558 (win32_require_context): New declaration.
2560 2014-10-08 Gary Benson <gbenson@redhat.com>
2562 * server.h: Do not include common-exceptions.h.
2564 2014-10-08 Gary Benson <gbenson@redhat.com>
2566 * server.h: Do not include cleanups.h.
2568 2014-09-30 James Hogan <james.hogan@imgtec.com>
2570 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2573 2014-09-23 Yao Qi <yao@codesourcery.com>
2575 * linux-low.c (lp_status_maybe_breakpoint): New function.
2576 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2577 (count_events_callback): Likewise.
2578 (select_event_lwp_callback): Likewise.
2579 (cancel_breakpoints_callback): Likewise.
2581 2014-09-19 Don Breazeal <donb@codesourcery.com>
2583 * linux-low.c (handle_extended_wait): Call
2584 linux_ptrace_get_extended_event.
2585 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2586 linux_is_extended_waitstatus.
2588 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2590 * Makefile.in (CPPFLAGS): Define.
2591 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2592 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2594 2014-09-16 Gary Benson <gbenson@redhat.com>
2596 * inferiors.h (current_inferior): Renamed as...
2597 (current_thread): New variable. All uses updated.
2598 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2599 (maybe_move_out_of_jump_pad): Likewise.
2600 (cancel_breakpoint): Likewise.
2601 (linux_low_filter_event): Likewise.
2602 (wait_for_sigstop): Likewise.
2603 (linux_resume_one_lwp): Likewise.
2604 (need_step_over_p): Likewise.
2605 (start_step_over): Likewise.
2606 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2607 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2608 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2609 and save_inferior as saved_thread.
2610 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2612 (regcache_invalidate_thread): Likewise.
2613 * remote-utils.c (prepare_resume_reply): Likewise.
2614 * thread-db.c (thread_db_get_tls_address): Likewise.
2615 (disable_thread_event_reporting): Likewise.
2616 (remove_thread_event_breakpoints): Likewise.
2617 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2619 * target.h (set_desired_inferior): Renamed as...
2620 (set_desired_thread): New declaration. All uses updated.
2621 * server.c (myresume): Updated comment to reference thread instead
2623 (handle_serial_event): Likewise.
2624 (handle_target_event): Likewise.
2626 2014-09-12 Tom Tromey <tromey@redhat.com>
2627 Gary Benson <gbenson@redhat.com>
2629 * regcache.h: Include common-regcache.h.
2630 (regcache_read_pc): Don't declare.
2631 * regcache.c (get_thread_regcache_for_ptid): New function.
2633 2014-09-11 Tom Tromey <tromey@redhat.com>
2634 Gary Benson <gbenson@redhat.com>
2636 * symbol.c: New file.
2637 * Makefile.in (SFILES): Add symbol.c.
2638 (OBS): Add symbol.o.
2640 2014-09-11 Gary Benson <gbenson@redhat.com>
2642 * target.c (target_stop_ptid, target_continue_ptid): New
2645 2014-09-11 Tom Tromey <tromey@redhat.com>
2646 Gary Benson <gbenson@redhat.com>
2648 * target.h: Include target/target.h.
2649 * target.c (target_read_memory, target_read_uint32)
2650 (target_write_memory): New functions.
2652 2014-09-11 Gary Benson <gbenson@redhat.com>
2654 * server.h (debug_hw_points): Don't declare.
2655 * server.c (debug_hw_points): Don't define. Replace all uses
2656 with show_debug_regs.
2657 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2658 all uses with show_debug_regs.
2660 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2662 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2663 endianness into account.
2664 (ppc_supply_ptrace_register): Likewise.
2666 2014-09-03 James Hogan <james.hogan@imgtec.com>
2668 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2669 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2671 2014-09-03 Gary Benson <gbenson@redhat.com>
2673 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2674 ALL_DEBUG_ADDRESS_REGISTERS.
2676 2014-09-02 Gary Benson <gbenson@redhat.com>
2678 * i386-low.h: Renamed as...
2679 * x86-low.h: New file. All type, function and variable name
2680 prefixes changed from "i386_" to "x86_". All references updated.
2681 * i386-low.c: Renamed as...
2682 * x86-low.c: New file. All type, function and variable name
2683 prefixes changed from "i386_" to "x86_". All references updated.
2685 2014-09-02 Gary Benson <gbenson@redhat.com>
2687 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2688 (x86_linux_new_thread): Likewise.
2690 2014-08-29 Gary Benson <gbenson@redhat.com>
2692 * server.h (setjmp.h): Do not include.
2693 (toplevel): Do not declare.
2694 (common-exceptions.h): Include.
2695 (cleanups.h): Likewise.
2696 * server.c (toplevel): Do not define.
2697 (exit_code): New static global.
2698 (detach_or_kill_for_exit_cleanup): New function.
2699 (main): New function. Original main renamed to...
2700 (captured_main): New function.
2701 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2703 2014-08-29 Gary Benson <gbenson@redhat.com>
2705 * Makefile.in (SFILES): Add common/common-exceptions.c.
2706 (OBS): Add common-exceptions.o.
2707 (common-exceptions.o): New rule.
2708 * utils.c (prepare_to_throw_exception): New function.
2710 2014-08-29 Gary Benson <gbenson@redhat.com>
2712 * config.in: Regenerate.
2713 * configure: Likewise.
2715 2014-08-29 Gary Benson <gbenson@redhat.com>
2717 * Makefile.in (SFILES): Add common/cleanups.c.
2719 (cleanups.o): New rule.
2721 2014-08-29 Gary Benson <gbenson@redhat.com>
2723 * utils.c (internal_vwarning): New function.
2725 2014-08-28 Gary Benson <gbenson@redhat.com>
2727 * utils.h (fatal): Remove declaration.
2728 * utils.c (fatal): Remove function.
2730 2014-08-28 Gary Benson <gbenson@redhat.com>
2732 * tracepoint.c (gdb_agent_init): Replace fatal with
2734 (initialize_tracepoint): Likewise.
2736 2014-08-28 Gary Benson <gbenson@redhat.com>
2738 * remote-utils.c (remote_prepare): Replace fatal with error.
2740 2014-08-28 Gary Benson <gbenson@redhat.com>
2742 * linux-low.c (linux_async): Replace fatal with warning.
2744 (linux_start_non_stop): Return -1 if linux_async failed.
2746 2014-08-28 Gary Benson <gbenson@redhat.com>
2748 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2750 (i386_dr_low_get_addr): Remove vague comment.
2751 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2754 2014-08-28 Gary Benson <gbenson@redhat.com>
2756 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2757 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2759 (linux_resume_one_lwp): Likewise.
2760 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2762 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2763 with internal_error.
2764 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2765 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2766 (find_register_by_name): Replace fatal with internal_error.
2767 (find_regno): Likewise.
2768 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2769 * thread-db.c (thread_db_create_event): Likewise.
2770 (thread_db_load_search): Likewise.
2771 (try_thread_db_load_1): Likewise.
2772 * tracepoint.c (get_jump_space_head): Replace fatal with
2774 (claim_trampoline_space): Likewise.
2775 (have_fast_tracepoint_trampoline_buffer): Likewise.
2776 (cmd_qtstart): Likewise.
2777 (stop_tracing): Likewise.
2778 (fast_tracepoint_collecting): Likewise.
2779 (target_malloc): Likewise.
2780 (download_tracepoint): Likewise.
2781 (download_trace_state_variables): Replace check with gdb_assert.
2782 (upload_fast_traceframes): Replace fatal with internal_error.
2784 2014-08-19 Tom Tromey <tromey@redhat.com>
2785 Gary Benson <gbenson@redhat.com>
2787 * Makefile.in (SFILES): Add common/common-debug.c.
2788 (OBS): Add common-debug.o.
2789 (common-debug.o): New rule.
2790 * debug.h (debug_printf): Don't declare.
2791 * debug.c (debug_printf): Renamed and rewritten as...
2792 (debug_vprintf): New function.
2794 2014-08-19 Gary Benson <gbenson@redhat.com>
2796 * utils.h: Do not include print-utils.h.
2798 2014-08-19 Tom Tromey <tromey@redhat.com>
2799 Gary Benson <gbenson@redhat.com>
2801 * server.h: Add static assertion.
2802 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2804 2014-08-19 Tom Tromey <tromey@redhat.com>
2805 Gary Benson <gbenson@redhat.com>
2807 * Makefile.in (SFILES): Add common/errors.c.
2808 (OBS): Add errors.o.
2809 (IPA_OBS): Add errors-ipa.o.
2810 (errors.o): New rule.
2811 (errors-ipa.o): Likewise.
2812 * utils.h (perror_with_name, error, warning): Don't declare.
2813 * utils.c (warning): Renamed and rewritten as...
2814 (vwarning): New function.
2815 (error): Renamed and rewritten as...
2816 (verror): New function.
2817 (internal_error): Renamed and rewritten as...
2818 (internal_verror): New function.
2820 2014-08-07 Gary Benson <gbenson@redhat.com>
2822 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2823 * configure: Regenerate.
2824 * config.in: Likewise.
2825 * server.h: Do not include errno.h.
2826 * event-loop.c: Likewise.
2827 * hostio-errno.c: Likewise.
2828 * linux-low.c: Likewise.
2829 * remote-utils.c: Likewise.
2830 * spu-low.c: Likewise.
2831 * utils.c: Likewise.
2832 * gdbreplay.c: Unconditionally include errno.h.
2834 2014-08-07 Gary Benson <gbenson@redhat.com>
2836 * server.h: Do not include string.h.
2837 * event-loop.c: Likewise.
2838 * linux-low.c: Likewise.
2839 * regcache.c: Likewise.
2840 * remote-utils.c: Likewise.
2841 * spu-low.c: Likewise.
2842 * utils.c: Likewise.
2844 2014-08-07 Gary Benson <gbenson@redhat.com>
2846 * server.h: Do not include gdb_assert.h.
2848 2014-08-07 Gary Benson <gbenson@redhat.com>
2850 * server.h: Do not include common-utils.h.
2852 2014-08-07 Gary Benson <gbenson@redhat.com>
2854 * server.h: Do not include ptid.h.
2855 * notif.h: Likewise.
2857 2014-08-07 Gary Benson <gbenson@redhat.com>
2859 * server.h: Do not include gdb_locale.h.
2861 2014-08-07 Gary Benson <gbenson@redhat.com>
2863 * server.h: Do not include gdb/signals.h.
2864 * win32-low.c: Likewise.
2866 2014-08-07 Gary Benson <gbenson@redhat.com>
2868 * server.h: Do not include pathmax.h.
2870 2014-08-07 Gary Benson <gbenson@redhat.com>
2872 * server.h: Do not include libiberty.h.
2873 * linux-bfin-low.c: Likewise.
2875 2014-08-07 Gary Benson <gbenson@redhat.com>
2877 * server.h: Do not include ansidecl.h.
2879 2014-08-07 Gary Benson <gbenson@redhat.com>
2881 * linux-x86-low.c: Do not include stddef.h.
2882 * lynx-ppc-low.c: Likewise.
2883 * tracepoint.c: Likewise.
2885 2014-08-07 Gary Benson <gbenson@redhat.com>
2887 * server.h: Do not include stdarg.h.
2888 * nto-low.c: Likewise.
2890 2014-08-07 Gary Benson <gbenson@redhat.com>
2892 * server.h: Do not include stdlib.h.
2893 * inferiors.c: Likewise.
2894 * linux-low.c: Likewise.
2895 * regcache.c: Likewise.
2896 * spu-low.c: Likewise.
2897 * tracepoint.c: Likewise.
2898 * utils.c: Likewise.
2900 2014-08-07 Gary Benson <gbenson@redhat.com>
2902 * server.h: Do not include stdio.h.
2903 * linux-low.c: Likewise.
2904 * remote-utils.c: Likewise.
2905 * spu-low.c: Likewise.
2906 * utils.c: Likewise.
2907 * wincecompat.c: Likewise.
2909 2014-08-06 Gary Benson <gbenson@redhat.com>
2911 * regcache.c (init_register_cache): Move conditionals inside if.
2913 2014-08-06 Gary Benson <gbenson@redhat.com>
2915 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2917 2014-07-31 Gary Benson <gbenson@redhat.com>
2919 * ax.h: Do not include server.h.
2920 * gdbthread.h: Likewise.
2921 * lynx-low.h: Likewise.
2922 * notif.h: Likewise.
2924 2014-07-30 Gary Benson <gbenson@redhat.com>
2926 * server.h: Include common-defs.h.
2927 Do not include config.h or build-gnulib-gdbserver/config.h.
2929 2014-07-30 Gary Benson <gbenson@redhat.com>
2931 * hostio-errno.c: Move server.h to top of includes list.
2932 * inferiors.c: Likewise.
2933 * linux-x86-low.c: Likewise.
2934 * notif.c: Include server.h.
2936 2014-07-24 Tom Tromey <tromey@redhat.com>
2937 Gary Benson <gbenson@redhat.com>
2939 * server.h (CORE_ADDR): Now unsigned.
2941 2014-07-16 Pedro Alves <palves@redhat.com>
2943 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2945 2014-07-15 Pedro Alves <palves@redhat.com>
2947 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2950 2014-07-11 Pedro Alves <palves@redhat.com>
2952 * linux-low.c (kill_wait_lwp): New function, based on
2953 kill_one_lwp_callback, but use my_waitpid directly.
2954 (kill_one_lwp_callback, linux_kill): Use it.
2956 2014-06-23 Pedro Alves <palves@redhat.com>
2958 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2959 before setting DR0..DR3.
2961 2014-06-20 Gary Benson <gbenson@redhat.com>
2963 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2964 * configure: Regenerated.
2965 * config.in: Likewise.
2967 2014-06-20 Gary Benson <gbenson@redhat.com>
2969 * Makefile.in (SFILES): Update locations for files moved
2971 (object file files): Reordered.
2973 2014-06-20 Gary Benson <gbenson@redhat.com>
2975 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2976 (i386_dr_low_set_addr): Likewise.
2977 (i386_dr_low_get_addr): Likewise.
2978 (i386_dr_low_can_set_control): Likewise.
2979 (i386_dr_low_set_control): Likewise.
2980 (i386_dr_low_get_control): Likewise.
2981 (i386_dr_low_get_status): Likewise.
2982 (i386_get_debug_register_length): Likewise.
2983 * linux-x86-low.c (i386_dr_low_set_addr):
2984 Changed signature. Made static.
2985 (i386_dr_low_get_addr): Likewise.
2986 (i386_dr_low_set_control): Likewise.
2987 (i386_dr_low_get_control): Likewise.
2988 (i386_dr_low_get_status): Likewise.
2989 (i386_dr_low): New global variable.
2990 * win32-i386-low.c (i386_dr_low_set_addr):
2991 Changed signature. Made static.
2992 (i386_dr_low_get_addr): Likewise.
2993 (i386_dr_low_set_control): Likewise.
2994 (i386_dr_low_get_control): Likewise.
2995 (i386_dr_low_get_status): Likewise.
2996 (i386_dr_low): New global variable.
2998 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3000 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3001 * Makefile.in (AR, AR_FLAGS): Define.
3002 * configure: Regenerate.
3004 2014-06-19 Gary Benson <gbenson@redhat.com>
3006 * Makefile.in (i386-dregs.o): New rule.
3007 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3008 * i386-low.c (target.h): Remove include.
3009 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3010 (DR_CONTROL_SHIFT): Likewise.
3011 (DR_CONTROL_SIZE): Likewise.
3012 (DR_RW_EXECUTE): Likewise.
3013 (DR_RW_WRITE): Likewise.
3014 (DR_RW_READ): Likewise.
3015 (DR_RW_IORW): Likewise.
3016 (DR_LEN_1): Likewise.
3017 (DR_LEN_2): Likewise.
3018 (DR_LEN_4): Likewise.
3019 (DR_LEN_8): Likewise.
3020 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3021 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3022 (DR_ENABLE_SIZE): Likewise.
3023 (DR_LOCAL_SLOWDOWN): Likewise.
3024 (DR_GLOBAL_SLOWDOWN): Likewise.
3025 (DR_CONTROL_RESERVED): Likewise.
3026 (I386_DR_CONTROL_MASK): Likewise.
3027 (I386_DR_VACANT): Likewise.
3028 (I386_DR_LOCAL_ENABLE): Likewise.
3029 (I386_DR_GLOBAL_ENABLE): Likewise.
3030 (I386_DR_DISABLE): Likewise.
3031 (I386_DR_SET_RW_LEN): Likewise.
3032 (I386_DR_GET_RW_LEN): Likewise.
3033 (I386_DR_WATCH_HIT): Likewise.
3034 (i386_wp_op_t): Likewise.
3035 (i386_show_dr): Likewise.
3036 (i386_length_and_rw_bits): Likewise.
3037 (i386_insert_aligned_watchpoint): Likewise.
3038 (i386_remove_aligned_watchpoint): Likewise.
3039 (i386_handle_nonaligned_watchpoint): Likewise.
3040 i386_update_inferior_debug_regs(): Likewise.
3041 (i386_dr_insert_watchpoint): Likewise.
3042 (i386_dr_remove_watchpoint): Likewise.
3043 (i386_dr_region_ok_for_watchpoint): Likewise.
3044 (i386_dr_stopped_data_address): Likewise.
3045 (i386_dr_stopped_by_watchpoint): Likewise.
3047 2014-06-19 Gary Benson <gbenson@redhat.com>
3049 * i386-low.c (i386_dr_show): Renamed to
3050 i386_show_dr and made static. All uses updated.
3051 (i386_dr_length_and_rw_bits): Renamed to
3052 i386_length_and_rw_bits and made static.
3054 (i386_dr_insert_aligned_watchpoint): Renamed to
3055 i386_insert_aligned_watchpoint and made static.
3057 (i386_dr_remove_aligned_watchpoint): Renamed to
3058 i386_remove_aligned_watchpoint and made static.
3060 (i386_dr_update_inferior_debug_regs): Renamed to
3061 i386_update_inferior_debug_regs and made static.
3064 2014-06-18 Gary Benson <gbenson@redhat.com>
3066 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3067 (i386_dr_low_can_set_control): Likewise.
3068 (i386_get_debug_register_length): Likewise.
3069 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3070 (i386_dr_low_can_set_control): Likewise.
3071 (i386_get_debug_register_length): Likewise.
3073 2014-06-17 Gary Benson <gbenson@redhat.com>
3075 * i386-low.h (i386-dregs.h): New include.
3076 (DR_FIRSTADDR): Now in i386-dregs.h.
3077 (DR_LASTADDR): Likewise.
3078 (DR_NADDR): Likewise.
3079 (DR_STATUS): Likewise.
3080 (DR_CONTROL): Likewise.
3081 (i386_debug_reg_state): Likewise.
3082 (i386_dr_insert_watchpoint): Likewise.
3083 (i386_dr_remove_watchpoint): Likewise.
3084 (i386_dr_region_ok_for_watchpoint): Likewise.
3085 (i386_dr_stopped_data_address): Likewise.
3086 (i386_dr_stopped_by_watchpoint): Likewise.
3087 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3089 2014-06-18 Gary Benson <gbenson@redhat.com>
3091 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3092 i386_dr_insert_watchpoint.
3093 (i386_low_remove_watchpoint): Renamed to
3094 i386_dr_remove_watchpoint.
3095 (i386_low_region_ok_for_watchpoint): Renamed to
3096 i386_dr_region_ok_for_watchpoint.
3097 (i386_low_stopped_data_address): Renamed to
3098 i386_dr_stopped_data_address.
3099 (i386_low_stopped_by_watchpoint): Renamed to
3100 i386_dr_stopped_by_watchpoint.
3101 * i386-low.c (i386_show_dr): Renamed to
3102 i386_dr_show and made nonstatic. All uses updated.
3103 (i386_length_and_rw_bits): Renamed to
3104 i386_dr_length_and_rw_bits and made nonstatic.
3106 (i386_insert_aligned_watchpoint): Renamed to
3107 i386_dr_insert_aligned_watchpoint and made nonstatic.
3109 (i386_remove_aligned_watchpoint): Renamed to
3110 i386_dr_remove_aligned_watchpoint and made nonstatic.
3112 (i386_update_inferior_debug_regs): Renamed to
3113 i386_dr_update_inferior_debug_regs and made nonstatic.
3115 (i386_low_insert_watchpoint): Renamed to
3116 i386_dr_insert_watchpoint. All uses updated.
3117 (i386_low_remove_watchpoint): Renamed to
3118 i386_dr_remove_watchpoint. All uses updated.
3119 (i386_low_region_ok_for_watchpoint): Renamed to
3120 i386_dr_region_ok_for_watchpoint. All uses updated.
3121 (i386_low_stopped_data_address): Renamed to
3122 i386_dr_stopped_data_address. All uses updated.
3123 (i386_low_stopped_by_watchpoint): Renamed to
3124 i386_dr_stopped_by_watchpoint. All uses updated.
3126 2014-06-18 Gary Benson <gbenson@redhat.com>
3128 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3129 (i386_dr_low_can_set_control): Likewise.
3130 (i386_insert_aligned_watchpoint): New check.
3132 2014-06-18 Gary Benson <gbenson@redhat.com>
3134 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3137 2014-06-18 Gary Benson <gbenson@redhat.com>
3139 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3140 instead of fatal and error.
3141 (i386_handle_nonaligned_watchpoint): Likewise.
3143 2014-06-18 Gary Benson <gbenson@redhat.com>
3145 * i386-low.c (i386_get_debug_register_length): New macro.
3146 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3147 (i386_show_dr): Use debug_printf instead of fprintf. Use
3148 phex to format values.
3150 2014-06-18 Gary Benson <gbenson@redhat.com>
3152 * i386-low.h: Comment changes.
3153 * i386-low.c: Likewise.
3155 2014-06-18 Gary Benson <gbenson@redhat.com>
3157 * i386-low.c: Whitespace changes.
3159 2014-06-12 Tom Tromey <tromey@redhat.com>
3161 * utils.c (freeargv): Remove.
3163 2014-06-12 Tom Tromey <tromey@redhat.com>
3165 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3166 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3167 (parse_debug_format_options): Likewise.
3168 (gdbserver_usage): Likewise.
3169 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3170 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3171 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3173 ($(LIBGNU)): Depend on libiberty.
3174 (all-lib): Recurse into all subdirs.
3175 (install-only): Invoke "install" target in subdirs.
3176 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3178 * configure: Rebuild.
3179 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3180 for vasprintf, vsnprintf, or gettimeofday.
3181 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3184 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3186 * development.sh: Delete.
3187 * Makefile.in (config.status): Adjust dependency on development.sh.
3188 * configure.ac: Adjust development.sh source call.
3189 * configure: Regenerate.
3191 2014-06-02 Pedro Alves <palves@redhat.com>
3193 * ax.c (gdb_free_agent_expr): New function.
3194 * ax.h (gdb_free_agent_expr): New declaration.
3195 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3197 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3199 (clear_breakpoint_conditions_and_commands): New function.
3200 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3201 (clear_breakpoint_conditions_and_commands): New declaration.
3203 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3205 * linux-aarch64-low.c (asm/ptrace.h): Include.
3207 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3209 Fix TLS access for -static -pthread.
3210 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3211 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3212 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3214 2014-05-20 Pedro Alves <palves@redhat.com>
3216 * linux-aarch64-low.c (aarch64_insert_point)
3217 (aarch64_remove_point): No longer check whether the type is
3218 supported here. Adjust to new interface.
3219 (the_low_target): Install aarch64_supports_z_point_type as
3220 supports_z_point_type method.
3221 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3222 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3223 instead of a Z packet char. Adjust.
3224 (arm_supports_z_point_type): New function.
3225 (arm_insert_point, arm_remove_point): Adjust to new interface.
3226 (the_low_target): Install arm_supports_z_point_type.
3227 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3228 (cris_insert_point, cris_remove_point): Adjust to new interface.
3229 Don't check whether the type is supported here.
3230 (the_low_target): Install cris_supports_z_point_type.
3231 * linux-low.c (linux_supports_z_point_type): New function.
3232 (linux_insert_point, linux_remove_point): Adjust to new interface.
3233 * linux-low.h (struct linux_target_ops) <insert_point,
3234 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3235 raw_breakpoint pointer parameter.
3236 <supports_z_point_type>: New method.
3237 * linux-mips-low.c (mips_supports_z_point_type): New function.
3238 (mips_insert_point, mips_remove_point): Adjust to new interface.
3239 Use mips_supports_z_point_type.
3240 (the_low_target): Install mips_supports_z_point_type.
3241 * linux-ppc-low.c (the_low_target): Install NULL as
3242 supports_z_point_type method.
3243 * linux-s390-low.c (the_low_target): Install NULL as
3244 supports_z_point_type method.
3245 * linux-sparc-low.c (the_low_target): Install NULL as
3246 supports_z_point_type method.
3247 * linux-x86-low.c (x86_supports_z_point_type): New function.
3248 (x86_insert_point): Adjust to new insert_point interface. Use
3249 insert_memory_breakpoint. Adjust to new
3250 i386_low_insert_watchpoint interface.
3251 (x86_remove_point): Adjust to remove_point interface. Use
3252 remove_memory_breakpoint. Adjust to new
3253 i386_low_remove_watchpoint interface.
3254 (the_low_target): Install x86_supports_z_point_type.
3255 * lynx-low.c (lynx_target_ops): Install NULL as
3256 supports_z_point_type callback.
3257 * nto-low.c (nto_supports_z_point_type): New.
3258 (nto_insert_point, nto_remove_point): Adjust to new interface.
3259 (nto_target_ops): Install nto_supports_z_point_type.
3260 * mem-break.c: Adjust intro comment.
3261 (struct raw_breakpoint) <raw_type, size>: New fields.
3262 <inserted>: Update comment.
3263 <shlib_disabled>: Delete field.
3264 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3265 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3266 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3267 (raw_bkpt_type_to_target_hw_bp_type): New function.
3268 (find_enabled_raw_code_breakpoint_at): New function.
3269 (find_raw_breakpoint_at): New type and size parameters. Use them.
3270 (insert_memory_breakpoint): New function, based off
3271 set_raw_breakpoint_at.
3272 (remove_memory_breakpoint): New function.
3273 (set_raw_breakpoint_at): Reimplement.
3274 (set_breakpoint): New, based on set_breakpoint_at.
3275 (set_breakpoint_at): Reimplement.
3276 (delete_raw_breakpoint): Go through the_target->remove_point
3277 instead of assuming memory breakpoints.
3278 (find_gdb_breakpoint_at): Delete.
3279 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3280 (find_gdb_breakpoint): New function.
3281 (set_gdb_breakpoint_at): Delete.
3282 (z_type_supported): New function.
3283 (set_gdb_breakpoint_1): New function, loosely based off
3284 set_gdb_breakpoint_at.
3285 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3286 (delete_gdb_breakpoint_at): Delete.
3287 (delete_gdb_breakpoint_1): New function, loosely based off
3288 delete_gdb_breakpoint_at.
3289 (delete_gdb_breakpoint): New function.
3290 (clear_gdb_breakpoint_conditions): Rename to ...
3291 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3293 (add_condition_to_breakpoint): Make static.
3294 (add_breakpoint_condition): Take a struct breakpoint pointer
3295 instead of an address. Adjust.
3296 (gdb_condition_true_at_breakpoint): Rename to ...
3297 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3299 (gdb_condition_true_at_breakpoint): Reimplement.
3300 (add_breakpoint_commands): Take a struct breakpoint pointer
3301 instead of an address. Adjust.
3302 (gdb_no_commands_at_breakpoint): Rename to ...
3303 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3304 parameter. Return true if no breakpoint was found. Change debug
3306 (gdb_no_commands_at_breakpoint): Reimplement.
3307 (run_breakpoint_commands): Rename to ...
3308 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3309 and change return type to boolean.
3310 (run_breakpoint_commands): New function.
3311 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3312 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3313 breakpoint. Go through the_target->remove_point instead of
3314 assuming memory breakpoint.
3315 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3316 software and hardware breakpoints.
3317 (reinsert_raw_breakpoint): Go through the_target->insert_point
3318 instead of assuming memory breakpoint.
3319 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3320 software and hardware breakpoints.
3321 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3322 Check both software and hardware breakpoints.
3323 (validate_inserted_breakpoint): Assert the breakpoint is a
3324 software breakpoint. Set the inserted flag to -1 instead of
3325 setting shlib_disabled.
3326 (delete_disabled_breakpoints): Adjust.
3327 (validate_breakpoints): Only validate software breakpoints.
3328 Adjust to inserted flag change.
3329 (check_mem_read, check_mem_write): Skip breakpoint types other
3330 than software breakpoints. Adjust to inserted flag change.
3331 * mem-break.h (enum raw_bkpt_type): New enum.
3332 (raw_breakpoint, struct process_info): Forward declare.
3333 (Z_packet_to_target_hw_bp_type): Delete declaration.
3334 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3335 (set_gdb_breakpoint, delete_gdb_breakpoint)
3336 (clear_breakpoint_conditions): New declarations.
3337 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3338 (breakpoint_inserted_here): Update comment.
3339 (add_breakpoint_condition, add_breakpoint_commands): Replace
3340 address parameter with a breakpoint pointer parameter.
3341 (gdb_breakpoint_here): Update comment.
3342 (delete_gdb_breakpoint_at): Delete.
3343 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3344 * server.c (process_point_options): Take a struct breakpoint
3345 pointer instead of an address. Adjust.
3346 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3347 delete_gdb_breakpoint.
3348 * spu-low.c (spu_target_ops): Install NULL as
3349 supports_z_point_type method.
3350 * target.h: Include mem-break.h.
3351 (struct target_ops) <prepare_to_access_memory>: Update comment.
3352 <supports_z_point_type>: New field.
3353 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3354 instead of a char. Also take a raw breakpoint pointer.
3355 * win32-arm-low.c (the_low_target): Install NULL as
3356 supports_z_point_type.
3357 * win32-i386-low.c (i386_supports_z_point_type): New function.
3358 (i386_insert_point, i386_remove_point): Adjust to new interface.
3359 (the_low_target): Install i386_supports_z_point_type.
3360 * win32-low.c (win32_supports_z_point_type): New function.
3361 (win32_insert_point, win32_remove_point): Adjust to new interface.
3362 (win32_target_ops): Install win32_supports_z_point_type.
3363 * win32-low.h (struct win32_target_ops):
3364 <supports_z_point_type>: New method.
3365 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3366 instead of a char. Also take a raw breakpoint pointer.
3368 2014-05-20 Pedro Alves <palves@redhat.com>
3370 * mem-break.h: Include break-common.h.
3371 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3372 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3373 (Z_packet_to_target_hw_bp_type): New declaration.
3374 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3375 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3376 (Z_PACKET_ACCESS_WP): Delete macros.
3377 (Z_packet_to_hw_type): Delete function.
3378 * i386-low.h: Don't include break-common.h here.
3379 (Z_packet_to_hw_type): Delete declaration.
3380 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3381 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3382 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3383 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3384 * linux-aarch64-low.c: Don't include break-common.h here.
3385 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3386 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3387 (Z_packet_to_target_hw_bp_type): Delete function.
3388 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3390 (mips_insert_point, mips_remove_point): Use
3391 Z_packet_to_target_hw_bp_type.
3393 2014-05-20 Pedro Alves <palves@redhat.com>
3395 * linux-aarch64-low.c: Include break-common.h.
3396 (enum target_point_type): Delete.
3397 (Z_packet_to_point_type): Rename to ...
3398 (Z_packet_to_target_hw_bp_type): ... this, and return a
3399 target_hw_bp_type instead.
3400 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3401 instead of an enum target_point_type.
3402 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3404 (aarch64_dr_state_insert_one_point)
3405 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3406 (aarch64_handle_aligned_watchpoint)
3407 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3408 Take an enum target_hw_bp_type instead of an enum
3410 (aarch64_supports_z_point_type): New function.
3411 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3412 use Z_packet_to_target_hw_bp_type.
3414 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3416 * configure.ac: Only use -Werror by default when DEVELOPMENT
3418 * configure: Regenerate.
3420 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3422 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3423 * linux-x86-low.c (X86_64_USER_REGS): New.
3424 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3426 2014-04-28 Yao Qi <yao@codesourcery.com>
3428 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3431 2014-04-25 Pedro Alves <palves@redhat.com>
3434 * linux-low.c (linux_attach_fail_reason_string): New function.
3435 (linux_attach_lwp): Delete.
3436 (linux_attach_lwp_1): Rename to ...
3437 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3438 argument. Remove "initial" parameter. Return int instead of
3439 void. Don't error or warn here.
3440 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3441 failure to attach to the tgid. Call warning when failing to
3443 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3444 argument. Remove "initial" parameter. Return int instead of
3445 void. Don't error or warn here.
3446 (linux_attach_fail_reason_string): New declaration.
3447 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3448 interface change. Use linux_attach_fail_reason_string.
3450 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3451 Walfred Tedeschi <walfred.tedeschi@intel.com>
3453 * Makefile.in: Added rules to handle new files
3454 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3455 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3456 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3457 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3458 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3459 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3461 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3462 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3463 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3464 i386/x32-avx512.xml.
3465 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3466 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3467 i386/x32-avx512-linux.xml.
3468 * i387-fp.c (num_avx512_k_registers): New constant for number
3470 (num_avx512_zmmh_low_registers): New constant for number of
3471 lower ZMM registers (0-15).
3472 (num_avx512_zmmh_high_registers): New constant for number of
3473 higher ZMM registers (16-31).
3474 (num_avx512_ymmh_registers): New contant for number of higher
3475 YMM registers (ymm16-31 added by avx521 on x86_64).
3476 (num_avx512_xmm_registers): New constant for number of higher
3477 XMM registers (xmm16-31 added by AVX512 on x86_64).
3478 (struct i387_xsave): Add space for AVX512 registers.
3479 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3480 Add code to handle AVX512 registers.
3481 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3482 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3483 prototypei from generated file.
3484 (tdesc_amd64_avx512_linux): Likewise.
3485 (init_registers_x32_avx512_linux): Likewise.
3486 (tdesc_x32_avx512_linux): Likewise.
3487 (init_registers_i386_avx512_linux): Likewise.
3488 (tdesc_i386_avx512_linux): Likewise.
3489 (x86_64_regmap): Add AVX512 registers.
3490 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3492 (initialize_low_arch): Add code to initialize AVX512 registers.
3494 2014-04-23 Pedro Alves <palves@redhat.com>
3496 * mem-break.c (find_gdb_breakpoint_at): Make static.
3497 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3499 2014-04-23 Pedro Alves <palves@redhat.com>
3501 * i386-low.c: Don't include break-common.h here.
3502 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3503 prototype to take target_hw_bp_type as argument instead of a Z
3505 * i386-low.h: Include break-common.h here.
3506 (Z_packet_to_hw_type): Declare.
3507 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3509 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3510 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3511 (x86_remove_point): Convert the packet number to a
3512 target_hw_bp_type before calling i386_low_remove_watchpoint.
3513 * win32-i386-low.c (i386_insert_point): Convert the packet number
3514 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3515 (i386_remove_point): Convert the packet number to a
3516 target_hw_bp_type before calling i386_low_remove_watchpoint.
3518 2014-04-23 Pedro Alves <palves@redhat.com>
3520 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3522 2014-04-10 Pedro Alves <palves@redhat.com>
3524 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3525 Check if the condition or command is NULL before checking if the
3526 breakpoint is known. On success, return true.
3527 * mem-break.h (add_breakpoint_condition): Document return.
3528 (add_breakpoint_commands): Add describing comment.
3529 * server.c (skip_to_semicolon): New function.
3530 (process_point_options): Use it.
3532 2014-04-09 Pedro Alves <palves@redhat.com>
3534 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3537 2014-02-27 Pedro Alves <palves@redhat.com>
3540 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3542 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3544 (last_thread_of_process_p): Take a PID argument instead of a
3546 (linux_wait_for_lwp): Delete.
3547 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3549 (linux_low_filter_event): New function, party factored out from
3550 linux_wait_for_event.
3551 (linux_wait_for_event): Rename to ...
3552 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3553 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3554 sigsuspend. Check for zombie leaders.
3555 (linux_wait_for_event): Reimplement as wrapper around
3556 linux_wait_for_event_filtered.
3557 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3558 a normal or signal exit is seen, it's the whole process exiting.
3559 (wait_for_sigstop): No longer a for_each_inferior callback.
3560 Rewrite on top of linux_wait_for_event_filtered.
3561 (stop_all_lwps): Call wait_for_sigstop directly.
3562 * server.c (resume, handle_target_event): Handle
3563 TARGET_WAITKIND_NO_RESUMED.
3565 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3567 * win32-low.c (psapi_get_dll_name,
3568 * win32_CreateToolhelp32Snapshot): Delete.
3569 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3570 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3572 (handle_load_dll): Add function description.
3573 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3575 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3577 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3579 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3580 base address when calling win32_add_one_solib.
3581 (handle_load_dll): Delete local variable load_addr.
3582 Remove 0x1000 offset applied to DLL base address when calling
3583 win32_add_one_solib.
3584 (handle_unload_dll): Add comment.
3586 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3588 * win32-low.c (win32_add_all_dlls): Renames
3589 win32_ensure_ntdll_loaded. Rewrite function documentation.
3590 Adjust implementation to always load all DLLs.
3591 Add 0x1000 offset to DLL base address when calling
3592 win32_add_one_solib.
3593 (child_initialization_done): New static global.
3594 (do_initial_child_stuff): Set child_initialization_done to
3595 zero during child initialization, and 1 after. Replace call
3596 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3598 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3599 (handle_unload_dll): Add function documentation.
3600 (get_child_debug_event): Ignore load and unload DLL events
3601 during child initialization.
3603 2014-02-20 Doug Evans <dje@google.com>
3605 Remove global all_lwps.
3606 * inferiors.h (ptid_of): Move here from linux-low.h.
3607 (pid_of, lwpid_of): Ditto.
3608 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3609 parameter is a struct thread_info * now.
3610 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3611 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3612 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3614 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3615 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3616 * linux-arm-low.c (update_registers_callback): Update, "entry"
3617 parameter is a struct thread_info * now.
3618 Fetch lwpid from current_inferior directly.
3619 (arm_insert_point): Pass &all_threads to find_inferior instead of
3621 (arm_remove_point): Ditto.
3622 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3623 (arm_prepare_to_resume): Fetch pid from thread.
3624 (arm_read_description): Fetch lwpid from current_inferior directly.
3625 * linux-low.c (all_lwps): Delete.
3626 (delete_lwp): Delete call to remove_inferior.
3627 (handle_extended_wait): Fetch lwpid from thread.
3628 (add_lwp): Don't set lwp->entry.id. Remove call to
3629 add_inferior_to_list.
3630 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3631 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3632 (kill_one_lwp_callback): Ditto.
3633 (linux_kill): Don't dereference NULL pointer.
3634 Fetch ptid,lwpid from thread.
3635 (get_detach_signal): Fetch ptid from thread.
3636 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3637 Simplify call to regcache_invalidate_thread.
3638 (delete_lwp_callback): Update, "entry" parameter is a
3639 struct thread_info * now. Fetch pid from thread.
3640 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3641 (status_pending_p_callback): Update, "entry" parameter is a
3642 struct thread_info * now. Fetch ptid from thread.
3643 (find_lwp_pid): Update, "entry" parameter is a
3644 struct thread_info * now.
3645 (linux_wait_for_lwp): Fetch pid from thread.
3646 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3647 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3648 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3649 (dequeue_one_deferred_signal): Ditto.
3650 (cancel_breakpoint): Fetch ptid from current_inferior.
3651 (linux_wait_for_event): Pass &all_threads to find_inferior,
3652 not &all_lwps. Fetch ptid, lwpid from thread.
3653 (count_events_callback): Update, "entry" parameter is a
3654 struct thread_info * now.
3655 (select_singlestep_lwp_callback): Ditto.
3656 (select_event_lwp_callback): Ditto.
3657 (cancel_breakpoints_callback): Ditto.
3658 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3660 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3661 (unsuspend_one_lwp): Update, "entry" parameter is a
3662 struct thread_info * now.
3663 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3665 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3666 Fetch lwpid from thread, not lwp.
3667 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3668 Pass &all_threads to find_inferior, not &all_lwps.
3669 (send_sigstop): Fetch lwpid from thread, not lwp.
3670 (send_sigstop_callback): Update, "entry" parameter is a
3671 struct thread_info * now.
3672 (suspend_and_send_sigstop_callback): Ditto.
3673 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3674 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3675 struct thread_info * now.
3676 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3678 (lwp_running): Update, "entry" parameter is a
3679 struct thread_info * now.
3680 (stop_all_lwps): Fetch ptid from thread.
3681 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3682 (linux_resume_one_lwp): Fetch lwpid from thread.
3683 (linux_set_resume_request): Update, "entry" parameter is a
3684 struct thread_info * now. Fetch pid, lwpid from thread.
3685 (resume_status_pending_p): Update, "entry" parameter is a
3686 struct thread_info * now.
3687 (need_step_over_p): Ditto. Fetch lwpid from thread.
3688 (start_step_over): Fetch lwpid from thread.
3689 (linux_resume_one_thread): Update, "entry" parameter is a
3690 struct thread_info * now. Fetch lwpid from thread.
3691 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3692 (proceed_one_lwp): Update, "entry" parameter is a
3693 struct thread_info * now. Fetch lwpid from thread.
3694 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3695 struct thread_info * now.
3696 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3697 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3698 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3700 (regsets_store_inferior_registers): Ditto.
3701 (fetch_register, store_register): Ditto.
3702 (linux_read_memory, linux_write_memory): Ditto.
3703 (linux_request_interrupt): Ditto.
3704 (linux_read_auxv): Ditto.
3705 (linux_xfer_siginfo): Ditto.
3706 (linux_qxfer_spu): Ditto.
3707 (linux_qxfer_libraries_svr4): Ditto.
3708 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3709 moved to inferiors.h.
3711 (get_thread_lwp): Update.
3712 (struct lwp_info): Delete member "entry". Simplify comment for
3715 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3716 current_inferior directly.
3717 (update_watch_registers_callback): Update, "entry" parameter is a
3718 struct thread_info * now. Fetch pid from thread.
3719 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3720 (mips_insert_point): Fetch lwpid from current_inferior.
3721 Pass &all_threads to find_inferior, not &all_lwps.
3722 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3723 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3725 (mips_stopped_data_address): Ditto.
3726 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3728 * linux-tile-low.c (tile_arch_setup): Ditto.
3729 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3730 (update_debug_registers_callback): Update, "entry" parameter is a
3731 struct thread_info * now. Fetch pid from thread.
3732 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3733 Pass &all_threads to find_inferior, not &all_lwps.
3734 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3735 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3736 Pass &all_threads to find_inferior, not &all_lwps.
3737 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3738 (i386_dr_low_get_status): Ditto.
3739 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3740 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3741 (x86_linux_read_description): Ditto.
3742 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3744 2014-02-20 Doug Evans <dje@google.com>
3746 * inferiors.c (get_first_inferior): Fix buglet.
3748 2014-02-19 Doug Evans <dje@google.com>
3750 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3751 * inferiors.c (add_thread): Change result type to struct thread_info *.
3752 All callers updated.
3753 (add_lwp): Call add_thread here instead of in callers.
3754 All callers updated.
3755 * linux-low.h (get_lwp_thread): Rewrite.
3756 (struct lwp_info): New member "thread".
3758 2014-02-19 Doug Evans <dje@google.com>
3760 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3761 All callers updated.
3763 2014-02-19 Doug Evans <dje@google.com>
3765 * inferiors.c (add_thread): Fix whitespace.
3767 2014-02-19 Doug Evans <dje@google.com>
3769 * dll.c (clear_dlls): Replace accessing list implemention details
3771 * gdbthread.h (get_first_thread): Declare.
3772 * inferiors.c (for_each_inferior_with_data): New function.
3773 (get_first_thread): New function.
3774 (find_thread_ptid): Simplify.
3775 (get_first_inferior): New function.
3776 (clear_list): Delete.
3777 (one_inferior_p): New function.
3778 (clear_inferior_list): New function.
3779 (clear_inferiors): Update.
3780 * inferiors.h (for_each_inferior_with_data): Declare.
3781 (clear_inferior_list): Declare.
3782 (one_inferior_p): Declare.
3783 (get_first_inferior): Declare.
3784 * linux-low.c (linux_wait_for_event): Replace accessing list
3785 implemention details with API function.
3786 * server.c (target_running): Ditto.
3787 (accumulate_file_name_length): New function.
3788 (emit_dll_description): New function.
3789 (handle_qxfer_libraries): Replace accessing list implemention
3790 details with API function.
3791 (handle_qxfer_threads_worker): New function.
3792 (handle_qxfer_threads_proper): Replace accessing list implemention
3793 details with API function.
3794 (handle_query): Ditto.
3795 (visit_actioned_threads_callback_ftype): New typedef.
3796 (visit_actioned_threads_data): New struct.
3797 (visit_actioned_threads): Rewrite to be find_inferior callback.
3798 (resume): Call find_inferior.
3799 (handle_status): Replace accessing list implemention
3800 details with API function.
3801 (process_serial_event): Replace accessing list implemention details
3803 * target.c (set_desired_inferior): Replace accessing list implemention
3804 details with API function.
3805 * tracepoint.c (same_process_p): New function.
3806 (gdb_agent_about_to_close): Replace accessing list implemention
3807 details with API function.
3808 * win32-low.c (child_delete_thread): Replace accessing list
3809 implemention details with API function.
3810 (match_dll_by_basename): New function.
3811 (dll_is_loaded_by_basename): New function.
3812 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3813 details call to dll_is_loaded_by_basename.
3815 2014-02-19 Doug Evans <dje@google.com>
3817 * dll.h (struct dll_info): Add comment.
3818 * gdbthread.h (struct thread_info): Add comment.
3819 (current_ptid): Simplify.
3820 * inferiors.c (add_process): Update.
3821 (remove_process): Update.
3822 * inferiors.h (struct process_info): Rename member "head" to "entry".
3823 * linux-low.c (delete_lwp): Update.
3825 (last_thread_of_process_p): Update.
3826 (kill_one_lwp_callback, linux_kill): Update.
3827 (status_pending_p_callback): Update.
3828 (wait_for_sigstop): Update. Simplify read of ptid.
3829 (start_step_over): Update.
3830 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3831 (get_lwp_thread): Update.
3832 (struct lwp_info): Rename member "head" to "entry".
3833 * regcache.h (inferior_list_entry): Delete.
3834 * server.c (kill_inferior_callback): Update.
3835 (detach_or_kill_inferior_callback): Update.
3836 (print_started_pid): Update.
3837 (print_attached_pid): Update.
3838 (process_serial_event): Simplify read of ptid.
3839 * thread-db.c (thread_db_create_event): Update.
3840 (thread_db_get_tls_address): Update.
3841 * win32-low.c (current_inferior_ptid): Simplify.
3843 2014-02-19 Tom Tromey <tromey@redhat.com>
3845 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3847 (target_supports_btrace): Update.
3849 2014-02-14 Yao Qi <yao@codesourcery.com>
3851 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3852 (rsp-low-ipa.o): New target.
3854 2014-02-12 Tom Tromey <tromey@redhat.com>
3856 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3857 convert_ascii_to_int.
3858 * regcache.c (registers_to_string): Likewise.
3859 * remote-utils.c (decode_M_packet): Likewise.
3860 * server.c (process_serial_event): Likewise.
3862 2014-02-12 Tom Tromey <tromey@redhat.com>
3864 * server.c (handle_query, handle_v_run): Use hex2bin, not
3866 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3868 2014-02-12 Tom Tromey <tromey@redhat.com>
3870 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3871 convert_int_to_ascii.
3872 * regcache.c (registers_to_string, collect_register_as_string):
3874 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3876 * server.c (process_serial_event): Likewise.
3877 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3878 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3880 2014-02-12 Tom Tromey <tromey@redhat.com>
3882 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3883 bin2hex, not hexify.
3884 * tracepoint.c (cmd_qtstatus): Likewise.
3886 2014-02-12 Tom Tromey <tromey@redhat.com>
3888 * remote-utils.c (monitor_output): Pass explicit length to
3891 2014-02-12 Tom Tromey <tromey@redhat.com>
3893 * tracepoint.c: Include rsp-low.h.
3894 * server.c: Include rsp-low.h.
3895 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3896 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3898 * remote-utils.c: Include rsp-low.h.
3899 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3900 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3901 (convert_int_to_ascii, convert_ascii_to_int): Move to
3903 * regcache.c: Include rsp-low.h.
3904 * ax.c: Include rsp-low.h.
3905 * Makefile.in (SFILES): Add common/rsp-low.c.
3906 (OBS): Add rsp-low.o.
3907 (rsp-low.o): New target.
3909 2014-02-12 Tom Tromey <tromey@redhat.com>
3911 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3912 Include print-utils.h.
3913 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3914 (plongest, thirty_two, phex_nz): Remove.
3915 * Makefile.in (SFILES): Add common/print-utils.c.
3916 (OBS): Add print-utils.o.
3917 (print-utils-ipa.o): New target.
3918 (print-utils.o): New target.
3919 (IPA_OBJS): Add print-utils-ipa.o.
3921 2014-02-06 Tom Tromey <tromey@redhat.com>
3923 * Makefile.in (SFILES): Fix indentation.
3925 2014-02-05 Doug Evans <dje@google.com>
3927 * linux-low.c (linux_wait_for_event): Improve comment.
3928 (linux_wait_1): Keep current_inferior in sync with event_child.
3930 2014-01-22 Doug Evans <dje@google.com>
3932 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3934 2014-01-22 Doug Evans <dje@google.com>
3936 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3937 * configure: Regenerate.
3938 * config.in: Regenerate.
3939 * Makefile.in (SFILES): Add debug.c.
3941 * debug.c: New file.
3942 * debug.h: New file.
3943 * linux-aarch64-low.c (*): Update all debugging printfs to use
3944 debug_printf instead of fprintf.
3945 * linux-arm-low.c (*): Ditto.
3946 * linux-cris-low.c (*): Ditto.
3947 * linux-crisv32-low.c (*): Ditto.
3948 * linux-m32r-low.c (*): Ditto.
3949 * linux-sparc-low.c (*): Ditto.
3950 * linux-x86.c (*): Ditto.
3951 * linux-low.c (*): Ditto.
3952 (linux_wait_1): Add calls to debug_enter, debug_exit.
3953 (linux_wait): Remove redundant debugging printf.
3954 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3955 (linux_resume, unstop_all_lwps): Ditto.
3956 * mem-break.c (*): Update all debugging printfs to use
3957 debug_printf instead of fprintf.
3958 * remote-utils.c (*): Ditto.
3959 * thread-db.c (*): Ditto.
3960 * server.c #include <ctype.h>, "gdb_vecs.h".
3961 (debug_threads): Moved to debug.c.
3962 (*): Update all debugging printfs to use debug_printf instead of
3964 (start_inferior): Replace call to fflush with call to debug_flush.
3965 (monitor_show_help): Mention set debug-format.
3966 (parse_debug_format_options): New function.
3967 (handle_monitor_command): Handle "monitor set debug-format".
3968 (gdbserver_usage): Mention --debug-format.
3969 (main): Parse --debug-format.
3970 * server.h (debug_threads): Declaration moved to debug.h.
3972 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3973 trace_debug_1 that uses debug_printf.
3974 (tracepoint_look_up_symbols): Update all debugging printfs to use
3975 debug_printf instead of fprintf.
3977 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3979 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3982 2014-01-17 Pedro Alves <palves@redhat.com>
3985 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3986 defined after including gdb_proc_service.h.
3988 2014-01-16 Doug Evans <dje@google.com>
3990 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3991 (match_dll): Use it.
3993 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3995 * target.h (target_ops) <read_btrace>: Change parameters and
3996 return type to allow error reporting.
3997 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3998 trace reading errors on.
3999 * linux-low.c (linux_low_read_btrace): Pass trace reading
4001 (linux_low_disable_btrace): New.
4003 2014-01-15 Doug Evans <dje@google.com>
4005 * inferiors.c (thread_id_to_gdb_id): Delete.
4006 * inferiors.h (thread_id_to_gdb_id): Delete.
4008 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4010 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4011 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4014 2014-01-08 Pedro Alves <palves@redhat.com>
4016 * server.c (handle_status): Don't discard previous queued stop
4017 replies or thread's pending status here.
4018 (main) <disconnection>: Do it here instead.
4020 2014-01-08 Pedro Alves <palves@redhat.com>
4022 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4023 * server.c (visit_actioned_threads, handle_pending_status): New
4025 (handle_v_cont): Factor out parts to ...
4026 (resume): ... this new function. If in all-stop, and a thread
4027 being resumed has a pending status, report it without actually
4029 (myresume): Adjust to use the new 'resume' function.
4030 (clear_pending_status_callback, set_pending_status_callback)
4031 (find_status_pending_thread_callback): New functions.
4032 (handle_status): Handle the case of multiple threads having
4033 interesting statuses to report. Report threads' real last signal
4034 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4035 with an interesting thread to report the status for, instead of
4036 always reporting the status of the first thread.
4038 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4040 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4041 * gdbreplay.c (gdbreplay_version): Likewise.
4043 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4045 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4046 iov.iov_len with the real length in use.
4048 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4050 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4051 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4052 for all targets that use win32-low.c.
4053 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4054 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4056 2013-12-13 Pedro Alves <palves@redhat.com>
4058 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4059 if equal to TARGET_WAITKIND_LOADED.
4060 * win32-low.c (cached_status): New static global.
4061 (win32_wait): Add declaration.
4062 (do_initial_child_stuff): Flush all initial pending debug events
4063 up to the initial breakpoint.
4064 (win32_wait): If CACHED_STATUS was set, return that instead
4065 of doing a real wait. Remove the code resuming the execution
4066 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4067 during the initial phase. Also remove the code changing
4068 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4069 TARGET_WAITKIND_STOPPED.
4071 2013-12-11 Yao Qi <yao@codesourcery.com>
4073 * notif.c (handle_notif_ack): Return 0 if no notification
4076 2013-11-20 Doug Evans <dje@google.com>
4078 * linux-low.c (linux_set_resume_request): Fix comment.
4080 2013-11-20 Doug Evans <dje@google.com>
4082 * linux-low.c (resume_status_pending_p): Tweak comment.
4084 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4086 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4087 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4088 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4089 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4090 (srv_amd64_regobj): Add amd64-mpx.o.
4091 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4092 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4093 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4094 * i387-fp.c (num_pl_bnd_register) Added constant.
4095 (num_pl_bnd_cfg_registers) Added constant.
4096 (struct i387_xsave) Added reserved area and MPX fields.
4097 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4098 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4100 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4101 (init_registers_amd64_mpx_linux): Declare new function.
4102 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4103 (x86_64_regmap): Add MPX registers.
4104 (x86_linux_read_description): Add MPX case.
4105 (initialize_low_arch): Initialize MPX targets.
4107 2013-11-18 Tom Tromey <tromey@redhat.com>
4109 * configure: Rebuild.
4110 * configure.ac: Don't check for stdlib.h.
4111 * gdbreplay.c: Unconditionally include stdlib.h.
4113 2013-11-18 Tom Tromey <tromey@redhat.com>
4115 * config.in: Rebuild.
4116 * configure: Rebuild.
4117 * configure.ac: Don't use AC_HEADER_DIRENT.
4119 2013-11-18 Tom Tromey <tromey@redhat.com>
4121 * server.h: Don't check HAVE_STRING_H.
4122 * gdbreplay.c: Don't check HAVE_STRING_H.
4123 * configure: Rebuild.
4125 2013-11-18 Tom Tromey <tromey@redhat.com>
4127 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4130 2013-11-08 Tom Tromey <tromey@redhat.com>
4132 * configure, config.in: Rebuild.
4133 * configure.ac: Remove unused configury.
4135 2013-11-08 Tom Tromey <tromey@redhat.com>
4137 * acinclude.m4: Include common.m4, codeset.m4.
4138 * configure, config.in: Rebuild.
4139 * configure.ac: Use GDB_AC_COMMON.
4141 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4143 * linux-s390-low.c (HWCAP_S390_TE): New define.
4144 (s390_arch_setup): Consider the TE field in the HWCAP for
4145 determining 'have_regset_tdb'.
4147 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4150 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4153 2013-10-02 Pedro Alves <palves@redhat.com>
4155 * server.c (process_serial_event): Don't output "GDBserver
4156 exiting" if GDB is connected through stdio.
4157 * target.c (mywait): Likewise, be silent if GDB is connected
4160 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4162 * lynx-low.c (lynx_add_threads_after_attach): New function.
4163 (lynx_attach): Remove call to add_thread. Add call to
4164 lynx_add_threads_after_attach instead.
4166 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4168 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4169 * config.in, configure: Regenerated.
4171 2013-09-18 Yao Qi <yao@codesourcery.com>
4174 * server.c (start_inferior): Clear 'resume_info'.
4176 2013-09-16 Jiong Wang <jiwang@tilera.com>
4178 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4181 2013-09-16 Jiong Wang <jiwang@tilera.com>
4183 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4184 linux-tile-low.o to srv_tgtobj.
4186 2013-09-16 Will Newton <will.newton@linaro.org>
4188 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4191 2013-09-06 Pedro Alves <palves@redhat.com>
4193 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4194 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4195 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4196 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4197 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4198 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4200 2013-09-06 Pedro Alves <palves@redhat.com>
4202 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4203 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4205 2013-09-06 Pedro Alves <palves@redhat.com>
4207 * linux-amd64-ipa.c: Include tracepoint.h.
4208 * linux-i386-ipa.c: Include tracepoint.h.
4210 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4212 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4213 (ps_get_thread_area): New function.
4215 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4217 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4218 (initialize_low_arch): Call init_registers_crisv32 rather than
4219 init_register_crisv32.
4221 2013-09-05 Pedro Alves <palves@redhat.com>
4223 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4225 * hostio.h: ... this new file.
4226 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4227 win32-low.c: Include hostio.h.
4229 2013-09-05 Pedro Alves <palves@redhat.com>
4231 * server.h (gdb_client_data, handler_func, callback_handler_func)
4232 (delete_file_handler, add_file_handler, append_callback_event)
4233 (delete_callback_event, start_event_loop, initialize_event_loop):
4234 Move to event-loop.h and include it.
4235 * event-loop.h: New file.
4237 2013-09-05 Pedro Alves <palves@redhat.com>
4239 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4240 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4241 (loaded_dll, unloaded_dll): Move to ...
4242 * dll.h: ... this new file.
4243 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4245 2013-09-05 Pedro Alves <palves@redhat.com>
4247 * server.h (current_process, get_thread_process, all_processes)
4248 (add_inferior_to_list, for_each_inferior, current_inferior)
4249 (remove_inferior, add_process, remove_process, find_process_pid)
4250 (have_started_inferiors_p, have_attached_inferiors_p)
4251 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4252 (clear_inferiors, find_inferior, find_inferior_id)
4253 (inferior_target_data, set_inferior_target_data)
4254 (inferior_regcache_data, set_inferior_regcache_data): Move to
4255 inferiors.h, and include it.
4256 * inferiors.h: New file.
4258 2013-09-05 Pedro Alves <palves@redhat.com>
4260 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4264 2013-09-05 Pedro Alves <palves@redhat.com>
4266 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4268 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4269 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4270 (handle_tracepoint_general_set, handle_tracepoint_query)
4271 (tracepoint_finished_step, tracepoint_was_hit)
4272 (release_while_stepping_state_list, current_traceframe)
4273 (in_readonly_region, traceframe_read_mem)
4274 (fetch_traceframe_registers, traceframe_read_sdata)
4275 (traceframe_read_info, struct fast_tpoint_collect_status)
4276 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4277 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4278 (supply_fast_tracepoint_registers)
4279 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4280 (ipa_tdesc, claim_trampoline_space)
4281 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4282 (agent_mem_read, agent_get_trace_state_variable_value)
4283 (agent_set_trace_state_variable_value, agent_tsv_read)
4284 (agent_mem_read_string, get_raw_reg_func_addr)
4285 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4286 * tracepoint.h: ... this new file.
4288 2013-09-05 Pedro Alves <palves@redhat.com>
4290 * server.h (perror_with_name, error, fatal, warning, paddress)
4291 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4293 * utils.h: New file.
4295 2013-09-05 Pedro Alves <palves@redhat.com>
4297 * server.h (remote_debug, noack_mode, transport_is_reliable)
4298 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4299 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4300 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4301 (write_enn, initialize_async_io, enable_async_io)
4302 (disable_async_io, check_remote_input_interrupt_request)
4303 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4304 (dead_thread_notify, prepare_resume_reply)
4305 (decode_address_to_semicolon, decode_address, decode_m_packet)
4306 (decode_M_packet, decode_X_packet, decode_xfer_write)
4307 (decode_search_memory_packet, unhexify, hexify)
4308 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4309 (look_up_one_symbol, relocate_instruction)
4310 (monitor_output): Move to remote-utils.h, and include it.
4311 * remote-utils.h: New file.
4313 2013-09-05 Pedro Alves <palves@redhat.com>
4315 * server.h (_): Delete.
4317 2013-09-02 Pedro Alves <palves@redhat.com>
4319 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4320 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4322 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4324 2013-09-02 Pierre Muller <muller@sourceware.org>
4326 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4327 or WriteProcessMemory complete successfully and handle
4328 ERROR_PARTIAL_COPY error.
4330 2013-09-02 Pedro Alves <palves@redhat.com>
4332 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4333 error instead of EIO.
4335 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4338 * linux-low.c: Include filestuff.h.
4339 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4340 * lynx-low.c: Include filestuff.h.
4341 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4342 * server.c: Include filestuff.h.
4343 (main): Call notice_open_fds.
4344 * spu-low.c: Include filestuff.h.
4345 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4347 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4349 * Makefile.in: Explain why ../target and ../nat are not
4350 listed as include file search paths.
4351 (linux-waitpid.o): New object file rule.
4352 * configure.srv (srv_native_linux_obj): New variable.
4353 Replace all occurrences of linux native object files with
4354 $srv_native_linux_obj.
4355 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4356 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4357 (linux_enable_event_reporting): Remove declaration.
4358 (my_waitpid): Moved to common/linux-waitpid.c.
4359 (linux_wait_for_event): Pass ptid when calling
4360 linux_enable_event_reporting.
4361 (linux_supports_tracefork_flag): Remove.
4362 (linux_enable_event_reporting): Likewise.
4363 (linux_tracefork_grandchild): Remove.
4364 (STACK_SIZE): Moved to common/linux-ptrace.c.
4365 (linux_tracefork_child): Remove.
4366 (linux_test_for_tracefork): Remove.
4367 (linux_look_up_symbols): Call linux_supports_traceclone.
4368 (initialize_low): Remove call to linux_test_for_tracefork.
4369 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4370 common/linux-ptrace.h.
4371 (PTRACE_TYPE_ARG4): Likewise.
4372 Include linux-ptrace.h.
4374 2013-08-21 Pedro Alves <palves@redhat.com>
4376 * config.in: Renegerate.
4378 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4380 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4381 (SFILES): Remove $(srcdir)/common/target-common.c and
4382 add $(srcdir)/target/waitstatus.c.
4383 (OBS): Remove target-common.o and add waitstatus.o.
4384 (server_h): Remove $(srcdir)/../common/target-common.h and
4385 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4386 and $(srcdir)/../target/waitstatus.h.
4387 (target-common.o): Remove.
4388 (waitstatus.o): New target object file.
4389 * target.h: Do not include target-common.h and
4390 include target/resume.h, target/wait.h and
4391 target/waitstatus.h.
4393 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4395 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4396 to PTRACE_TYPE_ARG3.
4397 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4398 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4400 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4401 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4403 2013-07-27 Jie Zhang <jie@codesourcery.com>
4404 Daniel Jacobowitz <dan@codesourcery.com>
4405 Yao Qi <yao@codesourcery.com>
4407 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4408 (mips-linux-watch.o): New rule.
4409 (mips_linux_watch_h): New variable.
4410 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4412 * linux-mips-low.c: Include mips-linux-watch.h.
4413 (struct arch_process_info, struct arch_lwp_info): New.
4414 (update_watch_registers_callback): New function.
4415 (mips_linux_new_process, mips_linux_new_thread) New functions.
4416 (mips_linux_prepare_to_resume, mips_insert_point): New
4418 (mips_remove_point, mips_stopped_by_watchpoint): New
4420 (rsp_bp_type_to_target_hw_bp_type): New function.
4421 (mips_stopped_data_address): New function.
4422 (the_low_target): Add watchpoint support functions.
4424 2013-07-27 Yao Qi <yao@codesourcery.com>
4426 * i386-low.c: Include break-common.h.
4427 (enum target_hw_bp_type): Remove.
4429 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4431 * Makefile.in (SFILES): /common/target-common.c.
4432 (OBS): Add target-common.o.
4433 (server_h): Add $(srcdir)/../common/target-common.h.
4434 (target-common.o): New target.
4435 * server.c (queue_stop_reply_callback): Free
4436 status string after use.
4437 * target.c (target_waitstatus_to_string): Remove.
4438 * target.h: Include target-common.h.
4439 (resume_kind): Likewise.
4440 (target_waitkind): Likewise.
4441 (target_waitstatus): Likewise.
4442 (TARGET_WNOHANG): Likewise.
4444 2013-07-04 Yao Qi <yao@codesourcery.com>
4446 * Makefile.in (host_alias): Use @host_noncanonical@.
4447 (target_alias): Use @target_noncanonical@.
4448 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4449 ACX_NONCANONICAL_HOST.
4450 * configure: Regenerated.
4453 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4455 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4456 * configure: Rebuild.
4457 * Makefile.in (version_host, version_target): Get from configure.
4458 (version.c): Use $(version_host) and $(version_target).
4460 2013-07-03 Pedro Alves <palves@redhat.com>
4462 * Makefile.in (config.status): Depend on development.sh.
4463 * acinclude.m4: Include libmcheck.m4.
4464 * configure: Regenerate.
4466 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4468 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4469 attribute inside the parentheses.
4470 (winapi_DebugSetProcessKillOnExit): Ditto.
4471 (winapi_DebugBreakProcess): Ditto.
4472 (winapi_GenerateConsoleCtrlEvent): Ditto.
4474 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4476 * notif.h (notif_event): Add a dummy member to avoid compiler
4479 2013-07-01 Pedro Alves <palves@redhat.com>
4481 * hostio.c (HOSTIO_PATH_MAX): Define.
4482 (require_filename, handle_open, handle_unlink, handle_readlink):
4485 2013-07-01 Pedro Alves <palves@redhat.com>
4487 * server.h: Include "pathmax.h".
4488 * linux-low.c: Don't include sys/param.h.
4489 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4491 * win32-low.c: Don't include sys/param.h.
4492 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4494 2013-07-01 Pedro Alves <palves@redhat.com>
4496 * event-loop.c: Don't check HAVE_UNISTD_H before including
4498 * gdbreplay.c: Likewise.
4499 * remote-utils.c: Likewise.
4500 * server.c: Likewise.
4501 * configure.ac: Don't check for unistd.h.
4502 * configure: Regenerate.
4504 2013-06-28 Tom Tromey <tromey@redhat.com>
4506 * Makefile.in (version.c): Use version.in, not
4509 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4511 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4512 * configure: Rebuild.
4513 * Makefile.in (version_host, version_target): Get from configure.
4514 (version.c): Use $(version_host) and $(version_target).
4516 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4518 Fix trace-status to output user name without trailing colon.
4519 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4521 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4523 Fix trace-status to output proper start-time and stop-time.
4524 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4525 output start time and stop time in hex as gdb expects.
4527 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4529 * tracepoint.c (build_traceframe_info_xml): Output trace state
4530 variables present in the trace buffer.
4532 2013-06-24 Tom Tromey <tromey@redhat.com>
4534 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4536 (version.o): Remove.
4537 * gdbreplay.c: Include version.h.
4538 (version, host_name): Don't declare.
4539 * server.h: Include version.h.
4540 (version, host_name): Don't declare.
4542 2013-06-12 Pedro Alves <palves@redhat.com>
4544 * linux-x86-low.c (linux_is_elf64): Delete global.
4545 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4546 with local linux_pid_exe_is_elf_64_file use.
4548 2013-06-11 Pedro Alves <palves@redhat.com>
4550 * linux-low.c (regset_disabled, disable_regset): New functions.
4551 (regsets_fetch_inferior_registers)
4552 (regsets_store_inferior_registers): Use them.
4553 (initialize_regsets_info); Don't allocate the disabled_regsets
4555 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4558 2013-06-11 Pedro Alves <palves@redhat.com>
4560 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4563 2013-06-11 Pedro Alves <palves@redhat.com>
4565 * linux-x86-low.c (initialize_low_arch): Call
4566 init_registers_x32_avx_linux.
4568 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4570 Fix compatibility with Android Bionic.
4571 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4574 2013-06-07 Pedro Alves <palves@redhat.com>
4577 * Makefile.in (OBS): Add tdesc.o.
4578 (IPA_OBJS): Add tdesc-ipa.o.
4579 (tdesc-ipa.o): New rule.
4580 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4582 * linux-low.c (new_inferior): Delete.
4583 (disabled_regsets, num_regsets): Delete.
4584 (linux_add_process): Adjust to set the new per-process
4586 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4587 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4588 was a stop. When calling arch_setup, switch the current inferior
4589 to the thread that got an event.
4590 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4591 (regsets_fetch_inferior_registers)
4592 (regsets_store_inferior_registers): New regsets_info parameter.
4594 (linux_register_in_regsets): New regs_info parameter. Adjust to
4596 (register_addr, fetch_register, store_register): New usrregs_info
4597 parameter. Adjust to use it.
4598 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4599 parameter regs_info. Adjust to use it.
4600 (linux_fetch_registers): Get the current inferior's regs_info, and
4602 (linux_store_registers): Ditto.
4603 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4604 (initialize_low): Don't initialize the target_regsets here. Call
4605 initialize_low_arch.
4606 * linux-low.h (target_regsets): Delete declaration.
4607 (struct regsets_info): New.
4608 (struct usrregs_info): New.
4609 (struct regs_info): New.
4610 (struct process_info_private) <new_inferior>: New field.
4611 (struct linux_target_ops): Delete the num_regs, regmap, and
4612 regset_bitmap fields. New field regs_info.
4613 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4614 * i387-fp.c (num_xmm_registers): Delete.
4615 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4616 calls to new interface.
4617 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4618 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4619 Infer the number of xmm registers from the regcache's target
4621 * i387-fp.h (num_xmm_registers): Delete.
4622 * inferiors.c (add_thread): Don't install the thread's regcache
4624 * proc-service.c (gregset_info): Fetch the current inferior's
4625 regs_info. Adjust to use it.
4626 * regcache.c: Include tdesc.h.
4627 (register_bytes, reg_defs, num_registers)
4628 (gdbserver_expedite_regs): Delete.
4629 (get_thread_regcache): If the thread doesn't have a regcache yet,
4630 create one, instead of aborting gdbserver.
4631 (regcache_invalidate_one): Rename to ...
4632 (regcache_invalidate_thread): ... this.
4633 (regcache_invalidate_one): New.
4634 (regcache_invalidate): Only invalidate registers of the current
4636 (init_register_cache): Add target_desc parameter, and use it.
4637 (new_register_cache): Ditto. Assert the target description has a
4638 non zero registers_size.
4639 (regcache_cpy): Add assertions. Adjust.
4640 (realloc_register_cache, set_register_cache): Delete.
4641 (registers_to_string, registers_from_string): Adjust.
4642 (find_register_by_name, find_regno, find_register_by_number)
4643 (register_cache_size): Add target_desc parameter, and use it.
4644 (free_register_cache_thread, free_register_cache_thread_one)
4645 (regcache_release, register_cache_size): New.
4646 (register_size): Add target_desc parameter, and use it.
4647 (register_data, supply_register, supply_register_zeroed)
4648 (supply_regblock, supply_register_by_name, collect_register)
4649 (collect_register_as_string, collect_register_by_name): Adjust.
4650 * regcache.h (struct target_desc): Forward declare.
4651 (struct regcache) <tdesc>: New field.
4652 (init_register_cache, new_register_cache): Add target_desc
4654 (regcache_invalidate_thread): Declare.
4655 (regcache_invalidate_one): Delete declaration.
4656 (regcache_release): Declare.
4657 (find_register_by_number, register_cache_size, register_size)
4658 (find_regno): Add target_desc parameter.
4659 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4661 * remote-utils.c: Include tdesc.h.
4662 (outreg, prepare_resume_reply): Adjust.
4663 * server.c: Include tdesc.h.
4664 (gdbserver_xmltarget): Delete declaration.
4665 (get_features_xml, process_serial_event): Adjust.
4666 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4668 (struct process_info) <tdesc>: New field.
4669 (ipa_tdesc): Declare.
4670 * tdesc.c: New file.
4671 * tdesc.h: New file.
4672 * tracepoint.c: Include tdesc.h.
4673 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4674 (get_context_regcache): Adjust to pass ipa_tdesc down.
4675 (do_action_at_tracepoint): Adjust to get the register cache size
4676 from the context regcache's description.
4677 (traceframe_walk_blocks): Adjust to get the register cache size
4678 from the current trace frame's description.
4679 (traceframe_get_pc): Adjust to get current trace frame's
4680 description and pass it down.
4681 (gdb_collect): Adjust to get the register cache size from the
4683 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4684 (gdbserver_xmltarget): Delete.
4685 (initialize_low_tracepoint): Set the ipa's target description.
4686 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4687 (initialize_low_tracepoint): Set the ipa's target description.
4688 * linux-x86-low.c: Include tdesc.h.
4689 [__x86_64__] (is_64bit_tdesc): New.
4690 (ps_get_thread_area, x86_get_thread_area): Use it.
4691 (i386_cannot_store_register): Rename to ...
4692 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4693 (i386_cannot_fetch_register): Rename to ...
4694 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4695 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4697 (target_regsets): Rename to ...
4698 (x86_regsets): ... this.
4699 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4701 (x86_siginfo_fixup): Use is_64bit_tdesc.
4702 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4703 (tdesc_x32_avx_linux, tdesc_x32_linux)
4704 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4706 (x86_linux_update_xmltarget): Delete.
4707 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4708 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4709 (AMD64_LINUX_USER64_CS): New.
4710 (x86_linux_read_description): New, based on
4711 x86_linux_update_xmltarget.
4712 (same_process_callback): New.
4713 (x86_arch_setup_process_callback): New.
4714 (x86_linux_update_xmltarget): New.
4715 (x86_regsets_info): New.
4716 (amd64_linux_regs_info): New.
4717 (i386_linux_usrregs_info): New.
4718 (i386_linux_regs_info): New.
4719 (x86_linux_regs_info): New.
4720 (x86_arch_setup): Reimplement.
4721 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4722 (x86_emit_ops): Ditto.
4723 (the_low_target): Adjust. Install x86_linux_regs_info,
4724 x86_cannot_fetch_register, and x86_cannot_store_register.
4725 (initialize_low_arch): New.
4726 * linux-ia64-low.c (tdesc_ia64): Declare.
4727 (ia64_fetch_register): Adjust.
4728 (ia64_usrregs_info, regs_info): New globals.
4729 (ia64_regs_info): New function.
4730 (the_low_target): Adjust.
4731 (initialize_low_arch): New function.
4732 * linux-sparc-low.c (tdesc_sparc64): Declare.
4733 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4735 (sparc_arch_setup): New function.
4736 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4737 (the_low_target): Adjust.
4738 (initialize_low_arch): New function.
4739 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4740 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4741 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4742 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4743 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4744 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4745 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4746 (tdesc_powerpc_isa205_vsx64l): Declare.
4747 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4748 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4749 (ppc_set_pc, ppc_get_hwcap): Adjust.
4750 (ppc_usrregs_info): Forward declare.
4751 (!__powerpc64__) ppc_regmap_adjusted: New global.
4752 (ppc_arch_setup): Adjust to the current process'es target
4754 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4755 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4756 (ppc_store_evrregset): Adjust.
4757 (target_regsets): Rename to ...
4758 (ppc_regsets): ... this, and make static.
4759 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4760 (ppc_regs_info): New function.
4761 (the_low_target): Adjust.
4762 (initialize_low_arch): New function.
4763 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4764 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4765 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4766 (tdesc_s390x_linux64v2): Declare.
4767 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4768 (s390_fill_gregset, s390_store_last_break): Adjust.
4769 (target_regsets): Rename to ...
4770 (s390_regsets): ... this, and make static.
4771 (s390_get_pc, s390_set_pc): Adjust.
4772 (s390_get_hwcap): New target_desc parameter, and use it.
4773 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4774 (s390_arch_setup): Adjust to set the current process'es target
4775 description. Don't adjust the regmap.
4776 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4777 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4778 (regs_info_3264): New globals.
4779 (s390_regs_info): New function.
4780 (the_low_target): Adjust.
4781 (initialize_low_arch): New function.
4782 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4783 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4784 [__mips64] (init_registers_mips_linux)
4785 (init_registers_mips_dsp_linux): Delete defines.
4786 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4787 (have_dsp): New global.
4788 (mips_read_description): New, based on mips_arch_setup.
4789 (mips_arch_setup): Reimplement.
4790 (get_usrregs_info): New function.
4791 (mips_cannot_fetch_register, mips_cannot_store_register)
4792 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4793 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4794 (target_regsets): Rename to ...
4795 (mips_regsets): ... this, and make static.
4796 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4797 (dsp_regs_info, regs_info): New globals.
4798 (mips_regs_info): New function.
4799 (the_low_target): Adjust.
4800 (initialize_low_arch): New function.
4801 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4802 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4804 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4805 (arm_read_description): New, with bits factored from
4807 (arm_arch_setup): Reimplement.
4808 (target_regsets): Rename to ...
4809 (arm_regsets): ... this, and make static.
4810 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4811 (arm_regs_info): New function.
4812 (the_low_target): Adjust.
4813 (initialize_low_arch): New function.
4814 * linux-m68k-low.c (tdesc_m68k): Declare.
4815 (target_regsets): Rename to ...
4816 (m68k_regsets): ... this, and make static.
4817 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4818 (m68k_regs_info): New function.
4819 (m68k_arch_setup): New function.
4820 (the_low_target): Adjust.
4821 (initialize_low_arch): New function.
4822 * linux-sh-low.c (tdesc_sharch): Declare.
4823 (target_regsets): Rename to ...
4824 (sh_regsets): ... this, and make static.
4825 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4826 (sh_regs_info, sh_arch_setup): New functions.
4827 (the_low_target): Adjust.
4828 (initialize_low_arch): New function.
4829 * linux-bfin-low.c (tdesc_bfin): Declare.
4830 (bfin_arch_setup): New function.
4831 (bfin_usrregs_info, regs_info): New globals.
4832 (bfin_regs_info): New function.
4833 (the_low_target): Adjust.
4834 (initialize_low_arch): New function.
4835 * linux-cris-low.c (tdesc_cris): Declare.
4836 (cris_arch_setup): New function.
4837 (cris_usrregs_info, regs_info): New globals.
4838 (cris_regs_info): New function.
4839 (the_low_target): Adjust.
4840 (initialize_low_arch): New function.
4841 * linux-cris-low.c (tdesc_crisv32): Declare.
4842 (cris_arch_setup): New function.
4843 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4844 (cris_regs_info): New function.
4845 (the_low_target): Adjust.
4846 (initialize_low_arch): New function.
4847 * linux-m32r-low.c (tdesc_m32r): Declare.
4848 (m32r_arch_setup): New function.
4849 (m32r_usrregs_info, regs_info): New globals.
4850 (m32r_regs_info): Adjust.
4851 (initialize_low_arch): New function.
4852 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4853 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4854 (tic6x_usrregs_info): Forward declare.
4855 (tic6x_read_description): New function, based on ...
4856 (tic6x_arch_setup): ... this. Reimplement.
4857 (target_regsets): Rename to ...
4858 (tic6x_regsets): ... this, and make static.
4859 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4860 (tic6x_regs_info): New function.
4861 (the_low_target): Adjust.
4862 (initialize_low_arch): New function.
4863 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4864 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4865 (target_regsets): Rename to ...
4866 (xtensa_regsets): ... this, and make static.
4867 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4869 (xtensa_arch_setup, xtensa_regs_info): New functions.
4870 (the_low_target): Adjust.
4871 (initialize_low_arch): New function.
4872 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4873 (nios2_arch_setup): Set the current process'es tdesc.
4874 (target_regsets): Rename to ...
4875 (nios2_regsets): ... this.
4876 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4877 (nios2_regs_info): New function.
4878 (the_low_target): Adjust.
4879 (initialize_low_arch): New function.
4880 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4881 (aarch64_arch_setup): Set the current process'es tdesc.
4882 (target_regsets): Rename to ...
4883 (aarch64_regsets): ... this.
4884 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4885 (aarch64_regs_info): New function.
4886 (the_low_target): Adjust.
4887 (initialize_low_arch): New function.
4888 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4890 (target_regsets): Rename to ...
4891 (tile_regsets): ... this.
4892 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4893 (tile_regs_info): New function.
4894 (tile_arch_setup): Set the current process'es tdesc.
4895 (the_low_target): Adjust.
4896 (initialize_low_arch): New function.
4897 * spu-low.c (tdesc_spu): Declare.
4898 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4899 * win32-arm-low.c (tdesc_arm): Declare.
4900 (arm_arch_setup): New function.
4901 (the_low_target): Install arm_arch_setup instead of
4903 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4904 (init_windows_x86): Rename to ...
4905 (i386_arch_setup): ... this. Set `win32_tdesc'.
4906 (the_low_target): Adjust.
4907 * win32-low.c (win32_tdesc): New global.
4908 (child_add_thread): Don't create the thread cache here.
4909 (do_initial_child_stuff): Set the new process'es tdesc.
4910 * win32-low.h (struct target_desc): Forward declare.
4911 (win32_tdesc): Declare.
4912 * lynx-i386-low.c (tdesc_i386): Declare global.
4913 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4914 * lynx-low.c (lynx_tdesc): New global.
4915 (lynx_add_process): Set the new process'es tdesc.
4916 * lynx-low.h (struct target_desc): Forward declare.
4917 (lynx_tdesc): Declare global.
4918 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4919 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4920 * nto-low.c (nto_tdesc): New global.
4921 (do_attach): Set the new process'es tdesc.
4922 * nto-low.h (struct target_desc): Forward declare.
4923 (nto_tdesc): Declare.
4924 * nto-x86-low.c (tdesc_i386): Declare.
4925 (nto_x86_arch_setup): Set `nto_tdesc'.
4927 2013-06-04 Gary Benson <gbenson@redhat.com>
4929 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4930 to qSupported response when appropriate.
4931 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4932 with nonzero-length annex.
4933 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4934 arguments supplied in annex.
4936 2013-05-31 Doug Evans <dje@google.com>
4939 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4940 64 bits in 64-cross-32 environment.
4942 2013-05-28 Pedro Alves <palves@redhat.com>
4944 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4945 (aarch64-without-fpu.c): Delete rule.
4946 * configure.srv (aarch64*-*-linux*): Remove references to
4947 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4948 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4951 2013-05-24 Pedro Alves <palves@redhat.com>
4953 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4954 instead of strchr/decode_address. Error if the range isn't split
4955 with a ','. Don't assume there's be a ':' in the action.
4957 2013-05-23 Yao Qi <yao@codesourcery.com>
4958 Pedro Alves <palves@redhat.com>
4960 * linux-low.c (lwp_in_step_range): New function.
4961 (linux_wait_1): If the thread was range stepping and stopped
4962 outside the stepping range, report the stop to GDB. Otherwise,
4963 continue stepping. Add range stepping debug output.
4964 (linux_set_resume_request): Copy the step range from the resume
4966 (linux_supports_range_stepping): New.
4967 (linux_target_ops) <supports_range_stepping>: Set to
4968 linux_supports_range_stepping.
4969 * linux-low.h (struct linux_target_ops)
4970 <supports_range_stepping>: New field.
4971 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4972 * linux-x86-low.c (x86_supports_range_stepping): New.
4973 (the_low_target) <supports_range_stepping>: Set to
4974 x86_supports_range_stepping.
4975 * server.c (handle_v_cont): Handle 'r' action.
4976 (handle_v_requests): Append ";r" if the target supports range
4978 * target.h (struct thread_resume) <step_range_start,
4979 step_range_end>: New fields.
4980 (struct target_ops) <supports_range_stepping>:
4982 (target_supports_range_stepping): New macro.
4984 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4986 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4987 confusion in comment.
4989 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4991 * lynx-low.c (struct process_info_private): New type.
4992 (lynx_add_process): New function.
4993 (lynx_create_inferior, lynx_attach): Replace calls to
4994 add_process by calls to lynx_add_process.
4995 (lynx_resume): If PTID is null, then try using
4996 current_process()->private->last_wait_event_ptid.
4998 (lynx_clear_inferiors): Delete. The contents of that function
4999 has been inlined in lynx_mourn;
5000 (lynx_wait_1): Save the ptid in the process's private data.
5001 (lynx_mourn): Free the process' private data. Replace call
5002 to lynx_clear_inferiors by call to clear_inferiors.
5004 2013-05-17 Yao Qi <yao@codesourcery.com>
5006 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5009 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5011 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5012 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5013 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5014 PT_TEXT_END_ADDR guards. Update comments.
5015 (linux_target_op) <read_offsets>: Conditionally define to
5016 linux_read_offsets if the target is UCLIBC and if it defines
5017 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5019 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5020 Andrew Jenner <andrew@codesourcery.com>
5022 * Makefile.in (SFILES): Add linux-nios2-low.c.
5023 (clean): Add action to delete nios2-linux.c.
5024 (nios2-linux.c): New rule.
5025 * configure.srv: Add nios2*-*-linux*.
5026 * linux-nios2-low.c: New.
5028 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5030 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5032 2013-04-25 Hui Zhu <hui@codesourcery.com>
5035 * ax.c (ax_printf): Add fflush.
5037 2013-04-22 Tom Tromey <tromey@redhat.com>
5039 * Makefile.in (SFILES): Add filestuff.c.
5040 (OBS): Add filestuff.o.
5041 (filestuff.o): New target.
5042 * config.in, configure: Rebuild.
5043 * configure.ac: Check for fdwalk, pipe2.
5045 2013-04-17 Pedro Alves <palves@redhat.com>
5047 * configure.ac (USE_THREAD_DB): Delete variable.
5048 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5049 Don't AC_SUBST USE_THREAD_DB.
5050 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5051 * config.in, configure: Regenerate.
5053 2013-04-16 Pedro Alves <palves@redhat.com>
5055 * linux-low.h (struct lwp_info) <thread_known>: Move under
5056 the USE_THREAD_DB #ifdef.
5058 2013-04-16 Pedro Alves <palves@redhat.com>
5060 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5061 (linux-low.o): Delete rule.
5062 * linux-low.h: Always include "gdb_thread_db.h" instead of
5063 conditionally including thread_db.h.
5064 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5067 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5069 * Makefile.in (install-only): Fix make install regression.
5071 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5073 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5074 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5076 * gdbserver.1: Remove.
5078 2013-03-22 Pedro Alves <palves@redhat.com>
5080 * linux-low.c (handle_extended_wait): Don't call
5081 linux_enable_event_reporting.
5083 2013-03-15 Tony Theodore <tonyt@logyst.com>
5086 * Makefile.in (SHELL): Use @SHELL@.
5088 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5090 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5093 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5095 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5096 Remove extraneous NULL element.
5098 2013-03-13 Yao Qi <yao@codesourcery.com>
5100 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5101 'V' block in trace frame.
5103 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5105 * target.h (struct target_ops): Add btrace ops.
5106 (target_supports_btrace): New macro.
5107 (target_enable_btrace): New macro.
5108 (target_disable_btrace): New macro.
5109 (target_read_btrace): New macro.
5110 * gdbthread.h (struct thread_info): Add btrace field.
5111 * server.c: Include btrace-common.h.
5112 (handle_btrace_general_set): New function.
5113 (handle_btrace_enable): New function.
5114 (handle_btrace_disable): New function.
5115 (handle_general_set): Call handle_btrace_general_set.
5116 (handle_qxfer_btrace): New function.
5117 (struct qxfer qxfer_packets[]): Add btrace entry.
5118 * inferiors.c (remove_thread): Disable btrace.
5119 * linux-low: Include linux-btrace.h.
5120 (linux_low_enable_btrace): New function.
5121 (linux_low_read_btrace): New function.
5122 (linux_target_ops): Add btrace ops.
5123 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5124 Add srv_linux_btrace=yes.
5125 (x86_64-*-linux*): Add linux-btrace.o.
5126 Add srv_linux_btrace=yes.
5127 * configure.ac: Define HAVE_LINUX_BTRACE.
5128 * config.in: Regenerated.
5129 * configure: Regenerated.
5131 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5133 * server.c (handle_qxfer): Preserve error message if -3 is
5135 (qxfer): Document the -3 return value.
5137 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5139 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5140 (linux_btrace_h): New variable.
5141 (linux-btrace.o): New rule.
5143 2013-03-08 Stan Shebs <stan@codesourcery.com>
5144 Hafiz Abid Qadeer <abidh@codesourcery.com>
5146 * tracepoint.c (trace_buffer_size): New global.
5147 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5148 (init_trace_buffer): Change to one-argument function. Allocate
5149 trace buffer memory.
5150 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5151 handle QTBuffer:size packet.
5152 (cmd_bigqtbuffer_size): New function.
5153 (initialize_tracepoint): Call init_trace_buffer with
5154 DEFAULT_TRACE_BUFFER_SIZE.
5155 * server.c (handle_query): Add QTBuffer:size in the
5158 2013-03-07 Yao Qi <yao@codesourcery.com>
5160 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5161 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5163 (cmd_qtsp): Adjust condition. Do post increment.
5164 Set cur_action and cur_step_action back to 0.
5166 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5169 * linux-low.c (linux_write_memory): Return early success if LEN is
5172 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5174 * configure.srv: Add x86_64-*-cygwin* as target.
5176 2013-02-28 Tom Tromey <tromey@redhat.com>
5178 * configure.ac: Invoke AC_SYS_LARGEFILE.
5179 * configure, config.in: Rebuild.
5181 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5183 * win32-low.c: Throughout, fix format strings and casts of
5184 printf-like functions to avoid type related warnings on all
5186 (get_child_debug_event): Print dwDebugEventCode as hex since
5187 that's how it's usually documented.
5189 2013-02-28 Yao Qi <yao@codesourcery.com>
5191 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5194 2013-02-27 Jiong Wang <jiwang@tilera.com>
5196 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5197 (reg-tilegx32.c): New rule.
5198 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5199 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5200 different register info initializer according to elf class.
5201 (init_registers_tilgx32): New function. The tilegx32 register info
5203 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5204 (tile_store_gregset): Likewise.
5206 2013-02-27 Yao Qi <yao@codesourcery.com>
5208 * server.c (process_point_options): Print debug message when
5209 debug_threads is true.
5211 2013-02-26 Yao Qi <yao@codesourcery.com>
5213 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5215 2013-02-19 Pedro Alves <palves@redhat.com>
5216 Kai Tietz <ktietz@redhat.com>
5220 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5221 instead of strtoul to extract address from packet.
5222 (process_serial_event) <'z'>: Likewise.
5224 2013-02-18 Yao Qi <yao@codesourcery.com>
5226 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5228 2013-02-14 Pedro Alves <palves@redhat.com>
5232 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5233 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5235 2013-02-14 Pedro Alves <palves@redhat.com>
5237 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5239 2013-02-14 Pedro Alves <palves@redhat.com>
5241 * tracepoint.c (save_string): Delete.
5242 (add_tracepoint_action): Use savestring instead of save_string.
5244 2013-02-12 Pedro Alves <palves@redhat.com>
5246 * linux-xtensa-low.c: Ditto.
5247 * xtensa-xtregs.c: Ditto.
5249 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5251 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5254 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5256 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5257 aarch64_num_wp_regs and aarch64_num_bp_regs to
5258 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5260 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5262 * linux-aarch64-low.c (ps_get_thread_area): Replace
5263 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5265 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5266 Marcus Shawcroft <marcus.shawcroft@arm.com>
5267 Nigel Stephens <nigel.stephens@arm.com>
5268 Yufeng Zhang <yufeng.zhang@arm.com>
5270 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5271 (aarch64.c, aarch64-without-fpu.c): New targets.
5272 * configure.srv (aarch64*-*-linux*): New.
5273 * linux-aarch64-low.c: New file.
5275 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5277 * linux-low.c (handle_extended_wait, linux_create_inferior)
5278 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5279 (dequeue_one_deferred_signal, linux_resume_one_thread)
5280 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5281 (linux_tracefork_grandchild, linux_test_for_tracefork)
5282 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5283 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5284 where the argument is 0.
5286 2013-01-25 Yao Qi <yao@codesourcery.com>
5288 * event-loop.c: Include "queue.h".
5289 (gdb_event_p): New typedef.
5290 (struct gdb_event) <next_event>: Remove.
5291 (event_queue): Change to QUEUE(gdb_event_p).
5292 (async_queue_event): Remove.
5293 (gdb_event_xfree): New.
5294 (initialize_event_loop): New.
5295 (process_event): Use API from QUEUE.
5296 (wait_for_event): Likewise.
5297 * server.c (main): Call initialize_event_loop.
5298 * server.h (initialize_event_loop): Declare.
5300 2013-01-18 Yao Qi <yao@codesourcery.com>
5302 * ax.h (struct eval_agent_expr_context): New.
5303 (gdb_eval_agent_expr): Update declaration.
5304 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5305 TFRAME. Add new argument CTX.
5306 * server.h (struct eval_agent_expr_context): Declare.
5307 (agent_mem_read, agent_tsv_read): Update declaration.
5308 (agent_mem_read_string): Likewise.
5309 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5310 (add_traceframe_block): Add new argument TPOINT.
5311 Increase TPOINT->traceframe_usage.
5312 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5313 eval_tracepoint_agent_expr.
5314 (condition_true_at_tracepoint): Likewise.
5315 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5316 (agent_mem_read_string, agent_tsv_read): Likewise.
5318 2013-01-16 Yao Qi <yao@codesourcery.com>
5320 * linux-low.c (linux_resume_one_lwp): Don't check
5321 'lwp->bp_reinsert != 0'.
5323 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5324 Pedro Alves <palves@redhat.com>
5326 * lynx-low.c (ptrace_request_to_str): Define a temporary
5327 macro and use it to simplify this function's implementation.
5329 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5331 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5334 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5336 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5338 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5340 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5342 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5344 * lynx-low.c (lynx_resume): Use the resume_info parameter
5345 to determine the ptid for the lynx_ptrace call, unless
5346 it is equal to minus_one_ptid, in which case we use the
5347 ptid of the current_inferior.
5348 (lynx_wait_1): After having received a thread create/exit
5349 event, resume the inferior's execution using the signaling
5350 thread's ptid, rather than the old ptid.
5352 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5354 * lynx-low.c (lynx_resume): Delete variable ret.
5356 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5358 * gdbreplay.c (gdbreplay_version): Update copyright year.
5359 * server.c (gdbserver_version): Likewise.
5361 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5363 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5366 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5368 * lynx-low.c (ptrace_request_to_str): Add handling for
5371 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5373 * lynx-low.c (lynx_attach): Delete variable new_process.
5375 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5377 * lynx-low.c (lynx_create_inferior): Delete variable
5380 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5382 * lynx-low.c (ptrace_request_to_str): Do not handle
5383 PTRACE_GETTHREADLIST if this macro does not exist.
5385 2012-12-15 Yao Qi <yao@codesourcery.com>
5387 * Makefile.in (OBS): Add notif.o.
5388 * notif.c, notif.h: New.
5389 * server.c: Include "notif.h".
5390 (struct vstop_notif) <next>: Remove.
5392 (queue_stop_reply): Update.
5393 (push_event, send_next_stop_reply): Remove.
5394 (discard_queued_stop_replies): Update.
5395 (notif_stop): New variable.
5396 (handle_v_stopped): Remove.
5397 (handle_v_requests): Don't call handle_v_stopped. Call
5398 handle_ack_notif instead.
5399 (queue_stop_reply_callback): Call notif_event_enque instead
5400 of queue_stop_reply.
5401 (handle_status): Don't call send_next_stop_reply, call
5402 notif_write_event instead.
5403 (kill_inferior_callback): Likewise.
5404 (detach_or_kill_inferior_callback): Likewise.
5405 (main): Call initialize_notif.
5406 (process_serial_event): Call QUEUE_is_empty.
5407 (handle_target_event): Call notif_push instead of push event.
5408 * server.h (push_event): Remove declaration.
5410 2012-12-10 Tom Tromey <tromey@redhat.com>
5412 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5413 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5416 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5417 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5418 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5419 (amd64-linux-ipa.o, ax.o): Rewrite.
5420 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5421 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5422 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5423 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5424 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5425 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5426 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5427 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5428 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5429 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5430 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5431 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5432 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5433 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5434 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5435 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5436 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5437 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5438 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5439 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5440 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5441 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5442 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5443 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5444 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5445 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5446 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5447 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5448 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5449 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5450 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5451 (reg-tilegx.o): Remove.
5452 (all_object_files): New macro.
5453 Include .deps files.
5454 * aclocal.m4, configure: Rebuild.
5455 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5456 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5457 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5459 2012-12-05 Tom Tromey <tromey@redhat.com>
5462 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5464 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5466 * configure.ac: Check for linux/perf_event.h.
5467 * config.in: Regenerated.
5468 * configure: Regenerated.
5470 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5472 * hostio.c (handle_readlink): Decrease buffer size
5473 parameter passed to readlink by one byte.
5475 2012-11-26 Yao Qi <yao@codesourcery.com>
5477 * configure.ac (build_warnings): Append '-Wempty-body'.
5478 * configure: Regenerated.
5479 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5482 2012-11-15 Pierre Muller <muller@sourceware.org>
5484 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5485 * config.in: Regenerate.
5486 * configure: Regenerate.
5487 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5488 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5489 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5490 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5492 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5493 instead of <sys/wait.h> header.
5494 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5496 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5498 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5499 (various make rules): Remove -DGDBSERVER
5501 2012-11-09 Yao Qi <yao@codesourcery.com>
5503 * spu-low.c (current_ptid): Move it to ..
5504 * gdbthread.h: ... here. New.
5505 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5506 * server.c (myresume, process_serial_event): Likewise.
5507 * thread-db.c (thread_db_find_new_threads): Likewise.
5508 * tracepoint.c (run_inferior_command): Likewise.
5510 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5512 * server.c (handle_search_memory_1): Include access length in
5515 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5517 * linux-crisv32-low.c: Fix compile errors.
5519 2012-09-04 Yao Qi <yao@codesourcery.com>
5521 * tracepoint.c (cmd_qtsv): Adjust debug message.
5522 Don't check CUR_TPOINT.
5524 2012-08-28 Yao Qi <yao@codesourcery.com>
5526 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5527 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5528 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5529 Remove declarations of xmalloc, xreallloc, xstrdup and
5531 * Makefile.in (libiberty_h): New.
5532 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5533 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5535 2012-08-23 Yao Qi <yao@codesourcery.com>
5537 * server.h: Remove declaration of 'xsnprintf'.
5539 2012-08-22 Keith Seitz <keiths@redhat.com>
5541 * server.h: Include build-gnulib-gbserver/config.h.
5542 * gdbreplay.c: Likewise.
5544 2012-08-08 Doug Evans <dje@google.com>
5546 * Makefile.in (SFILES): Add gdb_vecs.c.
5547 (OBS): Add gdb_vecs.o.
5548 (gdb_vecs_h, host_defs_h): New variables.
5549 (thread-db.o): Add $(gdb_vecs_h) dependency.
5550 (gdb_vecs.o): New rule.
5551 * thread-db.c: #include "gdb_vecs.h".
5552 (thread_db_load_search): Use a vector to iterate over path elements.
5553 Handle text appearing after "$pdir".
5555 * configure.ac: Add check for strstr.
5556 * config.in: Regenerate.
5557 * configure: Regenerate.
5559 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5561 * hostio.c (handle_pread): If pread fails, fall back to attempting
5563 (handle_pwrite): Likewise for pwrite.
5565 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5567 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5568 between unsupported TYPE and unimplementable ADDR/LEN combination.
5569 (arm_insert_point): Act on new return value.
5571 2012-07-31 Pedro Alves <palves@redhat.com>
5573 * server.c (process_point_options): Only skip tokens if we find
5574 one that is unrecognized. Don't treat 'X' specially while
5575 skipping unrecognized tokens.
5577 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5579 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5580 to 4-byte-align HW breakpoint addresses for Thumb.
5582 2012-07-27 Yao Qi <yao@codesourcery.com>
5586 * server.h: Declare gdb_agent_about_to_close.
5587 * target.c (kill_inferior): Include "agent.h".
5588 New. Send command 'kill'.
5589 * target.h (kill_inferior): Removed macro.
5590 * tracepoint.c (gdb_agent_about_to_close): New.
5591 (gdb_agent_helper_thread): Handle command 'close'.
5592 Wait endlessly until the inferior stops.
5593 Install gdb_agent_remove_socket to atexit hook.
5594 (agent_socket_name): New static variable.
5595 (gdb_agent_socket_init): Replace local variable 'name' with
5596 'agent_socket_name'.
5597 (gdb_agent_remove_socket): New.
5599 2012-07-27 Yao Qi <yao@codesourcery.com>
5601 * server.c (process_point_options): Stop at 'X' when parsing.
5603 2012-07-19 Michael Eager <eager@eagercon.com>
5605 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5607 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5608 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5609 hardware breakpoint.
5611 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5613 * gdbserver/linux-low.c (initialize_low): Call
5614 linux_ptrace_init_warnings.
5616 2012-07-02 Doug Evans <dje@google.com>
5618 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5621 2012-07-02 Stan Shebs <stan@codesourcery.com>
5623 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5624 (ax.o): Add it to build rule.
5626 (OBS): Add format.o.
5627 (IPA_OBS): Add format.o.
5628 * server.c (handle_query): Claim support for breakpoint commands.
5629 (process_point_options): Add command case.
5630 (process_serial_event): Leave running if there are printfs in
5632 * mem-break.h (any_persistent_commands): Declare.
5633 (add_breakpoint_commands): Declare.
5634 (gdb_no_commands_at_breakpoint): Declare.
5635 (run_breakpoint_commands): Declare.
5636 * mem-break.c (struct point_command_list): New struct.
5637 (struct breakpoint): New field command_list.
5638 (any_persistent_commands): New function.
5639 (add_commands_to_breakpoint): New function.
5640 (add_breakpoint_commands): New function.
5641 (gdb_no_commands_at_breakpoint): New function.
5642 (run_breakpoint_commands): New function.
5643 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5645 * ax.c: Include format.h.
5646 (ax_printf): New function.
5647 (gdb_eval_agent_expr): Add printf opcode.
5649 2012-06-13 Yao Qi <yao@codesourcery.com>
5651 * server.c (start_inferior): Remove duplicated writes to fields
5652 'last_resume_kind' and 'last_status' of 'current_inferior'.
5654 2012-06-12 Yao Qi <yao@codesourcery.com>
5655 Pedro Alves <palves@redhat.com>
5657 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5659 * server.c (handle_v_cont): Extend comment.
5661 2012-06-11 Yao Qi <yao@codesourcery.com>
5663 * linux-low.c (linux_attach): Add 'static'.
5665 2012-06-06 Yao Qi <yao@codesourcery.com>
5667 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5669 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5671 Fix gcc -flto compilation warning.
5672 * server.c (main): Make variable multi_mode and attach volatile.
5674 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5676 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5677 if the platform doesn't know about it.
5679 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5681 * Makefile.in (SFILES): Add linux-tile-low.c.
5682 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5683 * configure.srv: Handle tilegx-*-linux*.
5684 * linux-tile-low.c: New file.
5686 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5688 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5690 2012-05-24 Pedro Alves <palves@redhat.com>
5694 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5696 2012-05-24 Pedro Alves <palves@redhat.com>
5700 Replace target_signal with gdb_signal throughout.
5702 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5704 * linux-low.c (linux_store_registers): Avoid the copying sequence
5705 when no data has been retrieved by ptrace.
5707 2012-05-22 Will Deacon <will.deacon@arm.com>
5709 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5710 Include asm/ptrace.h.
5711 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5714 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5716 * linux-low.c (linux_store_registers): Don't re-retrieve data
5717 with ptrace that has already been obtained from /proc. Always
5718 copy any data retrieved with ptrace to the buffer supplied.
5720 2012-05-11 Yao Qi <yao@codesourcery.com>
5721 Pedro Alves <palves@redhat.com>
5723 * linux-low.c (enum stopping_threads_kind): New.
5724 (stopping_threads): Change type to `enum stopping_threads_kind'.
5725 (handle_extended_wait): If stopping and suspending threads, leave
5726 the new_lwp suspended too.
5727 (linux_wait_for_event): Adjust.
5728 (stop_all_lwps): Set `stopping_threads' to
5729 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5730 whether we're suspending threads or just stopping them. Assert no
5733 2012-04-29 Yao Qi <yao@codesourcery.com>
5735 * server.h: Move some code to ...
5736 * gdbthread.h: ... here. New.
5737 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5738 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5739 (nto-low.o, win32-low.o): Likewise.
5740 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5741 * regcache.c, remote-utils.c, server.c: Likewise.
5742 * target.c, tracepoint.c, win32-low.c: Likewise.
5744 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5746 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5747 (PTRACE_ARG4_TYPE): Likewise.
5748 (PTRACE_XFER_TYPE): Likewise.
5749 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5750 ptrace to PTRACE_ARG3_TYPE.
5751 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5752 (PTRACE_ARG4_TYPE): Likewise.
5753 (PTRACE_XFER_TYPE): Likewise.
5754 (linux_detach_one_lwp): Cast fourth argument of
5755 ptrace to long then PTRACE_ARG4_TYPE.
5756 (regsets_fetch_inferior_registers): Cast third argument of
5757 ptrace to long then PTRACE_ARG3_TYPE.
5758 (regsets_store_inferior_registers): Likewise.
5760 2012-04-20 Pedro Alves <palves@redhat.com>
5762 * configure: Regenerate.
5764 2012-04-19 Pedro Alves <palves@redhat.com>
5766 * Makefile.in (GNULIB_BUILDDIR): New.
5767 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5768 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5769 (all, install-only, uninstall, clean-info, all-lib, clean): No
5770 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5771 (maintainer-clean realclean distclean): Use subdir_do.
5773 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5774 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5775 * acinclude.m4: Include acx_configure_dir.m4.
5776 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5777 calls. Call AC_PROG_RANLIB. Configure gnulib using
5780 (GNULIB_STDINT_H): Adjust.
5781 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5782 * gdbreplay.c: Include build-gnulib/config.h.
5783 * server.h: Likewise.
5784 * aclocal.m4: Regenerate.
5785 * config.in: Regenerate.
5786 * configure: Regenerate.
5788 2012-04-19 Pedro Alves <palves@redhat.com>
5790 * Makefile.in (LIBGNU, INCGNU): Adjust.
5791 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5792 (all, install-only, uninstall, clean-info, all-lib, clean)
5793 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5794 * configure.ac: Adjust AC_OUTPUT output.
5795 * aclocal.m4: Regenerate.
5796 * configure: Regenerate.
5798 2012-04-19 Pedro Alves <palves@redhat.com>
5800 * Makefile.in (generated_files): New.
5801 (server_h): Remove the explicit dependency on config.h, and depend
5802 on $generated_files.
5804 2012-04-19 Pedro Alves <palves@redhat.com>
5806 * Makefile.in (INCGNU): Add -Ignulib.
5808 2012-04-19 Pedro Alves <palves@redhat.com>
5810 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5811 (INCGNU): ... this, and spell out -I here.
5812 (GNULIB_LIB): Rename to ...
5814 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5816 2012-04-19 Pedro Alves <palves@redhat.com>
5818 * config.in: Regenerate.
5820 2012-04-19 Pedro Alves <palves@redhat.com>
5822 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5823 * server.h (memmem): Remove declaration.
5824 * config.in: Regenerate.
5825 * configure: Regenerate.
5827 2012-04-19 Yao Qi <yao@codesourcery.com>
5829 * Makefile.in (SFILES): Add common/vec.c.
5833 2012-04-19 Yao Qi <yao@codesourcery.com>
5835 * remote-utils.c (prepare_resume_reply): Replace with macro
5836 target_core_of_thread.
5837 * server.c (handle_qxfer_threads_proper): Likewise.
5838 * target.h (traget_core_of_thread): New macro.
5840 2012-04-18 Pedro Alves <palves@redhat.com>
5842 * aclocal.m4: Regenerate.
5843 * configure: Regenerate.
5845 2012-04-16 Yao Qi <yao@codesourcery.com>
5847 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5848 duplicated on address.
5850 2012-04-16 Yao Qi <yao@codesourcery.com>
5852 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5853 (struct tracepoint_action_ops) <send>: New field.
5854 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5855 (agent_expr_send, x_tracepoint_action_send): New.
5856 (l_tracepoint_action_send): New.
5857 (cmd_qtdp): Download and install tracepoint
5858 according to `use_agent'.
5859 (run_inferior_command): Add one more parameter `len'.
5861 (tracepoint_send_agent): New.
5862 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5864 2012-04-16 Yao Qi <yao@codesourcery.com>
5866 * tracepoint.c (download_tracepoints): Moved to ...
5867 (cmd_qtstart): ... here.
5869 2012-04-14 Yao Qi <yao@codesourcery.com>
5871 * tracepoint.c: Include inttypes.h.
5872 (struct collect_memory_action): Use sized types.
5873 (struct tracepoint): Likewise.
5874 (cmd_qtdp, stop_tracing): Update print specifiers.
5875 (cmd_qtp, response_tracepoint): Likewise.
5876 (collect_data_at_tracepoint): Likewise.
5877 (collect_data_at_step): Likewise.
5879 2012-04-14 Yao Qi <yao@codesourcery.com>
5881 Import gnulib module inttypes.
5882 * aclocal.m4, config.in, configure: Regenerated.
5884 2012-04-14 Yao Qi <yao@codesourcery.com>
5886 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5887 Makefile and config.status at last.
5889 2012-04-13 Yao Qi <yao@codesourcery.com>
5891 * tracepoint.c: Include stdint.h unconditionally.
5893 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5895 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5896 on BFD_HAVE_SYS_PROCFS_TYPE.
5897 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5898 * configure: Regenerate.
5899 * config.in: Likewise.
5901 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5903 * Makefile.in (clean): Also remove x32.c x32-linux.c
5904 x32-avx.c x32-avx-linux.c.
5905 (x32.o): New target.
5907 (x32-linux.o): Likewise.
5908 (x32-linux.c): Likewise.
5909 (x32-avx.o): Likewise.
5910 (x32-avx.c): Likewise.
5911 (x32-avx-linux.o): Likewise.
5912 (x32-avx-linux.c): Likewise.
5914 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5915 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5916 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5917 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5918 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5919 i386/x32-avx-linux.xml.
5921 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5922 (init_registers_x32_avx_linux): Likwise.
5923 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5924 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5926 2012-04-13 Pedro Alves <palves@redhat.com>
5928 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5929 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5930 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5931 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5934 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5936 * linux-x86-low.c (compat_x32_clock_t): New.
5937 (compat_x32_siginfo_t): Likewise.
5938 (compat_x32_siginfo_from_siginfo): Likewise.
5939 (siginfo_from_compat_x32_siginfo): Likewise.
5940 (linux_is_elf64): Likewise.
5941 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5942 and siginfo_from_compat_x32_siginfo for x32.
5943 (x86_arch_setup): Set linux_is_elf64.
5945 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5948 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5950 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5951 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5952 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5953 compatible with process.
5955 2012-04-12 Yao Qi <yao@codesourcery.com>
5957 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5958 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5959 (install-only, install-info, clean): Handle sub dir gnulib.
5960 (all-lib, am--refresh): New targets.
5961 (memmem.o): Remove target.
5962 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5963 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5964 (AC_REPLACE_FUNCS): Remove memmem.
5965 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5966 (AC_OUTPUT): Generate Makefile in gnulib/.
5967 * aclocal.m4, config.in, configure: Regenerated.
5969 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5971 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5973 2012-04-05 Pedro Alves <palves@redhat.com>
5975 -Werror=strict-aliasing
5977 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5980 2012-04-04 Pedro Alves <palves@redhat.com>
5982 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5983 (sparc_store_gregset_from_stack, sparc_store_gregset)
5984 (sparc_breakpoint_at): Fix formatting.
5986 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5988 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5990 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5991 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5992 * config.in: Regenerate.
5993 * configure: Likewise.
5995 2012-03-29 Pedro Alves <palves@redhat.com>
5997 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5998 Correct ptrace arguments.
6000 2012-03-28 Pedro Alves <palves@redhat.com>
6002 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6003 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6004 (IA64_FR1_REGNUM): New defines.
6005 (ia64_fetch_register): New.
6006 (the_low_target): Install it.
6007 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6009 * linux-low.c (linux_fetch_registers): Try the
6010 the_low_target.fetch_register hook first.
6012 * linux-arm-low.c (the_low_target): Adjust.
6013 * linux-bfin-low.c (the_low_target): Adjust.
6014 * linux-cris-low.c (the_low_target): Adjust.
6015 * linux-crisv32-low.c (the_low_target): Adjust.
6016 * linux-m32r-low.c (the_low_target): Adjust.
6017 * linux-m68k-low.c (the_low_target): Adjust.
6018 * linux-mips-low.c (the_low_target): Adjust.
6019 * linux-ppc-low.c (the_low_target): Adjust.
6020 * linux-s390-low.c (the_low_target): Adjust.
6021 * linux-sh-low.c (the_low_target): Adjust.
6022 * linux-sparc-low.c (the_low_target): Adjust.
6023 * linux-tic6x-low.c (the_low_target): Adjust.
6024 * linux-x86-low.c (the_low_target): Adjust.
6025 * linux-xtensa-low.c (the_low_target): Adjust.
6027 2012-03-26 Pedro Alves <palves@redhat.com>
6029 * server.c (handle_qxfer_libraries): Don't bail early if
6030 the_target->qxfer_libraries_svr4 is not NULL.
6032 2012-03-26 Pedro Alves <palves@redhat.com>
6034 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6036 2012-03-23 Pedro Alves <palves@redhat.com>
6038 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6039 "library-list-svr4" element's start tag when the the DSO list is
6042 2012-03-23 Pedro Alves <palves@redhat.com>
6044 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6045 a variable whose type size is the same as the inferior's pointer
6048 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6050 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6052 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6053 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6054 * linux-low.h: Include <signal.h>.
6055 (struct siginfo): Remove forward declaration.
6056 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6059 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6061 * .gitignore: Ignore more files.
6063 2012-03-19 Pedro Alves <palves@redhat.com>
6064 Jan Kratochvil <jan.kratochvil@redhat.com>
6066 * server.c (cont_thread, general_thread): Add describing comments.
6067 (start_inferior): Clear `cont_thread'.
6068 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6071 2012-03-15 Yao Qi <yao@codesourcery.com>
6073 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6075 (cmd_qtdp): ... here.
6077 2012-03-15 Yao Qi <yao@codesourcery.com>
6079 * tracepoint.c (struct tracepoint_action_ops): New.
6080 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6081 (m_tracepoint_action_download): New.
6082 (r_tracepoint_action_download): New.
6083 (x_tracepoint_action_download): New.
6084 (l_tracepoint_action_download): New.
6085 (add_tracepoint_action): Install `action->ops' according type.
6086 (download_tracepoint_1): Move code `download' function pointer
6087 of various tracepoint_action_ops.
6089 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6091 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6092 linux_ptrace_attach_warnings.
6094 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6096 * Makefile.in (linux-ptrace.o): New.
6097 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6098 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6099 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6100 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6101 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6103 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6105 2012-03-08 Yao Qi <yao@codesourcery.com>
6106 Pedro Alves <palves@redhat.com>
6108 Fix PR server/13392.
6109 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6111 * tracepoint.c (remove_tracepoint): New.
6112 (cmd_qtdp): Call remove_tracepoint when failed to install.
6114 2012-03-07 Pedro Alves <palves@redhat.com>
6116 * linux-low.c (get_detach_signal): New.
6117 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6118 Pass on pending signals to PTRACE_DETACH. Check the result of the
6120 * server.c (program_signals, program_signals_p): New.
6121 (handle_general_set): Handle QProgramSignals.
6122 * server.h (program_signals, program_signals_p): Declare.
6124 2012-03-05 Pedro Alves <palves@redhat.com>
6125 Jan Kratochvil <jan.kratochvil@redhat.com>
6127 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6130 2012-03-03 Yao Qi <yao@codesourcery.com>
6132 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6133 agent_look_up_symbols.
6135 2012-03-03 Yao Qi <yao@codesourcery.com>
6137 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6138 (linux-x86-low.o): Likewise.
6139 * server.h: Remove in_process_agent_loaded.
6140 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6144 2012-03-03 Yao Qi <yao@codesourcery.com>
6146 * tracepoint.c (gdb_agent_capability): New global.
6147 (in_process_agent_loaded_ust): Renamed to
6148 `in_process_agent_supports_ust'.
6150 (in_process_agent_supports_ust): Call agent_capability_check.
6151 (clear_installed_tracepoints): Assert that agent supports
6154 2012-03-03 Yao Qi <yao@codesourcery.com>
6156 * linux-low.c (linux_supports_agent): New.
6157 (linux_target_ops): Initialize field `supports_agent' with
6158 linux_supports_agent.
6159 * target.h (struct target_ops) <supports_agent>: New.
6160 (target_supports_agent): New macro.
6161 * server.c (handle_general_set): Handle packet 'QAgent'.
6162 (handle_query): Send `QAgent+'.
6163 * Makefile.in (server.o): Depends on agent.h.
6165 2012-03-03 Yao Qi <yao@codesourcery.com>
6167 * Makefile.in (OBS): Add agent.o.
6168 Add new rule for agent.o.
6169 Track dependence of tracepoint.c on agent.h.
6170 * tracepoint.c (run_inferior_command_1):
6171 (run_inferior_command): Call agent_run_command.
6172 (gdb_ust_connect_sync_socket): Deleted. Move it to
6174 (resume_thread, stop_thread): Likewise.
6175 (gdb_ust_socket_init): Renamed to ...
6176 (gdb_agent_socket_init): ... New.
6177 (gdb_ust_thread): Renamed to ...
6178 (gdb_agent_helper_thread): ... New.
6179 (gdb_ust_init): Move some code to ...
6180 (gdb_agent_init): ... here. New.
6181 [HAVE_UST]: Call gdb_ust_init.
6182 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6183 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6184 * config.in, configure: Regenerated.
6186 2012-03-02 Pedro Alves <palves@redhat.com>
6188 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6189 * linux-low.c (struct simple_pid_list): New.
6190 (stopped_pids): New a struct simple_pid_list pointer.
6191 (add_to_pid_list, pull_pid_from_list): New.
6192 (handle_extended_wait): Don't assume the first signal new children
6193 report is SIGSTOP. Adjust call to pull_pid_from_list.
6194 (linux_wait_for_lwp): Adjust.
6196 2012-03-02 Yao Qi <yao@codesourcery.com>
6198 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6201 2012-03-02 Yao Qi <yao@codesourcery.com>
6203 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6204 `stop_pc' and `tpoint'. Update caller.
6206 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6208 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6209 * linux-low.c (use_linux_regsets): New macro.
6210 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6211 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6212 (linux_register_in_regsets): New function.
6213 (usr_fetch_inferior_registers): Skip registers covered by
6215 (usr_store_inferior_registers): Likewise.
6216 (usr_fetch_inferior_registers): New macro.
6217 (usr_store_inferior_registers): Likewise.
6218 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6219 (linux_store_registers): Likewise.
6220 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6222 (init_registers_mips64_dsp_linux): Likewise.
6223 (init_registers_mips_linux): New macro.
6224 (init_registers_mips_dsp_linux): Likewise.
6225 (mips_dsp_num_regs): Likewise.
6226 (DSP_BASE, DSP_CONTROL): New fallback macros.
6227 (mips_base_regs): New macro.
6228 (mips_regmap): Use it. Fix the size.
6229 (mips_dsp_regmap): New variable.
6230 (mips_dsp_regset_bitmap): Likewise.
6231 (mips_arch_setup): New function.
6232 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6234 (mips_cannot_store_register): Likewise.
6235 (the_low_target): Update .arch_setup, .num_regs and .regmap
6236 initializers. Add .regset_bitmap initializer.
6237 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6239 * linux-bfin-low.c (the_low_target): Likewise.
6240 * linux-cris-low.c (the_low_target): Likewise.
6241 * linux-crisv32-low.c (the_low_target): Likewise.
6242 * linux-ia64-low.c (the_low_target): Likewise.
6243 * linux-m32r-low.c (the_low_target): Likewise.
6244 * linux-m68k-low.c (the_low_target): Likewise.
6245 * linux-ppc-low.c (the_low_target): Likewise.
6246 * linux-s390-low.c (the_low_target): Likewise.
6247 * linux-sh-low.c (the_low_target): Likewise.
6248 * linux-sparc-low.c (the_low_target): Likewise.
6249 * linux-tic6x-low.c (the_low_target): Likewise.
6250 * linux-x86-low.c (the_low_target): Likewise.
6251 * linux-xtensa-low.c (the_low_target): Likewise.
6252 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6253 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6254 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6256 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6257 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6259 2012-02-29 Yao Qi <yao@codesourcery.com>
6260 Pedro Alves <palves@redhat.com>
6262 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6263 `step_over_finished' is true.
6265 2012-02-27 Pedro Alves <palves@redhat.com>
6267 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6268 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6270 2012-02-27 Pedro Alves <palves@redhat.com>
6273 * linux-low.c (pid_is_stopped): New.
6274 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6276 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6278 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6281 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6283 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6285 2012-02-24 Luis Machado <lgustavo@codesourcery>
6287 * server.c (handle_query): Advertise support for target-side
6288 breakpoint condition evaluation.
6289 (process_point_options): New function.
6290 (process_serial_event): When inserting a breakpoint, check for
6291 a target-side condition that should be evaluated.
6293 * mem-break.c: Include regcache.h and ax.h.
6294 (point_cond_list_t): New data structure.
6295 (breakpoint) <cond_list>: New field.
6296 (find_gdb_breakpoint_at): Make non-static.
6297 (delete_gdb_breakpoint_at): Clear any target-side
6299 (clear_gdb_breakpoint_conditions): New function.
6300 (add_condition_to_breakpoint): Likewise.
6301 (add_breakpoint_condition): Likewise.
6302 (gdb_condition_true_at_breakpoint): Likewise.
6303 (gdb_breakpoint_here): Return result directly instead
6304 of going through a local variable.
6306 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6307 (clear_gdb_breakpoint_conditions): Likewise.
6308 (add_breakpoint_condition): Likewise.
6309 (gdb_condition_true_at_breakpoint): Likewise.
6311 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6312 (need_step_over_p): Take target-side breakpoint condition into
6315 2012-02-24 Luis Machado <lgustavo@codesourcery>
6317 * server.h: Include tracepoint.h.
6318 (agent_mem_read, agent_get_trace_state_variable_value,
6319 agent_set_trace_state_variable_value,
6320 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6321 get_set_tsv_func_addr): New prototypes.
6323 * ax.h: New include file.
6324 * ax.c: New source file.
6326 * tracepoint.c: Include ax.h.
6327 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6328 agent_expr, eval_result_type): Move to ax.h.
6329 (parse_agent_expr): Rename to ...
6330 (gdb_parse_agent_expr): ... this, make it non-static and move
6332 (unparse_agent_expr) Rename to ...
6333 (gdb_unparse_agent_expr): ... this, make it non-static and move
6335 (eval_agent_expr): Rename to ...
6336 (eval_tracepoint_agent_expr): ... this.
6337 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6338 forward declarations.
6339 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6340 (agent_get_trace_state_variable_value): New function.
6341 (agent_set_trace_state_variable_value): New function.
6342 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6343 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6344 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6345 (condition_true_at_tracepoint): Likewise.
6346 (parse_agent_expr): Rename to ...
6347 (gdb_parse_agent_expr): ... this and move to ax.c.
6348 (unparse_agent_expr): Rename to ...
6349 (gdb_unparse_agent_expr): ... this and move to ax.c.
6350 (gdb_agent_op_name): Move to ax.c.
6351 (eval_agent_expr): Rename to ...
6352 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6354 (eval_tracepoint_agent_expr): New function.
6355 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6357 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6359 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6360 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6361 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6362 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6363 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6364 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6365 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6366 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6367 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6368 (compile_bytecodes): Remove forward declaration.
6369 (is_goto_target): Move to ax.c.
6370 (compile_bytecodes): Move to ax.c and call
6371 agent_get_trace_state_variable_value (...) and
6372 agent_set_trace_state_variable_value (...).
6374 * Makefile.in: Update ax.c and IPA dependencies.
6376 2012-02-24 Pedro Alves <palves@redhat.com>
6378 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6379 (cmd_bigqtbuffer_circular): ... this. Only handle
6380 'QTBuffer:circular:'.
6381 (handle_tracepoint_general_set): Adjust.
6383 2012-02-16 Yao Qi <yao@codesourcery.com>
6385 * inferiors.c: Move code to ...
6386 * dll.c: .... here. New.
6387 * server.h: Declare clear_dlls.
6388 * Makefile.in (SFILES): Add dll.c.
6392 2012-02-11 Yao Qi <yao@codesourcery.com>
6394 * server.c: (handle_monitor_command): Add a new parameter
6396 (handle_query): Update caller.
6398 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6400 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6401 * configure, config.in: Regenerate.
6402 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6405 2012-02-02 Pedro Alves <palves@redhat.com>
6407 Try SIGKILL first, then PTRACE_KILL.
6408 * linux-low.c (linux_kill_one_lwp): New.
6409 (linux_kill_one_lwp): Rename to ...
6410 (kill_one_lwp_callback): ... this. Use the new
6413 2012-02-02 Pedro Alves <palves@redhat.com>
6415 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6418 2012-01-27 Pedro Alves <palves@redhat.com>
6420 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6421 (elf_64_file_p): Make static.
6422 (linux_pid_exe_is_elf_64_file): New.
6423 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6424 Delete declarations.
6425 (linux_pid_exe_is_elf_64_file): Declare.
6426 * linux-x86-low.c (x86_arch_setup): Use
6427 linux_pid_exe_is_elf_64_file.
6429 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6431 * linux-low.c (linux_wait_for_event_1): Rename to ...
6432 (linux_wait_for_event): ... here and merge it with former
6433 linux_wait_for_event - new variable wait_ptid, use it.
6434 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6436 2012-01-23 Pedro Alves <palves@redhat.com>
6438 * server.c (main): Avoid yet another case of infinite loop while
6439 detaching/killing after a longjmp.
6441 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6444 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6446 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6448 * hostio.c (handle_readlink): New function.
6449 (handle_vFile): Call it to handle "vFile:readlink" packets.
6451 2012-01-20 Pedro Alves <palves@redhat.com>
6452 Ulrich Weigand <ulrich.weigand@linaro.org>
6454 * server.c (handle_v_requests): Only support vAttach and vRun to
6455 start multiple processes when in extended protocol mode.
6457 2012-01-17 Pedro Alves <palves@redhat.com>
6459 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6460 memalign plus mprotect to allocate the scratch buffer.
6462 2012-01-13 Pedro Alves <palves@redhat.com>
6464 * server.c (attach_inferior): Clear `cont_thread'.
6466 2012-01-13 Pedro Alves <palves@redhat.com>
6468 * server.c (main): Avoid infinite loop while detaching/killing
6471 2012-01-09 Doug Evans <dje@google.com>
6473 * server.c (start_inferior): Set last_ptid in --wrapper case.
6475 2012-01-06 Yao Qi <yao@codesourcery.com>
6477 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6479 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6481 2012-01-04 Yao Qi <yao@codesourcery.com>
6483 * tracepoint.c (cmd_qtdp): Print debug message
6484 for static tracepoint.
6486 2012-01-04 Yao Qi <yao@codesourcery.com>
6488 * tracepoint.c (trace_vdebug): Differentiate debug message
6489 between gdbserver and IPA.
6491 2012-01-03 Yao Qi <yao@codesourcery.com>
6493 * tracepoint.c (tracepoint_was_hit): Don't collect for
6496 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6498 * terminal.h: Reformat copyright header.
6500 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6502 * server.c (gdbserver_version): Update copyright year.
6503 * gdbreplay.c (gdbreplay_version): Likewise.
6505 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6507 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6510 2011-12-18 Hui Zhu <teawater@gmail.com>
6511 * linux-low.c (linux_create_inferior): Save return value to ret.
6513 2011-12-18 Hui Zhu <teawater@gmail.com>
6515 * linux-low.c (linux_create_inferior): Save return value to ret.
6517 2011-12-16 Doug Evans <dje@google.com>
6519 * linux-low.c (linux_create_inferior): If stdio connection,
6520 redirect stdin from /dev/null, stdout to stderr.
6521 * remote-utils.c (remote_is_stdio): New static global.
6522 (remote_connection_is_stdio): New function.
6523 (remote_prepare): Handle stdio connection.
6524 (remote_open): Ditto.
6525 (remote_close): Don't close stdin for stdio connections.
6526 (read_prim,write_prim): New functions. Replace all calls to
6527 read/write to these.
6528 * server.c (main): Watch for "-" argument. Move call to
6529 remote_prepare before start_inferior.
6530 * server.h (STDIO_CONNECTION_NAME): New macro.
6531 (remote_connection_is_stdio): Declare.
6533 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6534 in debugging output.
6536 2011-12-15 Yao Qi <yao@codesourcery.com>
6538 * tracepoint.c: Include sys/syscall.h.
6539 (gdb_ust_thread): Remove preprocessor conditional.
6541 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6543 * linux-low.c (linux_detach_one_lwp): Call
6544 the_low_target.prepare_to_resume before detaching.
6546 2011-12-14 Yao Qi <yao@codesourcery.com>
6548 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6551 2011-12-14 Yao Qi <yao@codesourcery.com>
6553 * i386-low.c (i386_low_stopped_data_address): Initialize local
6556 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6560 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6561 DR_CONTROL unless necessary. Extend comments.
6562 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6563 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6565 2011-12-13 Yao Qi <yao@codesourcery.com>
6567 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6569 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6571 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6573 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6574 Print new debug message for such case.
6576 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6578 Fix overlapping memcpy.
6579 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6580 the read_inferior_memory transfer.
6581 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6582 write_inferior_memory transfer.
6583 (set_fast_tracepoint_jump): New variable buf. Use it for the
6584 read_inferior_memory and write_inferior_memory transfers.
6585 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6586 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6587 Use it for the write_inferior_memory transfer.
6588 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6591 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6593 * linux-low.c (fetch_register, store_register): Make code
6594 consistent, fix formatting.
6596 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6598 * linux-low.c (usr_store_inferior_registers): Factor out code
6599 to handle individual registers into...
6600 (store_register): ... this new function.
6602 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6604 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6605 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6606 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6607 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6608 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6609 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6610 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6611 (srv_xmlfiles): Add new XML files.
6613 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6615 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6616 (init_registers_s390_linux32v1): Add prototype.
6617 (init_registers_s390_linux32v2): Likewise.
6618 (init_registers_s390_linux64v1): Likewise.
6619 (init_registers_s390_linux64v2): Likewise.
6620 (init_registers_s390x_linux64v1): Likewise.
6621 (init_registers_s390x_linux64v2): Likewise.
6622 (s390_num_regs): Increment to 52.
6623 (s390_regmap): Add orig_r2 register.
6624 (s390_num_regs_3264): Increment to 68.
6625 (s390_regmap_3264): Add orig_r2 register.
6626 (s390_collect_ptrace_register): Handle orig_r2 register.
6627 (s390_supply_ptrace_register): Likewise.
6628 (s390_fill_last_break): New function.
6629 (s390_store_last_break): Likewise.
6630 (s390_fill_system_call): New function.
6631 (s390_store_system_call): Likewise.
6632 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6634 (s390_check_regset): New function.
6635 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6636 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6637 Update target_regsets for available register sets.
6639 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6640 Jan Kratochvil <jan.kratochvil@redhat.com>
6642 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6643 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6645 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6646 * linux-low.h (struct process_info_private): New member r_debug.
6647 * server.c (handle_qxfer_libraries): Call
6648 the_target->qxfer_libraries_svr4.
6649 (handle_qxfer_libraries_svr4): New function.
6650 (qxfer_packets): New entry "libraries-svr4".
6651 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6652 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6653 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6654 PACKET_qXfer_libraries_svr4.
6656 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6658 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6659 PSW address/mask between 8-byte and 16-byte formats.
6660 (s390_supply_ptrace_register): Likewise.
6661 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6662 basic addressing mode bit.
6664 2011-11-24 Stan Shebs <stan@codesourcery.com>
6666 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6668 2011-11-17 Stan Shebs <stan@codesourcery.com>
6670 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6671 (tracing_start_time): New global.
6672 (tracing_stop_time): New global.
6673 (tracing_user_name): New global.
6674 (tracing_notes): New global.
6675 (tracing_stop_note): New global.
6676 (cmd_qtstart): Set traceframe_usage, start_time.
6677 (stop_tracing): Set stop_time.
6678 (cmd_qtstatus): Report additional status.
6679 (cmd_qtp): New function.
6680 (handle_tracepoint_query): Call it.
6681 (cmd_qtnotes): New function.
6682 (handle_tracepoint_general_set): Call it.
6683 (get_timestamp): Rename from tsv_get_timestamp.
6685 2011-11-14 Stan Shebs <stan@codesourcery.com>
6686 Kwok Cheung Yeung <kcy@codesourcery.com>
6688 * linux-x86-low.c (small_jump_insn): New.
6689 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6690 trampoline and error message, build a trampoline and issue a small
6691 jump instruction to it.
6692 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6693 trampoline and error message.
6694 (x86_get_min_fast_tracepoint_insn_len): New.
6695 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6696 * linux-low.h (struct linux_target_ops): Add arguments to
6697 install_fast_tracepoint_jump_pad operation, add new operation.
6698 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6700 (linux_get_min_fast_tracepoint_insn_len): New function.
6701 (linux_target_op): Add new operation.
6702 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6703 (gdb_trampoline_buffer_end): Ditto.
6704 (gdb_trampoline_buffer_error): Ditto.
6705 (struct ipa_sym_addresses): Add fields for new IPA variables.
6706 (symbol_list): Add entries for new IPA variables.
6707 (struct tracepoint): Add fields to hold the address range of the
6708 trampoline used by the tracepoint.
6709 (trampoline_buffer_head): New static variable.
6710 (trampoline_buffer_tail): Ditto.
6711 (claim_trampoline_space): New function.
6712 (have_fast_tracepoint_trampoline_buffer): New function.
6713 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6715 (install_fast_tracepoint): Ditto, also add error buffer argument.
6716 (cmd_qtminftpilen): New function.
6717 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6718 (fast_tracepoint_from_trampoline_address): New function.
6719 (fast_tracepoint_collecting): Handle trampoline as part of jump
6721 (set_trampoline_buffer_space): New function.
6722 (initialize_tracepoint): Initialize new IPA variables.
6723 * target.h (struct target_ops): Add arguments to
6724 install_fast_tracepoint_jump_pad operation, add new
6725 get_min_fast_tracepoint_insn_len operation.
6726 (target_get_min_fast_tracepoint_insn_len): New.
6727 (install_fast_tracepoint_jump_pad): Add arguments.
6728 * server.h (IPA_BUFSIZ): Define.
6729 * linux-i386-ipa.c: Include extra header files.
6730 (initialize_fast_tracepoint_trampoline_buffer): New function.
6731 (initialize_low_tracepoint): Call it.
6732 * server.h (set_trampoline_buffer_space): Declare.
6733 (claim_trampoline_space): Ditto.
6734 (have_fast_tracepoint_trampoline_buffer): Ditto.
6736 2011-11-14 Yao Qi <yao@codesourcery.com>
6738 * server.c (handle_query): Handle InstallInTrace for qSupported.
6739 * tracepoint.c (add_tracepoint): Sort list.
6740 (install_tracepoint, download_tracepoint): New.
6741 (cmd_qtdp): Call them to install and download tracepoints.
6742 (sort_tracepoints): Removed.
6743 (cmd_qtstart): Update.
6745 2011-11-14 Yao Qi <yao@codesourcery.com>
6747 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6748 * mem-break.h: Declare.
6749 * tracepoint.c (cmd_qtstart): Move some code to ...
6750 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6752 (download_tracepoints): Move some code to ...
6753 (download_tracepoint_1): ... here. New.
6755 2011-11-08 Yao Qi <yao@codesourcery.com>
6757 * remote-utils.c (relocate_instruction): A comment fix.
6759 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6761 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6762 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6763 dr_status_mirror and dr_control_mirror from debug_reg_state.
6764 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6765 (i386_initial_stuff): Remove use of deleted globals.
6766 (i386_get_thread_context, i386_set_thread_context,
6767 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6768 from debug_reg_state.
6770 2011-11-05 Yao Qi <yao@codesourcery.com>
6772 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6773 address as TPOINT's.
6775 2011-11-02 Stan Shebs <stan@codesourcery.com>
6777 * tracepoint.c (agent_mem_read_string): New function.
6778 (eval_agent_expr): Call it for tracenz.
6779 * server.c (handle_query): Report support for tracenz.
6781 2011-11-02 Yao Qi <yao@codesourcery.com>
6783 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6785 2011-11-02 Yao Qi <yao@codesourcery.com>
6787 * target.h: Fix a typo in comment.
6789 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6791 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6792 clobber the breakpoints' shadows with fast tracepoint jumps.
6793 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6794 * target.c (write_inferior_memory): Also pass MYADDR down to
6797 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6799 * configure.ac: Check support for personality routine.
6800 * configure: Regenerate.
6801 * config.in: Likewise.
6802 * linux-low.c: Include <sys/personality.h>.
6803 Define ADDR_NO_RANDOMIZE if necessary.
6804 (linux_create_inferior): Disable address space randomization when
6805 forking inferior, if requested.
6806 (linux_supports_disable_randomization): New function.
6807 (linux_target_ops): Install it.
6808 * server.h (disable_randomization): Declare.
6809 * server.c (disable_randomization): New global variable.
6810 (handle_general_set): Handle QDisableRandomization.
6811 (handle_query): Likewise for qSupported.
6812 (main): Support --disable-randomization and --no-disable-randomization
6813 command line arguments.
6814 * target.h (struct target_ops): Add supports_disable_randomization.
6815 (target_supports_disable_randomization): New macro.
6817 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6819 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6821 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6822 [!PT_GETDSBT] (target_loadmap): New definition.
6823 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6824 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6825 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6826 and PT_GETDSBT to LINUX_LOADMAP.
6827 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6828 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6830 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6832 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6833 (arm_linux_hwbp_cap): New static variable.
6834 (arm_linux_get_hwbp_cap): Replace by ...
6835 (arm_linux_init_hwbp_cap): ... this new function.
6836 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6837 (arm_linux_get_hw_watchpoint_count): Likewise.
6838 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6839 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6840 (arm_prepare_to_resume): Use perror_with_name instead of error.
6842 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6844 * linux-arm-low.c: Include <signal.h>.
6845 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6846 (struct arm_linux_hwbp_cap): New data type.
6847 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6848 (struct arm_linux_hw_breakpoint): New data type.
6849 (MAX_BPTS, MAX_WPTS): Define.
6850 (struct arch_process_info, struct arch_lwp_info): New data types.
6851 (arm_linux_get_hwbp_cap): New function.
6852 (arm_linux_get_hw_breakpoint_count): Likewise.
6853 (arm_linux_get_hw_watchpoint_count): Likewise.
6854 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6855 (arm_hwbp_control_initialize): Likewise.
6856 (arm_hwbp_control_is_enabled): Likewise.
6857 (arm_hwbp_control_is_initialized): Likewise.
6858 (arm_hwbp_control_disable): Likewise.
6859 (arm_linux_hw_breakpoint_equal): Likewise.
6860 (arm_linux_hw_point_initialize): Likewise.
6861 (struct update_registers_data): New data structure.
6862 (update_registers_callback: New function.
6863 (arm_insert_point): Likewise.
6864 (arm_remove_point): Likewise.
6865 (arm_stopped_by_watchpoint): Likewise.
6866 (arm_stopped_data_address): Likewise.
6867 (arm_new_process): Likewise.
6868 (arm_new_thread): Likewise.
6869 (arm_prepare_to_resume): Likewise.
6870 (the_low_target): Register arm_insert_point, arm_remove_point,
6871 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6872 arm_new_thread, and arm_prepare_to_resume.
6874 2011-09-15 Stan Shebs <stan@codesourcery.com>
6876 * server.h (struct emit_ops): Add compare-goto fields.
6877 * tracepoint.c (gdb_agent_op_sizes): New table.
6878 (emit_eq_goto): New function.
6879 (emit_ne_goto): New function.
6880 (emit_lt_goto): New function.
6881 (emit_le_goto): New function.
6882 (emit_gt_goto): New function.
6883 (emit_ge_goto): New function.
6884 (is_goto_target): New function.
6885 (compile_bytecodes): Recognize special cases of compare-goto
6886 combinations and call specialized emitters for them.
6887 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6888 (amd64_emit_ne_goto): New function.
6889 (amd64_emit_lt_goto): New function.
6890 (amd64_emit_le_goto): New function.
6891 (amd64_emit_gt_goto): New function.
6892 (amd64_emit_ge_goto): New function.
6893 (amd64_emit_ops): Add the new functions.
6894 (i386_emit_eq_goto): New function.
6895 (i386_emit_ne_goto): New function.
6896 (i386_emit_lt_goto): New function.
6897 (i386_emit_le_goto): New function.
6898 (i386_emit_gt_goto): New function.
6899 (i386_emit_ge_goto): New function.
6900 (i386_emit_ops): Add the new functions.
6902 2011-09-08 Stan Shebs <stan@codesourcery.com>
6904 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6905 (i386_emit_epilogue): Restore %ebx.
6907 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6909 * server.c (step_thread): Remove definition.
6910 (process_serial_event): Don't handle Hs.
6911 * server.h (step_thread): Remove declaration.
6912 * target.c (set_desired_inferior): Remove use of step_thread.
6914 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6916 * linux-low.c: Include linux-procfs.h.
6917 (linux_attach_lwp_1): Update comments.
6918 (linux_attach): Scan for existing threads when attaching to a
6919 process that is the tgid.
6920 * Makefile.in: Update dependencies.
6922 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6924 * configure.srv: Add linux-procfs.o dependencies.
6926 2011-08-14 Yao Qi <yao@codesourcery.com>
6928 * target.h (struct target_ops): Fix indent.
6929 * win32-low.c (win32_target_ops): Fix comment.
6931 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6932 Yao Qi <yao@codesourcery.com>
6934 * Makefile.in (clean): Remove tic6x-*.c files.
6935 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6936 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6937 (tic6x-c64xp-linux.c): Likewise.
6938 * configure.srv: Add support for tic6x-*-uclinux.
6939 * linux-tic6x-low.c: New.
6940 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6942 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6943 Yao Qi <yao@codesourcery.com>
6945 * target.h (struct target_ops): Add read_loadmap.
6946 * linux-low.c (struct target_loadseg): New type.
6947 (struct target_loadmap): New type.
6948 (linux_read_loadmap): New function.
6949 (linux_target_ops): Add linux_read_loadmap.
6950 * server.c (handle_query): Support qXfer:fdpic:read packet.
6951 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6954 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6956 * win32-low.c: Include <stdint.h>.
6958 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6960 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6961 to the inferior here.
6962 (i386_remove_aligned_watchpoint): Ditto.
6963 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6964 fit part of the watchpoint in the debug registers.
6965 (i386_update_inferior_debug_regs): New.
6966 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6967 registers, and only update the inferior on success.
6968 (i386_low_remove_watchpoint): Ditto.
6970 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6972 * linux-low.c (compare_ints, unique, list_threads, show_process,
6973 linux_core_of_thread): Delete.
6974 (linux_target_ops): Change linux_core_of_thread to
6975 linux_common_core_of_thread.
6976 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6977 * utils.c (malloc_failure): Change type of argument.
6978 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6979 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6980 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6981 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6982 (IPA_OBJS): Add common-utils-ipa.o.
6983 (ptid_h, linux_osdata_h): New macros.
6984 (server_h): Add common/common-utils.h, common/xml-utils.h,
6985 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6987 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6988 ptid.o, buffer.o): New rules.
6989 (linux-low.o): Add common/linux-osdata.h as a dependency.
6990 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6991 * configure.ac: Add AC_HEADER_DIRENT check.
6992 * config.in: Regenerate.
6993 * configure: Regenerate.
6994 * remote-utils.c (xml_escape_text): Delete.
6995 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6996 buffer_xml_printf): Move to common/buffer.c.
6997 * server.c (main): Remove call to initialize_inferiors.
6998 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6999 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7000 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7001 internal_error, gdb_assert, gdb_assert_fail): Delete.
7002 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7003 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7005 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7006 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7007 initialize_inferiors): Delete.
7009 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7011 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7014 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7016 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7018 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7020 2011-05-26 Yao Qi <yao@codesourcery.com>
7022 * Makefile.in (thread-db.o): Track dependence to
7023 common/gdb_thread_db.h.
7024 * thread-db.c: include gdb_thread_db.h from right place.
7026 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7028 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7029 __FILE__ and __LINE__ to internal_error.
7031 2011-05-13 Doug Evans <dje@google.com>
7033 * thread-db.c (try_thread_db_load_from_sdir): New function.
7034 (try_thread_db_load_from_dir): New function.
7035 (thread_db_load_search): Handle $sdir, ignore $pdir.
7036 Remove trying of system directories if search of
7037 libthread-db-search-path fails, that is now done via $sdir.
7039 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7041 * server.c (handle_query): Add EnableDisableTracepoints to the list
7042 of supported features.
7043 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7045 (cmd_qtenable_disable): New.
7046 (cmd_qtstart): Install tracepoints even if disabled.
7047 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7048 receiving a QTEnable or QTDisable packet.
7049 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7050 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7052 (gdb_probe): Skip data collection if static tracepoint is disabled.
7054 2011-05-10 Doug Evans <dje@google.com>
7056 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7058 2011-05-04 Doug Evans <dje@google.com>
7060 * linux-low.c (linux_join): Skip process lookup.
7061 * spu-low.c (spu_join): Ditto.
7062 * server.c (join_inferiors_callback): Delete.
7063 (process_serial_event): For 'D' packet (detach) call join_inferior
7066 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7068 * README: Don't mention xscale*-*-linux*.
7069 * configure.srv (xscale*-*-linux*): Don't handle target.
7071 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7073 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7075 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7076 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7077 (i386_emit_void_call_2): Likewise.
7079 2011-04-26 Yao Qi <yao@codesourcery.com>
7081 * linux-low.c: Move common macros to linux-ptrace.h.
7082 Include linux-ptrace.h.
7083 * Makefile.in (linux_ptrace_h): New.
7084 (linux-low.o): Depends on linux-ptrace.h.
7086 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7088 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7089 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7090 (remote_prepare): New function with most of the TCP code from ...
7091 (remote_open): ... here. Detect PORT here unconditionally. Move also
7092 setting transport_is_reliable.
7093 * server.c (run_once): New variable.
7094 (gdbserver_usage): Document it.
7095 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7096 the first run if RUN_ONCE.
7097 * server.h (run_once, remote_prepare): New declarations.
7099 2011-04-19 Tom Tromey <tromey@redhat.com>
7101 * win32-low.c (handle_load_dll): Remove duplicate "the".
7103 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7105 Remove support for old Cygwin 1.5 versions.
7106 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7107 function to avoid warning.
7108 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7111 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7113 * gdbserver/server.h (Macro _): Define it if not available.
7115 2011-03-14 Michael Snyder <msnyder@vmware.com>
7117 * hostio.c (handle_close): Remove unnecessary null test.
7119 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7121 * Makefile.in (maintainer-clean realclean distclean): Remove
7122 "make ... subdir_do" command.
7124 2011-03-10 Michael Snyder <msnyder@vmware.com>
7126 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7128 * server.c (handle_v_run): Free alloced buffer on early return.
7130 2011-03-09 Yao Qi <yao@codesourcery.com>
7133 2011-03-04 Yao Qi <yao@codesourcery.com>
7135 * Makefile.in: Remove GNU make feature --directory.
7137 2011-03-05 Yao Qi <yao@codesourcery.com>
7139 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7140 (subdir_do): New make target. Copied from gdb/Makefile.
7141 (maintainer-clean, realclean, distclean, clean): Call corresponding
7142 make targets in common/Makefile.
7144 2011-02-11 Yao Qi <yao@codesourcery.com>
7146 * configure.ac: Call AC_PROG_RANLIB.
7147 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7148 * configure: Regenerate.
7150 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7152 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7154 2011-03-06 Yao Qi <yao@codesourcery.com>
7156 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7158 2011-03-05 Yao Qi <yao@codesourcery.com>
7160 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7161 (subdir_do): New make target. Copied from gdb/Makefile.
7162 (maintainer-clean, realclean, distclean, clean): Call corresponding
7163 make targets in common/Makefile.
7165 2011-03-04 Yao Qi <yao@codesourcery.com>
7167 * Makefile.in: Remove GNU make feature --directory.
7169 2011-03-04 Michael Snyder <msnyder@vmware.com>
7171 * server.c (queue_stop_reply): Call xmalloc not malloc.
7173 2011-03-02 Michael Snyder <msnyder@vmware.com>
7175 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7177 2011-02-28 Michael Snyder <msnyder@vmware.com>
7179 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7180 (cmd_qtframe): Ditto.
7181 (cmd_qtbuffer): Ditto.
7182 (cmd_bigqtbuffer): Ditto.
7184 * utils.c (decimal2str): Initialize 'width' to nine, then
7187 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7189 * hostio.c (require_data): Free *data, not data.
7191 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7193 * hostio.c (require_data): Use free, not xfree.
7195 2011-02-27 Michael Snyder <msnyder@vmware.com>
7197 * server.c (handle_query): Discard unused value.
7199 * hostio.c (require_data): Free malloc memory before returning
7202 2011-02-26 Michael Snyder <msnyder@vmware.com>
7204 * linux-low.c (list_threads): Call closedir for dirent.
7206 2011-02-27 Michael Snyder <msnyder@vmware.com>
7208 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7209 a case statement falls through.
7211 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7213 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7216 2011-02-26 Michael Snyder <msnyder@vmware.com>
7218 * utils.c (decimal2str): Eliminate dead code and dead param.
7219 (pulongest): Drop dead param from call to decimal2str.
7222 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7224 Revert the following patch (not approved yet):
7225 2011-02-21 Hui Zhu <teawater@gmail.com>
7226 * tracepoint.c (tp_printf): New function.
7227 (eval_agent_expr): Handle gdb_agent_op_printf.
7229 2011-02-21 Hui Zhu <teawater@gmail.com>
7231 * tracepoint.c (tp_printf): New function.
7232 (eval_agent_expr): Handle gdb_agent_op_printf.
7234 2011-02-18 Tom Tromey <tromey@redhat.com>
7236 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7237 (tracepoint.o): Likewise.
7238 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7239 (gdb_agent_op_names): Likewise.
7241 2011-02-18 Tom Tromey <tromey@redhat.com>
7243 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7244 gdb_agent_op_rot>: New constants.
7245 (gdb_agent_op_names): Add pick and roll.
7246 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7249 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7251 * aclocal.m4: Regenerated with aclocal-1.11.1.
7253 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7255 * server.c (handle_qxfer_traceframe_info): New.
7256 (qxfer_packets): Register "traceframe-info".
7257 (handle_query): Report support for qXfer:traceframe-info:read+.
7258 * tracepoint.c (match_blocktype): New.
7259 (traceframe_find_block_type): Rename to ...
7260 (traceframe_walk_blocks): ... this. Add callback filter argument,
7262 (traceframe_find_block_type): New, reimplemented on top of
7263 traceframe_walk_blocks.
7264 (build_traceframe_info_xml): New.
7265 (traceframe_read_info): New.
7266 * server.h (traceframe_read_info): Declare.
7268 2011-02-11 Yao Qi <yao@codesourcery.com>
7270 * configure.ac: Call AC_PROG_RANLIB.
7271 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7272 * configure: Regenerate.
7274 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7276 * server.c (gdb_read_memory): Change return semantics to allow
7278 (handle_search_memory_1): Adjust.
7279 (process_serial_event) <'m' packet>: Handle partial transfers.
7280 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7282 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7284 * regcache.c (init_register_cache): Initialize
7285 regcache->register_status.
7286 (free_register_cache): Release regcache->register_status.
7287 (regcache_cpy): Copy register_status.
7288 (registers_to_string): Print 'x's for unavailable registers.
7289 (supply_register): Mark the register's status valid or
7290 unavailable, depending on whether a buffer was passed in or not.
7291 (supply_register_zeroed): New.
7292 (supply_regblock): Mark the registers' status valid or
7293 unavailable, depending on whether a buffer was passed in or not.
7294 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7295 (struct regcache): New `register_status' field.
7296 (supply_register_zeroed): Declare.
7297 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7298 supply_register_zeroed, rather than passing a NULL buffer to
7300 * tracepoint.c (fetch_traceframe_registers): Update comment.
7302 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7304 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7307 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7309 * server.h (decode_xfer_write): Change prototype.
7310 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7311 and don't extract the annex here.
7312 * server.c (decode_xfer_read): Remove `annex' parameter,
7313 and don't extract the annex here.
7315 (struct qxfer): New.
7316 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7317 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7318 (handle_qxfer_statictrace): New functions, abstracted out from
7319 handle_query, and made to use the struct qxfer interface.
7320 (handle_threads_qxfer_proper): Rename to ...
7321 (handle_qxfer_threads_proper): ... this.
7322 (handle_threads_qxfer): Rename to ...
7323 (handle_qxfer_threads): ... this. Adjust.
7324 (qxfer_packets): New array.
7325 (handle_qxfer): New function.
7326 (handle_query): Use handle_qxfer.
7328 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7330 * gdbreplay.c: Shorten lines of >= 80 columns.
7331 * linux-low.c: Ditto.
7332 * linux-ppc-low.c: Ditto.
7333 * linux-s390-low.c: Ditto.
7334 * linux-sparc-low.c: Ditto.
7335 * linux-x86-low.c: Ditto.
7336 * linux-xtensa-low.c: Ditto.
7337 * mem-break.c: Ditto.
7339 * regcache.h: Ditto.
7340 * remote-utils.c: Ditto.
7343 * thread-db.c: Ditto.
7344 * tracepoint.c: Ditto.
7346 * win32-low.h: Ditto.
7348 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7350 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7353 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7355 * server.c (gdbserver_version): Update copyright year in version
7357 * gdbreplay.c (gdbreplay_version): Ditto.
7359 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7361 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7362 * linux-bfin-low.c: New file.
7363 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7364 PT_DATA_ADDR for BFIN targets.
7365 * Makefile.in (SFILES): Add linux-bfin-low.c.
7366 (clean): Remove reg-bfin.c.
7367 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7368 * README: Mention supported Blackfin targets.
7370 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7372 * .gitignore: New file.
7374 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7376 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7378 2010-10-22 Jie Zhang <jie@codesourcery.com>
7380 * Makefile.in: Add FLAGS_TO_PASS variable.
7381 (install): Remove dependency of install-only and recursively
7382 invoke make for install-only.
7384 2010-10-04 Doug Evans <dje@google.com>
7386 * Makefile.in (uninstall): Use $(DESTDIR).
7388 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7392 * linux-x86-low.c (compat_siginfo_from_siginfo)
7393 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7394 si_code is < 0. Check for si_code == SI_TIMER before checking for
7397 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7399 * lynx-i386-low.c: New file.
7400 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7402 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7404 * lynx-low.c (ptrace_request_to_str): Remove handling for
7405 request values that have been removed in LynxOS 5.x.
7407 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7409 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7412 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7414 * configure.ac: Add --enable-inprocess-agent option.
7415 * configure: Rebuilt.
7417 2010-09-06 Yao Qi <yao@codesourcery.com>
7419 * linux-low.c (linux_kill): Remove unused variable.
7420 (linux_stabilize_threads): Likewise.
7421 * server.c (start_inferior): Likewise.
7422 (queue_stop_reply_callback): Likewise.
7423 * tracepoint.c (do_action_at_tracepoint): Likewise.
7425 2010-09-06 Yao Qi <yao@codesourcery.com>
7427 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7430 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7432 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7434 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7436 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7439 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7441 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7442 gdbserver/lynx-ppc-low.c: New files.
7443 * Makefile.in (lynx_low_h): New variable.
7444 (lynx-low.o, lynx-ppc-low.o): New rules.
7445 * configure.ac: On LynxOS, link with -lnetinet.
7446 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7447 * configure: regenerate.
7449 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7451 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7452 * configure.ac: Add check for vasprintf and vsnprintf.
7453 * configure, config.in: Regenerate.
7454 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7456 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7458 * gdbreplay.c: Move include of alloca.h up, next to include of
7460 * server.h: Add include of malloc.h.
7461 * mem-break.c: Remove include of malloc.h.
7462 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7464 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7466 * Makefile.in (memmem.o): Build with -Wno-error.
7468 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7470 * utils.c (xsnprintf): Make non-static.
7471 * server.h: Add xsnprintf declaration.
7472 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7473 replace calls to snprintf by calls to xsnprintf throughout.
7475 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7477 * configure.ac: Add configure check for alloca.
7478 * configure, config.in: Regenerate.
7479 * server.h: Include alloca.h if it exists.
7480 * gdbreplay.c: Include alloca.h if it exists.
7482 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7484 * linux-low.c (__SIGRTMIN): Define if not already defined.
7485 (linux_create_inferior): Check for __ANDROID__ rather than
7487 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7488 are already deferred.
7489 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7490 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7491 stopped and already has a pending signal to report.
7492 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7493 a pending signal to report or is moving out of a jump pad.
7494 (linux_init_signals): Check for __ANDROID__ rather than
7497 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7499 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7500 debug_threads check. Avoid a linear search when not doing debug
7503 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7505 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7506 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7507 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7508 (process_event): Change local fd's type to gdb_fildes_t.
7509 (create_file_handler): Adjust prototype.
7510 (delete_file_handler): Adjust prototype.
7511 (handle_file_event): Adjust prototype. Use pfildes.
7512 (create_file_event): Adjsut prototype.
7513 * remote-utils.c (remote_desc, listen_desc): Change type to
7515 * server.h: New gdb_fildes_t typedef.
7516 [USE_WIN32API]: Include winsock2.h.
7517 (delete_file_handler, add_file_handler): Adjust prototypes.
7519 * utils.c (pfildes): New.
7521 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7523 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7524 * configure: Regenerate.
7526 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7528 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7529 (linux_done_accessing_memory): ... this.
7530 (linux_target_ops): Adjust.
7531 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7532 * nto-low.c (nto_target_ops): Adjust comment.
7533 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7534 * spu-low.c (spu_target_ops): Adjust comment.
7535 * target.h (target_ops): Rename unprepare_to_access_memory field
7536 to done_accessing_memory.
7537 (unprepare_to_access_memory): Rename to ...
7538 (done_accessing_memory): ... this.
7540 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7542 * linux-low.c (linux_prepare_to_access_memory): New.
7543 (linux_unprepare_to_access_memory): New.
7544 (linux_target_ops): Install them.
7545 * server.c (read_memory): Rename to ...
7546 (gdb_read_memory): ... this. Use
7547 prepare_to_access_memory/prepare_to_access_memory.
7548 (write_memory): Rename to ...
7549 (gdb_write_memory): ... this. Use
7550 prepare_to_access_memory/prepare_to_access_memory.
7551 (handle_search_memory_1): Adjust.
7552 (process_serial_event): Adjust.
7553 * target.h (struct target_ops): New fields
7554 prepare_to_access_memory and unprepare_to_access_memory.
7555 (prepare_to_access_memory, unprepare_to_access_memory): New.
7556 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7557 prepare_to_access_memory/prepare_to_access_memory.
7558 * nto-low.c (nto_target_ops): Adjust.
7559 * spu-low.c (spu_target_ops): Adjust.
7560 * win32-low.c (win32_target_ops): Adjust.
7562 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7564 * Makefile.in (WARN_CFLAGS): Get it from configure.
7565 (WERROR_CFLAGS): New.
7566 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7567 * configure.ac: Introduce --enable-werror, which adds -Werror to
7568 the compiler command line. Enabled by default. Disable with
7569 --disable-werror. Add -Wdeclaration-after-statement
7570 Wpointer-arith and -Wformat-nonliteral to warning flags.
7571 * configure: Regenerate.
7573 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7575 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7577 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7579 * gdbreplay.c (remote_error): New.
7581 (expect): Use gdbchar. Check for error reading from GDB.
7582 Clarify sync error output.
7583 (play): Check for errors writing to GDB.
7584 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7585 * remote-utils.c (getpkt): Check for errors writing to the remote
7588 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7590 * linux-low.c (linux_wait_1): Move non-debugging code out of
7591 `debug_threads' control.
7593 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7595 * linux-low.c (linux_wait_1): Don't set last_status here.
7596 * server.c (push_event, queue_stop_reply_callback): Assert we're
7597 not pushing a TARGET_WAITKIND_IGNORE event.
7598 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7599 (myresume, handle_target_event): Set the thread's last_resume_kind
7600 and last_status from the target returned status.
7602 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7606 * linux-x86-low.c (update_debug_registers_callback): New.
7607 (i386_dr_low_set_addr): Use it.
7608 (i386_dr_low_get_addr): New.
7609 (i386_dr_low_set_control): Use update_debug_registers_callback.
7610 (i386_dr_low_get_control): New.
7611 (i386_dr_low_get_status): Adjust.
7612 * linux-low.c (linux_stop_lwp): New.
7613 * linux-low.h (linux_stop_lwp): Declare.
7615 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7616 argument instead of a i386_debug_reg_state.
7617 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7618 a i386_debug_reg_state.
7619 (i386_insert_aligned_watchpoint): Adjust.
7620 (i386_remove_aligned_watchpoint): Adjust.
7621 (i386_low_stopped_data_address): Read the debug registers from the
7622 inferior instead of from the mirrors.
7623 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7624 (i386_dr_low_get_addr): Declare.
7625 (i386_dr_low_get_control): Declare.
7626 (i386_dr_low_get_status): Change prototype.
7628 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7629 (i386_dr_low_get_addr): New.
7630 (i386_dr_low_get_control): New.
7631 (i386_dr_low_get_status): Adjust prototype. Return
7633 (i386_initial_stuff): Clear dr_status_mirror and
7635 (i386_get_thread_context): Adjust.
7636 (i386_set_thread_context): Adjust.
7637 (i386_thread_added): Adjust.
7639 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7641 * linux-low.h (linux_thread_area): Delete declaration.
7643 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7645 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7646 after its termination.
7648 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7650 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7651 (gdb_wants_all_stopped): Delete.
7652 (linux_wait_1): Don't call them.
7653 * server.c (handle_v_cont): Tag all threads as want-stopped.
7654 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7655 stopped as "client-wants-stopped".
7657 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7659 * Makefile.in (signals_h): New.
7660 (server_h): Depend on it.
7661 (server.o): Don't depend on $(signals_def).
7662 (signals.o): Depend on $(signals_def).
7664 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7666 * Makefile.in (signals_def): New.
7667 (server_h): Append include/gdb/signals.h and signals_def.
7668 (server.o): Append signals_def.
7670 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7672 * server.c (handle_target_event): Use target_signal_to_host for
7673 resume_info.sig initialization.
7674 * target.h (struct thread_resume) <sig>: New comment.
7676 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7678 * server.c (handle_query): strcpy() the returned string from paddress()
7679 instead of sprintf().
7680 * utils.c (paddress): Return phex_nz().
7682 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7684 * server.c (handle_v_cont): Call mourn_inferior if process
7686 (myresume): Likewise.
7688 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7690 Static tracepoints, and integration with UST.
7692 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7693 * mem-break.c (uninsert_all_breakpoints)
7694 (reinsert_all_breakpoints): New.
7695 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7696 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7697 (gdb_agent_ust_loaded, helper_thread_id)
7698 (gdb_agent_helper_thread_id): New macros.
7699 (struct ipa_sym_addresses): Add addr_ust_loaded,
7700 addr_helper_thread_id, addr_cmd_buf.
7701 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7702 (in_process_agent_loaded_ust): New.
7703 (write_e_ust_not_loaded): New.
7704 (maybe_write_ipa_ust_not_loaded): New.
7705 (struct collect_static_trace_data_action): New.
7706 (enum tracepoint_type) <static_tracepoint>: New.
7707 (struct tracepoint) <handle>: Mention static tracepoints.
7708 (struct static_tracepoint_ctx): New.
7709 (CMD_BUF_SIZE): New.
7710 (add_tracepoint_action): Handle static tracepoint actions.
7711 (unprobe_marker_at): New.
7712 (clear_installed_tracepoints): Handle static tracepoints.
7713 (cmd_qtdp): Handle static tracepoints.
7714 (probe_marker_at): New.
7715 (cmd_qtstart): Handle static tracepoints.
7716 (response_tracepoint): Handle static tracepoints.
7717 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7718 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7719 (get_context_regcache): Handle static tracepoints.
7720 (do_action_at_tracepoint): Handle static tracepoint actions.
7721 (traceframe_find_block_type): Handle static trace data blocks.
7722 (traceframe_read_sdata): New.
7723 (download_tracepoints): Download static tracepoint actions.
7724 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7725 (GDB_PROBE_NAME): New.
7730 (ust_marker_to_static_tracepoint): New.
7732 (collect_ust_data_at_tracepoint): New.
7733 (gdb_ust_probe): New.
7734 (UNIX_PATH_MAX, SOCK_DIR): New.
7735 (gdb_ust_connect_sync_socket): New.
7736 (resume_thread, stop_thread): New.
7737 (run_inferior_command): New.
7738 (init_named_socket): New.
7739 (gdb_ust_socket_init): New.
7740 (cstr_to_hexstr): New.
7742 (first_marker, next_marker): New.
7743 (response_ust_marker): New.
7744 (cmd_qtfstm, cmd_qtsstm): New.
7745 (unprobe_marker_at, probe_marker_at): New.
7746 (cmd_qtstmat, gdb_ust_thread): New.
7747 (gdb_ust_init): New.
7748 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7749 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7751 (x86_64_st_collect_regmap): New.
7752 (X86_64_NUM_ST_COLLECT_GREGS): New.
7753 (AMD64_RIP_REGNUM): New.
7754 (supply_static_tracepoint_registers): New.
7755 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7757 (i386_st_collect_regmap): New.
7758 (i386_NUM_ST_COLLECT_GREGS): New.
7759 (supply_static_tracepoint_registers): New.
7760 * server.c (handle_query): Handle qXfer:statictrace:read.
7761 <qSupported>: Report support for StaticTracepoints, and
7762 qXfer:statictrace:read features.
7763 * server.h (traceframe_read_sdata)
7764 (supply_static_tracepoint_registers): Declare.
7765 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7766 (unpack_varlen_hex): Include in IPA build.
7767 * Makefile.in (ustlibs, ustinc): New.
7768 (IPA_OBJS): Add remote-utils-ipa.o.
7769 ($(IPA_LIB)): Link -ldl and -lpthread.
7771 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7772 * config.in, configure: Regenerate.
7774 2010-06-20 Ian Lance Taylor <iant@google.com>
7775 Pedro Alves <pedro@codesourcery.com>
7777 * linux-x86-low.c (always_true): Delete.
7778 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7779 trying to fool the compiler with always_true.
7781 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7783 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7784 conditions in gdbserver.
7786 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7788 * spu-low.c (spu_read_memory): Wrap around local store limit.
7789 (spu_write_memory): Likewise.
7791 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7793 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7794 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7796 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7798 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7799 uses with LONGEST uses.
7801 2010-06-14 Stan Shebs <stan@codesourcery.com>
7802 Pedro Alves <pedro@codesourcery.com>
7806 * linux-x86-low.c: Include limits.h.
7811 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7812 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7813 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7814 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7815 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7816 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7817 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7818 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7819 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7820 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7821 (amd64_emit_void_call_2): New.
7822 (amd64_emit_ops): New.
7823 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7824 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7825 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7826 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7827 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7828 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7829 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7830 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7831 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7832 (i386_emit_stack_adjust, i386_emit_int_call_1)
7833 (i386_emit_void_call_2): New.
7834 (i386_emit_ops): New.
7835 (x86_emit_ops): New.
7836 (the_low_target): Install x86_emit_ops.
7837 * server.h (struct emit_ops): New.
7838 (get_raw_reg_func_addr): Declare.
7839 (current_insn_ptr, emit_error): Declare.
7840 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7841 (set_trace_state_variable_value): New defines.
7842 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7843 addr_get_trace_state_variable_value and
7844 addr_set_trace_state_variable_value.
7845 (symbol_list): New fields for get_raw_reg,
7846 get_trace_state_variable_value and set_trace_state_variable_value.
7847 (condfn): New typedef.
7848 (struct tracepoint): New field `compiled_cond'.
7849 (do_action_at_tracepoint): Clear compiled_cond.
7850 (get_trace_state_variable_value, set_trace_state_variable_value):
7852 (condition_true_at_tracepoint): If there's a compiled condition,
7854 (current_insn_ptr, emit_error): New globals.
7855 (struct bytecode_address): New.
7856 (get_raw_reg_func_addr): New.
7857 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7858 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7859 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7860 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7861 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7862 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7863 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7864 (compile_tracepoint_condition, compile_bytecodes): New.
7865 * target.h (emit_ops): Forward declare.
7866 (struct target_ops): New field emit_ops.
7867 (target_emit_ops): New.
7868 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7869 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7870 * linux-low.c (linux_emit_ops): New.
7871 (linux_target_ops): Install it.
7872 * linux-low.h (struct linux_target_ops): New field emit_ops.
7874 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7876 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7877 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7879 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7880 Stan Shebs <stan@codesourcery.com>
7882 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7883 (all): Depend on $(extra_libraries).
7884 (install-only): Install the IPA.
7885 (IPA_OBJS, IPA_LIB): New.
7886 (clean): Remove the IPA lib.
7887 (IPAGENT_CFLAGS): New.
7888 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7889 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7890 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7891 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7892 * configure.ac: Check for atomic builtins support in the compiler.
7893 (IPA_DEPFILES, extra_libraries): Define.
7894 * configure.srv (ipa_obj): Add description.
7895 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7896 (i[34567]86-*-linux*): Set ipa_obj.
7897 (x86_64-*-linux*): Set ipa_obj.
7898 * linux-low.c (stabilizing_threads): New.
7899 (supports_fast_tracepoints): New.
7900 (linux_detach): Stabilize threads before detaching.
7901 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7902 the lwp is either not stabilizing, or is moving out of a jump pad.
7903 (linux_fast_tracepoint_collecting): New.
7904 (maybe_move_out_of_jump_pad): New.
7905 (enqueue_one_deferred_signal): New.
7906 (dequeue_one_deferred_signal): New.
7907 (linux_wait_for_event_1): If moving out of a jump pad, defer
7908 pending signals to later.
7909 (linux_stabilize_threads): New.
7910 (linux_wait_1): Check if threads need moving out of jump pads, and
7912 (stuck_in_jump_pad_callback): New.
7913 (move_out_of_jump_pad_callback): New.
7915 (linux_resume_one_lwp): Handle moving out of jump pads.
7916 (linux_set_resume_request): Dequeue deferred signals.
7917 (need_step_over_p): Also step over fast tracepoint jumps.
7918 (start_step_over): Also uninsert fast tracepoint jumps.
7919 (finish_step_over): Also reinsert fast tracepoint jumps.
7920 (linux_install_fast_tracepoint_jump): New.
7921 (linux_target_ops): Install linux_stabilize_threads and
7922 linux_install_fast_tracepoint_jump_pad.
7923 * linux-low.h (linux_target_ops) <get_thread_area,
7924 install_fast_tracepoint_jump_pad>: New fields.
7925 (struct lwp_info) <collecting_fast_tracepoint,
7926 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7927 (linux_get_thread_area): Declare.
7928 * linux-x86-low.c (jump_insn): New.
7929 (x86_get_thread_area): New.
7930 (append_insns): New.
7932 (amd64_install_fast_tracepoint_jump_pad): New.
7933 (i386_install_fast_tracepoint_jump_pad): New.
7934 (x86_install_fast_tracepoint_jump_pad): New.
7935 (the_low_target): Install x86_get_thread_area and
7936 x86_install_fast_tracepoint_jump_pad.
7937 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7938 (struct fast_tracepoint_jump): New.
7939 (fast_tracepoint_jump_insn): New.
7940 (fast_tracepoint_jump_shadow): New.
7941 (find_fast_tracepoint_jump_at): New.
7942 (fast_tracepoint_jump_here): New.
7943 (delete_fast_tracepoint_jump): New.
7944 (set_fast_tracepoint_jump): New.
7945 (uninsert_fast_tracepoint_jumps_at): New.
7946 (reinsert_fast_tracepoint_jumps_at): New.
7947 (set_breakpoint_at): Use write_inferior_memory.
7948 (uninsert_raw_breakpoint): Use write_inferior_memory.
7949 (check_mem_read): Mask out fast tracepoint jumps.
7950 (check_mem_write): Mask out fast tracepoint jumps.
7951 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7952 (set_fast_tracepoint_jump): Declare.
7953 (delete_fast_tracepoint_jump)
7954 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7955 (reinsert_fast_tracepoint_jumps_at): Declare.
7956 * regcache.c: Don't compile many functions when building the
7957 in-process agent library.
7958 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7959 the register buffer in the heap.
7960 (free_register_cache): If the register buffer isn't owned by the
7961 regcache, don't free it.
7962 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7963 pre-existing register caches.
7964 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7966 (convert_ascii_to_int): : Constify `from' parameter type.
7967 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7968 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7969 the needed buffer in-place.
7970 (relocate_instruction): New.
7971 * server.c (handle_query) <qSymbols>: If the target supports
7972 tracepoints, give it a chance of looking up symbols. Report
7973 support for fast tracepoints.
7974 (handle_status): Stabilize threads.
7975 (process_serial_event): Adjust.
7976 * server.h (struct fast_tracepoint_jump): Forward declare.
7977 (struct process_info) <fast_tracepoint_jumps>: New field.
7978 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7979 (decode_X_packet, decode_M_packet): Adjust.
7980 (relocate_instruction): Declare.
7981 (in_process_agent_loaded): Declare.
7982 (tracepoint_look_up_symbols): Declare.
7983 (struct fast_tpoint_collect_status): Declare.
7984 (fast_tracepoint_collecting): Declare.
7985 (force_unlock_trace_buffer): Declare.
7986 (handle_tracepoint_bkpts): Declare.
7987 (initialize_low_tracepoint)
7988 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7989 * target.h (struct target_ops) <stabilize_threads,
7990 install_fast_tracepoint_jump_pad>: New fields.
7991 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7992 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7993 [HAVE_STDINT_H]: Include stdint.h.
7994 (trace_debug_1): Rename to ...
7995 (trace_vdebug): ... this.
7996 (trace_debug): Rename to ...
7997 (trace_debug_1): ... this. Add `level' parameter.
7999 (ATTR_USED, ATTR_NOINLINE): New.
8000 (IP_AGENT_EXPORT): New.
8001 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8002 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8003 (about_to_request_buffer_space, trace_buffer_is_full)
8004 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8005 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8006 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8007 (traceframe_write_count, traceframes_created)
8008 (trace_state_variables)
8009 New renaming defines.
8010 (struct ipa_sym_addresses): New.
8011 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8013 (ipa_sym_addrs): New.
8014 (all_tracepoint_symbols_looked_up): New.
8015 (in_process_agent_loaded): New.
8016 (write_e_ipa_not_loaded): New.
8017 (maybe_write_ipa_not_loaded): New.
8018 (tracepoint_look_up_symbols): New.
8019 (debug_threads) [IN_PROCESS_AGENT]: New.
8020 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8021 (UNKNOWN_SIDE_EFFECTS): New.
8022 (stop_tracing): New.
8023 (flush_trace_buffer): New.
8024 (stop_tracing_bkpt): New.
8025 (flush_trace_buffer_bkpt): New.
8026 (read_inferior_integer): New.
8027 (read_inferior_uinteger): New.
8028 (read_inferior_data_pointer): New.
8029 (write_inferior_data_pointer): New.
8030 (write_inferior_integer): New.
8031 (write_inferior_uinteger): New.
8032 (struct collect_static_trace_data_action): Delete.
8033 (enum tracepoint_type): New.
8034 (struct tracepoint) <type>: New field `type'.
8035 <actions_str, step_actions, step_actions_str>: Only include in
8037 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8038 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8039 (tracepoints): Use IP_AGENT_EXPORT.
8040 (last_tracepoint): Don't include in the IPA.
8041 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8042 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8043 (alloced_trace_state_variables): New.
8044 (trace_state_variables): Use IP_AGENT_EXPORT.
8045 (traceframe_t): Delete unused variable.
8046 (circular_trace_buffer): Don't include in the IPA.
8047 (trace_buffer_start): Delete.
8048 (struct trace_buffer_control): New.
8049 (trace_buffer_free): Delete.
8050 (struct ipa_trace_buffer_control): New.
8051 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8052 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8054 (trace_buffer_ctrl): New.
8055 (TRACE_BUFFER_CTRL_CURR): New.
8056 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8057 Reimplement as macros.
8058 (trace_buffer_wrap): Delete.
8059 (traceframe_write_count, traceframe_read_count)
8060 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8061 (struct tracepoint_hit_ctx) <type>: New field.
8062 (struct fast_tracepoint_ctx): New.
8063 (memory_barrier): New.
8065 (record_tracepoint_error): Update atomically in the IPA.
8066 (clear_inferior_trace_buffer): New.
8067 (about_to_request_buffer_space): New.
8068 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8069 updating the same buffer.
8070 (add_tracepoint): Default the tracepoint's type to trap
8071 tracepoint, and orig_size to -1.
8072 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8074 (create_trace_state_variable): New parameter `gdb'. Handle it.
8075 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8076 (cmd_qtdp): Handle fast tracepoints.
8078 (max_jump_pad_size): New.
8079 (gdb_jump_pad_head): New.
8080 (get_jump_space_head): New.
8081 (claim_jump_space): New.
8082 (sort_tracepoints): New.
8083 (MAX_JUMP_SIZE): New.
8084 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8086 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8087 support. Upload fast traceframes, and delete internal IPA
8089 (stop_tracing_handler): New.
8090 (flush_trace_buffer_handler): New.
8091 (cmd_qtstop): Upload fast tracepoints.
8092 (response_tracepoint): Handle fast tracepoints.
8093 (tracepoint_finished_step): Upload fast traceframes. Set the
8094 tracepoint hit context's tracepoint type.
8095 (handle_tracepoint_bkpts): New.
8096 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8097 type. Add comment about fast tracepoints.
8098 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8099 non-existing action_str field.
8100 (get_context_regcache): Handle fast tracepoints.
8101 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8103 (fast_tracepoint_from_jump_pad_address): New.
8104 (fast_tracepoint_from_ipa_tpoint_address): New.
8105 (collecting_t): New.
8106 (force_unlock_trace_buffer): New.
8107 (fast_tracepoint_collecting): New.
8110 (write_inferior_data_ptr): New.
8111 (target_tp_heap): New.
8112 (target_malloc): New.
8113 (download_agent_expr): New.
8115 (download_tracepoints): New.
8116 (download_trace_state_variables): New.
8117 (upload_fast_traceframes): New.
8118 (IPA_FIRST_TRACEFRAME): New.
8119 (IPA_NEXT_TRACEFRAME_1): New.
8120 (IPA_NEXT_TRACEFRAME): New.
8121 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8122 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8123 (gdb_jump_pad_buffer_end): New.
8124 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8125 (initialize_tracepoint): Adjust.
8126 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8127 buffer. Initialize the low module.
8128 * utils.c (PREFIX, TOOLNAME): New.
8129 (malloc_failure): Use PREFIX.
8130 (error): In the IPA, an error causes an exit.
8131 (fatal, warning): Use PREFIX.
8132 (internal_error): Use TOOLNAME.
8133 (NUMCELLS): Increase to 10.
8134 * configure, config.in: Regenerate.
8136 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8138 * server.c (handle_query) <qSupported>: Do two passes over the
8139 qSupported string to avoid nesting strtok.
8141 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8143 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8145 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8147 * configure: Regenerate.
8148 * proc-service.list: New.
8150 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8152 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8155 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8157 * gdbreplay.c (remote_open): Check error return from socket() call by
8158 its equality to -1 not by it being negative.
8159 * remote-utils.c (remote_open): Likewise.
8161 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8163 * config.h: Regenerate.
8165 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8167 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8168 doesn't provide PTRACE_GET_THREAD_AREA.
8170 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8172 * linux-m68k-low.c: Include <asm/ptrace.h>
8173 (ps_get_thread_area): Implement.
8175 2010-05-03 Doug Evans <dje@google.com>
8177 * event-loop.c (struct callback_event): New struct.
8178 (callback_list): New global.
8179 (append_callback_event, delete_callback_event): New functions.
8180 (process_callback): New function.
8181 (start_event_loop): Call it.
8182 * remote-utils.c (NOT_SCHEDULED): Define.
8183 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8184 moved out of readchar.
8185 (readchar): Rewrite. Call reschedule before returning.
8186 (reset_readchar): New function.
8187 (remote_close): Call it.
8188 (process_remaining, reschedule): New functions.
8189 * server.h (callback_handler_func): New typedef.
8190 (append_callback_event, delete_callback_event): Declare.
8192 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8194 * proc-service.c (ps_pglobal_lookup): Use
8195 thread_db_look_up_one_symbol.
8196 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8197 parameter. Use it instead of all_symbols_looked_up.
8198 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8200 (all_symbols_looked_up): Don't declare.
8201 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8202 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8204 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8205 Set all_symbols_looked_up here.
8206 (thread_db_look_up_one_symbol): New.
8207 (thread_db_get_tls_address): Adjust.
8208 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8209 thread_db object on the heap, and tentatively set it in the
8211 (thread_db_init): Don't set all_symbols_looked_up here.
8212 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8214 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8216 * linux-low.c (linux_kill, linux_detach): Adjust.
8217 (status_pending_p_callback): Remove redundant statement. Check
8218 for !TARGET_WAITIKIND_IGNORE, instead of
8219 TARGET_WAITKIND_STOPPED.
8220 (handle_tracepoints): Make sure LWP is locked. Adjust.
8221 (linux_wait_for_event_1): Adjust.
8222 (linux_cancel_breakpoints): New.
8223 (unsuspend_one_lwp): New.
8224 (unsuspend_all_lwps): New.
8225 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8226 (send_sigstop_callback): Change return type to int, add new
8227 `except' parameter and handle it.
8228 (suspend_and_send_sigstop_callback): New.
8229 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8230 pass them down. If SUSPEND, also increment the lwp's suspend
8232 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8233 (need_step_over_p): Don't consider suspended LWPs.
8234 (start_step_over): Adjust.
8235 (proceed_one_lwp): Change return type to int, add new `except'
8236 parameter and handle it.
8237 (unsuspend_and_proceed_one_lwp): New.
8238 (proceed_all_lwps): Use find_inferior instead of
8240 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8241 also decrement the suspend count of LWPs. Pass `except' down,
8242 instead of hacking its suspend count.
8243 (linux_pause_all): Add `freeze' parameter. Adjust.
8244 (linux_unpause_all): New.
8245 (linux_target_ops): Install linux_unpause_all.
8246 * server.c (handle_status): Adjust.
8247 * target.h (struct target_ops): New fields `unpause_all' and
8248 `cancel_breakpoints'. Add new parameter to `pause_all'.
8249 (pause_all): Add new `freeze' parameter.
8251 (cancel_breakpoints): New.
8252 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8254 (cmd_qtstart): Pause threads.
8255 (stop_tracing): Pause threads, and cancel breakpoints.
8256 * win32-low.c (win32_target_ops): Adjust.
8258 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8260 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8261 the inferior right away from here...
8262 (linux_wait_1): ... to here, and adjust to check the thread's
8263 last_resume_kind instead of the lwp's step or stop_expected flags.
8265 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8267 * README: Use consistent `GDB' and `GDBserver' spellings.
8269 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8271 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8272 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8273 (linux_detach_one_lwp): Assume the lwp is stopped.
8274 (any_thread_of): Delete.
8275 (linux_detach): Stop all lwps here. Don't blindly delete all
8277 (delete_lwp_callback): New.
8278 (linux_mourn): Delete all lwps of the process that is gone.
8279 (linux_wait_1): Don't delete the last lwp of the process here.
8280 * mem-break.h (mark_breakpoints_out): Declare.
8281 * mem-break.c (mark_breakpoints_out): New.
8282 (free_all_breakpoints): Use it.
8283 * server.c (handle_target_event): If the process is gone, mark
8285 * thread-db.c (struct thread_db) <create_bp>: New field.
8286 (thread_db_enable_reporting): Fix prototype. Store a thread event
8287 breakpoint reference in the thread_db struct.
8288 (thread_db_load_search): Clear the thread_db object.
8289 (try_thread_db_load_1): Ditto.
8290 (switch_to_process): New.
8291 (disable_thread_event_reporting): Use it.
8292 (remove_thread_event_breakpoints): New.
8293 (thread_db_detach, thread_db_mourn): Use it.
8295 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8297 * linux-low.c (linux_enable_event_reporting): New.
8298 (linux_wait_for_event_1, handle_extended_wait): Use it.
8300 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8302 * linux-low.c (linux_kill_one_lwp, linux_kill)
8303 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8304 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8305 SIGSTOP even if the LWP is stopped.
8306 (send_sigstop_callback): New.
8307 (stop_all_lwps): Use send_sigstop_callback instead.
8308 (linux_resume_one_thread): Adjust.
8309 (proceed_one_lwp): Still proceed an LWP that the client has
8310 requested to stop, if we haven't reported it as stopped yet. Make
8311 sure that LWPs the client want stopped, have a pending SIGSTOP.
8313 2010-04-26 Doug Evans <dje@google.com>
8315 * server.c (handle_general_set): Make static.
8317 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8318 Print received char after testing for error/eof instead of before.
8319 (input_interrupt): Tweak comment.
8321 2010-04-23 Doug Evans <dje@google.com>
8323 * server.c (start_inferior): Print inferior argv if --debug.
8325 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8327 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8328 * nto-x86-low.c: Include server.h
8330 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8332 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8333 be consistent with other sources of this directory.
8334 (init_registers_amd64): Correct name of source file of this function
8337 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8339 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8342 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8344 * win32-i386-low.c: Add 64-bit support.
8345 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8346 (init_registers_amd64): Declare.
8347 (mappings): Add 64-bit version of array.
8348 (init_windows_x86): New function.
8349 (the_low_target): Change init_arch field to init_windows_x86.
8351 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8353 * win32-low.c: Adapt to support also 64-bit architecture.
8354 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8355 (get_image_name): Use SIZE_T type for local variable `done'.
8356 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8357 (toolhelp_get_dll_name): Idem.
8358 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8359 Use uintptr_t typecast to avoid warning.
8360 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8361 (handle_exception): Use phex_nz to avoid warning.
8362 (win32_wait): Remove unused local variable `process'.
8364 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8366 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8369 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8371 * configure.ac: Use `ws2_32' library for srv_mingw.
8372 * configure: Regenerate.
8373 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8374 * remote-utils.c: Likewise.
8376 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8378 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8379 if __x86_64__ is defined.
8381 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8383 * configure: Regenerate.
8385 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8387 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8388 * target.h (target_ops): New get_tib_address field.
8389 * win32-low.h (win32_thread_info): Add thread_local_base field.
8390 * win32-low.c (child_add_thread): Add tlb argument.
8391 Set thread_local_base field to TLB.
8392 (get_child_debug_event): Adapt to child_add_thread change.
8393 (win32_get_tib_address): New function.
8394 (win32_target_ops): Set get_tib_address field to
8395 win32_get_tib_address.
8396 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8398 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8400 * linux-low.c (linux_mourn): Also remove the process.
8401 * server.c (handle_target_event): Don't remove the process here.
8402 * nto-low.c (nto_mourn): New.
8403 (nto_target_ops): Install it.
8404 * spu-low.c (spu_mourn): New.
8405 (spu_target_ops): Install it.
8406 * win32-low.c (win32_mourn): New.
8407 (win32_target_ops): Install it.
8409 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8411 * server.h (buffer_xml_printf): Remove redundant `;'.
8413 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8415 * regcache.c (set_register_cache): Invalidate regcaches before
8416 changing the register cache layout.
8417 (regcache_invalidate_one): Allow a NULL regcache.
8418 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8419 regcaches before changing the register cache layout or the target
8422 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8424 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8425 variable warning on Linux/x86-64.
8427 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8429 GDBserver disconnected tracing support.
8431 * linux-low.c (linux_remove_process): Delete.
8432 (add_lwp): Don't set last_resume_kind here.
8433 (linux_kill): Use `mourn'.
8434 (linux_detach): Use `thread_db_detach', and `mourn'.
8436 (linux_attach_lwp_1): Adjust comment.
8437 (linux_attach): last_resume_kind moved the thread_info; adjust.
8438 (status_pending_p_callback): Adjust.
8439 (linux_wait_for_event_1): Adjust.
8440 (count_events_callback, select_singlestep_lwp_callback)
8441 (select_event_lwp_callback, cancel_breakpoints_callback)
8442 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8443 (proceed_one_lwp): Adjust.
8444 (linux_async): Add debug output.
8445 (linux_thread_stopped): New.
8446 (linux_pause_all): New.
8447 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8449 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8450 (thread_db_free): Delete declaration.
8451 (thread_db_detach, thread_db_mourn): Declare.
8452 * thread-db.c (thread_db_init): Use thread_db_mourn.
8453 (thread_db_free): Delete, split in two.
8454 (disable_thread_event_reporting): New.
8455 (thread_db_detach): New.
8456 (thread_db_mourn): New.
8458 * server.h (struct thread_info) <last_resume_kind>: New field.
8459 <attached>: Add comment.
8460 <gdb_detached>: New field.
8461 (handler_func): Change return type to int.
8462 (handle_serial_event, handle_target_event): Ditto.
8463 (gdb_connected): Declare.
8465 (disconnected_tracing): Declare.
8466 (stop_tracing): Declare.
8468 * server.c (handle_query) <qSupported>: Report support for
8469 disconnected tracing.
8470 (queue_stop_reply_callback): Account for running threads.
8471 (gdb_wants_thread_stopped): New.
8472 (gdb_wants_all_threads_stopped): New.
8473 (gdb_reattached_process): New.
8474 (handle_status): Clear the `gdb_detached' flag of all processes.
8475 In all-stop, stop all threads.
8476 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8477 (process_serial_event): If the remote connection breaks, or if an
8478 exit was forced with "monitor exit", force an event loop exit.
8479 Handle disconnected tracing on detach.
8480 (handle_serial_event): Adjust.
8481 (handle_target_event): If GDB isn't connected, forward events back
8482 to the inferior, unless the last process exited, in which case,
8483 exit gdbserver. Adjust interface.
8485 * remote-utils.c (remote_open): Don't block in accept. Instead
8486 register an event loop source on the listen socket file
8487 descriptor. Refactor bits into ...
8488 (listen_desc): ... this new global.
8489 (gdb_connected): ... this new function.
8490 (enable_async_notification): ... this new function.
8491 (handle_accept_event): ... this new function.
8492 (remote_close): Clear remote_desc.
8494 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8496 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8498 (mourn_inferior): Define.
8499 (target_process_qsupported): Avoid the dangling else problem.
8500 (thread_stopped): Define.
8501 (pause_all): Define.
8502 (target_waitstatus_to_string): Declare.
8503 * target.c (target_waitstatus_to_string): New.
8505 * tracepoint.c (tracing): Make extern.
8506 (disconnected_tracing): New.
8507 (stop_tracing): Make extern. Handle tracing stops due to GDB
8509 (cmd_qtdisconnected): New.
8510 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8511 (handle_tracepoint_general_set): Handle QTDisconnected.
8513 * event-loop.c (event_handler_func): Change return type to int.
8514 (process_event): Bail out if the event handler wants the event
8516 (handle_file_event): Ditto.
8517 (start_event_loop): Bail out if the event handler wants the event
8520 * nto-low.c (nto_target_ops): Adjust.
8521 * spu-low.c (spu_wait): Don't remove the process here.
8522 (spu_target_ops): Adjust.
8523 * win32-low.c (win32_wait): Don't remove the process here.
8524 (win32_target_ops): Adjust.
8526 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8528 * regcache.c (realloc_register_cache): Invalidate inferior's
8529 regcache before recreating it.
8531 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8533 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8535 2010-04-09 Stan Shebs <stan@codesourcery.com>
8536 Pedro Alves <pedro@codesourcery.com>
8538 * server.h (LONGEST): New.
8539 (struct thread_info) <while_stepping>: New field.
8540 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8542 (initialize_tracepoint, handle_tracepoint_general_set)
8543 (handle_tracepoint_query, tracepoint_finished_step)
8544 (tracepoint_was_hit, release_while_stepping_state_list):
8545 (current_traceframe): Declare.
8546 * server.c (handle_general_set): Handle tracepoint packets.
8548 (write_memory): New.
8549 (handle_search_memory_1): Use read_memory.
8550 (handle_query): Report support for conditional tracepoints, trace
8551 state variables, and tracepoint sources. Handle tracepoint
8553 (main): Initialize the tracepoints module.
8554 (process_serial_event): Handle traceframe reads/writes.
8556 * linux-low.c (handle_tracepoints): New.
8557 (linux_wait_1): Call it.
8558 (linux_resume_one_lwp): Handle while-stepping.
8559 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8560 (linux_target_ops): Install them.
8561 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8563 * linux-x86-low.c (x86_supports_tracepoints): New.
8564 (the_low_target). Install it.
8566 * mem-break.h (delete_breakpoint): Declare.
8567 * mem-break.c (delete_breakpoint): Make external.
8569 * target.h (struct target_ops): Add `supports_tracepoints',
8570 `read_pc', and `write_pc' fields.
8571 (target_supports_tracepoints): Define.
8572 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8575 * regcache.h (struct regcache) <registers_owned>: New field.
8576 (init_register_cache, regcache_cpy): Declare.
8577 (regcache_read_pc, regcache_write_pc): Declare.
8578 (register_cache_size): Declare.
8579 (supply_regblock): Declare.
8580 * regcache.c (init_register_cache): New.
8581 (new_register_cache): Use it.
8582 (regcache_cpy): New.
8583 (register_cache_size): New.
8584 (supply_regblock): New.
8585 (regcache_read_pc, regcache_write_pc): New.
8587 * tracepoint.c: New.
8589 * Makefile.in (OBS): Add tracepoint.o.
8590 (tracepoint.o): New rule.
8592 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8594 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8596 (i386-mmx.c): Likewise.
8597 (i386-mmx-linux.o): Likewise.
8598 (i386-mmx-linux.c): Likewise.
8600 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8601 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8602 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8603 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8605 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8606 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8607 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8609 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8611 * Makefile.in (clean): Updated.
8613 (i386-avx.c): Likewise.
8614 (i386-avx-linux.o): Likewise.
8615 (i386-avx-linux.c): Likewise.
8616 (amd64-avx.o): Likewise.
8617 (amd64-avx.c): Likewise.
8618 (amd64-avx-linux.o): Likewise.
8619 (amd64-avx-linux.c): Likewise.
8621 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8622 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8623 (srv_amd64_regobj): Add amd64-avx.o.
8624 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8625 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8626 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8627 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8628 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8629 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8630 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8632 * i387-fp.c: Include "i386-xstate.h".
8634 (i387_cache_to_xsave): Likewise.
8635 (i387_xsave_to_cache): Likewise.
8636 (x86_xcr0): Likewise.
8638 * i387-fp.h (i387_cache_to_xsave): Likewise.
8639 (i387_xsave_to_cache): Likewise.
8640 (x86_xcr0): Likewise.
8642 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8643 * linux-crisv32-low.c (target_regsets): Likewise.
8644 * linux-m68k-low.c (target_regsets): Likewise.
8645 * linux-mips-low.c (target_regsets): Likewise.
8646 * linux-ppc-low.c (target_regsets): Likewise.
8647 * linux-s390-low.c (target_regsets): Likewise.
8648 * linux-sh-low.c (target_regsets): Likewise.
8649 * linux-sparc-low.c (target_regsets): Likewise.
8650 * linux-xtensa-low.c (target_regsets): Likewise.
8652 * linux-low.c: Include <sys/uio.h>.
8653 (regsets_fetch_inferior_registers): Support nt_type.
8654 (regsets_store_inferior_registers): Likewise.
8655 (linux_process_qsupported): New.
8656 (linux_target_ops): Add linux_process_qsupported.
8658 * linux-low.h (regset_info): Add nt_type.
8659 (linux_target_ops): Add process_qsupported.
8661 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8663 (init_registers_i386_avx_linux): New.
8664 (init_registers_amd64_avx_linux): Likewise.
8665 (xmltarget_i386_linux_no_xml): Likewise.
8666 (xmltarget_amd64_linux_no_xml): Likewise.
8667 (PTRACE_GETREGSET): Likewise.
8668 (PTRACE_SETREGSET): Likewise.
8669 (x86_fill_xstateregset): Likewise.
8670 (x86_store_xstateregset): Likewise.
8671 (use_xml): Likewise.
8672 (x86_linux_update_xmltarget): Likewise.
8673 (x86_linux_process_qsupported): Likewise.
8674 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8675 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8676 init_registers_i386_linux here. Call
8677 x86_linux_update_xmltarget.
8678 (the_low_target): Add x86_linux_process_qsupported.
8680 * server.c (handle_query): Call target_process_qsupported.
8682 * target.h (target_ops): Add process_qsupported.
8683 (target_process_qsupported): New.
8685 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8687 * inferiors.c (add_thread): Set last_status kind to
8688 TARGET_WAITKIND_IGNORE.
8689 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8690 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8691 (linux_wait_1): Move `thread' local definition to block that uses
8692 it. Don't NULL initialize `event_child'.
8693 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8694 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8695 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8697 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8699 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8700 an extended waitstatus, or by a watchpoint.
8701 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8702 thread was stepping or has been stopped by a watchpoint.
8704 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8706 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8707 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8708 of another, then delete the previous, and validate all
8710 (validate_inserted_breakpoint): New.
8711 (delete_disabled_breakpoints): New.
8712 (validate_breakpoints): New.
8713 (check_mem_read): Validate breakpoints before trusting their
8714 shadow. Delete disabled breakpoints.
8715 (check_mem_write): Validate breakpoints before trusting they
8716 should be inserted. Delete disabled breakpoints.
8717 * mem-break.h (validate_breakpoints):
8718 * server.c (handle_query): Validate breakpoints when we see a
8721 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8723 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8724 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8725 if we could tell there's a GDB breakpoint at stop_pc.
8726 (need_step_over_p): Don't do a step over if we find a GDB
8727 breakpoint at the resume PC.
8729 * mem-break.c (struct raw_breakpoint): New.
8730 (enum bkpt_type): New type `gdb_breakpoint'.
8731 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8732 fields. New field `raw'.
8733 (find_raw_breakpoint_at): New.
8734 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8736 (set_breakpoint_at): Adjust.
8737 (delete_raw_breakpoint): New.
8738 (release_breakpoint): New.
8739 (delete_breakpoint): Rename to...
8740 (delete_breakpoint_1): ... this. Add proc parameter. Use
8741 release_breakpoint. Return ENOENT.
8742 (delete_breakpoint): Reimplement.
8743 (find_breakpoint_at): Delete.
8744 (find_gdb_breakpoint_at): New.
8745 (delete_breakpoint_at): Delete.
8746 (set_gdb_breakpoint_at): New.
8747 (delete_gdb_breakpoint_at): New.
8748 (gdb_breakpoint_here): New.
8749 (set_reinsert_breakpoint): Use release_breakpoint.
8750 (uninsert_breakpoint): Rename to ...
8751 (uninsert_raw_breakpoint): ... this.
8752 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8753 (reinsert_raw_breakpoint): Change parameter type to
8755 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8757 (check_breakpoints): Adjust. Use release_breakpoint.
8758 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8759 (breakpoint_inserted_here): Ditto.
8760 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8761 Don't trust the breakpoint's shadow if it is not inserted.
8762 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8763 (delete_all_breakpoints): Adjust.
8764 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8765 use delete_breakpoint_1.
8767 * mem-break.h (breakpoints_supported): Delete declaration.
8768 (set_gdb_breakpoint_at): Declare.
8769 (gdb_breakpoint_here): Declare.
8770 (delete_breakpoint_at): Delete.
8771 (delete_gdb_breakpoint_at): Declare.
8773 * server.h (struct raw_breakpoint): Forward declare.
8774 (struct process_info): New field `raw_breakpoints'.
8776 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8779 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8781 * linux-low.c (status_pending_p_callback): Fix comment.
8782 (linux_wait_for_event_1): Move most of the internal breakpoint
8783 handling from here...
8784 (linux_wait_1): ... to here.
8785 (count_events_callback): New.
8786 (select_singlestep_lwp_callback): New.
8787 (select_event_lwp_callback): New.
8788 (cancel_breakpoints_callback): New.
8789 (select_event_lwp): New.
8790 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8791 priority to all LWPs that have had events that should be reported
8792 to the client. Cancel breakpoints when about to reporting the
8793 event to the client, not while stopping lwps. No longer cancel
8794 finished single-steps here.
8795 (cancel_finished_single_step): Delete.
8796 (cancel_finished_single_steps): Delete.
8798 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8800 * mem-break.c (enum bkpt_type): New.
8801 (struct breakpoint): New field `type'.
8802 (set_breakpoint_at): Change return type to struct breakpoint
8803 pointer. Set type to `other_breakpoint' by default.
8804 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8805 in the breakpoint list.
8806 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8807 (reinsert_breakpoint): Rename to ...
8808 (reinsert_raw_breakpoint): ... this.
8809 (reinsert_breakpoints_at): Adjust.
8810 * mem-break.h (struct breakpoint): Declare.
8811 (set_breakpoint_at): Change return type to struct breakpoint
8814 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8816 * server.c (handle_query): Assign, not compare.
8818 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8820 Teach linux gdbserver to step-over-breakpoints.
8822 * linux-low.c (can_hardware_single_step): New.
8823 (supports_breakpoints): New.
8824 (handle_extended_wait): If stopping threads, read the stop pc of
8827 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8828 low target doesn't support retrieving the PC.
8829 (add_lwp): Set last_resume_kind to resume_continue.
8830 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8831 (linux_attach): Don't clear stop_expected. Set the lwp's
8832 last_resume_kind to resume_stop.
8833 (linux_detach_one_lwp): Don't check for removed breakpoints.
8834 (check_removed_breakpoint): Delete.
8835 (status_pending_p): Rename to ...
8836 (status_pending_p_callback): ... this. Don't check for removed
8837 breakpoints. Don't consider threads that are stopped from GDB's
8839 (linux_wait_for_lwp): Always read the stop_pc here.
8840 (cancel_breakpoint): New.
8841 (step_over_bkpt): New global.
8842 (linux_wait_for_event_1): Implement stepping over breakpoints.
8843 (gdb_wants_lwp_stopped): New.
8844 (gdb_wants_all_stopped): New.
8845 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8846 single-step traps here. Store the thread's last reported target
8848 (send_sigstop): Don't clear stop_expected. Always set it,
8850 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8851 (cancel_finished_single_step): New.
8852 (cancel_finished_single_steps): New.
8853 (wait_for_sigstop): Don't cancel finished single-step traps here.
8854 (linux_resume_one_lwp): Don't check for removed breakpoints.
8855 Don't set `step' on non-hardware step archs.
8856 (linux_set_resume_request): Ignore resume_stop requests if already
8857 stopping or stopped. Set the lwp's last_resume_kind.
8858 (resume_status_pending_p): Don't check for removed breakpoints.
8859 (need_step_over_p): New.
8860 (start_step_over): New.
8861 (finish_step_over): New.
8862 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8863 requests. Clear the thread's last reported target waitstatus.
8864 Don't use the `suspended' flag. Don't consider pending breakpoints.
8865 (linux_resume): Start a step-over if necessary.
8866 (proceed_one_lwp): New.
8867 (proceed_all_lwps): New.
8868 (unstop_all_lwps): New.
8869 * linux-low.h (struct lwp_info): Rewrite comment for the
8870 `suspended' flag. Add the `stop_pc' field. Delete the
8871 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8872 Add `'last_resume_kind' and `need_step_over' fields.
8873 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8874 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8875 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8876 (set_raw_breakpoint_at): New.
8877 (set_breakpoint_at): Rewrite to use it.
8878 (reinsert_breakpoint_handler): Delete.
8879 (set_reinsert_breakpoint): New.
8880 (reinsert_breakpoint_by_bp): Delete.
8881 (delete_reinsert_breakpoints): New.
8882 (uninsert_breakpoint): Rewrite.
8883 (uninsert_breakpoints_at): New.
8884 (reinsert_breakpoint): Rewrite.
8885 (reinsert_breakpoints_at): New.
8886 (check_breakpoints): Rewrite.
8887 (breakpoint_here): New.
8888 (breakpoint_inserted_here): New.
8889 (check_mem_read): Adjust.
8890 * mem-break.h (breakpoints_supported, breakpoint_here)
8891 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8892 (reinsert_breakpoint_by_bp): Delete declaration.
8893 (delete_reinsert_breakpoints): Declare.
8894 (reinsert_breakpoint): Delete declaration.
8895 (reinsert_breakpoints_at): Declare.
8896 (uninsert_breakpoint): Delete declaration.
8897 (uninsert_breakpoints_at): Declare.
8898 (check_breakpoints): Adjust prototype.
8899 * server.h: Adjust include order.
8900 (struct thread_info): Declare here. Add a `last_status' field.
8902 2010-03-23 Michael Snyder <msnyder@vmware.com>
8904 * server.c (crc32): New function.
8905 (handle_query): Add handling for 'qCRC:' request.
8907 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8909 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8910 lwp had been stopped by a watchpoint.
8912 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8914 * server.h (internal_error): Declare.
8915 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8916 * utils.c (internal_error): New function.
8918 2010-03-15 Andreas Schwab <schwab@redhat.com>
8920 * configure.srv: Fix typo setting srv_regobj.
8922 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8924 * linux-low.c (fetch_register): Avoid passing a non string literal
8926 (usr_store_inferior_registers): Ditto.
8928 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8930 * linux-low.c (linux_write_memory): Bail out early if peeking
8933 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8935 * linux-low.h (struct lwp_info): New fields
8936 `stopped_by_watchpoint' and `stopped_data_address'.
8937 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8938 here, and cache them in the lwp object.
8939 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8941 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8943 (linux_stopped_by_watchpoint): Rewrite.
8944 (linux_stopped_data_address): Rewrite.
8946 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8948 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8949 switching the current inferior, not before.
8951 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8953 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8954 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8955 i386-linux.c and amd64-linux.c.
8956 (reg-i386.o): Removed.
8957 (reg-i386.c): Likewise.
8958 (reg-i386-linux.o): Likewise.
8959 (reg-i386-linux.c): Likewise.
8960 (reg-x86-64.o): Likewise.
8961 (reg-x86-64.c): Likewise.
8962 (reg-x86-64-linux.o): Likewise.
8963 (reg-x86-64-linux.c): Likewise.
8966 (i386-linux.o): Likewise.
8967 (i386-linux.c): Likewise.
8968 (amd64.o): Likewise.
8969 (amd64.c): Likewise.
8970 (amd64-linux.o): Likewise.
8971 (amd64-linux.c): Likewise.
8973 * configure.srv (srv_i386_regobj): New.
8974 (srv_i386_linux_regobj): Likewise.
8975 (srv_amd64_regobj): Likewise.
8976 (srv_amd64_linux_regobj): Likewise.
8977 (srv_i386_32bit_xmlfiles): Likewise.
8978 (srv_i386_64bit_xmlfiles): Likewise.
8979 (srv_i386_xmlfiles): Likewise.
8980 (srv_amd64_xmlfiles): Likewise.
8981 (srv_i386_linux_xmlfiles): Likewise.
8982 (srv_amd64_linux_xmlfiles): Likewise.
8983 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8984 srv_xmlfiles to $srv_i386_xmlfiles.
8985 (i[34567]86-*-mingw32ce*): Likewise.
8986 (i[34567]86-*-mingw*): Likewise.
8987 (i[34567]86-*-nto*): Likewise.
8988 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8989 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8990 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8991 (x86_64-*-linux*): Likewise.
8993 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8994 (init_registers_amd64_linux): New.
8995 (x86_arch_setup): Replace init_registers_x86_64_linux with
8996 init_registers_amd64_linux.
8998 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9000 * configure.ac: Check for libdl. If it is not available link against
9001 static libthread_db.
9002 * configure: Regenerate.
9004 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9008 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9009 handing a read watchpoint.
9010 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9012 2010-02-12 Doug Evans <dje@google.com>
9014 * linux-low.c (linux_supports_tracefork_flag): Document.
9015 (linux_look_up_symbols): Add comment.
9017 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9019 * regcache.c (supply_register): Clear regcache if buf is NULL.
9021 2010-02-02 Nicolas Roche <roche@sourceware.org>
9022 Joel Brobecker <brobecker@adacore.com>
9024 * inferiors.c (find_inferior): Add function documentation.
9025 (unloaded_dll): Handle the case where the unloaded dll has not
9026 been previously registered in the dll list.
9028 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9030 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9031 (thumb2_breakpoint): New.
9032 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9034 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9036 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9037 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9040 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9042 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9044 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9046 * linux-s390-low.c (s390_collect_ptrace_register)
9047 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9049 2010-01-21 Doug Evans <dje@google.com>
9051 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9052 (PTRACE_ARG4_TYPE): New macro.
9053 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9054 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9055 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9056 (usr_store_inferior_registers): Ditto.
9057 (linux_read_memory, linux_write_memory): Ditto.
9058 (linux_test_for_tracefork): Ditto.
9060 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9061 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9063 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9065 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9068 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9070 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9071 prototype to take a regcache. Adjust.
9073 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9075 * regcache.h (struct thread_info): Forward declare.
9076 (struct regcache): New.
9077 (new_register_cache): Adjust prototype.
9078 (get_thread_regcache): Declare.
9079 (free_register_cache): Adjust prototype.
9080 (registers_to_string, registers_from_string): Ditto.
9081 (supply_register, supply_register_by_name, collect_register)
9082 (collect_register_as_string, collect_register_by_name): Ditto.
9083 * regcache.c (struct inferior_regcache_data): Delete.
9084 (get_regcache): Rename to ...
9085 (get_thread_regcache): ... this. Adjust. Switch inferior before
9087 (regcache_invalidate_one): Adjust.
9088 (regcache_invalidate): Fix prototype.
9089 (new_register_cache): Return the new register cache.
9090 (free_register_cache): Change prototype.
9091 (realloc_register_cache): Adjust.
9092 (registers_to_string): Change prototype to take a regcache. Adjust.
9093 (registers_from_string): Ditto.
9094 (register_data): Ditto.
9095 (supply_register): Ditto.
9096 (supply_register_by_name): Ditto.
9097 (collect_register): Ditto.
9098 (collect_register_as_string): Ditto.
9099 (collect_register_by_name): Ditto.
9100 * server.c (process_serial_event): Adjust.
9101 * linux-low.h (regset_fill_func, regset_store_func): Change
9103 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9105 * linux-low.c (get_stop_pc): Adjust.
9106 (check_removed_breakpoint): Adjust.
9107 (linux_wait_for_event): Adjust.
9108 (linux_resume_one_lwp): Adjust.
9109 (fetch_register): Add regcache parameter. Adjust.
9110 (usr_store_inferior_registers): Ditto.
9111 (regsets_fetch_inferior_registers): Ditto.
9112 (regsets_store_inferior_registers): Ditto.
9113 (linux_fetch_registers, linux_store_registers): Ditto.
9114 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9116 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9118 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9119 prototype to take a regcache.
9120 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9121 * remote-utils.c (convert_ascii_to_int, outreg)
9122 (prepare_resume_reply): Change prototype to take a regcache.
9124 * target.h (struct target_ops) <fetch_registers, store_registers>:
9125 Change prototype to take a regcache.
9126 (fetch_inferior_registers, store_inferior_registers): Change
9127 prototype to take a regcache. Adjust.
9128 * proc-service.c (ps_lgetregs): Adjust.
9129 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9130 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9131 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9132 take a regcache. Adjust.
9133 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9134 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9135 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9136 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9137 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9138 (cris_cannot_fetch_register):
9139 (cris_breakpoint_at): Change prototype to take a regcache.
9141 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9142 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9143 to take a regcache. Adjust.
9144 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9146 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9147 take a regcache. Adjust.
9148 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9149 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9150 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9151 * linux-mips-low.c (mips_get_pc):
9152 (mips_set_pc): Change prototype to take a regcache. Adjust.
9153 (mips_reinsert_addr): Adjust.
9154 (mips_collect_register): Change prototype to take a regcache.
9156 (mips_supply_register):
9157 (mips_collect_register_32bit, mips_supply_register_32bit)
9158 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9159 (mips_store_fpregset): Ditto.
9160 * linux-ppc-low.c (ppc_supply_ptrace_register)
9161 (ppc_supply_ptrace_register): Ditto.
9162 (parse_spufs_run): Adjust.
9163 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9164 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9165 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9166 take a regcache. Adjust.
9167 * linux-s390-low.c (s390_collect_ptrace_register)
9168 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9169 (s390_set_pc): Change prototype to take a regcache. Adjust.
9170 (s390_arch_setup): Adjust.
9171 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9172 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9173 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9174 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9175 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9177 (sparc_breakpoint_at): Adjust.
9178 * linux-xtensa-low.c (xtensa_fill_gregset):
9179 (xtensa_store_gregset):
9180 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9181 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9182 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9183 prototype to take a regcache. Adjust.
9184 * win32-arm-low.c (arm_fetch_inferior_register)
9185 (arm_store_inferior_register): Change prototype to take a
9187 * win32-i386-low.c (i386_fetch_inferior_register)
9188 (i386_store_inferior_register): Change prototype to take a
9190 * win32-low.c (child_fetch_inferior_registers)
9191 (child_store_inferior_registers): Change prototype to take a
9193 (win32_wait): Adjust.
9194 (win32_fetch_inferior_registers): Change prototype to take a
9196 (win32_store_inferior_registers): Adjust.
9197 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9198 store_inferior_register>: Change prototype to take a regcache.
9200 2010-01-20 Doug Evans <dje@google.com>
9202 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9204 (linux_wait_for_event1, linux_init_signals): Ditto.
9205 (W_STOPCODE): Provide definition if missing.
9207 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9209 * linux-low.c (linux_core_of_thread): New.
9210 (compare_ints, show_process, list_threads): New.
9211 (linux_qxfer_osdata): Report threads and cores.
9212 (linux_target_op): Register linux_core_of_thread.
9213 * remote-utils.c (prepare_resume_reply): Report the core.
9214 (buffer_xml_printf): Support %d specifier.
9215 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9217 (handle_query): Handle qXfer:threads. Announce availability
9219 * target.h (struct target_ops): New field core_of_thread.
9221 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9223 * Makefile.in (clean): Remove new generated files.
9224 (reg-s390.o, reg-s390.c): Remove rules.
9225 (reg-s390x.o, reg-s390x.c): Likewise.
9226 (s390-linux32.o, s390-linux32.c): Add rules.
9227 (s390-linux64.o, s390-linux64.c): Likewise.
9228 (s390x-linux64.o, s390x-linux64.c): Likewise.
9229 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9230 * linux-s390-low.c: Include <elf.h>.
9231 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9232 (init_registers_s390): Remove prototype.
9233 (init_registers_s390x): Likewise.
9234 (init_registers_s390_linux32): Add prototype.
9235 (init_registers_s390_linux64): Likewise.
9236 (init_registers_s390x_linux64): Likewise.
9237 (s390_num_regs_3264): New define.
9238 (s390_regmap_3264): New global variable.
9239 (s390_cannot_fetch_register): Remove obsolete check.
9240 (s390_cannot_store_register): Likewise.
9241 (s390_collect_ptrace_register): Handle upper/lower register halves.
9242 (s390_supply_ptrace_register): Likewise.
9243 (s390_fill_gregset): Update to register number changes.
9244 (s390_get_hwcap): New routine.
9245 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9246 Install appropriate regmap and register set.
9248 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9250 * server.c (gdbserver_version): Update copyright year to 2010.
9251 * gdbreplay.c (gdbreplay_version): Likewise.
9253 2009-12-28 Doug Evans <dje@google.com>
9255 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9256 elf/external.h. Include <elf.h> instead but only if necessary.
9258 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9260 * linux-low.c (linux_remove_process): Remove `detaching'
9261 parameter. Don't release/detach from thread_db here.
9262 (linux_kill): Release/detach from thread_db here, ...
9263 (linux_detach): ... and here, before actually detaching.
9264 (linux_wait_1): ... and here, when a process exits.
9265 * thread-db.c (any_thread_of): New.
9266 (thread_db_free): Switch the current inferior to a thread of the
9269 2009-12-21 Doug Evans <dje@google.com>
9271 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9273 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9274 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9275 warning ifndef __NR_tkill. Move setting of errno there too.
9276 Delete unnecessary resetting of errno after syscall.
9277 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9279 * configure.ac: Check for dladdr.
9280 * config.in: Regenerate.
9281 * configure: Regenerate.
9282 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9283 (try_thread_db_load): Update.
9285 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9287 2009-12-18 Doug Evans <dje@google.com>
9289 * event-loop.c: Include unistd.h if it exists.
9291 * linux-low.c (my_waitpid): Move definition away from being in
9292 between linux_tracefork_child/linux_test_for_tracefork.
9294 * gdb_proc_service.h (psaddr_t): Fix type.
9295 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9296 signature to match glibc.
9298 2009-12-16 Doug Evans <dje@google.com>
9300 * linux-low.c (linux_read_memory): Fix argument to read.
9302 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9304 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9305 events, don't leave current_inferior pointing at null.
9307 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9309 * win32-low.c (LOG): Delete.
9310 (OUTMSG): Output to stderr.
9311 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9312 on compile time LOG macro.
9313 (win32_wait): Fix debug output.
9315 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9317 * win32-low.c (win32_add_one_solib): If the dll name is
9318 "ntdll.dll", prepend the system directory to the dll path.
9320 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9322 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9324 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9325 Vladimir Prus <vladimir@codesourcery.com>
9327 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9328 * configure.ac: Check for __mcoldfire__ and set
9329 gdb_cv_m68k_is_coldfire.
9330 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9331 reg-cf.o and reg-m68k.o.
9332 * configure: Regenerated.
9334 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9336 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9337 Pass it to thread_db_free.
9338 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9339 proper `detaching' argument to linux_remove_process.
9340 * linux-low.h (thread_db_free): Add `detaching' parameter.
9341 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9343 (thread_db_free): Add `detaching' parameter. Only
9344 call td_ta_clear_event if detaching from process.
9346 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9348 * thread-db.c (thread_db_free): Fix typo.
9350 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9353 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9355 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9357 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9358 with an i686 compiler.
9359 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9361 * configure: Rebuilt.
9363 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9367 * server.c (handle_search_memory_1): Correct read_addr initialization
9368 in loop for searching subsequent chunks.
9370 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9372 * configure.ac: New --with-libthread-db option.
9373 * thread-db.c: Allow direct dependence on libthread_db.
9374 (thread_db_free): Adjust.
9375 * config.in: Regenerate.
9376 * configure: Likewise.
9378 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9381 * thread-db.c (attach_thread): New function.
9382 (maybe_attach_thread): Return success/failure.
9383 (find_new_threads_callback): Adjust.
9384 (thread_db_find_new_threads): Loop until no new threads.
9386 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9388 * proc-service.c (ps_lgetregs): Formatting.
9390 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9392 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9393 * configure.ac: Adjust.
9394 * linux-low.h (struct process_info_private): Move members to struct
9396 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9397 * linux-low.c (linux_remove_process): Adjust.
9398 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9399 * server.c (handle_query): Move code ...
9400 (handle_monitor_command): ... here. New function.
9401 * target.h (struct target_ops): New member.
9402 * thread-db.c (struct thread_db): New.
9403 (libthread_db_search_path): New variable.
9404 (thread_db_create_event, thread_db_enable_reporting)
9405 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9406 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9407 (try_thread_db_load_1, dladdr_to_soname): New functions.
9408 (try_thread_db_load, thread_db_load_search): New functions.
9409 (thread_db_init): Search for libthread_db.
9410 (thread_db_free): New function.
9411 (thread_db_handle_monitor_command): Likewise.
9412 * config.in: Regenerate.
9413 * configure: Regenerate.
9415 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9417 * spu-low.c (spu_kill): Wait for inferior to terminate.
9418 Call clear_inferiors.
9419 (spu_detach): Call clear_inferiors.
9421 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9423 * aclocal.m4: Regenerate.
9424 * config.in: Likewise.
9425 * configure: Likewise.
9427 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9429 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9430 (parse_spufs_run): New function.
9431 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9432 (ppc_breakpoint_at): Handle SPU breakpoints.
9434 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9436 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9437 (SPUFS_MAGIC): Define.
9438 (spu_enumerate_spu_ids): New function.
9439 (linux_qxfer_spu): New function.
9440 (linux_target_ops): Install linux_qxfer_spu.
9442 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9444 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9445 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9446 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9447 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9448 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9449 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9450 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9451 (init_registers_powerpc_cell32l): Add prototype.
9452 (init_registers_powerpc_cell64l): Likewise.
9453 (ppc_arch_setup): Detect Cell/B.E. architecture.
9455 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9457 * Makefile.in (datarootdir): New variable.
9459 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9461 * linux-low.c (linux_write_memory): Update debugging output.
9462 * Makefile.in (clean): Add new descriptions.
9463 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9464 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9465 * configure.srv: Add new files for arm*-*-linux*.
9466 * linux-arm-low.c: Add new declarations.
9467 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9468 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9469 (HWCAP_VFPv3D16): New.
9470 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9471 instead of __IWMMXT__.
9472 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9473 (arm_arch_setup): New.
9474 (target_regsets): Remove #ifdef. Add VFP regset.
9475 (the_low_target): Use arm_arch_setup.
9477 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9479 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9480 the main thread again.
9482 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9484 Adding Neutrino gdbserver.
9485 * configure: Regenerated.
9486 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9487 * configure.srv (i[34567]86-*-nto*): New target.
9488 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9489 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9490 (nto_comctrl) [__QNX__]: New function.
9491 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9493 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9495 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9498 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9499 Pedro Alves <pedro@codesourcery.com>
9501 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9502 don't support CONTEXT_EXTENDED_REGISTERS.
9503 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9504 (the_low_target): Install them.
9505 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9506 failing with ERROR_PIPE_NOT_CONNECTED.
9508 2009-06-30 Doug Evans <dje@google.com>
9509 Pierre Muller <muller@ics.u-strasbg.fr>
9511 Add h/w watchpoint support to x86-linux, win32-i386.
9512 * Makefile.in (SFILES): Add i386-low.c
9513 (i386_low_h): Define.
9514 (i386-low.o): Add dependencies.
9515 (linux-x86-low.o): Add i386-low.h dependency.
9516 (win32-i386-low.o): Ditto.
9517 * i386-low.c: New file.
9518 * i386-low.h: New file.
9519 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9520 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9521 * linux-low.c (linux_add_process): Initialize arch_private.
9522 (linux_remove_process): Free arch_private.
9523 (add_lwp): Initialize arch_private.
9524 (delete_lwp): Free arch_private.
9525 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9527 * linux-low.h (process_info_private): New member arch_private.
9528 (lwp_info): New member arch_private.
9529 (linux_target_ops): New members new_process, new_thread,
9531 (ptid_of): New macro.
9532 * linux-x86-low.c: Include stddef.h, i386-low.h.
9533 (arch_process_info): New struct.
9534 (arch_lwp_info): New struct.
9535 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9536 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9537 (i386_dr_low_get_status): New function.
9538 (x86_insert_point, x86_remove_point): New functions.
9539 (x86_stopped_by_watchpoint): New function.
9540 (x86_stopped_data_address): New function.
9541 (x86_linux_new_process, x86_linux_new_thread): New functions.
9542 (x86_linux_prepare_to_resume): New function.
9543 (the_low_target): Add entries for insert_point, remove_point,
9544 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9546 * server.c (debug_hw_points): New global.
9547 (monitor_show_help): Document set debug-hw-points.
9548 (handle_query): Process "set debug-hw-points".
9549 * server.h (debug_hw_points): Declare.
9550 (paddress): Declare.
9551 * utils.c (NUMCELLS, CELLSIZE): New macros.
9552 (get_sell, xsnprintf, paddress): New functions.
9553 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9554 remove_point, stopped_by_watchpoint, stopped_data_address.
9555 * win32-i386-low.c: Include i386-low.h.
9556 (debug_reg_state): Replaces dr.
9557 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9558 (i386_dr_low_get_status): New function.
9559 (i386_insert_point, i386_remove_point): New functions.
9560 (i386_stopped_by_watchpoint): New function.
9561 (i386_stopped_data_address): New function.
9562 (i386_initial_stuff): Update.
9563 (get_thread_context,set_thread_context,i386_thread_added): Update.
9564 (the_low_target): Add entries for insert_point,
9565 remove_point, stopped_by_watchpoint, stopped_data_address.
9566 * win32-low.c (win32_insert_watchpoint): New function.
9567 (win32_remove_watchpoint): New function.
9568 (win32_stopped_by_watchpoint): New function.
9569 (win32_stopped_data_address): New function.
9570 (win32_target_ops): Add entries for insert_watchpoint,
9571 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9572 * win32-low.h (win32_target_ops): New members insert_point,
9573 remove_point, stopped_by_watchpoint, stopped_data_address.
9575 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9577 * server.c (process_serial_event): Re-return unsupported, not
9578 error, if the type isn't recognized. Re-allow supporting only
9579 insert or remove packets. Also call require_running for
9580 breakpoints. Add missing break statement to default case. Tidy.
9581 * target.h (struct target_ops): Rename insert_watchpoint to
9582 insert_point, and remove_watchpoint to remove_point.
9584 * linux-low.h (struct linux_target_ops): Likewise.
9585 * linux-low.c (linux_insert_watchpoint): Rename to ...
9586 (linux_insert_point): ... this. Adjust.
9587 (linux_remove_watchpoint): Rename to ...
9588 (linux_remove_point): ... this. Adjust.
9589 (linux_target_ops): Adjust.
9590 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9591 (cris_insert_point): ... this.
9592 (cris_remove_watchpoint): Rename to ...
9593 (cris_remove_point): ... this.
9594 (the_low_target): Adjust.
9596 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9598 * server.c (handle_v_kill): Pass signal_pid to
9599 kill_inferior if multi_process is zero.
9601 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9603 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9604 * target.h (target_ops): Comment for *_watchpoint to make it clear
9605 the functions can get types '0' and '1'.
9607 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9609 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9610 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9611 * regcache.c (get_regcache): Likewise.
9612 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9613 * win32-low.c (child_fetch_inferior_registers): Remove check for
9616 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9617 Pedro Alves <pedro@codesourcery.com>
9619 * target.h (struct target_ops) <supports_multi_process>: New
9621 (target_supports_multi_process): New.
9622 * server.c (handle_query): Even if GDB reports support, only
9623 enable multi-process if the target also supports it. Report
9624 multi-process support only if the target backend supports it.
9625 * linux-low.c (linux_supports_multi_process): New function.
9626 (linux_target_ops): Install it as target_supports_multi_process
9629 2009-05-24 Doug Evans <dje@google.com>
9631 Global renaming of find_thread_pid to find_thread_ptid.
9632 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9633 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9634 All callers updated.
9636 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9637 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9640 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9641 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9642 (linux_resume_one_lwp): Ditto.
9644 2009-05-23 Doug Evans <dje@google.com>
9646 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9647 from struct inferior_list_entry * to struct lwp_info *.
9648 All callers updated.
9650 2009-05-13 Doug Evans <dje@google.com>
9652 * linux-x86-low.c: Don't include assert.h.
9653 (x86_siginfo_fixup): Use fatal, not assert.
9654 (x86_arch_setup): Fix comment.
9656 2009-05-12 Doug Evans <dje@google.com>
9658 Biarch support for i386/amd64 gdbserver.
9659 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9660 Add linux-x86-low.c.
9661 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9662 (linux-x86-low.o): Add.
9663 * linux-x86-64-low.c: Delete.
9664 * linux-i386-low.c: Delete.
9665 * linux-x86-low.c: New file.
9666 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9668 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9670 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9671 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9672 (linux_child_pid_to_exec_file): New function.
9673 (elf_64_header_p, elf_64_file_p): New functions.
9674 (siginfo_fixup): New function.
9675 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9676 give target a chance to convert layout.
9677 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9678 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9680 2009-05-07 Doug Evans <dje@google.com>
9682 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9683 (regsets_store_inferior_registers): Ditto.
9685 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9689 * linux-low.c (must_set_ptrace_flags): Delete.
9690 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9692 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9693 `lwp->must_set_ptrace_flags' instead.
9694 (linux_wait_for_event_1): Set ptrace options here.
9695 (linux_wait_1): ... not here.
9697 2009-04-30 Doug Evans <dje@google.com>
9699 * inferiors.c (started_inferior_callback): New function.
9700 (attached_inferior_callback): New function.
9701 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9702 * server.c (print_started_pid, print_attached_pid): New functions.
9703 (detach_or_kill_for_exit): New function.
9704 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9705 * server.h (have_started_inferiors_p): Declare.
9706 (have_attached_inferiors_p): Declare.
9708 * inferiors.c (remove_process): Fix memory leak, free process.
9709 * linux-low.c (linux_remove_process): New function.
9710 (linux_kill): Call it instead of remove_process.
9711 (linux_detach, linux_wait_1): Ditto.
9713 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9715 * configure.srv: Add x86 Windows CE target.
9717 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9719 * inferiors.c (get_thread_process): Make global.
9720 * server.h (get_thread_process): Add prototype.
9721 * thread-db.c (find_one_thread): Use get_thread_process
9722 instead of current_process.
9723 (thread_db_get_tls_address): Do not crash if called when
9724 thread layer is not yet initialized.
9726 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9728 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9729 * spu-low.c (current_tid): Rename to ...
9730 (current_ptid): ... this.
9731 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9732 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9733 ptid_get_lwp (current_ptid) instead of current_tid.
9734 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9735 instead of current_tid. Use find_process_pid to verify pid
9736 argument is valid. Pass proper argument to remove_process.
9737 (spu_thread_alive): Compare current_ptid instead of current_tid.
9738 (spu_resume): Likewise.
9740 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9742 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9745 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9747 Implement the multiprocess extensions, and add linux multiprocess
9750 * server.h (ULONGEST): Declare.
9751 (struct ptid, ptid_t): New.
9752 (minus_one_ptid, null_ptid): Declare.
9753 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9754 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9755 (struct inferior_list_entry): Change `id' type from unsigned from
9757 (struct sym_cache, struct breakpoint, struct
9758 process_info_private): Forward declare.
9759 (struct process_info): Declare.
9760 (current_process): Declare.
9761 (all_processes): Declare.
9762 (initialize_inferiors): Declare.
9763 (add_thread): Adjust to use ptid_t.
9764 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9765 (add_process, remove_process, find_thread_pid): Declare.
9766 (find_inferior_id): Adjust to use ptid_t.
9767 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9768 (multi_process): Declare.
9769 (push_event): Adjust to use ptid_t.
9770 (read_ptid, write_ptid): Declare.
9771 (prepare_resume_reply): Adjust to use ptid_t.
9772 (clear_symbol_cache): Declare.
9773 * inferiors.c (all_processes): New.
9774 (null_ptid, minus_one_ptid): New.
9775 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9776 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9777 (add_thread): Change unsigned long to ptid. Remove gdb_id
9779 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9780 (gdb_id_to_thread): Rename to ...
9781 (find_thread_pid): ... this. Change unsigned long to ptid.
9782 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9783 (loaded_dll, pull_pid_from_list): Adjust.
9784 (add_process, remove_process, find_process_pid)
9785 (get_thread_process, current_process, initialize_inferiors): New.
9786 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9787 (struct target_waitstatus) <related_pid>: Ditto.
9788 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9790 (struct target_ops) <join>: Add `pid' argument.
9791 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9792 (struct target_ops) <wait>: Add `ptid' field. Change return type
9794 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9795 (mywait): Add `ptid' argument. Change return type to ptid_t.
9796 (target_pid_to_str): Declare.
9797 * target.c (set_desired_inferior): Adjust to use ptids.
9798 (mywait): Add new `ptid' argument. Adjust.
9799 (target_pid_to_str): New.
9800 * mem-break.h (free_all_breakpoints): Declare.
9801 * mem-break.c (breakpoints): Delelete.
9802 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9803 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9804 to use per-process breakpoint list.
9805 (free_all_breakpoints): New.
9806 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9807 (symbol_cache, all_symbols_looked_up): Delete.
9809 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9811 (prepare_resume_reply): Change ptid argument's type from unsigned
9812 long to ptid_t. Adjust. Implement W;process and X;process.
9813 (free_sym_cache, clear_symbol_cache): New.
9814 (look_up_one_symbol): Adjust to per-process symbol cache. *
9815 * server.c (cont_thread, general_thread, step_thread): Change type
9818 (multi_process): New.
9819 (last_ptid): Change type to ptid_t.
9820 (struct vstop_notif) <ptid>: Change type to ptid_t.
9821 (queue_stop_reply, push_event): Change `ptid' argument's type to
9823 (discard_queued_stop_replies): Add `pid' argument.
9824 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9825 changes. Don't reference the `attached' global.
9826 (attach_inferior): Adjust to mywait interface changes.
9827 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9828 features. Handle and report "multiprocess+". Handle
9830 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9832 (handle_v_kill): New.
9833 (handle_v_stopped): Adjust to use target_pid_to_str.
9834 (handle_v_requests): Allow multiple attaches and runs when
9835 multiprocess extensions are in effect. Handle "vKill".
9836 (myresume): Adjust to use ptids.
9837 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9838 (handle_status): Adjust to discard_queued_stop_replies interface
9840 (first_thread_of, kill_inferior_callback)
9841 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9842 (main): Call initialize_inferiors. Adjust to use ptids, killing
9843 and detaching from all inferiors. Handle multiprocess packet
9845 * linux-low.h: Include gdb_proc_service.h.
9846 (struct process_info_private): New.
9847 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9848 <lwpid_of>: Use ptid_get_lwp.
9849 (get_lwp_thread): Adjust.
9850 (struct lwp_info): Add `dead' member.
9851 (find_lwp_pid): Declare.
9852 * linux-low.c (thread_db_active): Delete.
9853 (new_inferior): Adjust comment.
9854 (inferior_pid): Delete.
9855 (linux_add_process): New.
9856 (handle_extended_wait): Adjust.
9857 (add_lwp): Change unsigned long to ptid.
9858 (linux_create_inferior): Add process to processes table. Adjust
9859 to use ptids. Don't set new_inferior here.
9860 (linux_attach_lwp): Rename to ...
9861 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9862 it. Adjust to use ptids.
9863 (linux_attach_lwp): New.
9864 (linux_attach): Add process to processes table. Don't set
9866 (struct counter): New.
9867 (second_thread_of_pid_p, last_thread_of_process_p): New.
9868 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9870 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9871 processes. Remove process from process table.
9872 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9873 to multiple processes.
9874 (any_thread_of): New.
9875 (linux_detach): Add `pid' argument, and handle it. Remove process
9876 from processes table.
9877 (linux_join): Add `pid' argument. Handle it.
9878 (linux_thread_alive): Change unsighed long argument to ptid_t.
9879 Consider dead lwps as not being alive.
9880 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9881 threads we're not interested in.
9882 (same_lwp, find_lwp_pid): New.
9883 (linux_wait_for_lwp): Change `pid' argument's type from int to
9885 (linux_wait_for_event): Rename to ...
9886 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9887 from int to ptid_t. Adjust.
9888 (linux_wait_for_event): New.
9889 (linux_wait_1): Add `ptid' argument. Change return type to
9890 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9891 that exit from the process table.
9892 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9894 (mark_lwp_dead): New.
9895 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9896 stopping all threads, mark its main lwp as dead.
9897 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9899 (fetch_register, usr_store_inferior_registers)
9900 (regsets_fetch_inferior_registers)
9901 (regsets_store_inferior_registers, linux_read_memory)
9902 (linux_write_memory): Inline `inferior_pid'.
9903 (linux_look_up_symbols): Adjust to use per-process
9905 (linux_request_interrupt): Adjust to use ptids.
9906 (linux_read_auxv): Inline `inferior_pid'.
9907 (initialize_low): Don't reference thread_db_active.
9908 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9909 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9910 (ps_getpid): Return the pid of the current inferior.
9911 * thread-db.c (proc_handle, thread_agent): Delete.
9912 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9914 (find_one_thread): Change argument type to ptid_t. Adjust to
9916 (maybe_attach_thread): Adjust to per-process data and ptids.
9917 (thread_db_find_new_threads): Ditto.
9918 (thread_db_init): Ditto.
9919 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9920 processes table. Adjust to use ptids.
9921 (spu_kill, spu_detach): Adjust interface. Remove process from
9923 (spu_join, spu_thread_alive): Adjust interface.
9924 (spu_wait): Adjust interface. Remove process from processes
9925 table. Adjust to use ptids.
9926 * win32-low.c (current_inferior_tid): Delete.
9927 (current_inferior_ptid): New.
9928 (debug_event_ptid): New.
9929 (thread_rec): Take a ptid. Adjust.
9930 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9931 (child_delete_thread): Ditto.
9932 (do_initial_child_stuff): Add `attached' argument. Add process to
9934 (child_fetch_inferior_registers, child_store_inferior_registers):
9936 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9937 (win32_attach): Pass 1 to do_initial_child_stuff.
9938 (win32_kill): Adjust interface. Remove process from processes
9940 (win32_detach): Ditto.
9941 (win32_join): Adjust interface.
9942 (win32_thread_alive): Take a ptid.
9943 (win32_resume): Adjust to use ptids.
9944 (get_child_debug_event): Ditto.
9945 (win32_wait): Adjust interface. Remove exiting process from
9948 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9950 Non-stop mode support.
9952 * server.h (non_stop): Declare.
9953 (gdb_client_data, handler_func): Declare.
9954 (delete_file_handler, add_file_handler, start_event_loop):
9956 (handle_serial_event, handle_target_event, push_event)
9957 (putpkt_notif): Declare.
9958 * target.h (enum resume_kind): New.
9959 (struct thread_resume): Replace `step' field by `kind' field.
9960 (TARGET_WNOHANG): Define.
9961 (struct target_ops) <wait>: Add `options' argument.
9962 <supports_non_stop, async, start_non_stop>: New fields.
9963 (target_supports_non_stop, target_async): New.
9964 (start_non_stop): Declare.
9965 (mywait): Add `options' argument.
9966 * target.c (mywait): Add `options' argument. Print child exit
9968 (start_non_stop): New.
9969 * server.c (non_stop, own_buf, mem_buf): New globals.
9970 (struct vstop_notif): New.
9971 (notif_queue): New global.
9972 (queue_stop_reply, push_event, discard_queued_stop_replies)
9973 (send_next_stop_reply): New.
9974 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9976 (attach_inferior): In non-stop mode, don't wait for the target
9978 (handle_general_set): Handle QNonStop.
9979 (handle_query): When handling qC, return the current general
9980 thread, instead of the first thread of the list.
9981 (handle_query): If the backend supports non-stop mode, include
9982 QNonStop+ in the qSupported query response.
9983 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9985 (handle_v_attach, handle_v_run): Handle non-stop mode.
9986 (handle_v_stopped): New.
9987 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9988 (myresume): Adjust to use resume_kind. Handle non-stop.
9989 (queue_stop_reply_callback): New.
9990 (handle_status): Handle non-stop mode.
9991 (main): Clear non_stop flag on reconnection. Use the event-loop.
9992 Refactor serial protocol handling from here ...
9993 (process_serial_event): ... to this new function. When GDB
9994 selects any thread, select one here. In non-stop mode, wait until
9995 GDB acks all pending events before exiting.
9996 (handle_serial_event, handle_target_event): New.
9997 * remote-utils.c (remote_open): Install remote_desc in the event
9999 (remote_close): Remove remote_desc from the event loop.
10000 (putpkt_binary): Rename to...
10001 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10002 (putpkt_binary): New as wrapper around putpkt_binary_1.
10003 (putpkt_notif): New.
10004 (prepare_resume_reply): In non-stop mode, don't change the
10006 * event-loop.c: New.
10007 * Makefile.in (OBJ): Add event-loop.o.
10008 (event-loop.o): New rule.
10010 * linux-low.h (pid_of): Moved here.
10012 (get_lwp_thread): Use lwpid_of.
10013 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10014 * linux-low.c (pid_of): Delete.
10015 (inferior_pid): Use lwpid_of.
10016 (linux_event_pipe): New.
10017 (target_is_async_p): New.
10019 (handle_extended_wait): Use lwpid_of.
10020 (add_lwp): Don't set lwpid field.
10021 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10022 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10023 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10024 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10025 first. Adjust to linux_wait_for_event interface changes. Use
10027 (linux_detach): Don't delete the main lwp here.
10028 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10029 (status_pending_p): Don't consider explicitly suspended lwps.
10030 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10031 pointer. Add OPTIONS argument. Change return type to int. Use
10032 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10033 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10034 pointer. Add status pointer argument. Return a pid instead of a
10035 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10036 changes. In non-stop mode, don't switch to a random thread.
10037 (linux_wait): Rename to...
10038 (linux_wait_1): ... this. Add target_options argument, and handle
10039 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10040 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10041 clean exit and signal exit code. Don't stop all threads in
10042 non-stop mode. In all-stop mode, only stop all threads when
10043 reporting a stop to GDB. Handle explicit thread stop requests.
10044 (async_file_flush, async_file_mark): New.
10046 (send_sigstop): Use lwpid_of.
10047 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10048 interface changes. In non-stop mode, don't switch to a random
10050 (linux_resume_one_lwp): Use lwpid_of.
10051 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10052 (linux_resume_one_thread): ... this. Handle resume_stop. In
10053 non-stop mode, don't look for pending flag in all threads.
10054 (resume_status_pending_p): Don't consider explicitly suspended
10056 (my_waitpid): Reimplement. Emulate __WALL.
10057 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10059 (sigchld_handler, linux_supports_non_stop, linux_async)
10060 (linux_start_non_stop): New.
10061 (linux_target_ops): Register linux_supports_non_stop, linux_async
10062 and linux_start_non_stop.
10063 (initialize_low): Install SIGCHLD handler.
10064 * thread-db.c (thread_db_create_event, find_one_thread)
10065 (thread_db_get_tls_address): Use lwpid_of.
10066 * win32-low.c (win32_detach): Adjust to use resume_kind.
10067 (win32_wait): Add `options' argument.
10068 * spu-low.c (spu_resume): Adjust to use resume_kind.
10069 (spu_wait): Add `options' argument.
10071 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10073 Decouple target code from remote protocol.
10075 * target.h (enum target_waitkind): New.
10076 (struct target_waitstatus): New.
10077 (struct target_ops) <wait>: Return an unsigned long. Take a
10078 target_waitstatus pointer instead of a char pointer.
10079 (mywait): Likewise.
10080 * target.c (mywait): Change prototype to return an unsigned long.
10081 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10082 * server.h (thread_from_wait, old_thread_from_wait): Delete
10084 (prepare_resume_reply): Change prototype to take a
10086 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10087 (last_status, last_ptid): New.
10088 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10089 pid instead of a signal.
10090 (attach_inferior): Remove "status" and "signal" parameters.
10092 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10094 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10095 (handle_v_requests, myresume): Remove "status" and "signal"
10096 parameters. Adjust.
10097 (handle_status): New.
10098 (main): Delete local `status'. Adjust.
10099 * remote-utils.c: Include target.h.
10100 (prepare_resume_reply): Change prototype to take a
10101 target_waitstatus. Adjust.
10103 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10105 * spu-low.c (spu_wait): Adjust.
10106 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10108 (win32_wait): Adjust.
10110 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10112 * target.h (struct thread_resume): Delete leave_stopped member.
10113 (struct target_ops): Add a `n' argument to the `resume' callback.
10114 * server.c (start_inferior): Adjust.
10115 (handle_v_cont, myresume): Adjust.
10116 * linux-low.c (check_removed_breakpoint): Adjust to resume
10117 interface change, and to removed leave_stopped field.
10118 (resume_ptr): Delete.
10119 (struct thread_resume_array): New.
10120 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10121 resume interface change.
10122 (linux_continue_one_thread, linux_queue_one_thread)
10123 (resume_status_pending_p): Check if the resume field is NULL
10124 instead of checking the leave_stopped member.
10125 (linux_resume): Adjust to the target resume interface change.
10126 * spu-low.c (spu_resume): Adjust to the target resume interface
10128 * win32-low.c (win32_detach, win32_resume): Ditto.
10130 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10132 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10134 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10136 (linux_continue_one_thread): Only preserve the stepping flag if
10137 there's a pending breakpoint.
10139 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10141 * server.c (main): After the inferior having exited, call
10142 remote_close before exiting gdbserver.
10144 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10146 Fix size of FPSCR in Power 7 processors.
10147 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10148 (PPC_FEATURE_HAS_DFP): New #define.
10149 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10152 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10154 * server.c (handle_query) Whitespace and formatting.
10156 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10158 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10159 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10160 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10161 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10162 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10163 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10164 Makefile.in, configure.ac: Fix whitespace throughout.
10165 * configure: Regenerate.
10167 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10169 * inferiors.c (find_inferior): Make it safe for the callback
10170 function to delete the currently iterated inferior.
10172 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10174 * Makefile.in (linuw_low_h): Move higher.
10175 (thread-db.o): Depend on $(linux_low_h).
10177 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10179 Rename "process" to "lwp" throughout.
10181 * linux-low.c (all_processes): Rename to...
10182 (all_lwps): ... this.
10183 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10184 (add_process): Rename to ...
10185 (add_lwp): ... this. Adjust.
10186 (linux_create_inferior): Adjust.
10187 (linux_attach_lwp): Adjust.
10188 (linux_attach): Adjust.
10189 (linux_kill_one_process): Rename to ...
10190 (linux_kill_one_lwp): ... this. Adjust.
10191 (linux_kill): Adjust.
10192 (linux_detach_one_process): Rename to ...
10193 (linux_detach_one_lwp): ... this. Adjust.
10194 (linux_detach): Adjust.
10195 (check_removed_breakpoint): Adjust.
10196 (status_pending_p): Adjust.
10197 (linux_wait_for_process): Rename to ...
10198 (linux_wait_for_lwp): ... this. Adjust.
10199 (linux_wait_for_event): Adjust.
10200 (send_sigstop): Adjust.
10201 (wait_for_sigstop): Adjust.
10202 (stop_all_processes): Rename to ...
10203 (stop_all_lwps): ... this.
10204 (linux_resume_one_process): Rename to ...
10205 (linux_resume_one_lwp): ... this. Adjust.
10206 (linux_set_resume_request, linux_continue_one_thread)
10207 (linux_queue_one_thread, resume_status_pending_p)
10208 (usr_store_inferior_registers, regsets_store_inferior_registers)
10209 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10211 * linux-low.h (get_process): Rename to ...
10212 (get_lwp): ... this. Adjust.
10213 (get_thread_process): Rename to ...
10214 (get_thread_lwp): ... this. Adjust.
10215 (get_process_thread): Rename to ...
10216 (get_lwp_thread): ... this. Adjust.
10217 (struct process_info): Rename to ...
10218 (struct lwp_info): ... this.
10219 (all_processes): Rename to ...
10220 (all_lwps): ... this.
10221 * proc-service.c (ps_lgetregs): Adjust.
10222 * thread-db.c (thread_db_create_event, find_one_thread)
10223 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10225 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10227 * server.c (handle_query): Handle "qAttached".
10229 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10231 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10232 GPLv3, update license URL.
10234 2009-03-01 Doug Evans <dje@google.com>
10236 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10237 (server_h): Add gdb_signals.h.
10238 (signals.o): Update.
10239 * server.h (target_signal_from_host,target_signal_to_host_p)
10240 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10242 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10244 * remote-utils.c (getpkt): Also generate remote-debug
10245 information if noack_mode is set.
10247 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10249 * server.c (handle_query): Report qXfer:siginfo:read and
10250 qXfer:siginfo:write as supported and handle them.
10251 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10252 * linux-low.c (linux_xfer_siginfo): New.
10253 (linux_target_ops): Set it.
10255 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10257 * server.c (gdbserver_usage): Mention --remote-debug.
10258 (main): Accept '--remote-debug' switch.
10260 2009-01-18 Doug Evans <dje@google.com>
10262 * regcache.c (new_register_cache): No need to check result of xcalloc.
10263 * server.c (handle_search_memory): Back out calls to xmalloc,
10264 result is checked and error is returned to user upon failure.
10265 (handle_query): Ditto. Add more checks for result of malloc.
10266 (handle_v_cont): Check result of malloc, report error back to
10268 (handle_v_run): Ditto. Call freeargv.
10269 * server.h (freeargv): Declare.
10270 * utils.c (freeargv): New fn.
10272 2009-01-15 Doug Evans <dje@google.com>
10274 * gdbreplay.c (perror_with_name): Make arg const char *.
10275 * server.h (target_signal_to_name): Make return type const char *.
10276 * thread-db.c (thread_db_err_str): Make return type const char *.
10277 * utils.c (perror_with_name): Make arg const char *.
10279 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10281 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10282 when handling a EXIT_PROCESS_DEBUG_EVENT.
10284 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10286 * gdbreplay.c (gdbreplay_version): Update copyright year.
10287 * server.c (gdbserver_version): Likewise.
10289 2009-01-05 Doug Evans <dje@google.com>
10291 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10292 (handle_extended_wait): Improve comment.
10294 2008-12-13 Doug Evans <dje@google.com>
10296 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10297 * server.h (ATTR_MALLOC): New macro.
10298 (xmalloc,xcalloc,xstrdup): Declare.
10299 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10300 * inferiors.c: Ditto.
10301 * linux-low.c: Ditto.
10302 * mem-break.c: Ditto.
10303 * regcache.c: Ditto.
10304 * remote-utils.c: Ditto.
10307 * win32-low.c: Ditto.
10309 2008-12-12 Doug Evans <dje@google.com>
10311 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10312 in debugging printf.
10314 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10316 2008-12-09 Doug Evans <dje@google.com>
10318 * linux-low.h (struct process_info): Delete member tid, unused.
10319 * thread-db.c (find_one_thread): Update.
10320 (maybe_attach_thread): Update.
10322 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10324 * target.h (struct target_ops): Add qxfer_osdata member.
10325 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10327 (linux_qxfer_osdata): New functions.
10328 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10330 * server.c (handle_query): Handle "qXfer:osdata:read:".
10331 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10332 (buffer_xml_printf): New functions.
10333 * server.h (struct buffer): New.
10334 (buffer_grow_str, buffer_grow_str0): New macros.
10335 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10336 (buffer_xml_printf): Declare.
10338 2008-11-24 Doug Evans <dje@google.com>
10340 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10342 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10344 * server.c (handle_v_run): Always use the supplied argument list.
10346 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10348 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10349 (xtensa_regmap_table): Add entry for scompare1.
10351 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10353 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10354 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10355 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10356 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10357 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10358 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10359 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10360 XML target descriptions.
10361 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10362 when inferior is running on an ISA 2.05 or later processor. Add
10363 special case to return offset for full 64-bit slot of FPSCR when
10366 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10368 * Makefile.in (SFILES, clean): Added sparc64 files.
10369 (reg-sparc64.o, reg-sparc64.c): New.
10370 * configure.srv (sparc*-*-linux*): New configuration.
10371 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10372 syscall arguments for SPARC.
10373 (regsets_store_inferior_registers): Likewise.
10374 * linux-sparc-low.c: New file.
10376 2008-10-21 Doug Evans <dje@google.com>
10378 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10379 (READLINE_DIR,READLINE_DEP): Delete.
10380 (INTERNAL_CFLAGS): Update.
10381 (LINTFLAGS): Update.
10383 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10385 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10386 whole argv from the last run, not just argv[0].
10388 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10390 * regcache.c (new_register_cache): Return NULL if the register
10391 cache size isn't known yet.
10392 (free_register_cache): Avoid dereferencing a NULL regcache.
10394 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10396 * configure.srv: Merge MIPS and MIPS64.
10398 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10400 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10402 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10404 * Makefile.in: Add required vsx dependencies.
10406 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10407 Declare init_registers_powerpc_vsx32l.
10408 Declare init_registers_powerpc_vsx64l.
10409 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10410 (ppc_arch_setup): Check for VSX in hwcap.
10411 (ppc_fill_vsxregset): New function.
10412 (ppc_store_vsxregset): New function.
10413 Add new VSX entry in regset_info target_regsets.
10415 * configure.srv: Add new VSX dependencies.
10417 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10419 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10420 (remote_open): Set or clear transport_is_reliable.
10421 (putpkt_binary): Don't expect acks in noack mode.
10422 (getpkt): Don't send ack/nac in noack mode.
10423 * server.c (handle_general_set): Handle QStartNoAckMode.
10424 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10426 (main): Reset noack_mode on every connection.
10427 * server.h (noack_mode): Declare.
10429 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10431 * Makefile.in (GDBREPLAY_OBS): New variable.
10432 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10434 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10435 Daniel Jacobowitz <dan@codesourcery.com>
10437 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10438 (usr_store_inferior_registers): Likewise.
10439 (regsets_store_inferior_registers): Likewise.
10441 2008-07-31 Rolf Jansen <rj@surtec.com>
10442 Pedro Alves <pedro@codesourcery.com>
10444 * configure.ac: Check for memmem declaration.
10445 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10446 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10447 (disable_packet_qfThreadInfo): Unconditionally compile.
10448 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10449 * configure, config.in: Regenerate.
10451 2008-07-28 Doug Kwan <dougkwan@google.com>
10453 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10454 (linux_write_memory): Remove declaration of errno.
10456 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10458 * linux-low.c (handle_extended_wait): Do not use "status"
10459 variable uninitialized.
10461 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10463 * server.c (handle_v_attach): Inhibit reporting dll changes.
10465 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10467 * remote-utils.c (prepare_resume_reply): If requested, don't
10468 output "thread:TID" in the T stop reply.
10470 * server.c (disable_packet_vCont, disable_packet_Tthread)
10471 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10472 (handle_query): If requested, disable support for qC, qfThreadInfo
10474 (handle_v_requests): If requested, disable support for vCont.
10475 (gdbserver_show_disableable): New.
10476 (main): Handle --disable-packet and --disable-packet=LIST.
10478 * server.h (disable_packet_vCont, disable_packet_Tthread)
10479 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10481 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10483 * server.c (gdbserver_usage): Mention --version.
10485 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10487 * Makefile.in (gdbreplay.o): New rule.
10489 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10491 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10492 message, not gdbserver.
10494 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10495 Nathan Sidwell <nathan@codesourcery.com>
10496 Joseph Myers <joseph@codesourcery.com>
10498 * acinclude.m4: Include ../../config/acx.m4.
10499 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10500 * configure, config.in: Regenerate.
10501 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10502 * server.c (gdbserver_version): Print PKGVERSION.
10503 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10504 (main): Adjust gdbserver_usage calls.
10505 * gdbreplay.c (version, host_name): Add declarations.
10506 (gdbreplay_version, gdbreplay_usage): New.
10507 (main): Accept --version and --help options.
10509 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10511 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10512 (arm_breakpoint_at): Handle Thumb.
10513 (the_low_target): Add comment.
10515 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10517 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10519 2008-05-09 Doug Evans <dje@google.com>
10521 * server.h (decode_search_memory_packet): Declare.
10522 * remote-utils.c (decode_search_memory_packet): New fn.
10523 * server.c (handle_search_memory_1): New fn.
10524 (handle_search_memory): New fn.
10525 (handle_query): Process qSearch:memory packets.
10527 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10529 * regcache.c (registers_length): Remove.
10530 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10531 full register packet.
10532 * regcache.h (registers_length): Remove prototype.
10533 * server.h (PBUFSIZ): Define to 16384.
10535 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10537 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10538 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10539 powerpc-64l.o, and powerpc-altivec64l.o.
10540 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10541 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10542 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10543 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10544 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10547 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10548 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10549 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10550 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10551 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10552 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10553 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10554 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10555 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10556 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10559 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10560 (init_registers_powerpc_32l): ... this new prototype.
10561 (init_registers_powerpc_32): Remove, replace by ...
10562 (init_registers_powerpc_altivec32l): ... this new prototype.
10563 (init_registers_powerpc_e500): Remove, replace by ...
10564 (init_registers_powerpc_e500l): ... this new prototype.
10565 (init_registers_ppc64): Remove, replace by ...
10566 (init_registers_powerpc_64l): ... this new prototype.
10567 (init_registers_powerpc_64): Remove, replace by ...
10568 (init_registers_powerpc_altivec64l): ... this new prototype.
10569 (ppc_num_regs): Set to 73.
10570 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10571 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10572 (ppc_cannot_store_register): Handle orig_r3 and trap.
10573 (ppc_arch_setup): Update init_registers_... calls.
10574 (ppc_fill_gregset): Handle orig_r3 and trap.
10576 * inferiors.c (clear_inferiors): Reset current_inferior.
10578 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10580 * acinclude.m4: Add override.m4.
10581 * configure: Regenerate.
10583 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10585 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10586 initial call to init_register_ppc64.
10588 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10590 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10591 single powerpc*-*-linux* case.
10592 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10594 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10596 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10597 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10599 * linux-ppc-low.c: Include <elf.h>.
10600 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10601 (ppc_hwcap): New global variable.
10602 (ppc_regmap): Remove __SPE__ #ifdef sections.
10603 (ppc_regmap_e500): New global variable.
10604 (ppc_cannot_store_register): Update __SPE__ special case.
10605 (ppc_get_hwcap): New function.
10606 (ppc_arch_setup): Use it to determine whether inferior supports
10607 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10608 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10609 Do not access registers if target does not support AltiVec.
10610 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10611 Do not access registers if target does not support SPE.
10612 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10614 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10616 * linux-low.c (disabled_regsets, num_regsets): New.
10617 (use_regsets_p): Delete.
10618 (linux_wait_for_process): Clear disabled_regsets.
10619 (regsets_fetch_inferior_registers): Check and set it.
10620 (regsets_store_inferior_registers): Likewise.
10621 (linux_fetch_registers, linux_store_registers): Do not use
10623 (initialize_low): Allocate disabled_regsets.
10625 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10627 * Makefile.in (LIBOBJS): New.
10628 (OBS): Use LIBOBJS.
10629 (memmem.o): New rule.
10630 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10631 * configure: Regenerated.
10633 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10635 * server.c (handle_query): Never return "unsupported" for
10636 qXfer:features:read queries.
10638 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10640 * server.c (get_features_xml): Fix inverted condition.
10641 (handle_query): Always support qXfer:feature:read.
10643 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10645 * server.c (wrapper_argv): New.
10646 (start_inferior): Handle wrapper_argv. If set, expect an extra
10648 (gdbserver_usage): Document --wrapper.
10649 (main): Parse --wrapper.
10651 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10653 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10654 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10655 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10656 (ppc_set_pc): Likewise.
10657 (ppc_arch_setup): New function.
10658 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10659 of collect_register.
10660 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10662 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10664 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10665 instead of linux-ppc64-low.o.
10666 * linux-ppc64-low.c: Remove file.
10667 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10668 (linux-ppc64-low.o): Remove rule.
10670 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10671 (init_registers_powerpc_64): Likewise.
10672 (ppc_regmap): Conditionally define depending on __powerpc64__.
10673 (ppc_cannot_store_register): Do not special-case "fpscr" when
10674 compiled on __powerpc64__.
10675 (ppc_collect_ptrace_register): New function.
10676 (ppc_supply_ptrace_register): New function.
10677 (ppc_breakpoint): Change type to "unsigned int".
10678 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10679 (the_low_target): Conditionally provide initializers for the
10680 arch_setup member depending on __powerpc64__. Install
10681 collect_ptrace_register and supply_ptrace_register members.
10683 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10685 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10686 * server.c (gdbserver_xmltarget): Define.
10687 (get_features_xml): Use it to replace "target.xml" and arch_string.
10689 * configure.srv: Remove srv_xmltarget. Add XML files that were
10690 mentioned there to srv_xmlfiles instead. Remove conditional tests
10691 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10692 srv_xmlfiles and srv_regobj to include all possible choices.
10693 * configure.ac (srv_xmltarget): Remove.
10694 (srv_xmlfiles): Do not add "target.xml".
10695 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10696 checks for supplementary target information.
10697 * configure: Regenerate.
10698 * Makefile.in (XML_TARGET): Remove.
10699 (target.xml): Remove rule.
10700 (clean): Do not clean up target.xml.
10701 (.PRECIOUS): Do not mention target.xml.
10703 * target.h (struct target_ops): Remove arch_string member.
10704 * linux-low.c (linux_arch_string): Remove.
10705 (linux_target_ops): Remove arch_string initializer.
10706 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10707 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10708 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10709 * spu-low.c (spu_arch_string): Remove.
10710 (spu_target_ops): Remove arch_string initializer.
10711 * win32-low.c (win32_arch_string): Remove.
10712 (win32_target_ops): Remove arch_string initializer.
10713 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10714 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10715 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10717 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10719 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10720 by collect_ptrace_register and supply_ptrace_register hooks.
10721 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10722 instead of checking for the_low_target.left_pad_xfer.
10723 (usr_store_inferior_registers): Use collect_ptrace_register callback
10724 instead of checking for the_low_target.left_pad_xfer.
10726 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10727 (s390_supply_ptrace_register): Likewise.
10728 (s390_fill_gregset): Call s390_collect_ptrace_register.
10729 (the_low_target): Update.
10731 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10732 (ppc_supply_ptrace_register): Likewise.
10733 (the_low_target): Update.
10735 * linux-i386-low.c (the_low_target): Update.
10736 * linux-x86-64-low.c (the_low_target): Update.
10738 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10740 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10741 reg-s390.o and reg-s390x.o.
10743 * linux-low.c (new_inferior): New global variable.
10744 (linux_create_inferior, linux_attach): Set it.
10745 (linux_wait_for_process): Call the_low_target.arch_setup after the
10746 target has stopped for the first time.
10747 (initialize_low): Do not call the_low_target.arch_setup.
10749 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10750 (s390_set_pc): Likewise.
10751 (s390_arch_setup): New function.
10752 (the_low_target): Use s390_arch_setup as arch_setup routine.
10754 * regcache.c (realloc_register_cache): New function.
10755 (set_register_cache): Call it for each existing regcache.
10757 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10759 * server.h (init_registers): Remove prototype.
10761 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10762 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10763 instead of init_registers ().
10764 * linux-arm-low.c (init_registers_arm): Add prototype.
10765 (init_registers_arm_with_iwmmxt): Likewise.
10766 (the_low_target): Add initializer for arch_setup field.
10767 * linux-cris-low.c (init_registers_cris): Add prototype.
10768 (the_low_target): Add initializer for arch_setup field.
10769 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10770 (the_low_target): Add initializer for arch_setup field.
10771 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10772 (the_low_target): Add initializer for arch_setup field.
10773 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10774 (the_low_target): Add initializer for arch_setup field.
10775 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10776 (the_low_target): Add initializer for arch_setup field.
10777 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10778 (the_low_target): Add initializer for arch_setup field.
10779 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10780 (init_registers_mips64_linux): Likewise.
10781 (the_low_target): Add initializer for arch_setup field.
10782 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10783 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10784 (the_low_target): Add initializer for arch_setup field.
10785 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10786 (init_registers_powerpc_64): Likewise.
10787 (the_low_target): Add initializer for arch_setup field.
10788 * linux-s390-low.c (init_registers_s390): Add prototype.
10789 (init_registers_s390x): Likewise.
10790 (the_low_target): Add initializer for arch_setup field.
10791 * linux-sh-low.c (init_registers_sh): Add prototype.
10792 (the_low_target): Add initializer for arch_setup field.
10793 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10794 (the_low_target): Add initializer for arch_setup field.
10795 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10796 (the_low_target): Add initializer for arch_setup field.
10798 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10799 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10800 instead of init_registers ().
10801 * win32-arm-low.c (init_registers_arm): Add prototype.
10802 (the_low_target): Add initializer for arch_setup field.
10803 * win32-i386-low.c (init_registers_i386): Add prototype.
10804 (the_low_target): Add initializer for arch_setup field.
10806 * spu-low.c (init_registers_spu): Add prototype.
10807 (initialize_low): Call initialie_registers_spu () instead of
10808 initialize_registers ().
10810 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10812 * server.c (handle_v_requests): When handling the vRun and vAttach
10813 packets, if already debugging a process, don't kill it. Return an
10816 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10818 * server.c (handle_query): Correct length check.
10820 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10822 * win32-low.c (do_initial_child_stuff): Add process handle
10823 parameter. Set current_process_handle and current_process_id from the
10824 parameters. Clear globals.
10825 (win32_create_inferior): Don't set current_process_handle and
10826 current_process_id here. Instead pass them on the call to
10827 do_initial_child_stuff.
10828 (win32_attach): Likewise.
10829 (win32_clear_inferiors): New.
10830 (win32_kill): Don't close the current process handle or the
10831 current thread handle here. Instead call win32_clear_inferiors.
10832 (win32_detach): Don't open a new handle to the process. Call
10833 win32_clear_inferiors.
10834 (win32_join): Don't rely on current_process_handle; open a new
10835 handle using the process id.
10836 (win32_wait): Call win32_clear_inferiors when the inferior process
10839 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10841 * server.c (monitor_show_help): Add "exit".
10843 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10845 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10846 (clean): Add reg-xtensa.c.
10847 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10848 * configure.srv (xtensa*-*-linux*) New target.
10849 * linux-xtensa-low.c: New.
10850 * xtensa-xtregs.c: New.
10852 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10854 * hostio.c: Don't include errno.h.
10855 (errno_to_fileio_errno): Move to hostio-errno.
10856 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10857 error number outputting to the target->hostio_last_error callback.
10858 (hostio_packet_error): Use FILEIO_EINVAL directly.
10859 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10860 calls to hostio_error.
10861 * hostio-errno.c: New.
10862 * server.h (hostio_last_error_from_errno): Declare.
10863 * target.h (target_ops): Add hostio_last_error member.
10864 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10865 as hostio_last_error handler.
10866 * spu-low.c (spu_target_ops): Likewise.
10867 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10868 (wince_hostio_last_error): New functions.
10869 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10870 as hostio_last_error handler.
10871 (win32_target_ops) [!_WIN32_WCE]: Register
10872 hostio_last_error_from_errno as hostio_last_error handler.
10873 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10874 (hostio-errno.o): New rule.
10875 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10876 * configure.srv (srv_hostio_err_objs): New variable. Default to
10878 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10879 * configure: Regenerate.
10881 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10883 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10884 (linux_kill, linux_detach): Clean up the process list.
10885 * remote-utils.c (remote_open): Improve port number parsing.
10886 (putpkt_binary, input_interrupt): Only send interrupts if the target
10888 * server.c (extended_protocol): Make static.
10889 (attached): Define earlier.
10890 (exit_requested, response_needed, program_argv): New variables.
10891 (target_running): New.
10892 (start_inferior): Clear attached here.
10893 (attach_inferior): Set attached here.
10894 (require_running): Define.
10895 (handle_query): Use require_running and target_running. Implement
10897 (handle_v_attach, handle_v_run): New.
10898 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10899 (gdbserver_usage): Update.
10900 (main): Redo argument parsing. Handle --debug and --multi. Handle
10901 --attach along with other options or after the port. Save
10902 program_argv. Support no initial program. Resynchronize
10903 communication with GDB after an error. Handle "monitor exit".
10904 Use require_running and target_running. Always allow the extended
10905 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10906 restart in extended mode.
10907 * README: Refer to the GDB manual. Update --attach usage.
10909 2007-12-20 Andreas Schwab <schwab@suse.de>
10911 * linux-low.c (STACK_SIZE): Define.
10912 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10913 (linux_test_for_tracefork): Likewise.
10915 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10917 * linux-low.c (linux_wait_for_event): Update messages. Do not
10918 reinsert auto-delete breakpoints.
10919 * mem-break.c (struct breakpoint): Change return type of handler to
10921 (set_breakpoint_at): Update handler type.
10922 (reinsert_breakpoint_handler): Return 1 instead of calling
10924 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10926 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10927 * mem-break.h (set_breakpoint_at): Update handler type.
10928 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10929 * win32-low.c (auto_delete_breakpoint): New.
10930 (get_child_debug_event): Use it.
10932 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10934 * configure.ac: Check for pread and pwrite.
10935 * hostio.c (handle_pread): Fall back to lseek and read.
10936 (handle_pwrite): Fall back to lseek and write.
10937 * config.in, configure: Regenerated.
10939 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10941 * server.c (myresume): Add own_buf argument.
10942 (main): Update calls.
10944 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10946 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10947 * remote-utils.c (remote_open): Do not call disable_async_io.
10948 (block_async_io): Delete.
10949 (unblock_async_io): Make static.
10950 (initialize_async_io): New.
10951 * server.c (handle_v_cont): Handle async I/O here.
10952 (myresume): Likewise. Move other common resume tasks here...
10953 (main): ... from here. Call initialize_async_io. Disable async
10954 I/O before the main loop.
10955 * server.h (initialize_async_io): Declare.
10956 (block_async_io, unblock_async_io): Delete prototypes.
10957 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10959 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10961 * remote-utils.c (readchar): Allow binary data in received messages.
10963 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10965 * win32-low.c (attaching): New global.
10966 (win32_create_inferior): Clear the `attaching' global.
10967 (win32_attach): Set the `attaching' global.
10968 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10969 attaching. Only set a breakpoint at the entry point if not
10972 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10974 * server.c (main): Don't report dll events on the initial
10975 connection on attaches.
10977 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10979 * server.c (main): Relax numerical bases supported for the pid of
10980 the --attach command line argument.
10982 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10984 * win32-low.c (win32_attach): Call OpenProcess before
10985 DebugActiveProcess, not after. Add last error output to error
10988 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10990 * win32-low.c (win32_get_thread_context)
10991 (win32_set_thread_context): New functions.
10992 (thread_rec): Use win32_get_thread_context.
10993 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10994 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10997 2007-12-03 Leo Zayas
10998 Pedro Alves <pedro_alves@portugalmail.pt>
11000 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11002 (child_add_thread): Minor cleanup.
11003 (child_continue): Resume artificially suspended threads before
11004 calling ContinueDebugEvent.
11005 (suspend_one_thread): New.
11006 (fake_breakpoint_event): New.
11007 (get_child_debug_event): Change return type to int. Check here if
11008 gdb sent an interrupt request. If a soft interrupt was requested,
11009 fake a breakpoint event. Return 0 if there is no event to handle,
11011 (win32_wait): Don't check here if gdb sent an interrupt request.
11012 Ensure there is a valid event to handle.
11013 (win32_request_interrupt): Add soft interruption method as last
11016 2007-12-03 Leo Zayas
11017 Pedro Alves <pedro_alves@portugalmail.pt>
11019 * win32-low.h (win32_thread_info): Add descriptions to the
11020 structure members. Replace `suspend_count' counter by a
11022 * win32-low.c (thread_rec): Update condition of when to get the
11023 context from the inferior. Rely on ContextFlags being set if it
11024 has already been retrieved. Only suspend the inferior thread if
11025 we haven't already. Warn if that fails.
11026 (continue_one_thread): s/suspend_count/suspended/. Only call
11027 ResumeThread once. Warn if that fails.
11029 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11031 * win32-low.c (win32_wait): Don't read from the inferior when it
11032 has already exited.
11034 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11036 * Makefile.in (win32_low_h): New variable.
11037 (win32-low.o): Add dependency on $(win32_low_h).
11038 (win32-arm-low.o, win32-i386-low.o): New rules.
11040 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11042 * hostio.c: Correct copyright year.
11044 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11046 * Makefile.in (OBS): Add hostio.o.
11047 (hostio.o): New rule.
11048 * server.h (handle_vFile): Declare.
11049 * hostio.c: New file.
11050 * server.c (handle_v_requests): Take packet_len and new_packet_len
11051 for binary packets. Call handle_vFile.
11052 (main): Update call to handle_v_requests.
11054 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11056 * linux-low.c: Include <sched.h>.
11058 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11060 * linux-low.c (linux_tracefork_grandchild): New.
11061 (linux_tracefork_child): Use clone.
11062 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11064 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11066 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11068 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11070 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11072 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11074 * inferiors.c (change_inferior_id): Delete.
11075 (add_pid_to_list, pull_pid_from_list): New.
11076 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11077 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11078 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11079 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11080 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11081 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11082 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11083 (using_threads): Always set to 1.
11084 (handle_extended_wait): New.
11085 (add_process): Do not set TID.
11086 (linux_create_inferior): Set must_set_ptrace_flags.
11087 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11088 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11089 (linux_thread_alive): Rename TID argument to LWPID.
11090 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11091 (linux_wait_for_event): Do not use TID or check using_threads. Update
11092 call to dead_thread_notify. Call handle_extended_wait.
11093 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11094 (send_sigstop): Delete sigstop_sent.
11095 (wait_for_sigstop): Avoid TID.
11096 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11097 (linux_test_for_tracefork): New.
11098 (linux_lookup_signals): Use thread_db_active and
11099 linux_supports_tracefork_flag.
11100 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11101 * linux-low.h (get_process_thread): Avoid TID.
11102 (struct process_ifo): Move thread_known and tid to the end. Remove
11104 (linux_attach_lwp, thread_db_init): Update prototypes.
11105 * server.h (change_inferior_id): Delete prototype.
11106 (add_pid_to_list, pull_pid_from_list): New prototypes.
11107 * thread-db.c (thread_db_use_events): New.
11108 (find_first_thread): Rename to...
11109 (find_one_thread): ...this. Update callers and messages. Do not
11110 call fatal. Check thread_db_use_events. Do not call
11111 change_inferior_id or new_thread_notify.
11112 (maybe_attach_thread): Update. Do not call new_thread_notify.
11113 (thread_db_init): Set thread_db_use_events. Check use_events.
11114 * utils.c (fatal, warning): Correct message prefix.
11116 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11118 * Makefile.in (clean): Remove new files.
11119 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11120 (powerpc-64.o, powerpc-64.c): New rules.
11121 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11122 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11124 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11126 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11127 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11128 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11129 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11130 (target_regsets): Add AltiVec and SPE register sets.
11131 * configure.ac: Check for AltiVec and SPE.
11132 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11133 (ppc_fill_vrregset, ppc_store_vrregset): New.
11134 (target_regsets): Add AltiVec register set.
11135 * configure: Regenerated.
11137 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11139 * linux-low.c (O_LARGEFILE): Define.
11140 (linux_read_memory): Use /proc/PID/mem.
11141 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11142 * configure, config.in: Regenerated.
11144 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11146 * linux-low.c (linux_wait_for_event): Do not pass signals while
11149 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11151 * win32-low.c (create_process): New.
11152 (win32_create_inferior): Use create_process instead of
11153 CreateProcess. If create_process failed retry appending an ".exe"
11154 suffix. Store the GetLastError result immediatelly after
11155 create_process calls and use it on the call to error.
11157 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11159 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11161 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11163 * configure.ac: Switch license to GPLv3.
11165 2007-08-01 Michael Snyder <msnyder@access-company.com>
11167 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11169 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11171 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11173 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11174 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11175 CloseToolhelp32Snapshot.
11176 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11177 CloseToolhelp32Snapshot.
11179 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11181 * server.c (main): Check for inferior exit before main loop.
11183 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11185 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11186 instead of on tmp_desc.
11188 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11189 Daniel Jacobowitz <dan@codesourcery.com>
11191 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11192 (add_thread): Minor cleanups.
11193 (clear_inferiors): Move lower in the file. Clear the DLL
11195 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11196 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11197 (xml_escape_text): New.
11198 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11200 (handle_v_cont): Report errors.
11201 (gdbserver_version): Update.
11202 (main): Correct size of own_buf. Do not report initial DLL events.
11203 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11204 (unloaded_dll, xml_escape_text): New.
11205 * win32-low.c (enum target_waitkind): Update comments.
11206 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11207 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11208 (win32_EnumProcessModules, win32_GetModuleInformation)
11209 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11210 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11211 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11212 (win32_Module32First, win32_Module32Next, load_toolhelp)
11213 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11214 (get_child_debug_event): Handle DLL events.
11215 (win32_wait): Likewise.
11217 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11219 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11220 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11222 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11224 * win32-low.c (handle_output_debug_string): Ignore event if not
11227 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11229 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11231 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11233 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11235 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11237 * inferiors.c (change_inferior_id): Add comment.
11238 * linux-low.c (check_removed_breakpoint): Add an early
11239 prototype. Improve debug output.
11240 (linux_attach): Doc update.
11241 (linux_detach_one_process, linux_detach): Clean up before releasing
11243 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11244 * linux-low.h (struct process_info): Doc improvement.
11245 * mem-break.c (delete_all_breakpoints): New.
11246 * mem-break.h (delete_all_breakpoints): New prototype.
11247 * thread-db.c (find_first_thread): New.
11248 (thread_db_create_event): Call it instead of
11249 thread_db_find_new_threads. Clean up unused variables.
11250 (maybe_attach_thread): Remove first thread handling.
11251 (thread_db_find_new_threads): Use find_first_thread.
11252 (thread_db_get_tls_address): Likewise.
11254 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11256 * thread-db.c (thread_db_find_new_threads): Add prototype.
11257 (thread_db_create_event): Check for the main thread before adding
11259 (maybe_attach_thread): Only enable event reporting if TID == 0.
11260 (thread_db_get_tls_address): Check for new threads.
11262 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11264 * linux-low.c (linux_create_inferior): Try execv before execvp.
11265 * spu-low.c (spu_create_inferior): Likewise.
11267 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11269 * linux-low.c (linux_create_inferior): Change execv to execvp.
11270 * spu-low.c (spu_create_inferior): Likewies.
11272 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11274 * Makefile.in (clean): Clean new files instead of deleted ones.
11275 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11276 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11278 * configure.srv: Specify XML files and new regformats for MIPS and
11280 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11281 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11282 an entry for the restart register.
11283 (mips_cannot_fetch_register, mips_cannot_store_register)
11284 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11285 register names to match the XML descriptions.
11286 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11287 restart register instead of $0.
11289 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11290 Markus Deuling <deuling@de.ibm.com>
11292 * remote-utils.c (decode_xfer_write): New function.
11293 * server.h (decode_xfer_write): Add prototype.
11294 * server.c (handle_query): Add PACKET_LEN argument. Support
11295 qXfer:spu:read and qXfer:spu:write packets.
11296 (main): Pass packet_len to handle_query.
11297 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11298 * target.h (target_ops): Add qxfer_spu.
11300 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11302 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11303 accessing non-seekable spufs files.
11305 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11307 * server.c (handle_query): Add reply for qC packet.
11309 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11310 Leo Zayas <lerele@champenstudios@com>
11312 * server.h (check_remote_input_interrupt_request): New function.
11313 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11314 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11315 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11316 (check_remote_input_interrupt_request): New function.
11317 * server.h (check_remote_input_interrupt_request): Declare.
11318 * win32-low.c (winapi_DebugBreakProcess,
11319 winapi_GenerateConsoleCtrlEvent): New typedefs.
11320 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11322 (win32_wait): Check for remote interrupt request
11323 with check_remote_input_interrupt_request.
11324 (win32_request_interrupt): New function.
11325 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11327 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11329 * win32-low.c (debug_registers_changed,
11330 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11331 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11332 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11333 (thread_rec): Get context using the low target.
11334 (child_add_thread): Call thread_added on the low target,
11335 which does the same thing.
11337 (do_initial_child_stuff): Remove debug registers references.
11338 Set context using the low target. Resume threads after
11339 setting the contexts.
11340 (child_continue): Remove dead variable. Remove debug
11341 registers references.
11342 (child_fetch_inferior_registers): Go through the low target.
11343 (do_child_store_inferior_registers): Remove.
11344 (child_store_inferior_registers): Go through the low target.
11345 (win32_resume): Remove debug registers references.
11346 Set context using the low target.
11347 (handle_exception): Change return type to void. Don't record
11348 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11349 first chance exception.
11350 (get_child_debug_event): Change return type to void. Remove
11351 goto loop. Always return after waiting for debug event.
11352 (win32_wait): Convert to switch statement. Handle spurious
11355 * win32-i386-low.c (debug_registers_changed,
11356 debug_registers_used): New.
11357 (initial_stuff): Rename to ...
11358 (i386_initial_stuff): ... this. Clear debug registers
11360 (store_debug_registers): Delete.
11361 (i386_get_thread_context): New.
11362 (load_debug_registers): Delete.
11363 (i386_set_thread_context): New.
11364 (i386_thread_added): New.
11365 (single_step): Rename to ...
11366 (i386_single_step): ... this.
11367 (do_fetch_inferior_registers): Rename to ...
11368 (i386_fetch_inferior_register): ... this.
11369 (i386_store_inferior_register): New.
11370 (the_low_target): Adapt to new interface.
11372 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11373 (arm_get_thread_context): New.
11374 (arm_set_thread_context): New.
11376 (do_fetch_inferior_registers): Rename to ...
11377 (arm_fetch_inferior_register): ... this.
11378 (arm_store_inferior_register): New.
11379 (arm_wince_breakpoint): Reimplement as unsigned long.
11380 (arm_wince_breakpoint_len): Define.
11381 (the_low_target): Adapt to new interface.
11383 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11384 load_debug_registers. Add get_thread_context, set_thread_context,
11385 thread_added and store_inferior_register. Rename
11386 fetch_inferior_registers to fetch_inferior_register.
11387 (regptr): Remove declaration.
11389 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11391 * linux-low.c (linux_detach): Change return type to int. Return 0.
11392 * spu-low.c (spu_detach): Likewise.
11394 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11396 * target.h (target_ops): Change return type of detach to int.
11398 (join_inferior): New.
11399 * server.c (main): Don't skip detach support on mingw32.
11400 If the inferior doesn't support detaching return error.
11401 Call join_inferior instead of using waitpid.
11402 * linux-low.c (linux_join): New.
11403 (linux_target_op): Add linux_join.
11404 * spu-low.c (spu_join): New.
11405 (spu_target_ops): Add spu_join.
11406 * win32-low.c (win32_detach): Adapt to new interface.
11407 Reopen current_process_handle before detaching. Issue a child
11408 resume before detaching.
11410 (win32_target_op): Add win32_join.
11412 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11414 * win32-low.c (win32-attach): Fix return value.
11415 * target.h (target_ops): Describe ATTACH return values.
11417 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11419 * win32-low.c (GETPROCADDRESS): Define.
11420 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11421 (winapi_DebugSetProcessKillOnExit): Likewise.
11422 (win32_create_inferior): Force usage of ansi CreateProcessA.
11423 (win32_attach): Use GETPROCADDRESS.
11424 (win32_detach): Likewise.
11426 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11428 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11430 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11432 * win32-low.c: Commit leftover changes from 2007-03-29.
11434 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11436 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11437 fields short instead of int. Add explicit padding.
11438 (i387_cache_to_fsave): Remove unnecessary casts.
11439 (i387_fsave_to_cache): Doc fix.
11440 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11442 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11444 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11445 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11447 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11449 * configure.srv (arm*-*-mingw32ce*): Move near the other
11452 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11454 * configure.ac: Add errno checking.
11455 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11456 sys/file.h and malloc.h.
11457 (AC_CHECK_DECLS): Add perror.
11458 (srv_mingwce): Handle.
11459 * configure.srv (i[34567]86-*-cygwin*): Add
11460 win32-i386-low.o to srv_tgtobj.
11461 (i[34567]86-*-mingw*): Likewise.
11462 (arm*-*-mingw32ce*): Add case.
11463 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11464 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11465 [__MINGW32CE__] (strerror): New function.
11466 [__MINGW32CE__] (errno): Define to GetLastError.
11467 [__MINGW32CE__] (COUNTOF): New macro.
11468 (remote_open): Remove extra close call.
11469 * mem-break.c (delete_breakpoint_at): New function.
11470 * mem-break.h (delete_breakpoint_at): Declare.
11471 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11472 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11473 [USE_WIN32API] (read, write): Add char* casts.
11474 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11475 * server.h: Include wincecompat.h on Windows CE.
11476 [HAVE_ERRNO_H]: Check.
11477 (perror): Declare if not declared.
11478 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11479 (perror_with_name): Remove errno declaration.
11480 * wincecompat.h: New.
11481 * wincecompat.c: New.
11482 * win32-low.h: New.
11483 * win32-arm-low.c: New.
11484 * win32-i386-low.c: New.
11485 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11486 (OUTMSG2): Make it safe.
11488 (COUNTOF): New macro.
11489 (NUM_REGS): Get it from the low target.
11490 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11491 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11492 (thread_rec): Let low target handle debug registers.
11493 (child_add_thread): Likewise.
11494 (child_init_thread_list): Likewise.
11495 (continue_one_thread): Likewise.
11497 (do_child_fetch_inferior_registers): Move to ...
11498 * win32-i386-low.c: ... here, and rename to ...
11499 (do_fetch_inferior_registers): ... this.
11500 * win32-low.c (child_fetch_inferior_registers):
11501 Go through the low target.
11502 (do_child_store_inferior_registers): Use regptr.
11503 (strwinerror): New function.
11504 (win32_create_inferior): Handle Windows CE.
11505 Use strwinerror instead of strerror on Windows error
11506 codes. Add program to the error output.
11507 Don't close the main thread handle on Windows CE.
11508 (win32_attach): Use coredll.dll on Windows CE.
11509 (win32_kill): Close current process and current
11511 (win32_detach): Use coredll.dll on Windows CE.
11512 (win32_resume): Let low target handle debug registers, and
11514 (handle_exception): Add/Remove initial breakpoint. Avoid
11515 non-existant WSTOPSIG on Windows CE.
11516 (win32_read_inferior_memory): Cast to remove warning.
11517 (win32_arch_string): Go through the low target.
11518 (initialize_low): Call set_breakpoint_data with the low
11519 target's breakpoint.
11520 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11521 FOP_REGNUM, mappings): Move to ...
11522 * win32-i386-low.c: ... here.
11523 * win32-low.c (win32_thread_info): Move to ...
11524 * win32-low.h: ... here.
11525 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11526 win32-arm-low.c and wincecompat.c.
11527 (all:): Add $EXEEXT.
11528 (install-only:): Likewise.
11529 (gdbserver:): Likewise.
11530 (gdbreplay:): Likewise.
11531 * config.in: Regenerate.
11532 * configure: Regenerate.
11534 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11536 * win32-low.c: Rename typedef thread_info to
11537 win32_thread_info throughout.
11539 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11541 * win32-i386-low.c: Rename to ...
11542 * win32-low.c: ... this.
11543 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11544 * Makefile.in: Likewise.
11546 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11548 * remote-utils.c (monitor_output): Constify msg parameter.
11549 * server.h (monitor_output): Likewise.
11550 * win32-i386-low.c (handle_output_debug_string): New.
11551 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11552 handle_output_debug_string.
11553 (get_child_debug_event): Likewise.
11555 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11557 * server.c (main): Correct strtoul check.
11559 2007-03-27 Jon Ringle <jon@ringle.org>
11561 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11563 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11565 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11567 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11569 * terminal.h: Check HAVE_SGTTY_H.
11571 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11573 * remote-utils.c (remote_open): Print out the assigned port number.
11575 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11577 * remote-utils.c (monitor_output): New function.
11578 * server.c (debug_threads): Define here.
11579 (monitor_show_help): New function.
11580 (handle_query): Handle qRcmd.
11581 (main): Do not handle 'd' packet.
11582 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11583 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11586 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11588 * Makefile.in (EXEEXT): New.
11589 (clean): Use $(EXEEXT).
11591 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11593 * target.h (target_ops): Rename send_signal to request_interrupt,
11594 and remove enum target_signal parameter.
11595 * linux-low.c (linux_request_interrupt): Rename from
11596 linux_send_signal, and always send SIGINT.
11597 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11598 and always send SIGINT.
11599 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11601 (input_interrupt): Likewise.
11603 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11605 * server.c (get_features_xml): Check if target implemented
11607 * win32-i386-low.c (win32_arch_string): New.
11608 (win32_target_ops): Add win32_arch_string as arch_string member.
11610 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11612 * spu-low.c (spu_arch_string): New.
11613 (spu_target_ops): Add spu_arch_string.
11615 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11617 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11618 * configure.ac: Do not check for terminal.h.
11619 * configure, config.in: Regenerated.
11621 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11623 * Makefile.in (OBS): Add $(XML_BUILTIN).
11624 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11626 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11627 (arm-with-iwmmxt.c): New.
11628 * config.in, configure: Regenerate.
11629 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11630 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11631 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11632 (arm*-*-linux*): Add iWMMXt and regset support.
11633 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11634 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11635 (arm_store_wmmxregset, target_regsets): New.
11636 * server.c (get_features_xml): Take annex argument. Check builtin
11638 (handle_query): Handle multiple annexes.
11640 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11642 * remote-utils.c [USE_WIN32API] (read, write): Define.
11643 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11646 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11648 * linux-i386-low.c (the_low_target): Set arch_string.
11649 * linux-x86-64-low.c (the_low_target): Likewise.
11650 * linux-low.c (linux_arch_string): New.
11651 (linux_target_ops): Add it.
11652 * linux-low.h (struct linux_target_ops): Add arch_string.
11653 * server.c (write_qxfer_response): Use const void * for DATA.
11654 (get_features_xml): New.
11655 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11656 * target.h (struct target_ops): Add arch_string method.
11658 2007-01-03 Denis Pilat <denis.pilat@st.com>
11659 Daniel Jacobowitz <dan@codesourcery.com>
11661 * linux-low.c (linux_kill): Handle being called with no threads.
11662 * win32-i386-low.c (win32_kill): Likewise.
11663 (get_child_debug_event): Clear current_process_handle.
11665 2006-12-30 Denis PILAT <denis.pilat@st.com>
11666 Daniel Jacobowitz <dan@codesourcery.com>
11668 * remote-utils.c (remote_open): Check the type of specified
11669 serial port devices before opening them.
11670 * server.c (main): Kill the inferior if an error occurs during
11671 the first remote_open.
11673 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11675 * README: Update supported targets.
11677 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11679 * Makefile.in (clean): Remove reg-mips64.c.
11680 (reg-mips64.c, reg-mips64.o): New rules.
11681 * configure.srv: Handle mips64. Include regset support for mips.
11682 * linux-mips-low.c (union mips_register): New.
11683 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11684 (mips_breakpoint, mips_breakpoint_at): Use int.
11685 (mips_collect_register, mips_supply_register)
11686 (mips_collect_register_32bit, mips_supply_register_32bit)
11687 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11688 (mips_store_fpregset, target_regsets): New.
11689 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11691 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11693 * configure.srv: Add target "spu*-*-*".
11694 * Makefile.in (clean): Remove reg-spu.c.
11695 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11696 * spu-low.c: New file.
11698 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11700 * configure.ac: Correct td_thr_tls_get_addr test.
11701 * configure: Regenerated.
11703 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11705 * linux-low.c (linux_wait_for_event): Reformat. Use the
11706 pass_signals array.
11707 * remote-utils.c (decode_address_to_semicolon): New.
11708 * server.c (pass_signals, handle_general_set): New.
11709 (handle_query): Mention QPassSignals for qSupported.
11710 (main): Call handle_general_set.
11711 * server.h (pass_signals, decode_address_to_semicolon): New.
11713 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11715 * server.c (handle_query): Correct error handling for read_auxv.
11717 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11719 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11720 and srv_linux_thread_db to yes.
11721 * linux-s390-low.c (s390_fill_gregset): New function.
11722 (target_regsets): Define data structure.
11724 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11726 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11727 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11728 * config.in, configure: Regenerated.
11729 * inferiors.c (gdb_id_to_thread): New function.
11730 (gdb_id_to_thread_id): Use it.
11731 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11732 * linux-low.h (struct process_info): Add th member.
11733 (thread_db_get_tls_address): New prototype.
11734 * remote-utils.c (decode_address): Make non-static.
11735 * server.c (handle_query): Handle qGetTLSAddr.
11736 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11737 * target.h (struct target_ops): Add get_tls_address.
11738 * thread-db.c (maybe_attach_thread): Save the thread handle.
11739 (thread_db_get_tls_address): New.
11741 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11743 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11744 (linux_resume_one_process): Take a siginfo_t *. Update all
11745 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11746 (struct pending_signals): Add a siginfo_t.
11747 (linux_wait_for_process): Always set last_status.
11748 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11749 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11750 * linux-low.h (struct process_info): Add last_status.
11752 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11754 * remote-utils.c (try_rle): New function.
11755 (putpkt_binary): Use it.
11757 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11759 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11760 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11761 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11762 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11763 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11766 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11768 * server.c (terminal_fd): New variable.
11769 (old_foreground_pgrp): Likewise.
11770 (restore_old_foreground_pgrp): New function.
11771 (start_inferior): Record the terminal file descriptor in terminal_fd
11772 and its original foreground group in old_foreground_pgrp. Register
11773 restore_old_foreground_pgrp with atexit().
11775 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11777 * server.c (handle_query): Correct qPart to qXfer.
11779 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11781 * configure.ac: Check for more headers which are missing on
11782 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11783 * configure.srv: Add Cygwin and mingw32.
11784 * remote-utils.c: Don't include headers unconditionally which
11785 are missing on mingw32. Include <winsock.h> for mingw32.
11786 (remote_open): Adjust for mingw32 support. Flush
11787 standard error after writing to it.
11788 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11789 (unblock_async_io, enable_async_io, disable_async_io)
11790 (readchar, getpkt): Update for Winsock support.
11791 (prepare_resume_reply): Expect a protocol signal number.
11792 * server.c: Disable <sys/wait.h> on mingw32.
11793 (start_inferior): Adjust for mingw32 support. Flush
11794 standard error after writing to it.
11795 (attach_inferior): Likewise. Use protocol signal
11797 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11799 * win32-i386-low.c: New file.
11800 * Makefile.in (XM_CLIBS): Set.
11801 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11802 (win32-i386-low.o): New dependency rule.
11803 * linux-low.c (linux_wait): Use target signal numbers.
11804 * target.h (struct target_ops): Doc fix.
11805 * server.h (target_signal_to_name): New prototype.
11806 * gdbreplay.c: Don't include headers unconditionally which
11807 are missing on mingw32. Include <winsock.h> for mingw32.
11808 (remote_close, remote_open): Adjust for Winsock support.
11809 * configure, config.in: Regenerated.
11811 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11813 * server.c (decode_xfer_read, write_qxfer_response): New.
11814 (handle_query): Take a packet length argument. Handle
11815 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11816 the qSupported response.
11817 (main): Update call to handle_query.
11819 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11821 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11822 (putpkt_binary): Renamed from putpkt and adjusted for binary
11824 (putpkt): New wrapper for putpkt_binary.
11825 (readchar): Don't mask off the high bit.
11826 (decode_X_packet): New function.
11827 * server.c (main): Call putpkt_binary if a handler sets the packet
11828 length. Save the length of the incoming packet. Handle 'X'.
11829 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11831 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11833 * server.c (handle_query): Handle qSupported.
11835 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11837 * remote-utils.c (all_symbols_looked_up): New variable.
11838 (look_up_one_symbol): Check it.
11839 * server.h (look_up_one_symbol): New declaration.
11840 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11842 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11844 * Makefile.in (linux-arm-low.o): Update dependencies.
11845 * linux-arm-low.c: Include "gdb_proc_service.h".
11846 (PTRACE_GET_THREAD_AREA): Define.
11847 (ps_get_thread_area): New function.
11849 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11851 * configure.srv (m68k*-*-uclinux*): New target.
11852 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11853 (linux_resume_one_process): Remove extraneous cast.
11854 (linux_read_offsets): New.
11855 (linux_target_op): Add linux_read_offsets on mmuless systems.
11856 * server.c (handle_query): Add qOffsets logic.
11857 * target.h (struct target_ops): Add read_offsets.
11859 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11861 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11862 (PTRACE_GET_THREAD_AREA): Define.
11863 (ps_get_thread_area): New function.
11864 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11865 (linux-x86-64-low.o): Update.
11867 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11869 * configure.ac: Remove checks for prfpregset_t.
11870 * gdb_proc_service.h: New file.
11871 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11872 new "gdb_proc_service.h".
11873 * proc-service.c: Likewise.
11874 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11875 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11876 * Makefile.in (gdb_proc_service_h): Updated.
11877 * configure, config.in: Regenerated.
11879 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11881 * remote-utils.c (prepare_resume_reply): Move declaration
11882 of gdb_id_from_wait to the top of the block.
11884 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11886 * linux-low.c (regsets_store_inferior_registers): Read the regset
11887 from the target before filling it.
11889 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11891 * server.c (attach_inferior): Return SIGTRAP for a successful
11894 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11896 * Makefile.in (OBS): Add version.o.
11897 (STAGESTUFF): Delete.
11898 (version.o): Add dependencies.
11899 (version.c): Replace rule.
11900 (clean): Remove version.c.
11901 * server.c (gdbserver_version): New.
11902 (gdbserver_usage): Use printf.
11903 (main): Handle --version and --help.
11904 * server.h (version, host_name): Add declarations.
11906 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11918 * linux-x86-64-low.c:
11920 * linux-s390-low.c:
11921 * linux-ppc64-low.c:
11923 * linux-mips-low.c:
11924 * linux-m68k-low.c:
11925 * linux-m32r-low.c:
11928 * linux-ia64-low.c:
11929 * linux-i386-low.c:
11930 * linux-crisv32-low.c:
11942 * gdbserver.1: Add (C) after Copyright. Update the FSF
11945 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11947 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11948 (arm_breakpoint_at): Recognize both breakpoints.
11949 (the_low_target): Use the correct breakpoint instruction.
11951 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11953 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11954 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11955 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11956 (the_low_target): Update.
11958 2005-10-25 Andreas Schwab <schwab@suse.de>
11960 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11962 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11963 (ia64_num_regs): Reduce to 462.
11965 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11967 * acinclude.m4: Correct quoting.
11968 * aclocal.m4: Regenerated.
11970 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11971 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11972 (thread_db_init): Call thread_db_err_str.
11973 * configure.ac: Check for TD_VERSION.
11974 * config.in, configure: Regenerated.
11976 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11978 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11980 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11982 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11983 is not available. Define HAVE_PTRACE_GETREGS if it is.
11984 * config.in, configure: Regenerated.
11985 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11986 * linux-i386-low.c, linux-m68k-low.c: Update to use
11987 HAVE_PTRACE_GETREGS.
11988 * linux-low.c (regsets_fetch_inferior_registers)
11989 (regsets_store_inferior_registers): Only return 0 if we processed
11991 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11992 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11994 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11996 * inferiors.c (struct thread_info): Add gdb_id.
11997 (add_thread): Add gdb_id argument.
11998 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11999 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12000 calls to add_thread.
12001 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12002 * server.c (handle_query): Use thread_to_gdb_id.
12003 (handle_v_cont, main): Use gdb_id_to_thread_id.
12004 * server.h (add_thread): Update prototype.
12005 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12008 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12010 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12011 left-padded registers.
12012 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12013 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12015 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12017 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12018 * configure: Regenerate.
12019 * config.in: Regenerate.
12020 * server.h (NEED_DECLARATION_STRERROR):
12021 Replace with !HAVE_DECL_STRERROR.
12023 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12025 * linux-low.c (linux_wait, linux_send_signal): Don't test
12026 an unsigned long variable for > 0 if it could be MAX_ULONG.
12027 * server.c (myresume): Likewise.
12028 * target.c (set_desired_inferior): Likewise.
12030 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12032 * configure.ac: Simplify and improve check for socklen_t.
12033 * configure, config.in: Regenerate.
12035 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12037 * acconfig.h: Remove.
12038 * configure.ac: Add a test for socklen_t. Use three-argument
12039 AC_DEFINE throughout.
12040 * config.in: Regenerated using autoheader 2.59.
12041 * configure: Regenerated.
12043 * gdbreplay.c (socklen_t): Provide a default.
12044 (remote_open): Use socklen_t.
12045 * remote-utils.c (socklen_t): Provide a default.
12046 (remote_open): Use socklen_t.
12047 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12050 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12052 * linux-low.c (linux_read_memory, linux_write_memory)
12053 (linux_read_auxv): Likewise.
12054 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12055 (check_mem_write): Likewise.
12056 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12058 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12059 (registers_from_string, register_data): Likewise.
12060 * server.c (handle_query, main): Likewise.
12061 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12062 (decode_M_packet): Likewise.
12063 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12064 * target.h (struct target_ops): Update read_memory, write_memory,
12066 (read_inferior_memory, write_inferior_memory): Update.
12067 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12068 to unsigned char *.
12069 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12070 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12071 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12072 linux-s390-low.c, linux-sh-low.c: Update for changes in
12073 read_inferior_memory and the_low_target->breakpoint.
12075 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12077 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12078 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12079 * configure.srv: Add powerpc64-*-linux*.
12080 * linux-ppc64-low.c: New file.
12082 2005-05-23 Orjan Friberg <orjanf@axis.com>
12084 * linux-cris-low.c: New file with support for CRIS.
12085 * linux-crisv32-low.c: Ditto for CRISv32.
12086 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12087 (clean): Add reg-cris.c and reg-crisv32.c.
12088 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12089 reg-crisv32.o, and reg-crisv32.c to make rules.
12090 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12091 recognized targets.
12093 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12095 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12096 of sizeof (PTRACE_XFER_TYPE).
12097 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12099 2005-05-12 Orjan Friberg <orjanf@axis.com>
12101 * target.h (struct target_ops): Add insert_watchpoint,
12102 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12103 pointers for hardware watchpoint support.
12104 * linux-low.h (struct linux_target_ops): Ditto.
12105 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12106 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12107 to linux_target_ops.
12108 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12110 * server.c (main): Recognize 'Z' and 'z' packets.
12112 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12114 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12115 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12116 (the_low_target): Add new members.
12118 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12120 * proc-service.c (ps_lgetregs): Search all_processes instead of
12123 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12125 * server.c (start_inferior): Change return type to int.
12126 (attach_inferior): Change sigptr to int *.
12127 (handle_v_cont, handle_v_requests): Change signal to int *.
12128 (main): Change signal to int.
12130 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12132 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12133 * configure.srv: Add m32r*-*-linux*.
12134 * linux-m32r-low.c: New file.
12136 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12138 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12140 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12142 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12143 Take unsigned long arguments for PIDs.
12144 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12145 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12146 (wait_for_sigstop, linux_resume_one_process)
12147 (regsets_fetch_inferior_registers, linux_send_signal)
12148 (linux_read_auxv): Likewise. Update the types of variables holding
12149 PIDs. Update format string specifiers.
12150 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12151 * remote-utils.c (prepare_resume_reply): Likewise.
12152 * server.c (cont_thread, general_thread, step_thread)
12153 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12155 (handle_query): Update format specifiers.
12156 (handle_v_cont, main): Use strtoul for thread IDs.
12157 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12158 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12159 (general_thread, step_thread, thread_from_wait)
12160 (old_thread_from_wait): Update.
12161 * target.h (struct thread_resume): Use unsigned long for THREAD.
12162 (struct target_ops): Use unsigned long for arguments to attach and
12165 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12167 * acinclude.m4: Include bfd/bfd.m4 directly.
12168 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12169 <agriffis@toolchain.org>.
12170 * aclocal.m4, configure: Regenerated.
12172 2005-01-07 Andrew Cagney <cagney@gnu.org>
12174 * configure.ac: Rename configure.in, require autoconf 2.59.
12175 * configure: Re-generate.
12177 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12179 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12180 LIBS when finished.
12181 * aclocal.m4: Regenerated.
12182 * configure: Regenerated.
12184 2004-11-21 Andreas Schwab <schwab@suse.de>
12186 * linux-m68k-low.c (m68k_num_gregs): Define.
12187 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12188 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12189 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12190 (m68k_breakpoint_at): New. Add to the_low_target.
12192 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12193 srv_linux_thread_db to yes.
12195 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12197 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12198 (ARCH_SET_FS): Likewise.
12199 (ARCH_GET_FS): Likewise.
12200 (ARCH_GET_GS): Likewise.
12202 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12204 * linux-i386-low.c (ps_get_thread_area): New.
12205 * linux-x86-64-low.c (ps_get_thread_area): New.
12206 * linux-low.c: Include <sys/syscall.h>.
12207 (linux_kill_one_process): Don't kill the first thread here.
12208 (linux_kill): Kill the first thread here.
12209 (kill_lwp): New function.
12210 (send_sigstop, linux_send_signal): Use it.
12211 * proc-service.c: Clean up #ifdefs.
12212 (fpregset_info): Delete.
12213 (ps_lgetregs): Update and enable implementation.
12214 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12216 * remote-utils.c (struct sym_cache, symbol_cache): New.
12217 (input_interrupt): Print a clearer message.
12218 (async_io_enabled): New variable.
12219 (enable_async_io, disable_async_io): Use it. Update comments.
12220 (look_up_one_symbol): Use the symbol cache.
12221 * thread-db.c (thread_db_look_up_symbols): New function.
12222 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12224 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12226 * configure.in: Test for -rdynamic.
12227 * configure: Regenerated.
12228 * Makefile (INTERNAL_LDFLAGS): New.
12229 (gdbserver, gdbreplay): Use it.
12231 2004-09-02 Andrew Cagney <cagney@gnu.org>
12233 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12235 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12237 * linux-low.c (linux_wait): Clear all_processes list also.
12239 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12241 * linux-low.c: Include <errno.h>. Remove extern declaration of
12244 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12246 * gdbreplay.c, server.h, utils.c: Update copyright years.
12248 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12250 * server.c (main): Print child status or termination signal from
12251 variable 'signal', not 'sig'.
12253 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12255 * linux-low.c (linux_read_memory): Change return type to
12256 int. Check for and return error from ptrace().
12257 * target.c (read_inferior_memory): Change return type to int. Pass
12258 back return status from the_target->read_memory().
12259 * target.h (struct target_ops): Adapt *read_memory() prototype.
12261 (read_inferior_memory): Adapt prototype.
12262 * server.c (main): Return an error packet if
12263 read_inferior_memory() returns an error.
12265 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12267 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12268 Unify with other clean targets.
12270 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12272 * server.c (handle_v_cont): Call set_desired_inferior.
12274 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12276 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12278 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12280 * linux-low.c (linux_wait): Unblock async I/O.
12281 (linux_resume): Block and enable async I/O.
12282 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12283 * server.h (block_async_io, unblock_async_io): Add prototypes.
12285 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12287 * remote-utils.c (remote_open): Print a status notice after
12288 opening a TCP port.
12289 * server.c (attach_inferior): Print a status notice after
12292 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12294 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12296 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12298 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12300 * server.c, target.h: Update copyright years.
12302 2004-02-25 Roland McGrath <roland@redhat.com>
12304 * target.h (struct target_ops): New member `read_auxv'.
12305 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12306 * linux-low.c (linux_read_auxv): New function.
12307 (linux_target_ops): Initialize `read_auxv' member to that.
12309 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12311 Committed by Jim Blandy <jimb@redhat.com>.
12313 * linux-s390-low.c (s390_num_regs): Update.
12314 (s390_regmap): Remove control registers. Use __s390x__ predefine
12315 instead of GPR_SIZE to distiguish s390 and s390x targets.
12317 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12319 * linux-low.c: Update copyright year.
12320 (check_removed_breakpoint): Clear pending_is_breakpoint.
12321 (linux_set_resume_request, linux_queue_one_thread)
12322 (resume_status_pending_p): New functions.
12323 (linux_continue_one_thread): Use process->resume.
12324 (linux_resume): Only resume threads if there are no pending events.
12325 * linux-low.h (struct process_info): Add resume request
12328 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12330 * regcache.c (new_register_cache): Clear the allocated register
12331 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12333 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12335 * linux-low.c (linux_resume): Take a struct thread_resume *
12337 (linux_wait): Update call.
12338 (resume_ptr): New static variable.
12339 (linux_continue_one_thread): Renamed from
12340 linux_continue_one_process. Use resume_ptr.
12341 (linux_resume): Use linux_continue_one_thread.
12342 * server.c (handle_v_cont, handle_v_requests): New functions.
12343 (myresume): New function.
12344 (main): Handle 'v' case.
12345 * target.h (struct thread_resume): New type.
12346 (struct target_ops): Change argument of "resume" to struct
12348 (myresume): Delete macro.
12350 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12352 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12353 (uninstall): Support DESTDIR.
12355 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12357 * configure.srv: Add xscale*linux copy of arm*linux entry.
12359 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12361 * linux-arm-low.c (arm_reinsert_addr): New function.
12362 (the_low_target): Add arm_reinsert_addr.
12364 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12366 * mem-break.c: Remove whitespace at end of file.
12368 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12370 * configure.in: Check whether we need to prototype strerror.
12371 * server.h: Optionally prototype strerror.
12372 * gdbreplay.c (perror_with_name): Use strerror.
12373 * linux-low.c (linux_attach_lwp): Use strerror.
12374 * utils.c (perror_with_name): Use strerror.
12375 * config.in, configure: Regenerated.
12377 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12379 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12380 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12382 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12384 * Makefile.in (SFILES): Update.
12385 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12386 low-sun3.c: Remove files.
12388 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12390 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12391 (linux_detach_one_process, linux_detach): New functions.
12392 (linux_target_ops): Add linux_detach.
12393 * server.c (main): Handle 'D' packet.
12394 * target.h (struct target_ops): Add "detach" member.
12395 (detach_inferior): Define.
12397 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12399 From Kelley Cook <kelleycook@wideopenwest.com>:
12400 * configure.srv: Accept i[34567]86 variants.
12402 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12404 * linux-low.c (linux_wait_for_event): Correct comment typos.
12405 (linux_resume_one_process): Call check_removed_breakpoint.
12406 (linux_send_signal): New function.
12407 (linux_target_ops): Add linux_send_signal.
12408 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12410 * target.h (struct target_ops): Add send_signal.
12412 2003-05-29 Jim Blandy <jimb@redhat.com>
12414 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12415 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12416 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12417 away part of the register's value.
12419 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12421 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12422 (linux_wait_for_event, linux_init_signals): Likewise.
12424 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12426 * configure.in: Check for stdlib.h.
12427 * configure: Regenerated.
12428 * config.in: Regenerated.
12430 2003-01-04 Andreas Schwab <schwab@suse.de>
12432 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12434 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12436 * Makefile.in: Remove obsolete code.
12438 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12440 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12441 defined(PT_FPR0_HI).
12443 2002-11-17 Stuart Hughes <seh@zee2.com>
12445 * linux-arm-low.c (arm_num_regs): Increase.
12446 (arm_regmap): Include status register.
12448 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12450 * linux-low.c (register_addr): Remove incorrect -1 check.
12452 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12454 * linux-low.c (linux_create_inferior): Call setpgid. Return
12456 (unstopped_p, linux_signal_pid): Remove.
12457 (linux_target_ops): Remove linux_signal_pid.
12458 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12459 global instead of target method.
12460 * target.h (struct target_ops): Remove signal_pid. Update comment
12461 for create_inferior.
12462 * server.c (signal_pid): New variable.
12463 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12464 gdbserver. Set the child to be the foreground process group.
12465 (attach_inferior): Set signal_pid.
12467 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12469 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12471 2002-08-20 Jim Blandy <jimb@redhat.com>
12473 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12476 2002-08-01 Andrew Cagney <cagney@redhat.com>
12478 * Makefile.in: Make chill references obsolete.
12480 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12482 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12483 * configure: Regenerate.
12484 * config.in: Regenerate.
12486 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12488 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12489 (perror_with_name, remote_close, remote_open, expect, play): Static.
12491 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12493 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12494 byte offsets instead of an array of indexes.
12495 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12497 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12499 * regcache.c: Add comment.
12501 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12503 * thread-db.c: New file.
12504 * proc-service.c: New file.
12505 * acinclude.m4: New file.
12506 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12507 proc-service.o, and thread-db.o.
12508 (linux-low.o): Add USE_THREAD_DB.
12509 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12510 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12511 * aclocal.m4: Regenerated.
12512 * config.in: Regenerated.
12513 * configure: Regenerated.
12514 * configure.in: Check for proc_service.h, sys/procfs.h,
12515 thread_db.h, and linux/elf.h headrs.
12516 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12517 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12518 Check for -lthread_db and thread support.
12519 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12520 PowerPC, and SuperH.
12521 * i387-fp.c: Constify arguments.
12522 * i387-fp.h: Likewise.
12523 * inferiors.c: (struct thread_info): Renamed from
12524 `struct inferior_info'. Remove PID member. Use generic inferior
12525 list header. All uses updated.
12526 (inferiors, signal_pid): Removed.
12527 (all_threads): New variable.
12528 (get_thread): Define.
12529 (add_inferior_to_list): New function.
12530 (for_each_inferior): New function.
12531 (change_inferior_id): New function.
12532 (add_inferior): Removed.
12533 (remove_inferior): New function.
12534 (add_thread): New function.
12535 (free_one_thread): New function.
12536 (remove_thread): New function.
12537 (clear_inferiors): Use for_each_inferior and free_one_thread.
12538 (find_inferior): New function.
12539 (find_inferior_id): New function.
12540 (inferior_target_data): Update argument type.
12541 (set_inferior_target_data): Likewise.
12542 (inferior_regcache_data): Likewise.
12543 (set_inferior_regcache_data): Likewise.
12544 * linux-low.c (linux_bp_reinsert): Remove.
12545 (all_processes, stopping_threads, using_thrads)
12546 (struct pending_signals, debug_threads, pid_of): New.
12547 (inferior_pid): Replace with macro.
12548 (struct inferior_linux_data): Remove.
12549 (get_stop_pc, add_process): New functions.
12550 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12551 Use add_process and add_thread.
12552 (linux_attach_lwp): New function, based on old linux_attach. Use
12553 add_process and add_thread. Set stop_expected for new threads.
12554 (linux_attach): New function.
12555 (linux_kill_one_process): New function.
12556 (linux_kill): Kill all LWPs.
12557 (linux_thread_alive): Use find_inferior_id.
12558 (check_removed_breakpoints, status_pending_p): New functions.
12559 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12560 Update. Use WNOHANG. Wait for cloned processes also. Update process
12561 struct for the found process.
12562 (linux_wait_for_event): New function.
12563 (linux_wait): Use it. Support LWPs.
12564 (send_sigstop, wait_for_sigstop, stop_all_processes)
12565 (linux_resume_one_process, linux_continue_one_process): New functions.
12566 (linux_resume): Support LWPs.
12567 (REGISTER_RAW_SIZE): Remove.
12568 (fetch_register): Use register_size instead. Call supply_register.
12569 (usr_store_inferior_registers): Likewise. Call collect_register.
12570 Fix recursive case.
12571 (regsets_fetch_inferior_registers): Improve error message.
12572 (regsets_store_inferior_registers): Add debugging.
12573 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12574 (unstopped_p, linux_signal_pid): New functions.
12575 (linux_target_ops): Add linux_signal_pid.
12576 (linux_init_signals): New function.
12577 (initialize_low): Call it. Initialize using_threads.
12578 * regcache.c (inferior_regcache_data): Add valid
12580 (get_regcache): Fetch registers lazily. Add fetch argument
12581 and update all callers.
12582 (regcache_invalidate_one, regcache_invalidate): New
12584 (new_register_cache): Renamed from create_register_cache.
12585 Return the new regcache.
12586 (free_register_cache): Change argument to a void *.
12587 (registers_to_string, registers_from_string): Call get_regcache
12588 with fetch flag set.
12589 (register_data): Make static. Pass fetch flag to get_regcache.
12590 (supply_register): Call get_regcache with fetch flag clear.
12591 (collect_register): Call get_regcache with fetch flag set.
12592 (collect_register_as_string): New function.
12593 * regcache.h: Update.
12594 * remote-utils.c (putpkt): Flush after debug output and use
12596 Handle input interrupts while waiting for an ACK.
12597 (input_interrupt): Use signal_pid method.
12598 (getpkt): Flush after debug output and use stderr.
12599 (outreg): Use collect_register_as_string.
12600 (new_thread_notify, dead_thread_notify): New functions.
12601 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12602 and general_thread.
12603 (look_up_one_symbol): Flush after debug output.
12604 * server.c (step_thread, server_waiting): New variables.
12605 (start_inferior): Don't use signal_pid. Update call to mywait.
12606 (attach_inferior): Update call to mywait.
12607 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12608 (main): Don't fetch/store registers explicitly. Use
12609 set_desired_inferior. Support proposed ``Hs'' packet. Update
12611 * server.h: Update.
12612 (struct inferior_list, struct_inferior_list_entry): New.
12613 * target.c (set_desired_inferior): New.
12614 (write_inferior_memory): Constify.
12615 (mywait): New function.
12616 * target.h: Update.
12617 (struct target_ops): New signal_pid method.
12618 (mywait): Removed macro, added prototype.
12620 * linux-low.h (regset_func): Removed.
12621 (regset_fill_func, regset_store_func): New.
12622 (enum regset_type): New.
12623 (struct regset_info): Add type field. Use new operation types.
12624 (struct linux_target_ops): stop_pc renamed to get_pc.
12625 Add decr_pc_after_break and breakpoint_at.
12626 (get_process, get_thread_proess, get_process_thread)
12627 (strut process_info, all_processes, linux_attach_lwp)
12628 (thread_db_init): New.
12630 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12631 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12632 (the_low_target): Add new members.
12633 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12634 (i386_store_fpxregset): Constify.
12635 (target_regsets): Add new kind identifier.
12636 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12637 (i386_set_pc): Add debugging.
12638 (i386_breakpoint_at): New function.
12639 (the_low_target): Add new members.
12640 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12641 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12642 (mips_breakpoint_at): New.
12643 (the_low_target): Add new members.
12644 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12645 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12646 (the_low_target): Add new members.
12647 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12648 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12649 (the_low_target): Add new members.
12650 * linux-x86-64-low.c (target_regsets): Add new kind
12653 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12655 From Martin Pool <mbp@samba.org>:
12656 * server.c (gdbserver_usage): New function.
12659 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12661 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12662 stop_at -> stop_pc.
12664 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12666 * Makefile.in: Remove obsolete code.
12668 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12670 * linux-low.c (regsets_fetch_inferior_registers),
12671 (regsets_store_inferior_registers): Removed cast to int from
12673 * regcache.h: Added declaration of struct inferior_info.
12675 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12677 * inferiors.c (struct inferior_info): Add regcache_data.
12678 (add_inferior): Call create_register_cache.
12679 (clear_inferiors): Call free_register_cache.
12680 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12681 * regcache.c (struct inferior_regcache_data): New.
12682 (registers): Remove.
12683 (get_regcache): New function.
12684 (create_register_cache, free_register_cache): New functions.
12685 (set_register_cache): Don't initialize the register cache here.
12686 (registers_to_string, registers_from_string, register_data): Call
12688 * regcache.h: Add prototypes.
12689 * server.h: Likewise.
12691 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12693 * mem-break.c: New file.
12694 * mem-break.h: New file.
12695 * Makefile.in: Add mem-break.o rule; update server.h
12697 * inferiors.c (struct inferior_info): Add target_data
12699 (clear_inferiors): Free target_data member if set.
12700 (inferior_target_data, set_inferior_target_data): New functions.
12701 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12702 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12703 * linux-low.c (linux_bp_reinsert): New variable.
12704 (struct inferior_linux_data): New.
12705 (linux_create_inferior): Use set_inferior_target_data.
12706 (linux_attach): Likewise. Call add_inferior.
12707 (linux_wait_for_one_inferior): New function.
12708 (linux_wait): Call it.
12709 (linux_write_memory): Add const.
12710 (initialize_low): Call set_breakpoint_data.
12711 * linux-low.h (struct linux_target_ops): Add breakpoint
12713 * server.c (attach_inferior): Remove extra add_inferior
12715 * server.h: Include mem-break.h. Update inferior.c
12717 * target.c (read_inferior_memory)
12718 (write_inferior_memory): New functions.
12719 * target.h (read_inferior_memory)
12720 (write_inferior_memory): Change macros to prototypes.
12721 (struct target_ops): Update comments. Add const to write_memory
12724 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12726 * linux-low.c (usr_store_inferior_registers): Support
12727 registers which are allowed to fail to store.
12728 * linux-low.h (linux_target_ops): Likewise.
12729 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12730 (ppc_cannot_store_register): FPSCR may not be storable.
12732 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12734 * server.h: Include <string.h> if HAVE_STRING_H.
12735 * ChangeLog: Correct paths in last ChangeLog entry.
12737 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12739 * linux-low.h: Remove obsolete prototypes.
12740 (struct linux_target_ops): New.
12741 (extern the_low_target): New.
12742 * linux-low.c (num_regs, regmap): Remove declarations.
12743 (register_addr): Use the_low_target explicitly.
12744 (fetch_register): Likewise.
12745 (usr_fetch_inferior_registers): Likewise.
12746 (usr_store_inferior_registers): Likewise.
12747 * linux-arm-low.c (num_regs): Remove.
12748 (arm_num_regs): Define.
12749 (arm_regmap): Renamed from regmap, made static.
12750 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12752 (arm_cannot_store_register): Renamed from cannot_store_register,
12754 (the_low_target): New.
12755 * linux-i386-low.c (num_regs): Remove.
12756 (i386_num_regs): Define.
12757 (i386_regmap): Renamed from regmap, made static.
12758 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12760 (i386_cannot_store_register): Renamed from cannot_store_register,
12762 (the_low_target): New.
12763 * linux-ia64-low.c (num_regs): Remove.
12764 (ia64_num_regs): Define.
12765 (ia64_regmap): Renamed from regmap, made static.
12766 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12768 (ia64_cannot_store_register): Renamed from cannot_store_register,
12770 (the_low_target): New.
12771 * linux-m68k-low.c (num_regs): Remove.
12772 (m68k_num_regs): Define.
12773 (m68k_regmap): Renamed from regmap, made static.
12774 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12776 (m68k_cannot_store_register): Renamed from cannot_store_register,
12778 (the_low_target): New.
12779 * linux-mips-low.c (num_regs): Remove.
12780 (mips_num_regs): Define.
12781 (mips_regmap): Renamed from regmap, made static.
12782 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12784 (mips_cannot_store_register): Renamed from cannot_store_register,
12786 (the_low_target): New.
12787 * linux-ppc-low.c (num_regs): Remove.
12788 (ppc_num_regs): Define.
12789 (ppc_regmap): Renamed from regmap, made static.
12790 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12792 (ppc_cannot_store_register): Renamed from cannot_store_register,
12794 (the_low_target): New.
12795 * linux-s390-low.c (num_regs): Remove.
12796 (s390_num_regs): Define.
12797 (s390_regmap): Renamed from regmap, made static.
12798 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12800 (s390_cannot_store_register): Renamed from cannot_store_register,
12802 (the_low_target): New.
12803 * linux-sh-low.c (num_regs): Remove.
12804 (sh_num_regs): Define.
12805 (sh_regmap): Renamed from regmap, made static.
12806 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12808 (sh_cannot_store_register): Renamed from cannot_store_register,
12810 (the_low_target): New.
12811 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12812 (the_low_target): New.
12814 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12816 * Makefile.in: Add stamp-h target.
12817 * configure.in: Create stamp-h.
12818 * configure: Regenerated.
12820 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12822 * inferiors.c: New file.
12823 * target.c: New file.
12824 * target.h: New file.
12825 * Makefile.in: Add target.o and inferiors.o. Update
12827 * linux-low.c (inferior_pid): New static variable,
12828 moved from server.c.
12829 (linux_create_inferior): Renamed from create_inferior.
12830 Call add_inferior. Return 0 on success instead of a PID.
12831 (linux_attach): Renamed from myattach.
12832 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12833 (linux_thread_alive): Renamed from mythread_alive.
12834 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12836 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12837 (regsets_store_inferior_registers): Correct error message.
12838 Add missing ``return 0''.
12839 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12840 (linux_store_registers): Renamed from store_inferior_registers.
12841 (linux_read_memory): Renamed from read_inferior_memory.
12842 (linux_write_memory): Renamed from write_inferior_memory.
12843 (linux_target_ops): New structure.
12844 (initialize_low): Call set_target_ops ().
12845 * remote-utils.c (unhexify): New function.
12846 (hexify): New function.
12847 (input_interrupt): Send signals to ``signal_pid''.
12848 * server.c (inferior_pid): Remove.
12849 (start_inferior): Update create_inferior call.
12850 (attach_inferior): Call add_inferior.
12851 (handle_query): New function.
12852 (main): Call handle_query for `q' packets.
12853 * server.h: Include "target.h". Remove obsolete prototypes.
12854 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12856 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12858 * Makefile.in: Add WARN_CFLAGS. Update configury
12860 * configure.in: Check for <string.h>
12861 * configure: Regenerate.
12862 * config.in: Regenerate.
12863 * gdbreplay.c: Include needed system headers.
12864 (remote_open): Remove strchr prototype.
12865 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12866 * regcache.c (supply_register): Change buf argument to const void *.
12867 (supply_register_by_name): Likewise.
12868 (collect_register): Change buf argument to void *.
12869 (collect_register_by_name): Likewise.
12870 * regcache.h: Add missing prototypes.
12871 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12872 * server.c (handle_query): New function.
12873 (attached): New static variable, moved out of main.
12874 (main): Quiet longjmp clobber warnings.
12875 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12876 * utils.c (error): Remove NORETURN.