1 2015-11-30 Pedro Alves <palves@redhat.com>
3 * linux-low.c (linux_resume): Wake up the event loop before
6 2015-11-30 Pedro Alves <palves@redhat.com>
8 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
10 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
12 * target.c (struct thread_search): New structure.
13 (thread_search_callback): New function.
14 (prev_general_thread): New global.
15 (prepare_to_access_memory, done_accessing_memory): New functions.
16 * target.h (prepare_to_access_memory, done_accessing_memory):
17 Replace macros with function declarations.
19 2015-11-30 Pedro Alves <palves@redhat.com>
22 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
23 report TARGET_WAITKIND_NO_RESUMED.
24 * remote-utils.c (prepare_resume_reply): Handle
25 TARGET_WAITKIND_NO_RESUMED.
26 * server.c (report_no_resumed): New global.
27 (handle_query) <qSupported>: Handle "no-resumed+". Report
28 "no-resumed+" support.
29 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
30 return error if the client doesn't support no-resumed events.
31 (push_stop_notification): New function.
32 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
33 events if the client supports them.
35 2015-11-30 Pedro Alves <palves@redhat.com>
37 * linux-low.c (thread_still_has_status_pending_p): Don't check
39 (lwp_resumed): New function.
40 (status_pending_p_callback): Return early if the LWP is not
41 supposed to be resumed.
43 2015-11-30 Pedro Alves <palves@redhat.com>
45 * linux-low.c (handle_extended_wait): Assert that the LWP's
46 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
47 thread create events, leave the new child's status pending.
48 (linux_low_filter_event): If GDB wants to hear about thread exit
49 events, leave the LWP marked dead and don't delete it.
50 (linux_wait_for_event_filtered): Don't check for thread exit.
51 (filter_exit_event): New function.
52 (linux_wait_1): Use it, when returning an exit event.
53 (linux_resume_one_lwp_throw): Assert that the LWP's
54 waitstatus is TARGET_WAITKIND_IGNORE.
55 * remote-utils.c (prepare_resume_reply): Handle
56 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
57 * server.c (report_thread_events): New global.
58 (handle_general_set): Handle QThreadEvents.
59 (handle_query) <qSupported>: Handle and report QThreadEvents+;
60 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
61 TARGET_WAITKIND_THREAD_EXITED.
62 * server.h (report_thread_events): Declare.
64 2015-11-30 Pedro Alves <palves@redhat.com>
66 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
67 the thread's last_resume_kind was resume_stop.
69 2015-11-30 Pedro Alves <palves@redhat.com>
71 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
74 2015-11-30 Pedro Alves <palves@redhat.com>
76 * server.c (handle_v_requests): Handle vCtrlC.
78 2015-11-30 Pedro Alves <palves@redhat.com>
80 * gdbthread.h (find_any_thread_of_pid): Declare.
81 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
83 * server.c (handle_query): If current_thread is NULL, look for
84 another thread of the selected process.
86 2015-11-26 Daniel Colascione <dancol@dancol.org>
87 Simon Marchi <simon.marchi@ericsson.com>
89 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
90 * server.c (handle_qxfer_threads_worker): Refactor to include thread
92 * target.h (struct target_ops) <thread_name>: New field.
93 (target_thread_name): New macro.
95 2015-11-23 Joel Brobecker <brobecker@adacore.com>
97 * regcache.h (regcache_invalidate_pid): Add declaration.
98 * regcache.c (regcache_invalidate_pid): New function, extracted
99 from regcache_invalidate.
100 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
101 Add trivial documentation comment.
102 * lynx-low.c: Use regcache_invalidate_pid instead of
105 2015-11-23 Joel Brobecker <brobecker@adacore.com>
107 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
108 and Elf64_auxv_t if the target is Android.
110 2015-11-22 Doug Evans <xdje42@gmail.com>
112 * target.h: #include <sys/types.h>.
114 2015-11-19 Pedro Alves <palves@redhat.com>
116 * linux-low.c (linux_process_qsupported): Change prototype.
118 * linux-low.h (struct linux_target_ops) <process_qsupported>:
120 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
121 and adjust to loop over all features.
122 * server.c (handle_query) <qSupported>: Adjust to call
123 target_process_qsupported once, passing it a vector of unprocessed
125 * target.h (struct target_ops) <process_qsupported>: Change
127 (target_process_qsupported): Adjust.
129 2015-11-19 Pedro Alves <palves@redhat.com>
131 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
133 * configure: Regenerate.
135 2015-11-19 Pedro Alves <palves@redhat.com>
137 * configure: Regenerate.
139 2015-11-19 Yao Qi <yao.qi@linaro.org>
141 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
144 2015-11-19 Yao Qi <yao.qi@linaro.org>
146 * linux-aarch64-low.c (enum aarch64_operand_type): New.
147 (struct aarch64_operand): Move enum out.
149 2015-11-19 Yao Qi <yao.qi@linaro.org>
151 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
152 struct user_fpsimd_state *.
153 (aarch64_store_fpregset): Likewise.
155 2015-11-19 Yao Qi <yao.qi@linaro.org>
157 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
158 struct user_pt_regs *.
159 (aarch64_store_gregset): Likewise.
161 2015-11-18 Pedro Alves <palves@redhat.com>
163 * Makefile.in (all_object_files): Add $IPA_OBJS.
165 2015-11-17 Pedro Alves <palves@redhat.com>
167 * win32-low.c (win32_resume): Use gdb_signal_from_host,
168 GDB_SIGNAL_0 and gdb_signal_to_string.
170 2015-11-17 Pedro Alves <palves@redhat.com>
172 * win32-low.c (handle_output_debug_string): Remove parameter.
173 (win32_kill): Remove our_status local and adjust call to
174 handle_output_debug_string.
175 (get_child_debug_event): Adjust call to
176 handle_output_debug_string.
178 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
180 * linux-mips-low.c (mips_fill_gregset): Add cast.
181 (mips_store_gregset): Likewise.
182 (mips_fill_fpregset): Likewise.
183 (mips_store_fpregset): Likewise.
185 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
187 * linux-mips-low.c (mips_add_watchpoint): Rename private to
190 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
192 * linux-mips-low.c (mips_linux_new_thread): Change type of
193 watch_type to enum target_hw_bp_type.
195 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
197 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
198 Change return type to arm_hwbp_type.
200 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
202 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
203 (arm_store_gregset): Likewise.
204 * linux-arm-low.c (arm_get_hwcap): Likewise.
205 (arm_read_description): Likewise.
207 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
209 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
211 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
213 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
214 (ppc_fill_vsxregset): Likewise.
215 (ppc_store_vsxregset): Likewise.
216 (ppc_fill_vrregset): Likewise.
217 (ppc_store_vrregset): Likewise.
218 (ppc_fill_evrregset): Likewise.
219 (ppc_store_evrregset): Likewise.
221 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
223 * linux-ppc-low.c (ppc_usrregs_info): Remove
225 (ppc_arch_setup): Move lower in file.
227 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
229 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
230 (ps_pdwrite): Likewise.
232 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
234 * linux-arm-low.c (arm_new_thread): Move pointer dereference
235 to after assert checks.
237 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
239 * proc-service.c (ps_pdread): Add/adjust casts.
240 (ps_pdwrite): Add/adjust casts.
242 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
244 * server.c (handle_search_memory_1): Cast return value of
247 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
249 * server.c (write_qxfer_response): Change type of data to
252 2015-10-29 Pedro Alves <palves@redhat.com>
254 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
256 2015-10-29 Pedro Alves <palves@redhat.com>
258 * tracepoint.c (clear_installed_tracepoints): Add casts.
260 2015-10-29 Pedro Alves <palves@redhat.com>
262 * server.c (handle_v_cont, process_serial_event): Add enum
263 gdb_signal casts to signal parsing code.
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-29 Pedro Alves <palves@redhat.com>
285 * linux-low.h (NULL_REGSET): Define.
286 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
287 * linux-arm-low.c (arm_regsets): Likewise.
288 * linux-crisv32-low.c (cris_regsets): Likewise.
289 * linux-m68k-low.c (m68k_regsets): Likewise.
290 * linux-mips-low.c (mips_regsets): Likewise.
291 * linux-nios2-low.c (nios2_regsets): Likewise.
292 * linux-ppc-low.c (ppc_regsets): Likewise.
293 * linux-s390-low.c (s390_regsets): Likewise.
294 * linux-sh-low.c (sh_regsets): Likewise.
295 * linux-sparc-low.c (sparc_regsets): Likewise.
296 * linux-tic6x-low.c (tic6x_regsets): Likewise.
297 * linux-tile-low.c (tile_regsets): Likewise.
298 * linux-x86-low.c (x86_regsets): Likewise.
299 * linux-xtensa-low.c (xtensa_regsets): Likewise.
301 2015-10-26 Doug Evans <dje@google.com>
303 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
305 2015-10-26 Doug Evans <dje@google.com>
307 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
309 2015-10-26 Doug Evans <dje@google.com>
311 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
313 (attach_thread, find_new_threads_callback): Ditto.
315 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
317 * mem-break.h (set_breakpoint_data): Remove.
319 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
321 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
322 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
323 (initialize_low): Remove set_breakpoint_data call.
324 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
325 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
326 (initialize_low): Remove set_breakpoint_data call.
327 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
328 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
329 (initialize_low): Remove set_breakpoint_data call.
331 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
333 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
334 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
335 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
336 * target.h (target_breakpoint_kind_from_pc): New macro.
338 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
340 * linux-low.c (default_breakpoint_kind_from_pc): New function.
341 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
342 the default breakpoint kind.
344 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
346 * linux-arm-low.c (arm_supports_z_point_type): Add software
349 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
351 * linux-arm-low.c: Refactor breakpoint definitions.
352 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
353 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
355 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
357 * Makefile.in: Add arm.c/o.
358 * configure.srv: Likewise.
359 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
360 (arm_breakpoint_kind_from_pc): New function.
361 (arm_sw_breakpoint_from_kind): Return proper kind.
362 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
364 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
366 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
368 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
369 (struct raw_breakpoint) <size>: Remove.
370 (struct raw_breakpoint) <kind>: Add.
371 (bp_size): New function.
372 (bp_opcode): Likewise.
373 (find_raw_breakpoint_at): Adjust for kind.
374 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
375 (remove_memory_breakpoint): Adjust for kind call bp_size.
376 (set_raw_breakpoint_at): Adjust for kind.
377 (set_breakpoint): Likewise.
378 (set_breakpoint_at): Call breakpoint_kind_from_pc.
379 (delete_raw_breakpoint): Adjust for kind.
380 (delete_breakpoint): Likewise.
381 (find_gdb_breakpoint): Likewise.
382 (set_gdb_breakpoint_1): Likewise.
383 (set_gdb_breakpoint): Likewise.
384 (delete_gdb_breakpoint_1): Likewise.
385 (delete_gdb_breakpoint): Likewise.
386 (uninsert_raw_breakpoint): Likewise.
387 (reinsert_raw_breakpoint): Likewise.
388 (set_breakpoint_data): Remove.
389 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
390 (check_mem_read): Adjust for kind call bp_size.
391 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
392 (clone_one_breakpoint): Adjust for kind.
393 * mem-break.h (set_gdb_breakpoint): Likewise.
394 (delete_gdb_breakpoint): Likewise.
395 * server.c (process_serial_event): Likewise.
397 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
399 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
400 (struct linux_target_ops) <breakpoint>: Remove.
401 (struct linux_target_ops) <breakpoint_len>: Remove.
402 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
403 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
404 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
405 (arm_sw_breakpoint_from_kind): New function.
406 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
407 (struct linux_target_ops) <breakpoint>: Remove.
408 (struct linux_target_ops) <breakpoint_len>: Remove.
409 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
410 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
411 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
412 (struct linux_target_ops) <breakpoint>: Remove.
413 (struct linux_target_ops) <breakpoint_len>: Remove.
414 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
415 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
416 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
417 (struct linux_target_ops) <breakpoint>: Remove.
418 (struct linux_target_ops) <breakpoint_len>: Remove.
419 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
420 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
421 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
422 and sw_breakpoint_from_kind to increment the pc.
423 (linux_breakpoint_kind_from_pc): New function.
424 (linux_sw_breakpoint_from_kind): New function.
425 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
426 (initialize_low): Call breakpoint_kind_from_pc and
427 sw_breakpoint_from_kind to replace breakpoint_data/len.
428 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
430 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
431 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
432 (struct linux_target_ops) <breakpoint>: Remove.
433 (struct linux_target_ops) <breakpoint_len>: Remove.
434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
436 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
437 (struct linux_target_ops) <breakpoint>: Remove.
438 (struct linux_target_ops) <breakpoint_len>: Remove.
439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
441 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
442 (struct linux_target_ops) <breakpoint>: Remove.
443 (struct linux_target_ops) <breakpoint_len>: Remove.
444 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
445 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
446 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
447 (struct linux_target_ops) <breakpoint>: Remove.
448 (struct linux_target_ops) <breakpoint_len>: Remove.
449 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
450 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
451 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
452 (struct linux_target_ops) <breakpoint>: Remove.
453 (struct linux_target_ops) <breakpoint_len>: Remove.
454 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
455 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
456 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
457 (struct linux_target_ops) <breakpoint>: Remove.
458 (struct linux_target_ops) <breakpoint_len>: Remove.
459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
461 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
462 (struct linux_target_ops) <breakpoint>: Remove.
463 (struct linux_target_ops) <breakpoint_len>: Remove.
464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
466 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
467 (struct linux_target_ops) <breakpoint>: Remove.
468 (struct linux_target_ops) <breakpoint_len>: Remove.
469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
471 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
472 (struct linux_target_ops) <breakpoint>: Remove.
473 (struct linux_target_ops) <breakpoint_len>: Remove.
474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
476 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
477 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
478 (struct linux_target_ops) <breakpoint>: Remove.
479 (struct linux_target_ops) <breakpoint_len>: Remove.
480 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
481 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
482 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
483 (struct linux_target_ops) <breakpoint>: Remove.
484 (struct linux_target_ops) <breakpoint_len>: Remove.
485 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
486 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
488 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
490 * linux-cris-low.c (cris_get_pc): Remove void arg.
492 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
494 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
497 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
499 * inferiors.c (thread_pid_matches_callback): New function.
500 (find_thread_process): New function.
501 (remove_thread): Reset current_thread.
502 (remove_process): Assert threads have been removed first.
504 2015-10-15 Yao Qi <yao.qi@linaro.org>
506 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
508 (aarch64_remove_point): Likewise.
509 * regcache.c (regcache_register_size): New function.
511 2015-10-12 Yao Qi <yao.qi@linaro.org>
513 * linux-aarch64-low.c: Update all callers as emit_load_store
514 is renamed to aarch64_emit_load_store.
516 2015-10-12 Yao Qi <yao.qi@linaro.org>
518 * linux-aarch64-low.c: Update all callers of function renaming
519 from emit_insn to aarch64_emit_insn.
521 2015-10-12 Yao Qi <yao.qi@linaro.org>
523 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
525 (struct aarch64_memory_operand): Likewise.
527 (emit_insn): Move to arch/aarch64-insn.c.
528 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
529 (emit_load_store): Move to arch/aarch64-insn.c.
530 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
531 (can_encode_int32): Remove.
533 2015-10-12 Yao Qi <yao.qi@linaro.org>
535 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
536 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
537 (aarch64_relocate_instruction): Likewise.
538 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
539 (struct aarch64_insn_visitor): Likewise.
541 2015-10-12 Yao Qi <yao.qi@linaro.org>
543 * linux-aarch64-low.c (struct aarch64_insn_data): New.
544 (struct aarch64_insn_visitor): New.
545 (struct aarch64_insn_relocation_data): New.
546 (aarch64_ftrace_insn_reloc_b): New function.
547 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
548 (aarch64_ftrace_insn_reloc_cb): Likewise.
549 (aarch64_ftrace_insn_reloc_tb): Likewise.
550 (aarch64_ftrace_insn_reloc_adr): Likewise.
551 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
552 (aarch64_ftrace_insn_reloc_others): Likewise.
554 (aarch64_relocate_instruction): Use visitor.
556 2015-10-12 Yao Qi <yao.qi@linaro.org>
558 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
559 int. Add argument buf.
560 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
561 aarch64_relocate_instruction.
563 2015-10-12 Yao Qi <yao.qi@linaro.org>
565 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
566 argument insn. Remove local variable insn. Don't call
568 (aarch64_install_fast_tracepoint_jump_pad): Call
571 2015-09-30 Yao Qi <yao.qi@linaro.org>
573 * linux-aarch64-low.c (emit_movk): Shorten a long line.
574 (emit_load_store_pair): Likewise.
576 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
578 * dll.c (match_dll): Add cast(s).
579 (unloaded_dll): Likewise.
580 * linux-low.c (second_thread_of_pid_p): Likewise.
581 (delete_lwp_callback): Likewise.
582 (count_events_callback): Likewise.
583 (select_event_lwp_callback): Likewise.
584 (linux_set_resume_request): Likewise.
585 * server.c (accumulate_file_name_length): Likewise.
586 (emit_dll_description): Likewise.
587 (handle_qxfer_threads_worker): Likewise.
588 (visit_actioned_threads): Likewise.
589 * thread-db.c (any_thread_of): Likewise.
590 * tracepoint.c (same_process_p): Likewise.
591 (match_blocktype): Likewise.
592 (build_traceframe_info_xml): Likewise.
594 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
596 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
598 (gdb_unparse_agent_expr): Likewise.
599 * hostio.c (require_data): Likewise.
600 (handle_pread): Likewise.
601 * linux-low.c (disable_regset): Likewise.
602 (fetch_register): Likewise.
603 (store_register): Likewise.
604 (get_dynamic): Likewise.
605 (linux_qxfer_libraries_svr4): Likewise.
606 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
607 (set_fast_tracepoint_jump): Likewise.
608 (uninsert_fast_tracepoint_jumps_at): Likewise.
609 (reinsert_fast_tracepoint_jumps_at): Likewise.
610 (validate_inserted_breakpoint): Likewise.
611 (clone_agent_expr): Likewise.
612 * regcache.c (init_register_cache): Likewise.
613 * remote-utils.c (putpkt_binary_1): Likewise.
614 (decode_M_packet): Likewise.
615 (decode_X_packet): Likewise.
616 (look_up_one_symbol): Likewise.
617 (relocate_instruction): Likewise.
618 (monitor_output): Likewise.
619 * server.c (handle_search_memory): Likewise.
620 (handle_qxfer_exec_file): Likewise.
621 (handle_qxfer_libraries): Likewise.
622 (handle_qxfer): Likewise.
623 (handle_query): Likewise.
624 (handle_v_cont): Likewise.
625 (handle_v_run): Likewise.
626 (captured_main): Likewise.
627 * target.c (write_inferior_memory): Likewise.
628 * thread-db.c (try_thread_db_load_from_dir): Likewise.
629 * tracepoint.c (init_trace_buffer): Likewise.
630 (add_tracepoint_action): Likewise.
631 (add_traceframe): Likewise.
632 (add_traceframe_block): Likewise.
633 (cmd_qtdpsrc): Likewise.
634 (cmd_qtdv): Likewise.
635 (cmd_qtstatus): Likewise.
636 (response_source): Likewise.
637 (response_tsv): Likewise.
638 (cmd_qtnotes): Likewise.
639 (gdb_collect): Likewise.
640 (initialize_tracepoint): Likewise.
642 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
644 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
645 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
646 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
648 (enum aarch64_condition_codes): New enum.
649 (w0): New static global.
652 (struct aarch64_memory_operand) <type>: New
653 MEMORY_OPERAND_POSTINDEX type.
654 (postindex_memory_operand): New helper function.
655 (emit_ret): New function.
656 (emit_load_store_pair): New function, factored out of emit_stp
657 with support for MEMORY_OPERAND_POSTINDEX.
658 (emit_stp): Rewrite using emit_load_store_pair.
659 (emit_ldp): New function.
660 (emit_load_store): Likewise.
661 (emit_ldr): Mention post-index instruction in comment.
662 (emit_ldrh): New function.
663 (emit_ldrb): New function.
664 (emit_ldrsw): Mention post-index instruction in comment.
665 (emit_str): Likewise.
666 (emit_subs): New function.
667 (emit_cmp): Likewise.
668 (emit_and): Likewise.
669 (emit_orr): Likewise.
670 (emit_orn): Likewise.
671 (emit_eor): Likewise.
672 (emit_mvn): Likewise.
673 (emit_lslv): Likewise.
674 (emit_lsrv): Likewise.
675 (emit_asrv): Likewise.
676 (emit_mul): Likewise.
677 (emit_sbfm): Likewise.
678 (emit_sbfx): Likewise.
679 (emit_ubfm): Likewise.
680 (emit_ubfx): Likewise.
681 (emit_csinc): Likewise.
682 (emit_cset): Likewise.
683 (emit_nop): Likewise.
684 (emit_ops_insns): New helper function.
685 (emit_pop): Likewise.
686 (emit_push): Likewise.
687 (aarch64_emit_prologue): New function.
688 (aarch64_emit_epilogue): Likewise.
689 (aarch64_emit_add): Likewise.
690 (aarch64_emit_sub): Likewise.
691 (aarch64_emit_mul): Likewise.
692 (aarch64_emit_lsh): Likewise.
693 (aarch64_emit_rsh_signed): Likewise.
694 (aarch64_emit_rsh_unsigned): Likewise.
695 (aarch64_emit_ext): Likewise.
696 (aarch64_emit_log_not): Likewise.
697 (aarch64_emit_bit_and): Likewise.
698 (aarch64_emit_bit_or): Likewise.
699 (aarch64_emit_bit_xor): Likewise.
700 (aarch64_emit_bit_not): Likewise.
701 (aarch64_emit_equal): Likewise.
702 (aarch64_emit_less_signed): Likewise.
703 (aarch64_emit_less_unsigned): Likewise.
704 (aarch64_emit_ref): Likewise.
705 (aarch64_emit_if_goto): Likewise.
706 (aarch64_emit_goto): Likewise.
707 (aarch64_write_goto_address): Likewise.
708 (aarch64_emit_const): Likewise.
709 (aarch64_emit_call): Likewise.
710 (aarch64_emit_reg): Likewise.
711 (aarch64_emit_pop): Likewise.
712 (aarch64_emit_stack_flush): Likewise.
713 (aarch64_emit_zero_ext): Likewise.
714 (aarch64_emit_swap): Likewise.
715 (aarch64_emit_stack_adjust): Likewise.
716 (aarch64_emit_int_call_1): Likewise.
717 (aarch64_emit_void_call_2): Likewise.
718 (aarch64_emit_eq_goto): Likewise.
719 (aarch64_emit_ne_goto): Likewise.
720 (aarch64_emit_lt_goto): Likewise.
721 (aarch64_emit_le_goto): Likewise.
722 (aarch64_emit_gt_goto): Likewise.
723 (aarch64_emit_ge_got): Likewise.
724 (aarch64_emit_ops_impl): New static global variable.
725 (aarch64_emit_ops): New target function, return
726 &aarch64_emit_ops_impl.
727 (struct linux_target_ops): Install it.
729 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
731 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
732 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
734 * linux-aarch64-ipa.c: New file.
735 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
737 (aarch64_get_thread_area): New target method.
738 (extract_signed_bitfield): New helper function.
739 (aarch64_decode_ldr_literal): New function.
740 (enum aarch64_opcodes): New enum.
741 (struct aarch64_register): New struct.
742 (struct aarch64_operand): New struct.
743 (x0): New static global.
752 (aarch64_register): New helper function.
753 (register_operand): Likewise.
754 (immediate_operand): Likewise.
755 (struct aarch64_memory_operand): New struct.
756 (offset_memory_operand): New helper function.
757 (preindex_memory_operand): Likewise.
758 (enum aarch64_system_control_registers): New enum.
760 (emit_insn): New helper function.
761 (emit_b): New function.
762 (emit_bcond): Likewise.
765 (emit_blr): Likewise.
766 (emit_stp): Likewise.
767 (emit_ldp_q_offset): Likewise.
768 (emit_stp_q_offset): Likewise.
769 (emit_load_store): Likewise.
770 (emit_ldr): Likewise.
771 (emit_ldrsw): Likewise.
772 (emit_str): Likewise.
773 (emit_ldaxr): Likewise.
774 (emit_stxr): Likewise.
775 (emit_stlr): Likewise.
776 (emit_data_processing_reg): Likewise.
777 (emit_data_processing): Likewise.
778 (emit_add): Likewise.
779 (emit_sub): Likewise.
780 (emit_mov): Likewise.
781 (emit_movk): Likewise.
782 (emit_mov_addr): Likewise.
783 (emit_mrs): Likewise.
784 (emit_msr): Likewise.
785 (emit_sevl): Likewise.
786 (emit_wfe): Likewise.
787 (append_insns): Likewise.
788 (can_encode_int32_in): New helper function.
789 (aarch64_relocate_instruction): New function.
790 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
791 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
792 (struct linux_target_ops): Install aarch64_get_thread_area,
793 aarch64_install_fast_tracepoint_jump_pad and
794 aarch64_get_min_fast_tracepoint_insn_len.
796 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
798 * Makefile.in (aarch64-insn.o): New rule.
799 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
801 2015-09-21 Yao Qi <yao.qi@linaro.org>
803 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
805 2015-09-21 Yao Qi <yao.qi@linaro.org>
807 * tracepoint.c (max_jump_pad_size): Remove.
809 2015-09-18 Yao Qi <yao.qi@linaro.org>
811 * linux-aarch64-low.c: Don't include sys/uio.h.
812 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
814 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
816 * tracepoint.c (eval_result_type): Change prototype.
817 (condition_true_at_tracepoint): Fix argument to compiled_cond.
819 2015-09-15 Pedro Alves <palves@redhat.com>
821 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
822 Check whether to report exec events instead of checking whether
823 multiprocess is enabled.
825 2015-09-15 Pedro Alves <palves@redhat.com>
828 * remote-utils.c (prepare_resume_reply): Merge
829 TARGET_WAITKIND_VFORK_DONE switch case with the
830 TARGET_WAITKIND_FORKED case.
832 2015-09-15 Yao Qi <yao.qi@linaro.org>
834 * server.c (handle_query): Check string comparison using
835 "else if" instead of "if".
837 2015-09-15 Yao Qi <yao.qi@linaro.org>
839 * server.c (vCont_supported): New global variable.
840 (handle_query): Set vCont_supported to 1 if "vContSupported+"
841 matches. Append ";vContSupported+" to own_buf.
842 (handle_v_requests): Append ";s;S" to own_buf if target supports
843 hardware single step or vCont_supported is false.
844 (capture_main): Set vCont_supported to zero.
846 2015-09-15 Yao Qi <yao.qi@linaro.org>
848 * linux-low.c (linux_supports_conditional_breakpoints): Rename
850 (linux_supports_hardware_single_step): ... New function.
851 (linux_target_ops): Update.
852 * lynx-low.c (lynx_target_ops): Set field
853 supports_hardware_single_step to target_can_do_hardware_single_step.
854 * nto-low.c (nto_target_ops): Likewise.
855 * spu-low.c (spu_target_ops): Likewise.
856 * win32-low.c (win32_target_ops): Likewise.
857 * target.c (target_can_do_hardware_single_step): New function.
858 * target.h (struct target_ops) <supports_conditional_breakpoints>:
859 Remove. <supports_hardware_single_step>: New field.
860 (target_supports_conditional_breakpoints): Remove.
861 (target_supports_hardware_single_step): New macro.
862 (target_can_do_hardware_single_step): Declare.
863 * server.c (handle_query): Use target_supports_hardware_single_step
864 instead of target_supports_conditional_breakpoints.
866 2015-09-15 Yao Qi <yao.qi@linaro.org>
868 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
870 (struct linux_target_ops the_low_target): Install
871 aarch64_linux_siginfo_fixup.
873 2015-09-11 Don Breazeal <donb@codesourcery.com>
874 Luis Machado <lgustavo@codesourcery.com>
876 * linux-low.c (linux_mourn): Static declaration.
877 (linux_arch_setup): Move in front of
878 handle_extended_wait.
879 (linux_arch_setup_thread): New function.
880 (handle_extended_wait): Handle exec events. Call
881 linux_arch_setup_thread. Make event_lwp argument a
882 pointer-to-a-pointer.
883 (check_zombie_leaders): Do not check stopped threads.
884 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
885 (linux_low_filter_event): Add lwp and thread for exec'ing
886 non-leader thread if leader thread has been deleted.
887 Refactor code into linux_arch_setup_thread and call it.
888 Pass child lwp pointer by reference to handle_extended_wait.
889 (linux_wait_for_event_filtered): Update comment.
890 (linux_wait_1): Prevent clobbering exec event status.
891 (linux_supports_exec_events): New function.
892 (linux_target_ops) <supports_exec_events>: Initialize new member.
893 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
895 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
896 * server.c (report_exec_events): New global variable.
897 (handle_query): Handle qSupported query for exec-events feature.
898 (captured_main): Initialize report_exec_events.
899 * server.h (report_exec_events): Declare new global variable.
900 * target.h (struct target_ops) <supports_exec_events>: New
902 (target_supports_exec_events): New macro.
903 * win32-low.c (win32_target_ops) <supports_exec_events>:
904 Initialize new member.
906 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
908 * linux-low.c (linux_low_enable_btrace): Remove.
909 (linux_target_ops): Replace linux_low_enable_btrace with
912 2015-09-03 Yao Qi <yao.qi@linaro.org>
914 * linux-aarch64-low.c (aarch64_insert_point): Call
915 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
918 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
920 * linux-low.c (check_stopped_by_breakpoint): Use
921 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
923 2015-08-27 Pedro Alves <palves@redhat.com>
925 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
927 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
929 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
930 the XNEW-family equivalent.
931 (compile_bytecodes): Likewise.
932 * dll.c (loaded_dll): Likewise.
933 * event-loop.c (append_callback_event): Likewise.
934 (create_file_handler): Likewise.
935 (create_file_event): Likewise.
936 * hostio.c (handle_open): Likewise.
937 * inferiors.c (add_thread): Likewise.
938 (add_process): Likewise.
939 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
940 * linux-arm-low.c (arm_new_process): Likewise.
941 (arm_new_thread): Likewise.
942 * linux-low.c (add_to_pid_list): Likewise.
943 (linux_add_process): Likewise.
944 (handle_extended_wait): Likewise.
946 (enqueue_one_deferred_signal): Likewise.
947 (enqueue_pending_signal): Likewise.
948 (linux_resume_one_lwp_throw): Likewise.
949 (linux_resume_one_thread): Likewise.
950 (linux_read_memory): Likewise.
951 (linux_write_memory): Likewise.
952 * linux-mips-low.c (mips_linux_new_process): Likewise.
953 (mips_linux_new_thread): Likewise.
954 (mips_add_watchpoint): Likewise.
955 * linux-x86-low.c (initialize_low_arch): Likewise.
956 * lynx-low.c (lynx_add_process): Likewise.
957 * mem-break.c (set_raw_breakpoint_at): Likewise.
958 (set_breakpoint): Likewise.
959 (add_condition_to_breakpoint): Likewise.
960 (add_commands_to_breakpoint): Likewise.
961 (clone_agent_expr): Likewise.
962 (clone_one_breakpoint): Likewise.
963 * regcache.c (new_register_cache): Likewise.
964 * remote-utils.c (look_up_one_symbol): Likewise.
965 * server.c (queue_stop_reply): Likewise.
966 (start_inferior): Likewise.
967 (queue_stop_reply_callback): Likewise.
968 (handle_target_event): Likewise.
969 * spu-low.c (fetch_ppc_memory): Likewise.
970 (store_ppc_memory): Likewise.
971 * target.c (set_target_ops): Likewise.
972 * thread-db.c (thread_db_load_search): Likewise.
973 (try_thread_db_load_1): Likewise.
974 * tracepoint.c (add_tracepoint): Likewise.
975 (add_tracepoint_action): Likewise.
976 (create_trace_state_variable): Likewise.
977 (cmd_qtdpsrc): Likewise.
978 (cmd_qtro): Likewise.
979 (add_while_stepping_state): Likewise.
980 * win32-low.c (child_add_thread): Likewise.
981 (get_image_name): Likewise.
983 2015-08-25 Yao Qi <yao.qi@linaro.org>
985 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
987 2015-08-25 Yao Qi <yao.qi@linaro.org>
989 * Makefile.in (aarch64-linux.o): New rule.
990 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
992 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
993 (aarch64_init_debug_reg_state): Make it extern.
994 (aarch64_linux_prepare_to_resume): Remove.
996 2015-08-25 Yao Qi <yao.qi@linaro.org>
998 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
999 lwp_arch_private_info and ptid_of_lwp.
1001 2015-08-25 Yao Qi <yao.qi@linaro.org>
1003 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1004 Find proc_info by find_process_pid. All callers updated.
1006 2015-08-25 Yao Qi <yao.qi@linaro.org>
1008 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1010 (debug_reg_change_callback): Remove.
1011 (aarch64_notify_debug_reg_change): Remove.
1013 2015-08-25 Yao Qi <yao.qi@linaro.org>
1015 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1016 Call current_lwp_ptid.
1018 2015-08-25 Yao Qi <yao.qi@linaro.org>
1020 * linux-aarch64-low.c (debug_reg_change_callback): Use
1023 2015-08-25 Yao Qi <yao.qi@linaro.org>
1025 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1027 2015-08-25 Yao Qi <yao.qi@linaro.org>
1029 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1031 2015-08-25 Yao Qi <yao.qi@linaro.org>
1033 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1036 2015-08-25 Yao Qi <yao.qi@linaro.org>
1038 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1040 (debug_reg_change_callback): Remove argument entry and add argument
1041 lwp. Remove local variable thread. Don't print thread id in the
1042 debugging output. Don't check whether pid of thread equals to pid.
1043 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1044 iterate_over_lwps instead find_inferior.
1046 2015-08-24 Pedro Alves <palves@redhat.com>
1048 * inferiors.c (get_first_process): New function.
1049 * inferiors.h (get_first_process): New declaration.
1050 * remote-utils.c (read_ptid): Default to the first process in the
1051 list, instead of to the current thread's process.
1053 2015-08-24 Pedro Alves <palves@redhat.com>
1055 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1056 * event-loop.c: Likewise.
1057 * remote-utils.c: Likewise.
1058 * tracepoint.c: Likewise.
1060 2015-08-24 Pedro Alves <palves@redhat.com>
1062 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1065 2015-08-21 Pedro Alves <palves@redhat.com>
1067 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1068 instead of literal 1.
1070 2015-08-21 Pedro Alves <palves@redhat.com>
1072 * tdesc.c (default_description): Explicitly zero-initialize.
1074 2015-08-21 Pedro Alves <palves@redhat.com>
1077 * inferiors.c (remove_thread): Discard any pending stop reply for
1079 * server.c (remove_all_on_match_pid): Rename to ...
1080 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1082 (discard_queued_stop_replies): Change parameter to a ptid. Now
1084 (handle_v_kill, kill_inferior_callback, captured_main)
1085 (process_serial_event): Adjust.
1086 * server.h (discard_queued_stop_replies): Declare.
1088 2015-08-21 Pedro Alves <palves@redhat.com>
1090 * linux-low.c (wait_for_sigstop): Always switch to no thread
1091 selected if the previously current thread dies.
1092 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1093 process instead of the current thread's.
1094 * remote-utils.c (input_interrupt): Don't check if there's no
1096 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1097 current thread to the general thread fails, error out.
1098 (handle_qxfer_auxv, handle_qxfer_libraries)
1099 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1100 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1101 (handle_query): Check if there's a thread selected instead of
1102 checking whether there's any thread in the thread list.
1103 (handle_qxfer_threads, handle_qxfer_btrace)
1104 (handle_qxfer_btrace_conf): Don't error out early if there's no
1105 thread in the thread list.
1106 (handle_v_cont, myresume): Don't set the current thread to the
1108 (process_serial_event) <Hg handling>: Also set thread_id if the
1109 previous general thread is still alive.
1110 (process_serial_event) <g/G handling>: If setting the current
1111 thread to the general thread fails, error out.
1112 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1113 thread's lwp instead of the current thread's.
1114 * target.c (set_desired_thread): If the desired thread was not
1115 found, leave the current thread pointing to NULL. Return an int
1116 (boolean) indicating success.
1117 * target.h (set_desired_thread): Change return type to int.
1119 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1121 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1122 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1124 (ps_get_thread_area): New function.
1126 2015-08-19 Gary Benson <gbenson@redhat.com>
1128 * hostio.c (handle_pread): Do not attempt to read more data
1129 than hostio_reply_with_data can fit in a packet.
1131 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1133 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1135 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1137 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1139 2015-08-06 Pedro Alves <palves@redhat.com>
1141 * tracepoint.c (expr_eval_result): Now an int.
1143 2015-08-06 Pedro Alves <palves@redhat.com>
1145 * gdbthread.h (struct regcache): Forward declare.
1146 (struct thread_info) <regcache_data>: Now a struct regcache
1148 * inferiors.c (inferior_regcache_data)
1149 (set_inferior_regcache_data): Now work with struct regcache
1151 * inferiors.h (struct regcache): Forward declare.
1152 (inferior_regcache_data, set_inferior_regcache_data): Now work
1153 with struct regcache pointers.
1154 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1155 (free_register_cache_thread): Remove struct regcache pointer
1158 2015-08-06 Pedro Alves <palves@redhat.com>
1160 * server.c (captured_main): On error, print the exception message
1161 to stderr, and if run_once is set, throw a quit.
1163 2015-08-06 Pedro Alves <palves@redhat.com>
1165 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1168 2015-08-06 Pedro Alves <palves@redhat.com>
1170 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1171 reading beyond the passed in buffer length.
1173 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1175 * tracepoint.c (symbol_list) <required>: Remove.
1177 2015-08-06 Pedro Alves <palves@redhat.com>
1179 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1180 count if stopping and suspending threads.
1181 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1182 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1183 (linux_detach): Complete an ongoing step-over.
1184 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1186 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1187 (linux_wait_1): If passing a signal to the inferior after
1188 finishing a step-over, unsuspend and re-resume all lwps. If we
1189 see a single-step event but the thread should be continuing, don't
1190 pass the trap to gdb.
1191 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1192 internal_error instead of gdb_assert.
1193 (enqueue_pending_signal): New function.
1194 (check_ptrace_stopped_lwp_gone): Add debug output.
1195 (start_step_over): Use internal_error instead of gdb_assert.
1196 (complete_ongoing_step_over): New function.
1197 (linux_resume_one_thread): Don't resume a suspended thread.
1198 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1201 2015-08-06 Pedro Alves <palves@redhat.com>
1203 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1204 (linux_thread_alive): Use lwp_is_marked_dead.
1205 (extended_event_reported): Delete.
1206 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1207 instead of extended_event_reported.
1208 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1210 (lwp_is_marked_dead): New function.
1211 (lwp_running): Use lwp_is_marked_dead.
1212 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1215 2015-08-06 Pedro Alves <palves@redhat.com>
1217 * linux-low.c (linux_wait_1): Move fork event output out of the
1218 !report_to_gdb check. Pass event_child->waitstatus to
1219 target_waitstatus_to_string instead of ourstatus.
1221 2015-08-04 Yao Qi <yao.qi@linaro.org>
1223 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1224 if current_thread is 32 bit.
1226 2015-08-04 Yao Qi <yao.qi@linaro.org>
1228 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1229 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1230 * server.c (extended_protocol): Remove "static".
1231 * server.h (extended_protocol): Declare it.
1233 2015-08-04 Yao Qi <yao.qi@linaro.org>
1235 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1236 both aarch64 and aarch32.
1237 (aarch64_set_pc): Likewise.
1239 2015-08-04 Yao Qi <yao.qi@linaro.org>
1241 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1242 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1243 arm-with-neon.xml to srv_xmlfiles.
1244 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1245 (is_64bit_tdesc): New function.
1246 (aarch64_linux_read_description): New function.
1247 (aarch64_arch_setup): Call aarch64_linux_read_description.
1248 (regs_info): Rename to regs_info_aarch64.
1249 (aarch64_regs_info): Return right regs_info.
1250 (initialize_low_arch): Call initialize_low_arch_aarch32.
1252 2015-08-04 Yao Qi <yao.qi@linaro.org>
1254 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1255 * linux-aarch32-low.c: New file.
1256 * linux-aarch32-low.h: New file.
1257 * linux-arm-low.c (arm_fill_gregset): Move it to
1258 linux-aarch32-low.c.
1259 (arm_store_gregset): Likewise.
1260 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1261 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1262 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1263 (regs_info): Rename to regs_info_arm.
1264 (arm_regs_info): Return regs_info_aarch32 if
1265 have_ptrace_getregset is 1 and target description is
1266 arm_with_neon or arm_with_vfpv3.
1267 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1268 Call initialize_low_arch_aarch32 instead.
1270 2015-08-04 Yao Qi <yao.qi@linaro.org>
1272 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1273 * linux-low.c: ... here.
1274 * linux-low.h (have_ptrace_getregset): Declare it.
1276 2015-08-04 Pedro Alves <palves@redhat.com>
1278 * thread-db.c (struct thread_db): Use new typedefs.
1279 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1281 (disable_thread_event_reporting): Cast result of dlsym to
1282 destination function pointer type.
1283 (thread_db_mourn): Use td_ta_delete_ftype.
1285 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1287 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1289 (CDX_BREAKPOINT): Define for R2.
1290 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1291 (the_low_target): Add comments.
1293 2015-07-30 Yao Qi <yao.qi@linaro.org>
1295 * linux-arm-low.c (arm_hwcap): Remove it.
1296 (arm_read_description): New local variable arm_hwcap. Don't
1297 set arm_hwcap to zero.
1299 2015-07-30 Yao Qi <yao.qi@linaro.org>
1301 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1302 Use regcache->tdesc instead.
1303 (arm_store_wmmxregset): Likewise.
1304 (arm_fill_vfpregset): Likewise.
1305 (arm_store_vfpregset): Likewise.
1307 2015-07-30 Yao Qi <yao.qi@linaro.org>
1309 * linux-arm-low.c: Include arch/arm.h.
1310 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1311 (arm_store_gregset): Likewise.
1313 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1315 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1316 ptrace's 4th parameter.
1318 2015-07-27 Yao Qi <yao.qi@linaro.org>
1320 * configure.srv (case aarch64*-*-linux*): Don't set
1323 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1325 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1327 * linux-arm-low.c: Likewise.
1328 * linux-cris-low.c: Likewise.
1329 * linux-crisv32-low.c: Likewise.
1330 * linux-low.c: Likewise.
1331 * linux-m68k-low.c: Likewise.
1332 * linux-mips-low.c: Likewise.
1333 * linux-nios2-low.c: Likewise.
1334 * linux-s390-low.c: Likewise.
1335 * linux-sparc-low.c: Likewise.
1336 * linux-tic6x-low.c: Likewise.
1337 * linux-tile-low.c: Likewise.
1338 * linux-x86-low.c: Likewise.
1340 2015-07-24 Pedro Alves <palves@redhat.com>
1342 * config.in: Regenerate.
1343 * configure: Regenerate.
1345 2015-07-24 Pedro Alves <palves@redhat.com>
1347 * acinclude.m4: Include ../ptrace.m4.
1348 * configure.ac: Call GDB_AC_PTRACE.
1349 * config.in, configure: Regenerate.
1351 2015-07-24 Yao Qi <yao.qi@linaro.org>
1353 * linux-low.c (linux_create_inferior): Remove setting to
1354 proc->priv->new_inferior.
1355 (linux_attach): Likewise.
1356 (linux_low_filter_event): Likewise.
1357 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1359 2015-07-24 Yao Qi <yao.qi@linaro.org>
1361 * linux-low.c (linux_arch_setup): New function.
1362 (linux_low_filter_event): If proc->tdesc is NULL and
1363 proc->attached is true, call the_low_target.arch_setup.
1364 Otherwise, keep status pending, and return.
1365 (linux_resume_one_lwp_throw): Don't call get_pc if
1366 thread->while_stepping isn't NULL. Don't call
1367 get_thread_regcache if proc->tdesc is NULL.
1368 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1369 (linux_target_ops): Install arch_setup.
1370 * server.c (start_inferior): Call the_target->arch_setup.
1371 * target.h (struct target_ops) <arch_setup>: New field.
1372 (target_arch_setup): New marco.
1373 * lynx-low.c (lynx_target_ops): Update.
1374 * nto-low.c (nto_target_ops): Update.
1375 * spu-low.c (spu_target_ops): Update.
1376 * win32-low.c (win32_target_ops): Update.
1378 2015-07-24 Yao Qi <yao.qi@linaro.org>
1380 * linux-low.c (linux_add_process): Don't set
1381 proc->priv->new_inferior.
1382 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1383 (linux_attach): Likewise.
1385 2015-07-24 Yao Qi <yao.qi@linaro.org>
1387 * server.c (start_inferior): Code refactor.
1389 2015-07-24 Yao Qi <yao.qi@linaro.org>
1391 * server.c (process_serial_event): Set general_thread.
1393 2015-07-21 Yao Qi <yao.qi@linaro.org>
1395 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1396 aarch64_linux_get_debug_reg_capacity.
1398 2015-07-17 Yao Qi <yao.qi@linaro.org>
1400 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1401 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1402 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1403 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1404 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1405 (AARCH64_HWP_ALIGNMENT): Likewise.
1406 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1407 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1408 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1409 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1410 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1411 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1412 (struct aarch64_debug_reg_state): Likewise.
1413 (struct arch_lwp_info): Likewise.
1414 (aarch64_align_watchpoint): Likewise.
1415 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1416 (aarch64_watchpoint_length): Likewise.
1417 (aarch64_point_encode_ctrl_reg): Likewise
1418 (aarch64_point_is_aligned): Likewise.
1419 (aarch64_align_watchpoint): Likewise.
1420 (aarch64_linux_set_debug_regs):
1421 (aarch64_dr_state_insert_one_point): Likewise.
1422 (aarch64_dr_state_remove_one_point): Likewise.
1423 (aarch64_handle_breakpoint): Likewise.
1424 (aarch64_handle_aligned_watchpoint): Likewise.
1425 (aarch64_handle_unaligned_watchpoint): Likewise.
1426 (aarch64_handle_watchpoint): Likewise.
1428 2015-07-17 Yao Qi <yao.qi@linaro.org>
1430 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1431 and don't aarch64_get_debug_reg_state. All callers update.
1432 (aarch64_handle_aligned_watchpoint): Likewise.
1433 (aarch64_handle_unaligned_watchpoint): Likewise.
1434 (aarch64_handle_watchpoint): Likewise.
1435 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1436 (aarch64_remove_point): Likewise.
1438 2015-07-17 Yao Qi <yao.qi@linaro.org>
1440 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1442 (aarch64_handle_unaligned_watchpoint): Likewise.
1444 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1446 Revert the previous 3 commits:
1447 Move gdb_regex* to common/
1448 Move linux_find_memory_regions_full & co.
1449 gdbserver build-id attribute generator
1451 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1452 Jan Kratochvil <jan.kratochvil@redhat.com>
1454 gdbserver build-id attribute generator.
1455 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1456 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1457 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1459 (get_dynamic): Use find_pdhr to traverse program headers.
1460 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1461 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1462 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1463 (get_hex_build_id): New.
1464 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1465 to reply XML document.
1467 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1468 Jan Kratochvil <jan.kratochvil@redhat.com>
1470 * target.c: Include target/target-utils.h and fcntl.h.
1471 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1472 (target_fileio_read_stralloc): New functions.
1474 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1476 * Makefile.in (OBS): Add gdb_regex.o.
1478 * config.in: Rebuilt.
1479 * configure: Rebuilt.
1481 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1482 Jan Kratochvil <jan.kratochvil@redhat.com>
1484 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1485 * Makefile.in (OBS): Add target-utils.o.
1486 (linux-maps.o, target-utils.o): New.
1487 * configure.srv (srv_linux_obj): Add linux-maps.o.
1489 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1491 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1493 (the_low_target): Install it.
1495 2015-07-14 Pedro Alves <palves@redhat.com>
1497 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1498 Instead, ignore ECHILD, and throw an error for other errnos.
1500 2015-07-10 Pedro Alves <palves@redhat.com>
1502 * event-loop.c (struct callback_event) <data>: Change type to
1503 gdb_client_data instance instead of gdb_client_data pointer.
1504 (append_callback_event): Adjust.
1506 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1508 * linux-aarch64-low.c: Add comments for each linux_target_ops
1509 method. Remove comments already covered in target_ops and
1510 linux_target_ops definitions.
1511 (the_low_target): Add comments for each unimplemented method.
1513 2015-07-09 Yao Qi <yao.qi@linaro.org>
1515 * linux-aarch64-low.c (aarch64_regmap): Remove.
1516 (aarch64_usrregs_info): Remove.
1517 (regs_info): Set field usrregs to NULL.
1519 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1521 * linux-low.c: Include "rsp-low.h"
1522 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1523 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1524 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1525 (handle_btrace_enable_pt): New.
1526 (handle_btrace_general_set): Support "pt".
1527 (handle_btrace_conf_general_set): Support "pt:size".
1529 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1531 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1534 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1536 * linux-aarch64-low.c: Remove comment about endianness.
1537 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1538 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1541 2015-06-24 Gary Benson <gbenson@redhat.com>
1543 * linux-i386-ipa.c (stdint.h): Do not include.
1544 * lynx-i386-low.c (stdint.h): Likewise.
1545 * lynx-ppc-low.c (stdint.h): Likewise.
1546 * mem-break.c (stdint.h): Likewise.
1547 * thread-db.c (stdint.h): Likewise.
1548 * tracepoint.c (stdint.h): Likewise.
1549 * win32-low.c (stdint.h): Likewise.
1551 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1553 * server.c (write_qxfer_response): Update call to
1554 remote_escape_output.
1556 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1557 Jan Kratochvil <jan.kratochvil@redhat.com>
1559 Merge multiple hex conversions.
1560 * gdbreplay.c (tohex): Rename to 'fromhex'.
1561 (logchar): Use fromhex.
1563 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1565 * server.c (handle_qxfer_libraries): Set `version' attribute for
1568 2015-06-10 Gary Benson <gbenson@redhat.com>
1570 * target.h (struct target_ops) <multifs_open>: New field.
1571 <multifs_unlink>: Likewise.
1572 <multifs_readlink>: Likewise.
1573 * linux-low.c (nat/linux-namespaces.h): New include.
1574 (linux_target_ops): Initialize the_target->multifs_open,
1575 the_target->multifs_unlink and the_target->multifs_readlink.
1576 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1577 * hostio.c (hostio_fs_pid): New static variable.
1578 (hostio_handle_new_gdb_connection): New function.
1579 (handle_setfs): Likewise.
1580 (handle_open): Use the_target->multifs_open as appropriate.
1581 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1582 (handle_readlink): Use the_target->multifs_readlink as
1584 (handle_vFile): Handle vFile:setfs packets.
1585 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1586 after target_handle_new_gdb_connection.
1588 2015-06-10 Gary Benson <gbenson@redhat.com>
1590 * configure.ac (AC_CHECK_FUNCS): Add setns.
1591 * config.in: Regenerate.
1592 * configure: Likewise.
1593 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1594 (linux-namespaces.o): New rule.
1595 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1597 2015-06-09 Gary Benson <gbenson@redhat.com>
1599 * hostio.c (handle_open): Process mode argument with
1600 fileio_to_host_mode.
1602 2015-06-01 Yao Qi <yao.qi@linaro.org>
1604 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1605 * linux-x86-low.c: Likewise.
1607 2015-05-28 Don Breazeal <donb@codesourcery.com>
1609 * linux-low.c (handle_extended_wait): Initialize
1610 thread_info.last_resume_kind for new fork children.
1612 2015-05-15 Pedro Alves <palves@redhat.com>
1614 * target.h (target_handle_new_gdb_connection): Rewrite using if
1615 wrapped in do/while.
1617 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1619 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1620 * configure, config.in: Regenerate.
1621 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1624 2015-05-12 Don Breazeal <donb@codesourcery.com>
1626 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1627 PTRACE_EVENT_VFORK_DONE.
1628 (linux_low_ptrace_options, extended_event_reported): Add vfork
1630 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1631 and "vforkdone" for RSP 'T' Stop Reply Packet.
1632 * server.h (report_vfork_events): Declare
1635 2015-05-12 Don Breazeal <donb@codesourcery.com>
1637 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1638 (the_low_target) <new_fork>: Initialize new member.
1639 * linux-arm-low.c (arm_new_fork): New function.
1640 (the_low_target) <new_fork>: Initialize new member.
1641 * linux-low.c (handle_extended_wait): Call new target function
1643 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1644 * linux-mips-low.c (mips_add_watchpoint): New function
1645 extracted from mips_insert_point.
1646 (the_low_target) <new_fork>: Initialize new member.
1647 (mips_linux_new_fork): New function.
1648 (mips_insert_point): Call mips_add_watchpoint.
1649 * linux-x86-low.c (x86_linux_new_fork): New function.
1650 (the_low_target) <new_fork>: Initialize new member.
1652 2015-05-12 Don Breazeal <donb@codesourcery.com>
1654 * linux-low.c (handle_extended_wait): Implement return value,
1655 rename argument 'event_child' to 'event_lwp', handle
1656 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1657 (linux_low_ptrace_options): New function.
1658 (linux_low_filter_event): Call linux_low_ptrace_options,
1659 use different argument fo linux_enable_event_reporting,
1660 use return value from handle_extended_wait.
1661 (extended_event_reported): New function.
1662 (linux_wait_1): Call extended_event_reported and set
1663 status to report fork events.
1664 (linux_write_memory): Add pid to debug message.
1665 (reset_lwp_ptrace_options_callback): New function.
1666 (linux_handle_new_gdb_connection): New function.
1667 (linux_target_ops): Initialize new structure member.
1668 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1669 * lynx-low.c: Initialize new structure member.
1670 * remote-utils.c (prepare_resume_reply): Implement stop reason
1671 "fork" for "T" stop message.
1672 * server.c (handle_query): Call handle_new_gdb_connection.
1673 * server.h (report_fork_events): Declare global flag.
1674 * target.h (struct target_ops) <handle_new_gdb_connection>:
1676 (target_handle_new_gdb_connection): New macro.
1677 * win32-low.c: Initialize new structure member.
1679 2015-05-12 Don Breazeal <donb@codesourcery.com>
1681 * mem-break.c (APPEND_TO_LIST): Define macro.
1682 (clone_agent_expr): New function.
1683 (clone_one_breakpoint): New function.
1684 (clone_all_breakpoints): New function.
1685 * mem-break.h: Declare new functions.
1687 2015-05-12 Don Breazeal <donb@codesourcery.com>
1689 * linux-low.c (linux_supports_fork_events): New function.
1690 (linux_supports_vfork_events): New function.
1691 (linux_target_ops): Initialize new structure members.
1692 (initialize_low): Call linux_check_ptrace_features.
1693 * lynx-low.c (lynx_target_ops): Initialize new structure
1695 * server.c (report_fork_events, report_vfork_events):
1697 (handle_query): Add new features to qSupported packet and
1699 (captured_main): Initialize new global variables.
1700 * target.h (struct target_ops) <supports_fork_events>:
1702 <supports_vfork_events>: New member.
1703 (target_supports_fork_events): New macro.
1704 (target_supports_vfork_events): New macro.
1705 * win32-low.c (win32_target_ops): Initialize new structure
1708 2015-05-12 Gary Benson <gbenson@redhat.com>
1710 * server.c (handle_qxfer_exec_file): Use current process
1713 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1715 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1716 Remove HAVE_PTRACE_GETREGS conditionals.
1717 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1718 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1720 2015-05-08 Yao Qi <yao.qi@linaro.org>
1722 * linux-low.c (linux_supports_conditional_breakpoints): New
1724 (linux_target_ops): Install new target method.
1725 * lynx-low.c (lynx_target_ops): Install NULL hook for
1726 supports_conditional_breakpoints.
1727 * nto-low.c (nto_target_ops): Likewise.
1728 * spu-low.c (spu_target_ops): Likewise.
1729 * win32-low.c (win32_target_ops): Likewise.
1730 * server.c (handle_query): Check
1731 target_supports_conditional_breakpoints.
1732 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1734 (target_supports_conditional_breakpoints): New macro.
1736 2015-05-06 Pedro Alves <palves@redhat.com>
1739 * server.c (start_inferior): If the process exits, mourn it.
1741 2015-04-21 Gary Benson <gbenson@redhat.com>
1743 * hostio.c (fileio_open_flags_to_host): Factored out to
1744 fileio_to_host_openflags in common/fileio.c. Single use
1747 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1749 * linux-xtensa-low.c (xtensa_fill_gregset)
1750 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1753 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1755 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1756 (regs_info): Replace usrregs pointer with NULL.
1758 2015-04-17 Gary Benson <gbenson@redhat.com>
1760 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1761 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1762 * server.c (handle_qxfer_exec_file): New function.
1763 (qxfer_packets): Add exec-file entry.
1764 (handle_query): Report qXfer:exec-file:read as supported packet.
1766 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1768 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1770 2015-04-09 Gary Benson <gbenson@redhat.com>
1772 * hostio-errno.c (errno_to_fileio_error): Remove function.
1773 Update caller to use remote_fileio_to_fio_error.
1775 2015-04-09 Yao Qi <yao.qi@linaro.org>
1777 * linux-low.c (linux_insert_point): Call
1778 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1779 (linux_remove_point): Call remove_memory_breakpoint if type is
1781 * linux-x86-low.c (x86_insert_point): Don't call
1782 insert_memory_breakpoint.
1783 (x86_remove_point): Don't call remove_memory_breakpoint.
1785 2015-04-01 Pedro Alves <palves@redhat.com>
1786 Cleber Rosa <crosa@redhat.com>
1788 * server.c (gdbserver_usage): Reorganize and extend the usage
1791 2015-03-24 Pedro Alves <palves@redhat.com>
1793 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1794 output. Also dump TRAP_TRACE.
1795 (linux_low_filter_event): In debug output, distinguish a
1796 resume_stop SIGSTOP from a delayed SIGSTOP.
1798 2015-03-24 Gary Benson <gbenson@redhat.com>
1800 * linux-x86-low.c (x86_linux_new_thread): Moved to
1802 (x86_linux_prepare_to_resume): Likewise.
1804 2015-03-24 Gary Benson <gbenson@redhat.com>
1806 * Makefile.in (x86-linux-dregs.o): New rule.
1807 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1808 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1809 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1810 (x86_linux_dr_get): Likewise.
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_update_debug_registers): Likewise.
1820 2015-03-24 Gary Benson <gbenson@redhat.com>
1822 * linux-x86-low.c (x86_linux_update_debug_registers):
1823 New function, factored out from...
1824 (x86_linux_prepare_to_resume): ...this.
1826 2015-03-24 Gary Benson <gbenson@redhat.com>
1828 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1829 (x86_linux_dr_set): Likewise.
1830 (update_debug_registers_callback): Likewise.
1831 (x86_linux_dr_set_addr): Likewise.
1832 (x86_linux_dr_get_addr): Likewise.
1833 (x86_linux_dr_set_control): Likewise.
1834 (x86_linux_dr_get_control): Likewise.
1835 (x86_linux_dr_get_status): Likewise.
1836 (x86_linux_prepare_to_resume): Likewise.
1838 2015-03-24 Gary Benson <gbenson@redhat.com>
1840 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1841 Use perror_with_name. Pass string through gettext.
1842 (x86_linux_dr_set): Likewise.
1844 2015-03-24 Gary Benson <gbenson@redhat.com>
1846 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1847 (x86_linux_dr_set_addr): ...this.
1848 (x86_dr_low_get_addr): Rename to...
1849 (x86_linux_dr_get_addr): ...this.
1850 (x86_dr_low_set_control): Rename to...
1851 (x86_linux_dr_set_control): ...this.
1852 (x86_dr_low_get_control): Rename to...
1853 (x86_linux_dr_get_control): ...this.
1854 (x86_dr_low_get_status): Rename to...
1855 (x86_linux_dr_get_status): ...this.
1856 (x86_dr_low): Update with new function names.
1858 2015-03-24 Gary Benson <gbenson@redhat.com>
1860 * Makefile.in (x86-linux.o): New rule.
1861 * configure.srv: Add x86-linux.o to relevant targets.
1862 * linux-low.c (lwp_set_arch_private_info): New function.
1863 (lwp_arch_private_info): Likewise.
1864 * linux-x86-low.c: Include nat/x86-linux.h.
1865 (arch_lwp_info): Removed structure.
1866 (update_debug_registers_callback):
1867 Use lwp_set_debug_registers_changed.
1868 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1869 and lwp_set_debug_registers_changed.
1870 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1872 2015-03-24 Gary Benson <gbenson@redhat.com>
1874 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1875 * linux-arm-low.c (arm_new_thread): Likewise.
1876 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1877 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1878 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1879 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1881 2015-03-24 Gary Benson <gbenson@redhat.com>
1883 * linux-low.c (ptid_of_lwp): New function.
1884 (lwp_is_stopped): Likewise.
1885 (lwp_stop_reason): Likewise.
1886 * linux-x86-low.c (update_debug_registers_callback):
1888 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1891 2015-03-24 Gary Benson <gbenson@redhat.com>
1893 * linux-low.h (linux_stop_lwp): Remove declaration.
1895 2015-03-24 Gary Benson <gbenson@redhat.com>
1897 * linux-low.h: Include nat/linux-nat.h.
1898 * linux-low.c (iterate_over_lwps_args): New structure.
1899 (iterate_over_lwps_filter): New function.
1900 (iterate_over_lwps): Likewise.
1901 * linux-x86-low.c (update_debug_registers_callback):
1902 Update signature to what iterate_over_lwps expects.
1903 Remove PID check that iterate_over_lwps now performs.
1904 (x86_dr_low_set_addr): Use iterate_over_lwps.
1905 (x86_dr_low_set_control): Likewise.
1907 2015-03-24 Gary Benson <gbenson@redhat.com>
1909 * linux-x86-low.c (x86_debug_reg_state): New function.
1910 (x86_linux_prepare_to_resume): Use the above.
1912 2015-03-24 Gary Benson <gbenson@redhat.com>
1914 * linux-low.c (current_lwp_ptid): New function.
1915 * linux-x86-low.c: Include nat/linux-nat.h.
1916 (x86_dr_low_get_addr): Use current_lwp_ptid.
1917 (x86_dr_low_get_control): Likewise.
1918 (x86_dr_low_get_status): Likewise.
1920 2015-03-20 Pedro Alves <palves@redhat.com>
1922 * tracepoint.c (cmd_qtstatus): Make "str" const.
1924 2015-03-20 Pedro Alves <palves@redhat.com>
1926 * server.c (handle_general_set): Make "req_str" const.
1928 2015-03-19 Pedro Alves <palves@redhat.com>
1930 * linux-low.c (linux_resume_one_lwp): Rename to ...
1931 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1932 instead call perror_with_name.
1933 (check_ptrace_stopped_lwp_gone): New function.
1934 (linux_resume_one_lwp): Reimplement as wrapper around
1935 linux_resume_one_lwp_throw that swallows errors if the LWP is
1938 2015-03-19 Pedro Alves <palves@redhat.com>
1940 * linux-low.c (count_events_callback, select_event_lwp_callback):
1941 No longer check whether the thread has resume_stop as last resume
1944 2015-03-19 Pedro Alves <palves@redhat.com>
1946 * linux-low.c (count_events_callback, select_event_lwp_callback):
1947 Use the lwp's status_pending_p field, not the thread's.
1949 2015-03-19 Pedro Alves <palves@redhat.com>
1951 * linux-low.c (select_event_lwp_callback): Update comments to
1952 no longer mention SIGTRAP.
1954 2015-03-18 Gary Benson <gbenson@redhat.com>
1956 * server.c (handle_query): Do not report vFile:fstat as supported.
1958 2015-03-11 Gary Benson <gbenson@redhat.com>
1960 * hostio.c (sys/types.h): New include.
1961 (sys/stat.h): Likewise.
1962 (common-remote-fileio.h): Likewise.
1963 (handle_fstat): New function.
1964 (handle_vFile): Handle vFile:fstat packets.
1966 2015-03-11 Gary Benson <gbenson@redhat.com>
1968 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1969 struct stat.st_blocks and struct stat.st_blksize.
1970 * configure: Regenerate.
1971 * config.in: Likewise.
1972 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1973 (OBS): Add common-remote-fileio.o.
1974 (common-remote-fileio.o): New rule.
1976 2015-03-09 Pedro Alves <palves@redhat.com>
1978 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1979 'struct sockaddr' pointer in 'accept' call.
1981 2015-03-09 Pedro Alves <palves@redhat.com>
1984 2015-03-07 Pedro Alves <palves@redhat.com>
1985 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1986 or <winsock2.h> here. Instead include "gdb_socket.h".
1987 (remote_open): Use union gdb_sockaddr_u.
1988 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1989 or <winsock2.h> here. Instead include "gdb_socket.h".
1990 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1991 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1993 (init_named_socket, gdb_agent_helper_thread): Use union
1996 2015-03-07 Pedro Alves <palves@redhat.com>
1998 * configure.ac (build_warnings): Move
1999 -Wdeclaration-after-statement to the C-specific set.
2000 * configure: Regenerate.
2002 2015-03-07 Pedro Alves <palves@redhat.com>
2004 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2005 or <winsock2.h> here. Instead include "gdb_socket.h".
2006 (remote_open): Use union gdb_sockaddr_u.
2007 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2008 or <winsock2.h> here. Instead include "gdb_socket.h".
2009 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2010 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2012 (init_named_socket, gdb_agent_helper_thread): Use union
2015 2015-03-07 Pedro Alves <palves@redhat.com>
2017 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2020 2015-03-06 Yao Qi <yao.qi@linaro.org>
2022 * linux-aarch64-low.c (aarch64_insert_point): Use
2023 show_debug_regs as a boolean.
2024 (aarch64_remove_point): Likewise.
2026 2015-03-05 Pedro Alves <palves@redhat.com>
2028 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2029 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2030 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2031 * nto-low.c (nto_target_ops): Likewise.
2032 * spu-low.c (spu_target_ops): Likewise.
2033 * win32-low.c (win32_target_ops): Likewise.
2035 2015-03-04 Pedro Alves <palves@redhat.com>
2037 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2038 Decide whether a breakpoint triggered based on the SIGTRAP's
2040 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2041 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2042 (linux_low_filter_event): Check for breakpoints before checking
2044 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2046 (linux_stopped_by_sw_breakpoint)
2047 (linux_supports_stopped_by_sw_breakpoint)
2048 (linux_stopped_by_hw_breakpoint)
2049 (linux_supports_stopped_by_hw_breakpoint): New functions.
2050 (linux_target_ops): Install new target methods.
2052 2015-03-04 Pedro Alves <palves@redhat.com>
2054 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2055 * server.c (swbreak_feature, hwbreak_feature): New globals.
2056 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2057 (captured_main): Clear swbreak_feature and hwbreak_feature.
2058 * server.h (swbreak_feature, hwbreak_feature): Declare.
2059 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2060 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2061 supports_stopped_by_hw_breakpoint>: New fields.
2062 (target_supports_stopped_by_sw_breakpoint)
2063 (target_stopped_by_sw_breakpoint)
2064 (target_supports_stopped_by_hw_breakpoint)
2065 (target_stopped_by_hw_breakpoint): Declare.
2067 2015-03-04 Pedro Alves <palves@redhat.com>
2069 enum lwp_stop_reason -> enum target_stop_reason
2070 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2071 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2072 (linux_wait_1, stuck_in_jump_pad_callback)
2073 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2074 (linux_stopped_by_watchpoint):
2075 * linux-low.h (enum lwp_stop_reason): Delete.
2076 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2077 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2079 2015-03-04 Yao Qi <yao.qi@linaro.org>
2081 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2083 2015-03-03 Gary Benson <gbenson@redhat.com>
2085 * hostio.c (handle_vFile): Fix prefix lengths.
2087 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2089 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2092 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2094 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2095 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2096 (clean): Add "rm -f" for above C files.
2097 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2098 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2099 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2100 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2101 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2102 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2103 (init_registers_s390x_vx_linux64)
2104 (init_registers_s390x_tevx_linux64)
2105 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2106 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2108 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2109 (s390_store_vxrs_high): New functions.
2110 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2112 (s390_arch_setup): Add logic for selecting one of the new target
2113 descriptions. Activate the new vector regsets if applicable.
2114 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2115 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2116 and init_registers_s390x_tevx_linux64.
2118 2015-03-01 Pedro Alves <palves@redhat.com>
2120 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2123 2015-02-27 Pedro Alves <palves@redhat.com>
2125 * linux-x86-low.c (u_debugreg_offset): New function.
2126 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2128 2015-02-27 Pedro Alves <palves@redhat.com>
2130 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2131 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2132 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2133 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2134 (ps_lsetfpregs, ps_getpid)
2135 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2136 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2137 (ps_lsetxregs, ps_plog): Declare.
2139 2015-02-27 Pedro Alves <palves@redhat.com>
2141 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2142 IP_AGENT_EXPORT_FUNC.
2143 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2144 IP_AGENT_EXPORT_FUNC.
2145 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2146 (IP_AGENT_EXPORT): Delete.
2147 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2148 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2149 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2150 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2151 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2152 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2153 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2154 (traceframe_read_count, traceframe_write_count)
2155 (traceframes_created, trace_state_variables, get_raw_reg)
2156 (get_trace_state_variable_value, set_trace_state_variable_value)
2157 (ust_loaded, helper_thread_id, cmd_buf): Use
2158 IPA_SYM_EXPORTED_NAME.
2159 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2160 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2161 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2162 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2163 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2164 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2165 EXTERN_C_PUSH/EXTERN_C_POP.
2166 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2167 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2168 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2169 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2170 (traceframe_write_count, traceframe_read_count)
2171 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2172 (about_to_request_buffer_space, get_trace_state_variable_value)
2173 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2174 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2175 EXTERN_C_PUSH/EXTERN_C_POP.
2176 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2177 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2178 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2179 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2180 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2181 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2182 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2183 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2185 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2186 (IP_AGENT_EXPORT_VAR_DECL): Define.
2188 (gdb_agent_get_raw_reg): Declare.
2190 2015-02-27 Tom Tromey <tromey@redhat.com>
2191 Pedro Alves <palves@redhat.com>
2193 Rename symbols whose names are reserved C++ keywords throughout.
2195 2015-02-27 Pedro Alves <palves@redhat.com>
2197 * Makefile.in (COMPILER): New, get it from autoconf.
2198 (CXX): Get from autoconf instead.
2199 (COMPILE.pre): Use COMPILER.
2200 (CC-LD): Rename to ...
2201 (CC_LD): ... this. Use COMPILER.
2202 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2203 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2204 * acinclude.m4: Include build-with-cxx.m4.
2205 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2206 Disable -Werror by default if building in C++ mode.
2207 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2208 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2209 the C++ compiler. Save/restore CXXFLAGS too.
2210 * configure: Regenerate.
2212 2015-02-27 Pedro Alves <palves@redhat.com>
2214 * acinclude.m4: Include libiberty.m4.
2215 * configure.ac: Call libiberty_INIT.
2216 * config.in, configure: Regenerate.
2218 2015-02-26 Pedro Alves <palves@redhat.com>
2220 * linux-low.c (linux_wait_1): When incrementing the PC past a
2221 program breakpoint always use the_low_target.breakpoint_len as
2222 increment, rather than the maximum between that and
2223 the_low_target.decr_pc_after_break.
2225 2015-02-23 Pedro Alves <palves@redhat.com>
2227 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2228 thread was doing a step-over; always adjust the PC if
2229 we stepped over a permanent breakpoint.
2230 (linux_wait_1): If we stepped over breakpoint that was on top of a
2231 permanent breakpoint, manually advance the PC past it.
2233 2015-02-23 Pedro Alves <palves@redhat.com>
2235 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2237 (x86_fill_gregset, x86_store_gregset): Use it when handling
2240 2015-02-20 Pedro Alves <palves@redhat.com>
2242 * thread-db.c: Include "nat/linux-procfs.h".
2243 (thread_db_init): Skip listing new threads if the kernel supports
2244 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2246 2015-02-20 Pedro Alves <palves@redhat.com>
2248 * linux-low.c (status_pending_p_callback): Use ptid_match.
2250 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2252 PR breakpoints/16812
2253 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2254 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2255 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2257 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2259 PR breakpoints/15956
2260 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2262 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2264 * linux-low.c (linux_low_btrace_conf): Print size.
2265 * server.c (handle_btrace_conf_general_set): New.
2266 (hanle_general_set): Call handle_btrace_conf_general_set.
2267 (handle_query): Report Qbtrace-conf:bts:size as supported.
2269 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2271 * linux-low.c (linux_low_enable_btrace): Update parameters.
2272 (linux_low_btrace_conf): New.
2273 (linux_target_ops)<to_btrace_conf>: Initialize.
2274 * server.c (current_btrace_conf): New.
2275 (handle_btrace_enable): Rename to ...
2276 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2277 to target_enable_btrace. Update comment. Update users.
2278 (handle_qxfer_btrace_conf): New.
2279 (qxfer_packets): Add btrace-conf entry.
2280 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2281 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2282 (target_ops)<read_btrace_conf>: New.
2283 (target_enable_btrace): Update parameters.
2284 (target_read_btrace_conf): New.
2286 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2288 * server.c (handle_btrace_general_set): Remove call to
2289 target_supports_btrace.
2290 (supported_btrace_packets): New.
2291 (handle_query): Call supported_btrace_packets.
2292 * target.h: include btrace-common.h.
2293 (btrace_target_info): Removed.
2294 (supports_btrace, target_supports_btrace): Update parameters.
2296 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2298 * Makefile.in (SFILES): Add common/btrace-common.c.
2299 (OBS): Add common/btrace-common.o.
2300 (btrace-common.o): Add build rules.
2301 * linux-low: Include btrace-common.h.
2302 (linux_low_read_btrace): Use struct btrace_data. Call
2303 btrace_data_init and btrace_data_fini.
2305 2015-02-06 Pedro Alves <palves@redhat.com>
2307 * thread-db.c (find_new_threads_callback): Add debug output.
2309 2015-02-04 Pedro Alves <palves@redhat.com>
2311 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2312 (resume_stopped_resumed_lwps): New function.
2313 (linux_wait_for_event_filtered): Use it.
2315 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2317 * Makefile.in (SFILES): Add linux-personality.c.
2318 (linux-personality.o): New rule.
2319 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2320 list of objects to be built.
2321 * linux-low.c: Include nat/linux-personality.h.
2322 (linux_create_inferior): Remove code to disable address space
2323 randomization (moved to ../nat/linux-personality.c). Create
2324 cleanup to disable address space randomization.
2326 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2328 * Makefile.in (posix-strerror.o): New rule.
2329 (mingw-strerror.o): Likewise.
2330 * configure: Regenerated.
2331 * configure.ac: Source file ../common/common.host. Initialize new
2332 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2334 2015-01-14 Yao Qi <yao@codesourcery.com>
2336 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2337 (ppc-linux.o): New rule.
2338 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2339 * configure.ac: AC_CHECK_FUNCS(getauxval).
2340 * config.in: Re-generated.
2341 * configure: Re-generated.
2342 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2343 ppc64_64bit_inferior_p
2345 2015-01-14 Yao Qi <yao@codesourcery.com>
2347 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2348 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2349 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2350 (PT_ORIG_R3, PT_TRAP): Likewise.
2351 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2352 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2353 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2355 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2357 * i387-fp.c (i387_cache_to_xsave): In look over
2358 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2359 zmmh_low_space field by use of zmmh_high_space.
2361 2015-01-09 Pedro Alves <palves@redhat.com>
2363 * linux-low.c (step_over_bkpt): Move higher up in the file.
2364 (handle_extended_wait): Don't store the stop_pc here.
2365 (get_stop_pc): Adjust comments and rename to ...
2366 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2367 stopped for a software breakpoint or hardware breakpoint.
2368 (thread_still_has_status_pending_p): New function.
2369 (status_pending_p_callback): Use
2370 thread_still_has_status_pending_p. If the event is no longer
2371 interesting, resume the LWP.
2372 (handle_tracepoints): Add assert.
2373 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2374 (wstatus_maybe_breakpoint): New function.
2375 (cancel_breakpoint): Delete function.
2376 (check_stopped_by_watchpoint): New function, factored out from
2377 linux_low_filter_event.
2378 (lp_status_maybe_breakpoint): Delete function.
2379 (linux_low_filter_event): Remove filter_ptid argument.
2380 Leave thread group exits pending here. Store the LWP's stop PC.
2381 Always leave events pending.
2382 (linux_wait_for_event_filtered): Pull all events out of the
2383 kernel, and leave them all pending.
2384 (count_events_callback, select_event_lwp_callback): Consider all
2386 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2387 (select_event_lwp): Only give preference to the stepping LWP in
2388 all-stop mode. Adjust comments.
2389 (ignore_event): New function.
2390 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2391 references to cancel_breakpoints. Adjust to renames. Also give
2392 equal priority to all LWPs that have had events in non-stop mode.
2393 If reporting a software breakpoint event, unadjust the LWP's PC.
2394 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2395 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2397 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2398 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2399 (linux_stopped_by_watchpoint): Adjust.
2400 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2401 * linux-low.h (enum lwp_stop_reason): New.
2402 (struct lwp_info) <stop_pc>: Adjust comment.
2403 <stopped_by_watchpoint>: Delete field.
2404 <stop_reason>: New field.
2405 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2406 * mem-break.c (software_breakpoint_inserted_here)
2407 (hardware_breakpoint_inserted_here): New function.
2408 * mem-break.h (software_breakpoint_inserted_here)
2409 (hardware_breakpoint_inserted_here): Declare.
2410 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2411 (cancel_breakpoints): Delete.
2412 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2413 (upload_fast_traceframes): Remove references to
2416 2015-01-09 Pedro Alves <palves@redhat.com>
2418 * thread-db.c (find_new_threads_callback): Ignore thread if the
2419 kernel thread ID is -1.
2421 2015-01-09 Pedro Alves <palves@redhat.com>
2423 * linux-low.c (linux_attach_fail_reason_string): Move to
2424 nat/linux-ptrace.c, and rename.
2425 (linux_attach_lwp): Update comment.
2426 (attach_proc_task_lwp_callback): New function.
2427 (linux_attach): Adjust to rename and use
2428 linux_proc_attach_tgid_threads.
2429 (linux_attach_fail_reason_string): Delete declaration.
2431 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2433 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2434 * server.c (gdbserver_version): Likewise.
2436 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2438 * remote-utils.c: Include ctype.h.
2439 (input_interrupt): Explicitly handle the case when the char
2440 received is the NUL byte. Improve the printing of non-ASCII
2443 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2445 * linux-low.c (linux_low_filter_event): Update call to
2446 linux_enable_event_reporting following the addition of
2447 a new parameter to that function.
2449 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2452 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2453 (AARCH64_FPCR_REGNO): Likewise.
2454 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2455 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2456 (aarch64_store_fpregset): Likewise.
2458 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2460 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2461 Remove FIXME comment about assumption about N.
2463 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2465 * configure.ac: If large-file support is disabled in GDBserver,
2466 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2467 * configure: Regenerate.
2469 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2471 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2472 warning upon ENODATA from ptrace.
2473 * linux-s390-low.c (s390_store_tdb): New.
2474 (s390_regsets): Add regset for NT_S390_TDB.
2476 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2478 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2479 without a fill_function.
2480 * linux-s390-low.c (s390_fill_last_break): Remove.
2481 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2482 (s390_arch_setup): Use regset's size instead of fill_function for
2485 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2487 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2488 the regset's store function when ptrace returned an error.
2489 * regcache.c (get_thread_regcache): Invalidate register cache
2490 before fetching inferior's registers.
2492 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2494 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2495 while-loop as for-loop.
2496 (regsets_store_inferior_registers): Likewise.
2498 2014-11-28 Yao Qi <yao@codesourcery.com>
2500 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2501 * config.in, configure: Re-generate.
2502 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2505 2014-11-21 Yao Qi <yao@codesourcery.com>
2507 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2508 (AC_CHECK_HEADERS): Remove malloc.h.
2509 * configure: Re-generated.
2510 * config.in: Re-generated.
2511 * server.h: Don't include alloca.h and malloc.h.
2512 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2513 Don't include malloc.h.
2515 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2517 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2518 corresponding ERRNO check in same block.
2520 2014-11-12 Pedro Alves <palves@redhat.com>
2522 * server.c (cont_thread): Update comment.
2523 (start_inferior, attach_inferior): No longer clear cont_thread.
2524 (handle_v_cont): No longer set cont_thread.
2525 (captured_main): Clear cont_thread each time a GDB connects.
2527 2014-11-12 Pedro Alves <palves@redhat.com>
2529 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2530 thread, and don't resume all threads if the Hc thread has exited.
2532 2014-11-12 Pedro Alves <palves@redhat.com>
2534 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2535 the process group instead of to a specific LWP.
2537 2014-10-15 Pedro Alves <palves@redhat.com>
2540 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2542 (arm_set_thread_context): Delete.
2543 (the_low_target): Adjust.
2544 * win32-i386-low.c (debug_registers_changed)
2545 (debug_registers_used): Delete.
2546 (update_debug_registers_callback): New function.
2547 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2548 needing to update their debug registers.
2549 (win32_get_current_dr): New function.
2550 (x86_dr_low_get_addr, x86_dr_low_get_control)
2551 (x86_dr_low_get_status): Fetch the debug register from the thread
2553 (i386_initial_stuff): Adjust.
2554 (i386_get_thread_context): Remove current_event parameter. Don't
2555 clear debug_registers_changed nor copy DR values to
2557 (i386_set_thread_context): Delete.
2558 (i386_prepare_to_resume): New function.
2559 (i386_thread_added): Mark the thread as needing to update irs
2561 (the_low_target): Remove i386_set_thread_context and install
2562 i386_prepare_to_resume.
2563 * win32-low.c (win32_get_thread_context): Adjust.
2564 (win32_set_thread_context): Use SetThreadContext
2566 (win32_prepare_to_resume): New function.
2567 (win32_require_context): New function, factored out from ...
2568 (thread_rec): ... this.
2569 (continue_one_thread): Call win32_prepare_to_resume on each thread
2570 we're about to continue.
2571 (win32_resume): Call win32_prepare_to_resume on the event thread.
2572 * win32-low.h (struct win32_thread_info)
2573 <debug_registers_changed>: New field.
2574 (struct win32_target_ops): Change prototype of set_thread_context,
2575 delete set_thread_context and add prepare_to_resume.
2576 (win32_require_context): New declaration.
2578 2014-10-08 Gary Benson <gbenson@redhat.com>
2580 * server.h: Do not include common-exceptions.h.
2582 2014-10-08 Gary Benson <gbenson@redhat.com>
2584 * server.h: Do not include cleanups.h.
2586 2014-09-30 James Hogan <james.hogan@imgtec.com>
2588 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2591 2014-09-23 Yao Qi <yao@codesourcery.com>
2593 * linux-low.c (lp_status_maybe_breakpoint): New function.
2594 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2595 (count_events_callback): Likewise.
2596 (select_event_lwp_callback): Likewise.
2597 (cancel_breakpoints_callback): Likewise.
2599 2014-09-19 Don Breazeal <donb@codesourcery.com>
2601 * linux-low.c (handle_extended_wait): Call
2602 linux_ptrace_get_extended_event.
2603 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2604 linux_is_extended_waitstatus.
2606 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2608 * Makefile.in (CPPFLAGS): Define.
2609 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2610 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2612 2014-09-16 Gary Benson <gbenson@redhat.com>
2614 * inferiors.h (current_inferior): Renamed as...
2615 (current_thread): New variable. All uses updated.
2616 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2617 (maybe_move_out_of_jump_pad): Likewise.
2618 (cancel_breakpoint): Likewise.
2619 (linux_low_filter_event): Likewise.
2620 (wait_for_sigstop): Likewise.
2621 (linux_resume_one_lwp): Likewise.
2622 (need_step_over_p): Likewise.
2623 (start_step_over): Likewise.
2624 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2625 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2626 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2627 and save_inferior as saved_thread.
2628 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2630 (regcache_invalidate_thread): Likewise.
2631 * remote-utils.c (prepare_resume_reply): Likewise.
2632 * thread-db.c (thread_db_get_tls_address): Likewise.
2633 (disable_thread_event_reporting): Likewise.
2634 (remove_thread_event_breakpoints): Likewise.
2635 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2637 * target.h (set_desired_inferior): Renamed as...
2638 (set_desired_thread): New declaration. All uses updated.
2639 * server.c (myresume): Updated comment to reference thread instead
2641 (handle_serial_event): Likewise.
2642 (handle_target_event): Likewise.
2644 2014-09-12 Tom Tromey <tromey@redhat.com>
2645 Gary Benson <gbenson@redhat.com>
2647 * regcache.h: Include common-regcache.h.
2648 (regcache_read_pc): Don't declare.
2649 * regcache.c (get_thread_regcache_for_ptid): New function.
2651 2014-09-11 Tom Tromey <tromey@redhat.com>
2652 Gary Benson <gbenson@redhat.com>
2654 * symbol.c: New file.
2655 * Makefile.in (SFILES): Add symbol.c.
2656 (OBS): Add symbol.o.
2658 2014-09-11 Gary Benson <gbenson@redhat.com>
2660 * target.c (target_stop_ptid, target_continue_ptid): New
2663 2014-09-11 Tom Tromey <tromey@redhat.com>
2664 Gary Benson <gbenson@redhat.com>
2666 * target.h: Include target/target.h.
2667 * target.c (target_read_memory, target_read_uint32)
2668 (target_write_memory): New functions.
2670 2014-09-11 Gary Benson <gbenson@redhat.com>
2672 * server.h (debug_hw_points): Don't declare.
2673 * server.c (debug_hw_points): Don't define. Replace all uses
2674 with show_debug_regs.
2675 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2676 all uses with show_debug_regs.
2678 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2680 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2681 endianness into account.
2682 (ppc_supply_ptrace_register): Likewise.
2684 2014-09-03 James Hogan <james.hogan@imgtec.com>
2686 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2687 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2689 2014-09-03 Gary Benson <gbenson@redhat.com>
2691 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2692 ALL_DEBUG_ADDRESS_REGISTERS.
2694 2014-09-02 Gary Benson <gbenson@redhat.com>
2696 * i386-low.h: Renamed as...
2697 * x86-low.h: New file. All type, function and variable name
2698 prefixes changed from "i386_" to "x86_". All references updated.
2699 * i386-low.c: Renamed as...
2700 * x86-low.c: New file. All type, function and variable name
2701 prefixes changed from "i386_" to "x86_". All references updated.
2703 2014-09-02 Gary Benson <gbenson@redhat.com>
2705 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2706 (x86_linux_new_thread): Likewise.
2708 2014-08-29 Gary Benson <gbenson@redhat.com>
2710 * server.h (setjmp.h): Do not include.
2711 (toplevel): Do not declare.
2712 (common-exceptions.h): Include.
2713 (cleanups.h): Likewise.
2714 * server.c (toplevel): Do not define.
2715 (exit_code): New static global.
2716 (detach_or_kill_for_exit_cleanup): New function.
2717 (main): New function. Original main renamed to...
2718 (captured_main): New function.
2719 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2721 2014-08-29 Gary Benson <gbenson@redhat.com>
2723 * Makefile.in (SFILES): Add common/common-exceptions.c.
2724 (OBS): Add common-exceptions.o.
2725 (common-exceptions.o): New rule.
2726 * utils.c (prepare_to_throw_exception): New function.
2728 2014-08-29 Gary Benson <gbenson@redhat.com>
2730 * config.in: Regenerate.
2731 * configure: Likewise.
2733 2014-08-29 Gary Benson <gbenson@redhat.com>
2735 * Makefile.in (SFILES): Add common/cleanups.c.
2737 (cleanups.o): New rule.
2739 2014-08-29 Gary Benson <gbenson@redhat.com>
2741 * utils.c (internal_vwarning): New function.
2743 2014-08-28 Gary Benson <gbenson@redhat.com>
2745 * utils.h (fatal): Remove declaration.
2746 * utils.c (fatal): Remove function.
2748 2014-08-28 Gary Benson <gbenson@redhat.com>
2750 * tracepoint.c (gdb_agent_init): Replace fatal with
2752 (initialize_tracepoint): Likewise.
2754 2014-08-28 Gary Benson <gbenson@redhat.com>
2756 * remote-utils.c (remote_prepare): Replace fatal with error.
2758 2014-08-28 Gary Benson <gbenson@redhat.com>
2760 * linux-low.c (linux_async): Replace fatal with warning.
2762 (linux_start_non_stop): Return -1 if linux_async failed.
2764 2014-08-28 Gary Benson <gbenson@redhat.com>
2766 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2768 (i386_dr_low_get_addr): Remove vague comment.
2769 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2772 2014-08-28 Gary Benson <gbenson@redhat.com>
2774 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2775 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2777 (linux_resume_one_lwp): Likewise.
2778 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2780 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2781 with internal_error.
2782 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2783 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2784 (find_register_by_name): Replace fatal with internal_error.
2785 (find_regno): Likewise.
2786 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2787 * thread-db.c (thread_db_create_event): Likewise.
2788 (thread_db_load_search): Likewise.
2789 (try_thread_db_load_1): Likewise.
2790 * tracepoint.c (get_jump_space_head): Replace fatal with
2792 (claim_trampoline_space): Likewise.
2793 (have_fast_tracepoint_trampoline_buffer): Likewise.
2794 (cmd_qtstart): Likewise.
2795 (stop_tracing): Likewise.
2796 (fast_tracepoint_collecting): Likewise.
2797 (target_malloc): Likewise.
2798 (download_tracepoint): Likewise.
2799 (download_trace_state_variables): Replace check with gdb_assert.
2800 (upload_fast_traceframes): Replace fatal with internal_error.
2802 2014-08-19 Tom Tromey <tromey@redhat.com>
2803 Gary Benson <gbenson@redhat.com>
2805 * Makefile.in (SFILES): Add common/common-debug.c.
2806 (OBS): Add common-debug.o.
2807 (common-debug.o): New rule.
2808 * debug.h (debug_printf): Don't declare.
2809 * debug.c (debug_printf): Renamed and rewritten as...
2810 (debug_vprintf): New function.
2812 2014-08-19 Gary Benson <gbenson@redhat.com>
2814 * utils.h: Do not include print-utils.h.
2816 2014-08-19 Tom Tromey <tromey@redhat.com>
2817 Gary Benson <gbenson@redhat.com>
2819 * server.h: Add static assertion.
2820 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2822 2014-08-19 Tom Tromey <tromey@redhat.com>
2823 Gary Benson <gbenson@redhat.com>
2825 * Makefile.in (SFILES): Add common/errors.c.
2826 (OBS): Add errors.o.
2827 (IPA_OBS): Add errors-ipa.o.
2828 (errors.o): New rule.
2829 (errors-ipa.o): Likewise.
2830 * utils.h (perror_with_name, error, warning): Don't declare.
2831 * utils.c (warning): Renamed and rewritten as...
2832 (vwarning): New function.
2833 (error): Renamed and rewritten as...
2834 (verror): New function.
2835 (internal_error): Renamed and rewritten as...
2836 (internal_verror): New function.
2838 2014-08-07 Gary Benson <gbenson@redhat.com>
2840 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2841 * configure: Regenerate.
2842 * config.in: Likewise.
2843 * server.h: Do not include errno.h.
2844 * event-loop.c: Likewise.
2845 * hostio-errno.c: Likewise.
2846 * linux-low.c: Likewise.
2847 * remote-utils.c: Likewise.
2848 * spu-low.c: Likewise.
2849 * utils.c: Likewise.
2850 * gdbreplay.c: Unconditionally include errno.h.
2852 2014-08-07 Gary Benson <gbenson@redhat.com>
2854 * server.h: Do not include string.h.
2855 * event-loop.c: Likewise.
2856 * linux-low.c: Likewise.
2857 * regcache.c: Likewise.
2858 * remote-utils.c: Likewise.
2859 * spu-low.c: Likewise.
2860 * utils.c: Likewise.
2862 2014-08-07 Gary Benson <gbenson@redhat.com>
2864 * server.h: Do not include gdb_assert.h.
2866 2014-08-07 Gary Benson <gbenson@redhat.com>
2868 * server.h: Do not include common-utils.h.
2870 2014-08-07 Gary Benson <gbenson@redhat.com>
2872 * server.h: Do not include ptid.h.
2873 * notif.h: Likewise.
2875 2014-08-07 Gary Benson <gbenson@redhat.com>
2877 * server.h: Do not include gdb_locale.h.
2879 2014-08-07 Gary Benson <gbenson@redhat.com>
2881 * server.h: Do not include gdb/signals.h.
2882 * win32-low.c: Likewise.
2884 2014-08-07 Gary Benson <gbenson@redhat.com>
2886 * server.h: Do not include pathmax.h.
2888 2014-08-07 Gary Benson <gbenson@redhat.com>
2890 * server.h: Do not include libiberty.h.
2891 * linux-bfin-low.c: Likewise.
2893 2014-08-07 Gary Benson <gbenson@redhat.com>
2895 * server.h: Do not include ansidecl.h.
2897 2014-08-07 Gary Benson <gbenson@redhat.com>
2899 * linux-x86-low.c: Do not include stddef.h.
2900 * lynx-ppc-low.c: Likewise.
2901 * tracepoint.c: Likewise.
2903 2014-08-07 Gary Benson <gbenson@redhat.com>
2905 * server.h: Do not include stdarg.h.
2906 * nto-low.c: Likewise.
2908 2014-08-07 Gary Benson <gbenson@redhat.com>
2910 * server.h: Do not include stdlib.h.
2911 * inferiors.c: Likewise.
2912 * linux-low.c: Likewise.
2913 * regcache.c: Likewise.
2914 * spu-low.c: Likewise.
2915 * tracepoint.c: Likewise.
2916 * utils.c: Likewise.
2918 2014-08-07 Gary Benson <gbenson@redhat.com>
2920 * server.h: Do not include stdio.h.
2921 * linux-low.c: Likewise.
2922 * remote-utils.c: Likewise.
2923 * spu-low.c: Likewise.
2924 * utils.c: Likewise.
2925 * wincecompat.c: Likewise.
2927 2014-08-06 Gary Benson <gbenson@redhat.com>
2929 * regcache.c (init_register_cache): Move conditionals inside if.
2931 2014-08-06 Gary Benson <gbenson@redhat.com>
2933 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2935 2014-07-31 Gary Benson <gbenson@redhat.com>
2937 * ax.h: Do not include server.h.
2938 * gdbthread.h: Likewise.
2939 * lynx-low.h: Likewise.
2940 * notif.h: Likewise.
2942 2014-07-30 Gary Benson <gbenson@redhat.com>
2944 * server.h: Include common-defs.h.
2945 Do not include config.h or build-gnulib-gdbserver/config.h.
2947 2014-07-30 Gary Benson <gbenson@redhat.com>
2949 * hostio-errno.c: Move server.h to top of includes list.
2950 * inferiors.c: Likewise.
2951 * linux-x86-low.c: Likewise.
2952 * notif.c: Include server.h.
2954 2014-07-24 Tom Tromey <tromey@redhat.com>
2955 Gary Benson <gbenson@redhat.com>
2957 * server.h (CORE_ADDR): Now unsigned.
2959 2014-07-16 Pedro Alves <palves@redhat.com>
2961 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2963 2014-07-15 Pedro Alves <palves@redhat.com>
2965 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2968 2014-07-11 Pedro Alves <palves@redhat.com>
2970 * linux-low.c (kill_wait_lwp): New function, based on
2971 kill_one_lwp_callback, but use my_waitpid directly.
2972 (kill_one_lwp_callback, linux_kill): Use it.
2974 2014-06-23 Pedro Alves <palves@redhat.com>
2976 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2977 before setting DR0..DR3.
2979 2014-06-20 Gary Benson <gbenson@redhat.com>
2981 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2982 * configure: Regenerated.
2983 * config.in: Likewise.
2985 2014-06-20 Gary Benson <gbenson@redhat.com>
2987 * Makefile.in (SFILES): Update locations for files moved
2989 (object file files): Reordered.
2991 2014-06-20 Gary Benson <gbenson@redhat.com>
2993 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2994 (i386_dr_low_set_addr): Likewise.
2995 (i386_dr_low_get_addr): Likewise.
2996 (i386_dr_low_can_set_control): Likewise.
2997 (i386_dr_low_set_control): Likewise.
2998 (i386_dr_low_get_control): Likewise.
2999 (i386_dr_low_get_status): Likewise.
3000 (i386_get_debug_register_length): Likewise.
3001 * linux-x86-low.c (i386_dr_low_set_addr):
3002 Changed signature. Made static.
3003 (i386_dr_low_get_addr): Likewise.
3004 (i386_dr_low_set_control): Likewise.
3005 (i386_dr_low_get_control): Likewise.
3006 (i386_dr_low_get_status): Likewise.
3007 (i386_dr_low): New global variable.
3008 * win32-i386-low.c (i386_dr_low_set_addr):
3009 Changed signature. Made static.
3010 (i386_dr_low_get_addr): Likewise.
3011 (i386_dr_low_set_control): Likewise.
3012 (i386_dr_low_get_control): Likewise.
3013 (i386_dr_low_get_status): Likewise.
3014 (i386_dr_low): New global variable.
3016 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3018 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3019 * Makefile.in (AR, AR_FLAGS): Define.
3020 * configure: Regenerate.
3022 2014-06-19 Gary Benson <gbenson@redhat.com>
3024 * Makefile.in (i386-dregs.o): New rule.
3025 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3026 * i386-low.c (target.h): Remove include.
3027 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3028 (DR_CONTROL_SHIFT): Likewise.
3029 (DR_CONTROL_SIZE): Likewise.
3030 (DR_RW_EXECUTE): Likewise.
3031 (DR_RW_WRITE): Likewise.
3032 (DR_RW_READ): Likewise.
3033 (DR_RW_IORW): Likewise.
3034 (DR_LEN_1): Likewise.
3035 (DR_LEN_2): Likewise.
3036 (DR_LEN_4): Likewise.
3037 (DR_LEN_8): Likewise.
3038 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3039 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3040 (DR_ENABLE_SIZE): Likewise.
3041 (DR_LOCAL_SLOWDOWN): Likewise.
3042 (DR_GLOBAL_SLOWDOWN): Likewise.
3043 (DR_CONTROL_RESERVED): Likewise.
3044 (I386_DR_CONTROL_MASK): Likewise.
3045 (I386_DR_VACANT): Likewise.
3046 (I386_DR_LOCAL_ENABLE): Likewise.
3047 (I386_DR_GLOBAL_ENABLE): Likewise.
3048 (I386_DR_DISABLE): Likewise.
3049 (I386_DR_SET_RW_LEN): Likewise.
3050 (I386_DR_GET_RW_LEN): Likewise.
3051 (I386_DR_WATCH_HIT): Likewise.
3052 (i386_wp_op_t): Likewise.
3053 (i386_show_dr): Likewise.
3054 (i386_length_and_rw_bits): Likewise.
3055 (i386_insert_aligned_watchpoint): Likewise.
3056 (i386_remove_aligned_watchpoint): Likewise.
3057 (i386_handle_nonaligned_watchpoint): Likewise.
3058 i386_update_inferior_debug_regs(): Likewise.
3059 (i386_dr_insert_watchpoint): Likewise.
3060 (i386_dr_remove_watchpoint): Likewise.
3061 (i386_dr_region_ok_for_watchpoint): Likewise.
3062 (i386_dr_stopped_data_address): Likewise.
3063 (i386_dr_stopped_by_watchpoint): Likewise.
3065 2014-06-19 Gary Benson <gbenson@redhat.com>
3067 * i386-low.c (i386_dr_show): Renamed to
3068 i386_show_dr and made static. All uses updated.
3069 (i386_dr_length_and_rw_bits): Renamed to
3070 i386_length_and_rw_bits and made static.
3072 (i386_dr_insert_aligned_watchpoint): Renamed to
3073 i386_insert_aligned_watchpoint and made static.
3075 (i386_dr_remove_aligned_watchpoint): Renamed to
3076 i386_remove_aligned_watchpoint and made static.
3078 (i386_dr_update_inferior_debug_regs): Renamed to
3079 i386_update_inferior_debug_regs and made static.
3082 2014-06-18 Gary Benson <gbenson@redhat.com>
3084 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3085 (i386_dr_low_can_set_control): Likewise.
3086 (i386_get_debug_register_length): Likewise.
3087 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3088 (i386_dr_low_can_set_control): Likewise.
3089 (i386_get_debug_register_length): Likewise.
3091 2014-06-17 Gary Benson <gbenson@redhat.com>
3093 * i386-low.h (i386-dregs.h): New include.
3094 (DR_FIRSTADDR): Now in i386-dregs.h.
3095 (DR_LASTADDR): Likewise.
3096 (DR_NADDR): Likewise.
3097 (DR_STATUS): Likewise.
3098 (DR_CONTROL): Likewise.
3099 (i386_debug_reg_state): Likewise.
3100 (i386_dr_insert_watchpoint): Likewise.
3101 (i386_dr_remove_watchpoint): Likewise.
3102 (i386_dr_region_ok_for_watchpoint): Likewise.
3103 (i386_dr_stopped_data_address): Likewise.
3104 (i386_dr_stopped_by_watchpoint): Likewise.
3105 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3107 2014-06-18 Gary Benson <gbenson@redhat.com>
3109 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3110 i386_dr_insert_watchpoint.
3111 (i386_low_remove_watchpoint): Renamed to
3112 i386_dr_remove_watchpoint.
3113 (i386_low_region_ok_for_watchpoint): Renamed to
3114 i386_dr_region_ok_for_watchpoint.
3115 (i386_low_stopped_data_address): Renamed to
3116 i386_dr_stopped_data_address.
3117 (i386_low_stopped_by_watchpoint): Renamed to
3118 i386_dr_stopped_by_watchpoint.
3119 * i386-low.c (i386_show_dr): Renamed to
3120 i386_dr_show and made nonstatic. All uses updated.
3121 (i386_length_and_rw_bits): Renamed to
3122 i386_dr_length_and_rw_bits and made nonstatic.
3124 (i386_insert_aligned_watchpoint): Renamed to
3125 i386_dr_insert_aligned_watchpoint and made nonstatic.
3127 (i386_remove_aligned_watchpoint): Renamed to
3128 i386_dr_remove_aligned_watchpoint and made nonstatic.
3130 (i386_update_inferior_debug_regs): Renamed to
3131 i386_dr_update_inferior_debug_regs and made nonstatic.
3133 (i386_low_insert_watchpoint): Renamed to
3134 i386_dr_insert_watchpoint. All uses updated.
3135 (i386_low_remove_watchpoint): Renamed to
3136 i386_dr_remove_watchpoint. All uses updated.
3137 (i386_low_region_ok_for_watchpoint): Renamed to
3138 i386_dr_region_ok_for_watchpoint. All uses updated.
3139 (i386_low_stopped_data_address): Renamed to
3140 i386_dr_stopped_data_address. All uses updated.
3141 (i386_low_stopped_by_watchpoint): Renamed to
3142 i386_dr_stopped_by_watchpoint. All uses updated.
3144 2014-06-18 Gary Benson <gbenson@redhat.com>
3146 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3147 (i386_dr_low_can_set_control): Likewise.
3148 (i386_insert_aligned_watchpoint): New check.
3150 2014-06-18 Gary Benson <gbenson@redhat.com>
3152 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3155 2014-06-18 Gary Benson <gbenson@redhat.com>
3157 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3158 instead of fatal and error.
3159 (i386_handle_nonaligned_watchpoint): Likewise.
3161 2014-06-18 Gary Benson <gbenson@redhat.com>
3163 * i386-low.c (i386_get_debug_register_length): New macro.
3164 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3165 (i386_show_dr): Use debug_printf instead of fprintf. Use
3166 phex to format values.
3168 2014-06-18 Gary Benson <gbenson@redhat.com>
3170 * i386-low.h: Comment changes.
3171 * i386-low.c: Likewise.
3173 2014-06-18 Gary Benson <gbenson@redhat.com>
3175 * i386-low.c: Whitespace changes.
3177 2014-06-12 Tom Tromey <tromey@redhat.com>
3179 * utils.c (freeargv): Remove.
3181 2014-06-12 Tom Tromey <tromey@redhat.com>
3183 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3184 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3185 (parse_debug_format_options): Likewise.
3186 (gdbserver_usage): Likewise.
3187 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3188 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3189 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3191 ($(LIBGNU)): Depend on libiberty.
3192 (all-lib): Recurse into all subdirs.
3193 (install-only): Invoke "install" target in subdirs.
3194 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3196 * configure: Rebuild.
3197 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3198 for vasprintf, vsnprintf, or gettimeofday.
3199 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3202 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3204 * development.sh: Delete.
3205 * Makefile.in (config.status): Adjust dependency on development.sh.
3206 * configure.ac: Adjust development.sh source call.
3207 * configure: Regenerate.
3209 2014-06-02 Pedro Alves <palves@redhat.com>
3211 * ax.c (gdb_free_agent_expr): New function.
3212 * ax.h (gdb_free_agent_expr): New declaration.
3213 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3215 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3217 (clear_breakpoint_conditions_and_commands): New function.
3218 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3219 (clear_breakpoint_conditions_and_commands): New declaration.
3221 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3223 * linux-aarch64-low.c (asm/ptrace.h): Include.
3225 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3227 Fix TLS access for -static -pthread.
3228 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3229 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3230 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3232 2014-05-20 Pedro Alves <palves@redhat.com>
3234 * linux-aarch64-low.c (aarch64_insert_point)
3235 (aarch64_remove_point): No longer check whether the type is
3236 supported here. Adjust to new interface.
3237 (the_low_target): Install aarch64_supports_z_point_type as
3238 supports_z_point_type method.
3239 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3240 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3241 instead of a Z packet char. Adjust.
3242 (arm_supports_z_point_type): New function.
3243 (arm_insert_point, arm_remove_point): Adjust to new interface.
3244 (the_low_target): Install arm_supports_z_point_type.
3245 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3246 (cris_insert_point, cris_remove_point): Adjust to new interface.
3247 Don't check whether the type is supported here.
3248 (the_low_target): Install cris_supports_z_point_type.
3249 * linux-low.c (linux_supports_z_point_type): New function.
3250 (linux_insert_point, linux_remove_point): Adjust to new interface.
3251 * linux-low.h (struct linux_target_ops) <insert_point,
3252 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3253 raw_breakpoint pointer parameter.
3254 <supports_z_point_type>: New method.
3255 * linux-mips-low.c (mips_supports_z_point_type): New function.
3256 (mips_insert_point, mips_remove_point): Adjust to new interface.
3257 Use mips_supports_z_point_type.
3258 (the_low_target): Install mips_supports_z_point_type.
3259 * linux-ppc-low.c (the_low_target): Install NULL as
3260 supports_z_point_type method.
3261 * linux-s390-low.c (the_low_target): Install NULL as
3262 supports_z_point_type method.
3263 * linux-sparc-low.c (the_low_target): Install NULL as
3264 supports_z_point_type method.
3265 * linux-x86-low.c (x86_supports_z_point_type): New function.
3266 (x86_insert_point): Adjust to new insert_point interface. Use
3267 insert_memory_breakpoint. Adjust to new
3268 i386_low_insert_watchpoint interface.
3269 (x86_remove_point): Adjust to remove_point interface. Use
3270 remove_memory_breakpoint. Adjust to new
3271 i386_low_remove_watchpoint interface.
3272 (the_low_target): Install x86_supports_z_point_type.
3273 * lynx-low.c (lynx_target_ops): Install NULL as
3274 supports_z_point_type callback.
3275 * nto-low.c (nto_supports_z_point_type): New.
3276 (nto_insert_point, nto_remove_point): Adjust to new interface.
3277 (nto_target_ops): Install nto_supports_z_point_type.
3278 * mem-break.c: Adjust intro comment.
3279 (struct raw_breakpoint) <raw_type, size>: New fields.
3280 <inserted>: Update comment.
3281 <shlib_disabled>: Delete field.
3282 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3283 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3284 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3285 (raw_bkpt_type_to_target_hw_bp_type): New function.
3286 (find_enabled_raw_code_breakpoint_at): New function.
3287 (find_raw_breakpoint_at): New type and size parameters. Use them.
3288 (insert_memory_breakpoint): New function, based off
3289 set_raw_breakpoint_at.
3290 (remove_memory_breakpoint): New function.
3291 (set_raw_breakpoint_at): Reimplement.
3292 (set_breakpoint): New, based on set_breakpoint_at.
3293 (set_breakpoint_at): Reimplement.
3294 (delete_raw_breakpoint): Go through the_target->remove_point
3295 instead of assuming memory breakpoints.
3296 (find_gdb_breakpoint_at): Delete.
3297 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3298 (find_gdb_breakpoint): New function.
3299 (set_gdb_breakpoint_at): Delete.
3300 (z_type_supported): New function.
3301 (set_gdb_breakpoint_1): New function, loosely based off
3302 set_gdb_breakpoint_at.
3303 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3304 (delete_gdb_breakpoint_at): Delete.
3305 (delete_gdb_breakpoint_1): New function, loosely based off
3306 delete_gdb_breakpoint_at.
3307 (delete_gdb_breakpoint): New function.
3308 (clear_gdb_breakpoint_conditions): Rename to ...
3309 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3311 (add_condition_to_breakpoint): Make static.
3312 (add_breakpoint_condition): Take a struct breakpoint pointer
3313 instead of an address. Adjust.
3314 (gdb_condition_true_at_breakpoint): Rename to ...
3315 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3317 (gdb_condition_true_at_breakpoint): Reimplement.
3318 (add_breakpoint_commands): Take a struct breakpoint pointer
3319 instead of an address. Adjust.
3320 (gdb_no_commands_at_breakpoint): Rename to ...
3321 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3322 parameter. Return true if no breakpoint was found. Change debug
3324 (gdb_no_commands_at_breakpoint): Reimplement.
3325 (run_breakpoint_commands): Rename to ...
3326 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3327 and change return type to boolean.
3328 (run_breakpoint_commands): New function.
3329 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3330 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3331 breakpoint. Go through the_target->remove_point instead of
3332 assuming memory breakpoint.
3333 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3334 software and hardware breakpoints.
3335 (reinsert_raw_breakpoint): Go through the_target->insert_point
3336 instead of assuming memory breakpoint.
3337 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3338 software and hardware breakpoints.
3339 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3340 Check both software and hardware breakpoints.
3341 (validate_inserted_breakpoint): Assert the breakpoint is a
3342 software breakpoint. Set the inserted flag to -1 instead of
3343 setting shlib_disabled.
3344 (delete_disabled_breakpoints): Adjust.
3345 (validate_breakpoints): Only validate software breakpoints.
3346 Adjust to inserted flag change.
3347 (check_mem_read, check_mem_write): Skip breakpoint types other
3348 than software breakpoints. Adjust to inserted flag change.
3349 * mem-break.h (enum raw_bkpt_type): New enum.
3350 (raw_breakpoint, struct process_info): Forward declare.
3351 (Z_packet_to_target_hw_bp_type): Delete declaration.
3352 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3353 (set_gdb_breakpoint, delete_gdb_breakpoint)
3354 (clear_breakpoint_conditions): New declarations.
3355 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3356 (breakpoint_inserted_here): Update comment.
3357 (add_breakpoint_condition, add_breakpoint_commands): Replace
3358 address parameter with a breakpoint pointer parameter.
3359 (gdb_breakpoint_here): Update comment.
3360 (delete_gdb_breakpoint_at): Delete.
3361 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3362 * server.c (process_point_options): Take a struct breakpoint
3363 pointer instead of an address. Adjust.
3364 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3365 delete_gdb_breakpoint.
3366 * spu-low.c (spu_target_ops): Install NULL as
3367 supports_z_point_type method.
3368 * target.h: Include mem-break.h.
3369 (struct target_ops) <prepare_to_access_memory>: Update comment.
3370 <supports_z_point_type>: New field.
3371 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3372 instead of a char. Also take a raw breakpoint pointer.
3373 * win32-arm-low.c (the_low_target): Install NULL as
3374 supports_z_point_type.
3375 * win32-i386-low.c (i386_supports_z_point_type): New function.
3376 (i386_insert_point, i386_remove_point): Adjust to new interface.
3377 (the_low_target): Install i386_supports_z_point_type.
3378 * win32-low.c (win32_supports_z_point_type): New function.
3379 (win32_insert_point, win32_remove_point): Adjust to new interface.
3380 (win32_target_ops): Install win32_supports_z_point_type.
3381 * win32-low.h (struct win32_target_ops):
3382 <supports_z_point_type>: New method.
3383 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3384 instead of a char. Also take a raw breakpoint pointer.
3386 2014-05-20 Pedro Alves <palves@redhat.com>
3388 * mem-break.h: Include break-common.h.
3389 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3390 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3391 (Z_packet_to_target_hw_bp_type): New declaration.
3392 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3393 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3394 (Z_PACKET_ACCESS_WP): Delete macros.
3395 (Z_packet_to_hw_type): Delete function.
3396 * i386-low.h: Don't include break-common.h here.
3397 (Z_packet_to_hw_type): Delete declaration.
3398 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3399 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3400 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3401 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3402 * linux-aarch64-low.c: Don't include break-common.h here.
3403 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3404 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3405 (Z_packet_to_target_hw_bp_type): Delete function.
3406 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3408 (mips_insert_point, mips_remove_point): Use
3409 Z_packet_to_target_hw_bp_type.
3411 2014-05-20 Pedro Alves <palves@redhat.com>
3413 * linux-aarch64-low.c: Include break-common.h.
3414 (enum target_point_type): Delete.
3415 (Z_packet_to_point_type): Rename to ...
3416 (Z_packet_to_target_hw_bp_type): ... this, and return a
3417 target_hw_bp_type instead.
3418 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3419 instead of an enum target_point_type.
3420 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3422 (aarch64_dr_state_insert_one_point)
3423 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3424 (aarch64_handle_aligned_watchpoint)
3425 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3426 Take an enum target_hw_bp_type instead of an enum
3428 (aarch64_supports_z_point_type): New function.
3429 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3430 use Z_packet_to_target_hw_bp_type.
3432 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3434 * configure.ac: Only use -Werror by default when DEVELOPMENT
3436 * configure: Regenerate.
3438 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3440 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3441 * linux-x86-low.c (X86_64_USER_REGS): New.
3442 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3444 2014-04-28 Yao Qi <yao@codesourcery.com>
3446 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3449 2014-04-25 Pedro Alves <palves@redhat.com>
3452 * linux-low.c (linux_attach_fail_reason_string): New function.
3453 (linux_attach_lwp): Delete.
3454 (linux_attach_lwp_1): Rename to ...
3455 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3456 argument. Remove "initial" parameter. Return int instead of
3457 void. Don't error or warn here.
3458 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3459 failure to attach to the tgid. Call warning when failing to
3461 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3462 argument. Remove "initial" parameter. Return int instead of
3463 void. Don't error or warn here.
3464 (linux_attach_fail_reason_string): New declaration.
3465 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3466 interface change. Use linux_attach_fail_reason_string.
3468 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3469 Walfred Tedeschi <walfred.tedeschi@intel.com>
3471 * Makefile.in: Added rules to handle new files
3472 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3473 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3474 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3475 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3476 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3477 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3479 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3480 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3481 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3482 i386/x32-avx512.xml.
3483 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3484 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3485 i386/x32-avx512-linux.xml.
3486 * i387-fp.c (num_avx512_k_registers): New constant for number
3488 (num_avx512_zmmh_low_registers): New constant for number of
3489 lower ZMM registers (0-15).
3490 (num_avx512_zmmh_high_registers): New constant for number of
3491 higher ZMM registers (16-31).
3492 (num_avx512_ymmh_registers): New contant for number of higher
3493 YMM registers (ymm16-31 added by avx521 on x86_64).
3494 (num_avx512_xmm_registers): New constant for number of higher
3495 XMM registers (xmm16-31 added by AVX512 on x86_64).
3496 (struct i387_xsave): Add space for AVX512 registers.
3497 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3498 Add code to handle AVX512 registers.
3499 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3500 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3501 prototypei from generated file.
3502 (tdesc_amd64_avx512_linux): Likewise.
3503 (init_registers_x32_avx512_linux): Likewise.
3504 (tdesc_x32_avx512_linux): Likewise.
3505 (init_registers_i386_avx512_linux): Likewise.
3506 (tdesc_i386_avx512_linux): Likewise.
3507 (x86_64_regmap): Add AVX512 registers.
3508 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3510 (initialize_low_arch): Add code to initialize AVX512 registers.
3512 2014-04-23 Pedro Alves <palves@redhat.com>
3514 * mem-break.c (find_gdb_breakpoint_at): Make static.
3515 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3517 2014-04-23 Pedro Alves <palves@redhat.com>
3519 * i386-low.c: Don't include break-common.h here.
3520 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3521 prototype to take target_hw_bp_type as argument instead of a Z
3523 * i386-low.h: Include break-common.h here.
3524 (Z_packet_to_hw_type): Declare.
3525 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3527 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3528 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3529 (x86_remove_point): Convert the packet number to a
3530 target_hw_bp_type before calling i386_low_remove_watchpoint.
3531 * win32-i386-low.c (i386_insert_point): Convert the packet number
3532 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3533 (i386_remove_point): Convert the packet number to a
3534 target_hw_bp_type before calling i386_low_remove_watchpoint.
3536 2014-04-23 Pedro Alves <palves@redhat.com>
3538 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3540 2014-04-10 Pedro Alves <palves@redhat.com>
3542 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3543 Check if the condition or command is NULL before checking if the
3544 breakpoint is known. On success, return true.
3545 * mem-break.h (add_breakpoint_condition): Document return.
3546 (add_breakpoint_commands): Add describing comment.
3547 * server.c (skip_to_semicolon): New function.
3548 (process_point_options): Use it.
3550 2014-04-09 Pedro Alves <palves@redhat.com>
3552 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3555 2014-02-27 Pedro Alves <palves@redhat.com>
3558 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3560 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3562 (last_thread_of_process_p): Take a PID argument instead of a
3564 (linux_wait_for_lwp): Delete.
3565 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3567 (linux_low_filter_event): New function, party factored out from
3568 linux_wait_for_event.
3569 (linux_wait_for_event): Rename to ...
3570 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3571 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3572 sigsuspend. Check for zombie leaders.
3573 (linux_wait_for_event): Reimplement as wrapper around
3574 linux_wait_for_event_filtered.
3575 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3576 a normal or signal exit is seen, it's the whole process exiting.
3577 (wait_for_sigstop): No longer a for_each_inferior callback.
3578 Rewrite on top of linux_wait_for_event_filtered.
3579 (stop_all_lwps): Call wait_for_sigstop directly.
3580 * server.c (resume, handle_target_event): Handle
3581 TARGET_WAITKIND_NO_RESUMED.
3583 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3585 * win32-low.c (psapi_get_dll_name,
3586 * win32_CreateToolhelp32Snapshot): Delete.
3587 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3588 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3590 (handle_load_dll): Add function description.
3591 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3593 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3595 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3597 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3598 base address when calling win32_add_one_solib.
3599 (handle_load_dll): Delete local variable load_addr.
3600 Remove 0x1000 offset applied to DLL base address when calling
3601 win32_add_one_solib.
3602 (handle_unload_dll): Add comment.
3604 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3606 * win32-low.c (win32_add_all_dlls): Renames
3607 win32_ensure_ntdll_loaded. Rewrite function documentation.
3608 Adjust implementation to always load all DLLs.
3609 Add 0x1000 offset to DLL base address when calling
3610 win32_add_one_solib.
3611 (child_initialization_done): New static global.
3612 (do_initial_child_stuff): Set child_initialization_done to
3613 zero during child initialization, and 1 after. Replace call
3614 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3616 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3617 (handle_unload_dll): Add function documentation.
3618 (get_child_debug_event): Ignore load and unload DLL events
3619 during child initialization.
3621 2014-02-20 Doug Evans <dje@google.com>
3623 Remove global all_lwps.
3624 * inferiors.h (ptid_of): Move here from linux-low.h.
3625 (pid_of, lwpid_of): Ditto.
3626 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3627 parameter is a struct thread_info * now.
3628 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3629 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3630 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3632 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3633 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3634 * linux-arm-low.c (update_registers_callback): Update, "entry"
3635 parameter is a struct thread_info * now.
3636 Fetch lwpid from current_inferior directly.
3637 (arm_insert_point): Pass &all_threads to find_inferior instead of
3639 (arm_remove_point): Ditto.
3640 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3641 (arm_prepare_to_resume): Fetch pid from thread.
3642 (arm_read_description): Fetch lwpid from current_inferior directly.
3643 * linux-low.c (all_lwps): Delete.
3644 (delete_lwp): Delete call to remove_inferior.
3645 (handle_extended_wait): Fetch lwpid from thread.
3646 (add_lwp): Don't set lwp->entry.id. Remove call to
3647 add_inferior_to_list.
3648 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3649 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3650 (kill_one_lwp_callback): Ditto.
3651 (linux_kill): Don't dereference NULL pointer.
3652 Fetch ptid,lwpid from thread.
3653 (get_detach_signal): Fetch ptid from thread.
3654 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3655 Simplify call to regcache_invalidate_thread.
3656 (delete_lwp_callback): Update, "entry" parameter is a
3657 struct thread_info * now. Fetch pid from thread.
3658 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3659 (status_pending_p_callback): Update, "entry" parameter is a
3660 struct thread_info * now. Fetch ptid from thread.
3661 (find_lwp_pid): Update, "entry" parameter is a
3662 struct thread_info * now.
3663 (linux_wait_for_lwp): Fetch pid from thread.
3664 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3665 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3666 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3667 (dequeue_one_deferred_signal): Ditto.
3668 (cancel_breakpoint): Fetch ptid from current_inferior.
3669 (linux_wait_for_event): Pass &all_threads to find_inferior,
3670 not &all_lwps. Fetch ptid, lwpid from thread.
3671 (count_events_callback): Update, "entry" parameter is a
3672 struct thread_info * now.
3673 (select_singlestep_lwp_callback): Ditto.
3674 (select_event_lwp_callback): Ditto.
3675 (cancel_breakpoints_callback): Ditto.
3676 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3678 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3679 (unsuspend_one_lwp): Update, "entry" parameter is a
3680 struct thread_info * now.
3681 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3683 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3684 Fetch lwpid from thread, not lwp.
3685 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3686 Pass &all_threads to find_inferior, not &all_lwps.
3687 (send_sigstop): Fetch lwpid from thread, not lwp.
3688 (send_sigstop_callback): Update, "entry" parameter is a
3689 struct thread_info * now.
3690 (suspend_and_send_sigstop_callback): Ditto.
3691 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3692 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3693 struct thread_info * now.
3694 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3696 (lwp_running): Update, "entry" parameter is a
3697 struct thread_info * now.
3698 (stop_all_lwps): Fetch ptid from thread.
3699 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3700 (linux_resume_one_lwp): Fetch lwpid from thread.
3701 (linux_set_resume_request): Update, "entry" parameter is a
3702 struct thread_info * now. Fetch pid, lwpid from thread.
3703 (resume_status_pending_p): Update, "entry" parameter is a
3704 struct thread_info * now.
3705 (need_step_over_p): Ditto. Fetch lwpid from thread.
3706 (start_step_over): Fetch lwpid from thread.
3707 (linux_resume_one_thread): Update, "entry" parameter is a
3708 struct thread_info * now. Fetch lwpid from thread.
3709 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3710 (proceed_one_lwp): Update, "entry" parameter is a
3711 struct thread_info * now. Fetch lwpid from thread.
3712 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3713 struct thread_info * now.
3714 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3715 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3716 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3718 (regsets_store_inferior_registers): Ditto.
3719 (fetch_register, store_register): Ditto.
3720 (linux_read_memory, linux_write_memory): Ditto.
3721 (linux_request_interrupt): Ditto.
3722 (linux_read_auxv): Ditto.
3723 (linux_xfer_siginfo): Ditto.
3724 (linux_qxfer_spu): Ditto.
3725 (linux_qxfer_libraries_svr4): Ditto.
3726 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3727 moved to inferiors.h.
3729 (get_thread_lwp): Update.
3730 (struct lwp_info): Delete member "entry". Simplify comment for
3733 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3734 current_inferior directly.
3735 (update_watch_registers_callback): Update, "entry" parameter is a
3736 struct thread_info * now. Fetch pid from thread.
3737 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3738 (mips_insert_point): Fetch lwpid from current_inferior.
3739 Pass &all_threads to find_inferior, not &all_lwps.
3740 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3741 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3743 (mips_stopped_data_address): Ditto.
3744 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3746 * linux-tile-low.c (tile_arch_setup): Ditto.
3747 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3748 (update_debug_registers_callback): Update, "entry" parameter is a
3749 struct thread_info * now. Fetch pid from thread.
3750 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3751 Pass &all_threads to find_inferior, not &all_lwps.
3752 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3753 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3754 Pass &all_threads to find_inferior, not &all_lwps.
3755 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3756 (i386_dr_low_get_status): Ditto.
3757 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3758 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3759 (x86_linux_read_description): Ditto.
3760 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3762 2014-02-20 Doug Evans <dje@google.com>
3764 * inferiors.c (get_first_inferior): Fix buglet.
3766 2014-02-19 Doug Evans <dje@google.com>
3768 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3769 * inferiors.c (add_thread): Change result type to struct thread_info *.
3770 All callers updated.
3771 (add_lwp): Call add_thread here instead of in callers.
3772 All callers updated.
3773 * linux-low.h (get_lwp_thread): Rewrite.
3774 (struct lwp_info): New member "thread".
3776 2014-02-19 Doug Evans <dje@google.com>
3778 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3779 All callers updated.
3781 2014-02-19 Doug Evans <dje@google.com>
3783 * inferiors.c (add_thread): Fix whitespace.
3785 2014-02-19 Doug Evans <dje@google.com>
3787 * dll.c (clear_dlls): Replace accessing list implemention details
3789 * gdbthread.h (get_first_thread): Declare.
3790 * inferiors.c (for_each_inferior_with_data): New function.
3791 (get_first_thread): New function.
3792 (find_thread_ptid): Simplify.
3793 (get_first_inferior): New function.
3794 (clear_list): Delete.
3795 (one_inferior_p): New function.
3796 (clear_inferior_list): New function.
3797 (clear_inferiors): Update.
3798 * inferiors.h (for_each_inferior_with_data): Declare.
3799 (clear_inferior_list): Declare.
3800 (one_inferior_p): Declare.
3801 (get_first_inferior): Declare.
3802 * linux-low.c (linux_wait_for_event): Replace accessing list
3803 implemention details with API function.
3804 * server.c (target_running): Ditto.
3805 (accumulate_file_name_length): New function.
3806 (emit_dll_description): New function.
3807 (handle_qxfer_libraries): Replace accessing list implemention
3808 details with API function.
3809 (handle_qxfer_threads_worker): New function.
3810 (handle_qxfer_threads_proper): Replace accessing list implemention
3811 details with API function.
3812 (handle_query): Ditto.
3813 (visit_actioned_threads_callback_ftype): New typedef.
3814 (visit_actioned_threads_data): New struct.
3815 (visit_actioned_threads): Rewrite to be find_inferior callback.
3816 (resume): Call find_inferior.
3817 (handle_status): Replace accessing list implemention
3818 details with API function.
3819 (process_serial_event): Replace accessing list implemention details
3821 * target.c (set_desired_inferior): Replace accessing list implemention
3822 details with API function.
3823 * tracepoint.c (same_process_p): New function.
3824 (gdb_agent_about_to_close): Replace accessing list implemention
3825 details with API function.
3826 * win32-low.c (child_delete_thread): Replace accessing list
3827 implemention details with API function.
3828 (match_dll_by_basename): New function.
3829 (dll_is_loaded_by_basename): New function.
3830 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3831 details call to dll_is_loaded_by_basename.
3833 2014-02-19 Doug Evans <dje@google.com>
3835 * dll.h (struct dll_info): Add comment.
3836 * gdbthread.h (struct thread_info): Add comment.
3837 (current_ptid): Simplify.
3838 * inferiors.c (add_process): Update.
3839 (remove_process): Update.
3840 * inferiors.h (struct process_info): Rename member "head" to "entry".
3841 * linux-low.c (delete_lwp): Update.
3843 (last_thread_of_process_p): Update.
3844 (kill_one_lwp_callback, linux_kill): Update.
3845 (status_pending_p_callback): Update.
3846 (wait_for_sigstop): Update. Simplify read of ptid.
3847 (start_step_over): Update.
3848 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3849 (get_lwp_thread): Update.
3850 (struct lwp_info): Rename member "head" to "entry".
3851 * regcache.h (inferior_list_entry): Delete.
3852 * server.c (kill_inferior_callback): Update.
3853 (detach_or_kill_inferior_callback): Update.
3854 (print_started_pid): Update.
3855 (print_attached_pid): Update.
3856 (process_serial_event): Simplify read of ptid.
3857 * thread-db.c (thread_db_create_event): Update.
3858 (thread_db_get_tls_address): Update.
3859 * win32-low.c (current_inferior_ptid): Simplify.
3861 2014-02-19 Tom Tromey <tromey@redhat.com>
3863 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3865 (target_supports_btrace): Update.
3867 2014-02-14 Yao Qi <yao@codesourcery.com>
3869 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3870 (rsp-low-ipa.o): New target.
3872 2014-02-12 Tom Tromey <tromey@redhat.com>
3874 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3875 convert_ascii_to_int.
3876 * regcache.c (registers_to_string): Likewise.
3877 * remote-utils.c (decode_M_packet): Likewise.
3878 * server.c (process_serial_event): Likewise.
3880 2014-02-12 Tom Tromey <tromey@redhat.com>
3882 * server.c (handle_query, handle_v_run): Use hex2bin, not
3884 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3886 2014-02-12 Tom Tromey <tromey@redhat.com>
3888 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3889 convert_int_to_ascii.
3890 * regcache.c (registers_to_string, collect_register_as_string):
3892 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3894 * server.c (process_serial_event): Likewise.
3895 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3896 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3898 2014-02-12 Tom Tromey <tromey@redhat.com>
3900 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3901 bin2hex, not hexify.
3902 * tracepoint.c (cmd_qtstatus): Likewise.
3904 2014-02-12 Tom Tromey <tromey@redhat.com>
3906 * remote-utils.c (monitor_output): Pass explicit length to
3909 2014-02-12 Tom Tromey <tromey@redhat.com>
3911 * tracepoint.c: Include rsp-low.h.
3912 * server.c: Include rsp-low.h.
3913 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3914 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3916 * remote-utils.c: Include rsp-low.h.
3917 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3918 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3919 (convert_int_to_ascii, convert_ascii_to_int): Move to
3921 * regcache.c: Include rsp-low.h.
3922 * ax.c: Include rsp-low.h.
3923 * Makefile.in (SFILES): Add common/rsp-low.c.
3924 (OBS): Add rsp-low.o.
3925 (rsp-low.o): New target.
3927 2014-02-12 Tom Tromey <tromey@redhat.com>
3929 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3930 Include print-utils.h.
3931 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3932 (plongest, thirty_two, phex_nz): Remove.
3933 * Makefile.in (SFILES): Add common/print-utils.c.
3934 (OBS): Add print-utils.o.
3935 (print-utils-ipa.o): New target.
3936 (print-utils.o): New target.
3937 (IPA_OBJS): Add print-utils-ipa.o.
3939 2014-02-06 Tom Tromey <tromey@redhat.com>
3941 * Makefile.in (SFILES): Fix indentation.
3943 2014-02-05 Doug Evans <dje@google.com>
3945 * linux-low.c (linux_wait_for_event): Improve comment.
3946 (linux_wait_1): Keep current_inferior in sync with event_child.
3948 2014-01-22 Doug Evans <dje@google.com>
3950 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3952 2014-01-22 Doug Evans <dje@google.com>
3954 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3955 * configure: Regenerate.
3956 * config.in: Regenerate.
3957 * Makefile.in (SFILES): Add debug.c.
3959 * debug.c: New file.
3960 * debug.h: New file.
3961 * linux-aarch64-low.c (*): Update all debugging printfs to use
3962 debug_printf instead of fprintf.
3963 * linux-arm-low.c (*): Ditto.
3964 * linux-cris-low.c (*): Ditto.
3965 * linux-crisv32-low.c (*): Ditto.
3966 * linux-m32r-low.c (*): Ditto.
3967 * linux-sparc-low.c (*): Ditto.
3968 * linux-x86.c (*): Ditto.
3969 * linux-low.c (*): Ditto.
3970 (linux_wait_1): Add calls to debug_enter, debug_exit.
3971 (linux_wait): Remove redundant debugging printf.
3972 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3973 (linux_resume, unstop_all_lwps): Ditto.
3974 * mem-break.c (*): Update all debugging printfs to use
3975 debug_printf instead of fprintf.
3976 * remote-utils.c (*): Ditto.
3977 * thread-db.c (*): Ditto.
3978 * server.c #include <ctype.h>, "gdb_vecs.h".
3979 (debug_threads): Moved to debug.c.
3980 (*): Update all debugging printfs to use debug_printf instead of
3982 (start_inferior): Replace call to fflush with call to debug_flush.
3983 (monitor_show_help): Mention set debug-format.
3984 (parse_debug_format_options): New function.
3985 (handle_monitor_command): Handle "monitor set debug-format".
3986 (gdbserver_usage): Mention --debug-format.
3987 (main): Parse --debug-format.
3988 * server.h (debug_threads): Declaration moved to debug.h.
3990 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3991 trace_debug_1 that uses debug_printf.
3992 (tracepoint_look_up_symbols): Update all debugging printfs to use
3993 debug_printf instead of fprintf.
3995 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3997 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4000 2014-01-17 Pedro Alves <palves@redhat.com>
4003 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4004 defined after including gdb_proc_service.h.
4006 2014-01-16 Doug Evans <dje@google.com>
4008 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4009 (match_dll): Use it.
4011 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4013 * target.h (target_ops) <read_btrace>: Change parameters and
4014 return type to allow error reporting.
4015 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4016 trace reading errors on.
4017 * linux-low.c (linux_low_read_btrace): Pass trace reading
4019 (linux_low_disable_btrace): New.
4021 2014-01-15 Doug Evans <dje@google.com>
4023 * inferiors.c (thread_id_to_gdb_id): Delete.
4024 * inferiors.h (thread_id_to_gdb_id): Delete.
4026 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4028 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4029 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4032 2014-01-08 Pedro Alves <palves@redhat.com>
4034 * server.c (handle_status): Don't discard previous queued stop
4035 replies or thread's pending status here.
4036 (main) <disconnection>: Do it here instead.
4038 2014-01-08 Pedro Alves <palves@redhat.com>
4040 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4041 * server.c (visit_actioned_threads, handle_pending_status): New
4043 (handle_v_cont): Factor out parts to ...
4044 (resume): ... this new function. If in all-stop, and a thread
4045 being resumed has a pending status, report it without actually
4047 (myresume): Adjust to use the new 'resume' function.
4048 (clear_pending_status_callback, set_pending_status_callback)
4049 (find_status_pending_thread_callback): New functions.
4050 (handle_status): Handle the case of multiple threads having
4051 interesting statuses to report. Report threads' real last signal
4052 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4053 with an interesting thread to report the status for, instead of
4054 always reporting the status of the first thread.
4056 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4058 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4059 * gdbreplay.c (gdbreplay_version): Likewise.
4061 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4063 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4064 iov.iov_len with the real length in use.
4066 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4068 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4069 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4070 for all targets that use win32-low.c.
4071 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4072 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4074 2013-12-13 Pedro Alves <palves@redhat.com>
4076 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4077 if equal to TARGET_WAITKIND_LOADED.
4078 * win32-low.c (cached_status): New static global.
4079 (win32_wait): Add declaration.
4080 (do_initial_child_stuff): Flush all initial pending debug events
4081 up to the initial breakpoint.
4082 (win32_wait): If CACHED_STATUS was set, return that instead
4083 of doing a real wait. Remove the code resuming the execution
4084 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4085 during the initial phase. Also remove the code changing
4086 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4087 TARGET_WAITKIND_STOPPED.
4089 2013-12-11 Yao Qi <yao@codesourcery.com>
4091 * notif.c (handle_notif_ack): Return 0 if no notification
4094 2013-11-20 Doug Evans <dje@google.com>
4096 * linux-low.c (linux_set_resume_request): Fix comment.
4098 2013-11-20 Doug Evans <dje@google.com>
4100 * linux-low.c (resume_status_pending_p): Tweak comment.
4102 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4104 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4105 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4106 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4107 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4108 (srv_amd64_regobj): Add amd64-mpx.o.
4109 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4110 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4111 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4112 * i387-fp.c (num_pl_bnd_register) Added constant.
4113 (num_pl_bnd_cfg_registers) Added constant.
4114 (struct i387_xsave) Added reserved area and MPX fields.
4115 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4116 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4118 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4119 (init_registers_amd64_mpx_linux): Declare new function.
4120 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4121 (x86_64_regmap): Add MPX registers.
4122 (x86_linux_read_description): Add MPX case.
4123 (initialize_low_arch): Initialize MPX targets.
4125 2013-11-18 Tom Tromey <tromey@redhat.com>
4127 * configure: Rebuild.
4128 * configure.ac: Don't check for stdlib.h.
4129 * gdbreplay.c: Unconditionally include stdlib.h.
4131 2013-11-18 Tom Tromey <tromey@redhat.com>
4133 * config.in: Rebuild.
4134 * configure: Rebuild.
4135 * configure.ac: Don't use AC_HEADER_DIRENT.
4137 2013-11-18 Tom Tromey <tromey@redhat.com>
4139 * server.h: Don't check HAVE_STRING_H.
4140 * gdbreplay.c: Don't check HAVE_STRING_H.
4141 * configure: Rebuild.
4143 2013-11-18 Tom Tromey <tromey@redhat.com>
4145 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4148 2013-11-08 Tom Tromey <tromey@redhat.com>
4150 * configure, config.in: Rebuild.
4151 * configure.ac: Remove unused configury.
4153 2013-11-08 Tom Tromey <tromey@redhat.com>
4155 * acinclude.m4: Include common.m4, codeset.m4.
4156 * configure, config.in: Rebuild.
4157 * configure.ac: Use GDB_AC_COMMON.
4159 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4161 * linux-s390-low.c (HWCAP_S390_TE): New define.
4162 (s390_arch_setup): Consider the TE field in the HWCAP for
4163 determining 'have_regset_tdb'.
4165 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4168 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4171 2013-10-02 Pedro Alves <palves@redhat.com>
4173 * server.c (process_serial_event): Don't output "GDBserver
4174 exiting" if GDB is connected through stdio.
4175 * target.c (mywait): Likewise, be silent if GDB is connected
4178 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4180 * lynx-low.c (lynx_add_threads_after_attach): New function.
4181 (lynx_attach): Remove call to add_thread. Add call to
4182 lynx_add_threads_after_attach instead.
4184 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4186 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4187 * config.in, configure: Regenerated.
4189 2013-09-18 Yao Qi <yao@codesourcery.com>
4192 * server.c (start_inferior): Clear 'resume_info'.
4194 2013-09-16 Jiong Wang <jiwang@tilera.com>
4196 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4199 2013-09-16 Jiong Wang <jiwang@tilera.com>
4201 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4202 linux-tile-low.o to srv_tgtobj.
4204 2013-09-16 Will Newton <will.newton@linaro.org>
4206 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4209 2013-09-06 Pedro Alves <palves@redhat.com>
4211 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4212 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4213 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4214 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4215 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4216 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4218 2013-09-06 Pedro Alves <palves@redhat.com>
4220 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4221 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4223 2013-09-06 Pedro Alves <palves@redhat.com>
4225 * linux-amd64-ipa.c: Include tracepoint.h.
4226 * linux-i386-ipa.c: Include tracepoint.h.
4228 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4230 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4231 (ps_get_thread_area): New function.
4233 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4235 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4236 (initialize_low_arch): Call init_registers_crisv32 rather than
4237 init_register_crisv32.
4239 2013-09-05 Pedro Alves <palves@redhat.com>
4241 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4243 * hostio.h: ... this new file.
4244 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4245 win32-low.c: Include hostio.h.
4247 2013-09-05 Pedro Alves <palves@redhat.com>
4249 * server.h (gdb_client_data, handler_func, callback_handler_func)
4250 (delete_file_handler, add_file_handler, append_callback_event)
4251 (delete_callback_event, start_event_loop, initialize_event_loop):
4252 Move to event-loop.h and include it.
4253 * event-loop.h: New file.
4255 2013-09-05 Pedro Alves <palves@redhat.com>
4257 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4258 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4259 (loaded_dll, unloaded_dll): Move to ...
4260 * dll.h: ... this new file.
4261 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4263 2013-09-05 Pedro Alves <palves@redhat.com>
4265 * server.h (current_process, get_thread_process, all_processes)
4266 (add_inferior_to_list, for_each_inferior, current_inferior)
4267 (remove_inferior, add_process, remove_process, find_process_pid)
4268 (have_started_inferiors_p, have_attached_inferiors_p)
4269 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4270 (clear_inferiors, find_inferior, find_inferior_id)
4271 (inferior_target_data, set_inferior_target_data)
4272 (inferior_regcache_data, set_inferior_regcache_data): Move to
4273 inferiors.h, and include it.
4274 * inferiors.h: New file.
4276 2013-09-05 Pedro Alves <palves@redhat.com>
4278 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4282 2013-09-05 Pedro Alves <palves@redhat.com>
4284 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4286 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4287 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4288 (handle_tracepoint_general_set, handle_tracepoint_query)
4289 (tracepoint_finished_step, tracepoint_was_hit)
4290 (release_while_stepping_state_list, current_traceframe)
4291 (in_readonly_region, traceframe_read_mem)
4292 (fetch_traceframe_registers, traceframe_read_sdata)
4293 (traceframe_read_info, struct fast_tpoint_collect_status)
4294 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4295 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4296 (supply_fast_tracepoint_registers)
4297 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4298 (ipa_tdesc, claim_trampoline_space)
4299 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4300 (agent_mem_read, agent_get_trace_state_variable_value)
4301 (agent_set_trace_state_variable_value, agent_tsv_read)
4302 (agent_mem_read_string, get_raw_reg_func_addr)
4303 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4304 * tracepoint.h: ... this new file.
4306 2013-09-05 Pedro Alves <palves@redhat.com>
4308 * server.h (perror_with_name, error, fatal, warning, paddress)
4309 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4311 * utils.h: New file.
4313 2013-09-05 Pedro Alves <palves@redhat.com>
4315 * server.h (remote_debug, noack_mode, transport_is_reliable)
4316 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4317 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4318 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4319 (write_enn, initialize_async_io, enable_async_io)
4320 (disable_async_io, check_remote_input_interrupt_request)
4321 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4322 (dead_thread_notify, prepare_resume_reply)
4323 (decode_address_to_semicolon, decode_address, decode_m_packet)
4324 (decode_M_packet, decode_X_packet, decode_xfer_write)
4325 (decode_search_memory_packet, unhexify, hexify)
4326 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4327 (look_up_one_symbol, relocate_instruction)
4328 (monitor_output): Move to remote-utils.h, and include it.
4329 * remote-utils.h: New file.
4331 2013-09-05 Pedro Alves <palves@redhat.com>
4333 * server.h (_): Delete.
4335 2013-09-02 Pedro Alves <palves@redhat.com>
4337 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4338 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4340 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4342 2013-09-02 Pierre Muller <muller@sourceware.org>
4344 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4345 or WriteProcessMemory complete successfully and handle
4346 ERROR_PARTIAL_COPY error.
4348 2013-09-02 Pedro Alves <palves@redhat.com>
4350 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4351 error instead of EIO.
4353 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4356 * linux-low.c: Include filestuff.h.
4357 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4358 * lynx-low.c: Include filestuff.h.
4359 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4360 * server.c: Include filestuff.h.
4361 (main): Call notice_open_fds.
4362 * spu-low.c: Include filestuff.h.
4363 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4365 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4367 * Makefile.in: Explain why ../target and ../nat are not
4368 listed as include file search paths.
4369 (linux-waitpid.o): New object file rule.
4370 * configure.srv (srv_native_linux_obj): New variable.
4371 Replace all occurrences of linux native object files with
4372 $srv_native_linux_obj.
4373 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4374 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4375 (linux_enable_event_reporting): Remove declaration.
4376 (my_waitpid): Moved to common/linux-waitpid.c.
4377 (linux_wait_for_event): Pass ptid when calling
4378 linux_enable_event_reporting.
4379 (linux_supports_tracefork_flag): Remove.
4380 (linux_enable_event_reporting): Likewise.
4381 (linux_tracefork_grandchild): Remove.
4382 (STACK_SIZE): Moved to common/linux-ptrace.c.
4383 (linux_tracefork_child): Remove.
4384 (linux_test_for_tracefork): Remove.
4385 (linux_look_up_symbols): Call linux_supports_traceclone.
4386 (initialize_low): Remove call to linux_test_for_tracefork.
4387 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4388 common/linux-ptrace.h.
4389 (PTRACE_TYPE_ARG4): Likewise.
4390 Include linux-ptrace.h.
4392 2013-08-21 Pedro Alves <palves@redhat.com>
4394 * config.in: Renegerate.
4396 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4398 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4399 (SFILES): Remove $(srcdir)/common/target-common.c and
4400 add $(srcdir)/target/waitstatus.c.
4401 (OBS): Remove target-common.o and add waitstatus.o.
4402 (server_h): Remove $(srcdir)/../common/target-common.h and
4403 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4404 and $(srcdir)/../target/waitstatus.h.
4405 (target-common.o): Remove.
4406 (waitstatus.o): New target object file.
4407 * target.h: Do not include target-common.h and
4408 include target/resume.h, target/wait.h and
4409 target/waitstatus.h.
4411 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4413 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4414 to PTRACE_TYPE_ARG3.
4415 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4416 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4418 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4419 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4421 2013-07-27 Jie Zhang <jie@codesourcery.com>
4422 Daniel Jacobowitz <dan@codesourcery.com>
4423 Yao Qi <yao@codesourcery.com>
4425 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4426 (mips-linux-watch.o): New rule.
4427 (mips_linux_watch_h): New variable.
4428 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4430 * linux-mips-low.c: Include mips-linux-watch.h.
4431 (struct arch_process_info, struct arch_lwp_info): New.
4432 (update_watch_registers_callback): New function.
4433 (mips_linux_new_process, mips_linux_new_thread) New functions.
4434 (mips_linux_prepare_to_resume, mips_insert_point): New
4436 (mips_remove_point, mips_stopped_by_watchpoint): New
4438 (rsp_bp_type_to_target_hw_bp_type): New function.
4439 (mips_stopped_data_address): New function.
4440 (the_low_target): Add watchpoint support functions.
4442 2013-07-27 Yao Qi <yao@codesourcery.com>
4444 * i386-low.c: Include break-common.h.
4445 (enum target_hw_bp_type): Remove.
4447 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4449 * Makefile.in (SFILES): /common/target-common.c.
4450 (OBS): Add target-common.o.
4451 (server_h): Add $(srcdir)/../common/target-common.h.
4452 (target-common.o): New target.
4453 * server.c (queue_stop_reply_callback): Free
4454 status string after use.
4455 * target.c (target_waitstatus_to_string): Remove.
4456 * target.h: Include target-common.h.
4457 (resume_kind): Likewise.
4458 (target_waitkind): Likewise.
4459 (target_waitstatus): Likewise.
4460 (TARGET_WNOHANG): Likewise.
4462 2013-07-04 Yao Qi <yao@codesourcery.com>
4464 * Makefile.in (host_alias): Use @host_noncanonical@.
4465 (target_alias): Use @target_noncanonical@.
4466 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4467 ACX_NONCANONICAL_HOST.
4468 * configure: Regenerated.
4471 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4473 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4474 * configure: Rebuild.
4475 * Makefile.in (version_host, version_target): Get from configure.
4476 (version.c): Use $(version_host) and $(version_target).
4478 2013-07-03 Pedro Alves <palves@redhat.com>
4480 * Makefile.in (config.status): Depend on development.sh.
4481 * acinclude.m4: Include libmcheck.m4.
4482 * configure: Regenerate.
4484 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4486 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4487 attribute inside the parentheses.
4488 (winapi_DebugSetProcessKillOnExit): Ditto.
4489 (winapi_DebugBreakProcess): Ditto.
4490 (winapi_GenerateConsoleCtrlEvent): Ditto.
4492 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4494 * notif.h (notif_event): Add a dummy member to avoid compiler
4497 2013-07-01 Pedro Alves <palves@redhat.com>
4499 * hostio.c (HOSTIO_PATH_MAX): Define.
4500 (require_filename, handle_open, handle_unlink, handle_readlink):
4503 2013-07-01 Pedro Alves <palves@redhat.com>
4505 * server.h: Include "pathmax.h".
4506 * linux-low.c: Don't include sys/param.h.
4507 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4509 * win32-low.c: Don't include sys/param.h.
4510 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4512 2013-07-01 Pedro Alves <palves@redhat.com>
4514 * event-loop.c: Don't check HAVE_UNISTD_H before including
4516 * gdbreplay.c: Likewise.
4517 * remote-utils.c: Likewise.
4518 * server.c: Likewise.
4519 * configure.ac: Don't check for unistd.h.
4520 * configure: Regenerate.
4522 2013-06-28 Tom Tromey <tromey@redhat.com>
4524 * Makefile.in (version.c): Use version.in, not
4527 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4529 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4530 * configure: Rebuild.
4531 * Makefile.in (version_host, version_target): Get from configure.
4532 (version.c): Use $(version_host) and $(version_target).
4534 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4536 Fix trace-status to output user name without trailing colon.
4537 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4539 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4541 Fix trace-status to output proper start-time and stop-time.
4542 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4543 output start time and stop time in hex as gdb expects.
4545 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4547 * tracepoint.c (build_traceframe_info_xml): Output trace state
4548 variables present in the trace buffer.
4550 2013-06-24 Tom Tromey <tromey@redhat.com>
4552 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4554 (version.o): Remove.
4555 * gdbreplay.c: Include version.h.
4556 (version, host_name): Don't declare.
4557 * server.h: Include version.h.
4558 (version, host_name): Don't declare.
4560 2013-06-12 Pedro Alves <palves@redhat.com>
4562 * linux-x86-low.c (linux_is_elf64): Delete global.
4563 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4564 with local linux_pid_exe_is_elf_64_file use.
4566 2013-06-11 Pedro Alves <palves@redhat.com>
4568 * linux-low.c (regset_disabled, disable_regset): New functions.
4569 (regsets_fetch_inferior_registers)
4570 (regsets_store_inferior_registers): Use them.
4571 (initialize_regsets_info); Don't allocate the disabled_regsets
4573 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4576 2013-06-11 Pedro Alves <palves@redhat.com>
4578 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4581 2013-06-11 Pedro Alves <palves@redhat.com>
4583 * linux-x86-low.c (initialize_low_arch): Call
4584 init_registers_x32_avx_linux.
4586 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4588 Fix compatibility with Android Bionic.
4589 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4592 2013-06-07 Pedro Alves <palves@redhat.com>
4595 * Makefile.in (OBS): Add tdesc.o.
4596 (IPA_OBJS): Add tdesc-ipa.o.
4597 (tdesc-ipa.o): New rule.
4598 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4600 * linux-low.c (new_inferior): Delete.
4601 (disabled_regsets, num_regsets): Delete.
4602 (linux_add_process): Adjust to set the new per-process
4604 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4605 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4606 was a stop. When calling arch_setup, switch the current inferior
4607 to the thread that got an event.
4608 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4609 (regsets_fetch_inferior_registers)
4610 (regsets_store_inferior_registers): New regsets_info parameter.
4612 (linux_register_in_regsets): New regs_info parameter. Adjust to
4614 (register_addr, fetch_register, store_register): New usrregs_info
4615 parameter. Adjust to use it.
4616 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4617 parameter regs_info. Adjust to use it.
4618 (linux_fetch_registers): Get the current inferior's regs_info, and
4620 (linux_store_registers): Ditto.
4621 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4622 (initialize_low): Don't initialize the target_regsets here. Call
4623 initialize_low_arch.
4624 * linux-low.h (target_regsets): Delete declaration.
4625 (struct regsets_info): New.
4626 (struct usrregs_info): New.
4627 (struct regs_info): New.
4628 (struct process_info_private) <new_inferior>: New field.
4629 (struct linux_target_ops): Delete the num_regs, regmap, and
4630 regset_bitmap fields. New field regs_info.
4631 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4632 * i387-fp.c (num_xmm_registers): Delete.
4633 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4634 calls to new interface.
4635 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4636 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4637 Infer the number of xmm registers from the regcache's target
4639 * i387-fp.h (num_xmm_registers): Delete.
4640 * inferiors.c (add_thread): Don't install the thread's regcache
4642 * proc-service.c (gregset_info): Fetch the current inferior's
4643 regs_info. Adjust to use it.
4644 * regcache.c: Include tdesc.h.
4645 (register_bytes, reg_defs, num_registers)
4646 (gdbserver_expedite_regs): Delete.
4647 (get_thread_regcache): If the thread doesn't have a regcache yet,
4648 create one, instead of aborting gdbserver.
4649 (regcache_invalidate_one): Rename to ...
4650 (regcache_invalidate_thread): ... this.
4651 (regcache_invalidate_one): New.
4652 (regcache_invalidate): Only invalidate registers of the current
4654 (init_register_cache): Add target_desc parameter, and use it.
4655 (new_register_cache): Ditto. Assert the target description has a
4656 non zero registers_size.
4657 (regcache_cpy): Add assertions. Adjust.
4658 (realloc_register_cache, set_register_cache): Delete.
4659 (registers_to_string, registers_from_string): Adjust.
4660 (find_register_by_name, find_regno, find_register_by_number)
4661 (register_cache_size): Add target_desc parameter, and use it.
4662 (free_register_cache_thread, free_register_cache_thread_one)
4663 (regcache_release, register_cache_size): New.
4664 (register_size): Add target_desc parameter, and use it.
4665 (register_data, supply_register, supply_register_zeroed)
4666 (supply_regblock, supply_register_by_name, collect_register)
4667 (collect_register_as_string, collect_register_by_name): Adjust.
4668 * regcache.h (struct target_desc): Forward declare.
4669 (struct regcache) <tdesc>: New field.
4670 (init_register_cache, new_register_cache): Add target_desc
4672 (regcache_invalidate_thread): Declare.
4673 (regcache_invalidate_one): Delete declaration.
4674 (regcache_release): Declare.
4675 (find_register_by_number, register_cache_size, register_size)
4676 (find_regno): Add target_desc parameter.
4677 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4679 * remote-utils.c: Include tdesc.h.
4680 (outreg, prepare_resume_reply): Adjust.
4681 * server.c: Include tdesc.h.
4682 (gdbserver_xmltarget): Delete declaration.
4683 (get_features_xml, process_serial_event): Adjust.
4684 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4686 (struct process_info) <tdesc>: New field.
4687 (ipa_tdesc): Declare.
4688 * tdesc.c: New file.
4689 * tdesc.h: New file.
4690 * tracepoint.c: Include tdesc.h.
4691 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4692 (get_context_regcache): Adjust to pass ipa_tdesc down.
4693 (do_action_at_tracepoint): Adjust to get the register cache size
4694 from the context regcache's description.
4695 (traceframe_walk_blocks): Adjust to get the register cache size
4696 from the current trace frame's description.
4697 (traceframe_get_pc): Adjust to get current trace frame's
4698 description and pass it down.
4699 (gdb_collect): Adjust to get the register cache size from the
4701 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4702 (gdbserver_xmltarget): Delete.
4703 (initialize_low_tracepoint): Set the ipa's target description.
4704 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4705 (initialize_low_tracepoint): Set the ipa's target description.
4706 * linux-x86-low.c: Include tdesc.h.
4707 [__x86_64__] (is_64bit_tdesc): New.
4708 (ps_get_thread_area, x86_get_thread_area): Use it.
4709 (i386_cannot_store_register): Rename to ...
4710 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4711 (i386_cannot_fetch_register): Rename to ...
4712 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4713 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4715 (target_regsets): Rename to ...
4716 (x86_regsets): ... this.
4717 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4719 (x86_siginfo_fixup): Use is_64bit_tdesc.
4720 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4721 (tdesc_x32_avx_linux, tdesc_x32_linux)
4722 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4724 (x86_linux_update_xmltarget): Delete.
4725 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4726 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4727 (AMD64_LINUX_USER64_CS): New.
4728 (x86_linux_read_description): New, based on
4729 x86_linux_update_xmltarget.
4730 (same_process_callback): New.
4731 (x86_arch_setup_process_callback): New.
4732 (x86_linux_update_xmltarget): New.
4733 (x86_regsets_info): New.
4734 (amd64_linux_regs_info): New.
4735 (i386_linux_usrregs_info): New.
4736 (i386_linux_regs_info): New.
4737 (x86_linux_regs_info): New.
4738 (x86_arch_setup): Reimplement.
4739 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4740 (x86_emit_ops): Ditto.
4741 (the_low_target): Adjust. Install x86_linux_regs_info,
4742 x86_cannot_fetch_register, and x86_cannot_store_register.
4743 (initialize_low_arch): New.
4744 * linux-ia64-low.c (tdesc_ia64): Declare.
4745 (ia64_fetch_register): Adjust.
4746 (ia64_usrregs_info, regs_info): New globals.
4747 (ia64_regs_info): New function.
4748 (the_low_target): Adjust.
4749 (initialize_low_arch): New function.
4750 * linux-sparc-low.c (tdesc_sparc64): Declare.
4751 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4753 (sparc_arch_setup): New function.
4754 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4755 (the_low_target): Adjust.
4756 (initialize_low_arch): New function.
4757 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4758 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4759 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4760 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4761 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4762 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4763 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4764 (tdesc_powerpc_isa205_vsx64l): Declare.
4765 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4766 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4767 (ppc_set_pc, ppc_get_hwcap): Adjust.
4768 (ppc_usrregs_info): Forward declare.
4769 (!__powerpc64__) ppc_regmap_adjusted: New global.
4770 (ppc_arch_setup): Adjust to the current process'es target
4772 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4773 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4774 (ppc_store_evrregset): Adjust.
4775 (target_regsets): Rename to ...
4776 (ppc_regsets): ... this, and make static.
4777 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4778 (ppc_regs_info): New function.
4779 (the_low_target): Adjust.
4780 (initialize_low_arch): New function.
4781 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4782 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4783 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4784 (tdesc_s390x_linux64v2): Declare.
4785 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4786 (s390_fill_gregset, s390_store_last_break): Adjust.
4787 (target_regsets): Rename to ...
4788 (s390_regsets): ... this, and make static.
4789 (s390_get_pc, s390_set_pc): Adjust.
4790 (s390_get_hwcap): New target_desc parameter, and use it.
4791 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4792 (s390_arch_setup): Adjust to set the current process'es target
4793 description. Don't adjust the regmap.
4794 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4795 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4796 (regs_info_3264): New globals.
4797 (s390_regs_info): New function.
4798 (the_low_target): Adjust.
4799 (initialize_low_arch): New function.
4800 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4801 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4802 [__mips64] (init_registers_mips_linux)
4803 (init_registers_mips_dsp_linux): Delete defines.
4804 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4805 (have_dsp): New global.
4806 (mips_read_description): New, based on mips_arch_setup.
4807 (mips_arch_setup): Reimplement.
4808 (get_usrregs_info): New function.
4809 (mips_cannot_fetch_register, mips_cannot_store_register)
4810 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4811 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4812 (target_regsets): Rename to ...
4813 (mips_regsets): ... this, and make static.
4814 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4815 (dsp_regs_info, regs_info): New globals.
4816 (mips_regs_info): New function.
4817 (the_low_target): Adjust.
4818 (initialize_low_arch): New function.
4819 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4820 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4822 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4823 (arm_read_description): New, with bits factored from
4825 (arm_arch_setup): Reimplement.
4826 (target_regsets): Rename to ...
4827 (arm_regsets): ... this, and make static.
4828 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4829 (arm_regs_info): New function.
4830 (the_low_target): Adjust.
4831 (initialize_low_arch): New function.
4832 * linux-m68k-low.c (tdesc_m68k): Declare.
4833 (target_regsets): Rename to ...
4834 (m68k_regsets): ... this, and make static.
4835 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4836 (m68k_regs_info): New function.
4837 (m68k_arch_setup): New function.
4838 (the_low_target): Adjust.
4839 (initialize_low_arch): New function.
4840 * linux-sh-low.c (tdesc_sharch): Declare.
4841 (target_regsets): Rename to ...
4842 (sh_regsets): ... this, and make static.
4843 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4844 (sh_regs_info, sh_arch_setup): New functions.
4845 (the_low_target): Adjust.
4846 (initialize_low_arch): New function.
4847 * linux-bfin-low.c (tdesc_bfin): Declare.
4848 (bfin_arch_setup): New function.
4849 (bfin_usrregs_info, regs_info): New globals.
4850 (bfin_regs_info): New function.
4851 (the_low_target): Adjust.
4852 (initialize_low_arch): New function.
4853 * linux-cris-low.c (tdesc_cris): Declare.
4854 (cris_arch_setup): New function.
4855 (cris_usrregs_info, regs_info): New globals.
4856 (cris_regs_info): New function.
4857 (the_low_target): Adjust.
4858 (initialize_low_arch): New function.
4859 * linux-cris-low.c (tdesc_crisv32): Declare.
4860 (cris_arch_setup): New function.
4861 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4862 (cris_regs_info): New function.
4863 (the_low_target): Adjust.
4864 (initialize_low_arch): New function.
4865 * linux-m32r-low.c (tdesc_m32r): Declare.
4866 (m32r_arch_setup): New function.
4867 (m32r_usrregs_info, regs_info): New globals.
4868 (m32r_regs_info): Adjust.
4869 (initialize_low_arch): New function.
4870 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4871 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4872 (tic6x_usrregs_info): Forward declare.
4873 (tic6x_read_description): New function, based on ...
4874 (tic6x_arch_setup): ... this. Reimplement.
4875 (target_regsets): Rename to ...
4876 (tic6x_regsets): ... this, and make static.
4877 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4878 (tic6x_regs_info): New function.
4879 (the_low_target): Adjust.
4880 (initialize_low_arch): New function.
4881 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4882 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4883 (target_regsets): Rename to ...
4884 (xtensa_regsets): ... this, and make static.
4885 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4887 (xtensa_arch_setup, xtensa_regs_info): New functions.
4888 (the_low_target): Adjust.
4889 (initialize_low_arch): New function.
4890 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4891 (nios2_arch_setup): Set the current process'es tdesc.
4892 (target_regsets): Rename to ...
4893 (nios2_regsets): ... this.
4894 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4895 (nios2_regs_info): New function.
4896 (the_low_target): Adjust.
4897 (initialize_low_arch): New function.
4898 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4899 (aarch64_arch_setup): Set the current process'es tdesc.
4900 (target_regsets): Rename to ...
4901 (aarch64_regsets): ... this.
4902 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4903 (aarch64_regs_info): New function.
4904 (the_low_target): Adjust.
4905 (initialize_low_arch): New function.
4906 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4908 (target_regsets): Rename to ...
4909 (tile_regsets): ... this.
4910 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4911 (tile_regs_info): New function.
4912 (tile_arch_setup): Set the current process'es tdesc.
4913 (the_low_target): Adjust.
4914 (initialize_low_arch): New function.
4915 * spu-low.c (tdesc_spu): Declare.
4916 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4917 * win32-arm-low.c (tdesc_arm): Declare.
4918 (arm_arch_setup): New function.
4919 (the_low_target): Install arm_arch_setup instead of
4921 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4922 (init_windows_x86): Rename to ...
4923 (i386_arch_setup): ... this. Set `win32_tdesc'.
4924 (the_low_target): Adjust.
4925 * win32-low.c (win32_tdesc): New global.
4926 (child_add_thread): Don't create the thread cache here.
4927 (do_initial_child_stuff): Set the new process'es tdesc.
4928 * win32-low.h (struct target_desc): Forward declare.
4929 (win32_tdesc): Declare.
4930 * lynx-i386-low.c (tdesc_i386): Declare global.
4931 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4932 * lynx-low.c (lynx_tdesc): New global.
4933 (lynx_add_process): Set the new process'es tdesc.
4934 * lynx-low.h (struct target_desc): Forward declare.
4935 (lynx_tdesc): Declare global.
4936 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4937 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4938 * nto-low.c (nto_tdesc): New global.
4939 (do_attach): Set the new process'es tdesc.
4940 * nto-low.h (struct target_desc): Forward declare.
4941 (nto_tdesc): Declare.
4942 * nto-x86-low.c (tdesc_i386): Declare.
4943 (nto_x86_arch_setup): Set `nto_tdesc'.
4945 2013-06-04 Gary Benson <gbenson@redhat.com>
4947 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4948 to qSupported response when appropriate.
4949 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4950 with nonzero-length annex.
4951 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4952 arguments supplied in annex.
4954 2013-05-31 Doug Evans <dje@google.com>
4957 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4958 64 bits in 64-cross-32 environment.
4960 2013-05-28 Pedro Alves <palves@redhat.com>
4962 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4963 (aarch64-without-fpu.c): Delete rule.
4964 * configure.srv (aarch64*-*-linux*): Remove references to
4965 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4966 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4969 2013-05-24 Pedro Alves <palves@redhat.com>
4971 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4972 instead of strchr/decode_address. Error if the range isn't split
4973 with a ','. Don't assume there's be a ':' in the action.
4975 2013-05-23 Yao Qi <yao@codesourcery.com>
4976 Pedro Alves <palves@redhat.com>
4978 * linux-low.c (lwp_in_step_range): New function.
4979 (linux_wait_1): If the thread was range stepping and stopped
4980 outside the stepping range, report the stop to GDB. Otherwise,
4981 continue stepping. Add range stepping debug output.
4982 (linux_set_resume_request): Copy the step range from the resume
4984 (linux_supports_range_stepping): New.
4985 (linux_target_ops) <supports_range_stepping>: Set to
4986 linux_supports_range_stepping.
4987 * linux-low.h (struct linux_target_ops)
4988 <supports_range_stepping>: New field.
4989 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4990 * linux-x86-low.c (x86_supports_range_stepping): New.
4991 (the_low_target) <supports_range_stepping>: Set to
4992 x86_supports_range_stepping.
4993 * server.c (handle_v_cont): Handle 'r' action.
4994 (handle_v_requests): Append ";r" if the target supports range
4996 * target.h (struct thread_resume) <step_range_start,
4997 step_range_end>: New fields.
4998 (struct target_ops) <supports_range_stepping>:
5000 (target_supports_range_stepping): New macro.
5002 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5004 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5005 confusion in comment.
5007 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5009 * lynx-low.c (struct process_info_private): New type.
5010 (lynx_add_process): New function.
5011 (lynx_create_inferior, lynx_attach): Replace calls to
5012 add_process by calls to lynx_add_process.
5013 (lynx_resume): If PTID is null, then try using
5014 current_process()->private->last_wait_event_ptid.
5016 (lynx_clear_inferiors): Delete. The contents of that function
5017 has been inlined in lynx_mourn;
5018 (lynx_wait_1): Save the ptid in the process's private data.
5019 (lynx_mourn): Free the process' private data. Replace call
5020 to lynx_clear_inferiors by call to clear_inferiors.
5022 2013-05-17 Yao Qi <yao@codesourcery.com>
5024 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5027 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5029 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5030 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5031 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5032 PT_TEXT_END_ADDR guards. Update comments.
5033 (linux_target_op) <read_offsets>: Conditionally define to
5034 linux_read_offsets if the target is UCLIBC and if it defines
5035 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5037 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5038 Andrew Jenner <andrew@codesourcery.com>
5040 * Makefile.in (SFILES): Add linux-nios2-low.c.
5041 (clean): Add action to delete nios2-linux.c.
5042 (nios2-linux.c): New rule.
5043 * configure.srv: Add nios2*-*-linux*.
5044 * linux-nios2-low.c: New.
5046 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5048 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5050 2013-04-25 Hui Zhu <hui@codesourcery.com>
5053 * ax.c (ax_printf): Add fflush.
5055 2013-04-22 Tom Tromey <tromey@redhat.com>
5057 * Makefile.in (SFILES): Add filestuff.c.
5058 (OBS): Add filestuff.o.
5059 (filestuff.o): New target.
5060 * config.in, configure: Rebuild.
5061 * configure.ac: Check for fdwalk, pipe2.
5063 2013-04-17 Pedro Alves <palves@redhat.com>
5065 * configure.ac (USE_THREAD_DB): Delete variable.
5066 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5067 Don't AC_SUBST USE_THREAD_DB.
5068 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5069 * config.in, configure: Regenerate.
5071 2013-04-16 Pedro Alves <palves@redhat.com>
5073 * linux-low.h (struct lwp_info) <thread_known>: Move under
5074 the USE_THREAD_DB #ifdef.
5076 2013-04-16 Pedro Alves <palves@redhat.com>
5078 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5079 (linux-low.o): Delete rule.
5080 * linux-low.h: Always include "gdb_thread_db.h" instead of
5081 conditionally including thread_db.h.
5082 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5085 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5087 * Makefile.in (install-only): Fix make install regression.
5089 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5091 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5092 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5094 * gdbserver.1: Remove.
5096 2013-03-22 Pedro Alves <palves@redhat.com>
5098 * linux-low.c (handle_extended_wait): Don't call
5099 linux_enable_event_reporting.
5101 2013-03-15 Tony Theodore <tonyt@logyst.com>
5104 * Makefile.in (SHELL): Use @SHELL@.
5106 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5108 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5111 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5113 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5114 Remove extraneous NULL element.
5116 2013-03-13 Yao Qi <yao@codesourcery.com>
5118 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5119 'V' block in trace frame.
5121 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5123 * target.h (struct target_ops): Add btrace ops.
5124 (target_supports_btrace): New macro.
5125 (target_enable_btrace): New macro.
5126 (target_disable_btrace): New macro.
5127 (target_read_btrace): New macro.
5128 * gdbthread.h (struct thread_info): Add btrace field.
5129 * server.c: Include btrace-common.h.
5130 (handle_btrace_general_set): New function.
5131 (handle_btrace_enable): New function.
5132 (handle_btrace_disable): New function.
5133 (handle_general_set): Call handle_btrace_general_set.
5134 (handle_qxfer_btrace): New function.
5135 (struct qxfer qxfer_packets[]): Add btrace entry.
5136 * inferiors.c (remove_thread): Disable btrace.
5137 * linux-low: Include linux-btrace.h.
5138 (linux_low_enable_btrace): New function.
5139 (linux_low_read_btrace): New function.
5140 (linux_target_ops): Add btrace ops.
5141 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5142 Add srv_linux_btrace=yes.
5143 (x86_64-*-linux*): Add linux-btrace.o.
5144 Add srv_linux_btrace=yes.
5145 * configure.ac: Define HAVE_LINUX_BTRACE.
5146 * config.in: Regenerated.
5147 * configure: Regenerated.
5149 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5151 * server.c (handle_qxfer): Preserve error message if -3 is
5153 (qxfer): Document the -3 return value.
5155 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5157 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5158 (linux_btrace_h): New variable.
5159 (linux-btrace.o): New rule.
5161 2013-03-08 Stan Shebs <stan@codesourcery.com>
5162 Hafiz Abid Qadeer <abidh@codesourcery.com>
5164 * tracepoint.c (trace_buffer_size): New global.
5165 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5166 (init_trace_buffer): Change to one-argument function. Allocate
5167 trace buffer memory.
5168 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5169 handle QTBuffer:size packet.
5170 (cmd_bigqtbuffer_size): New function.
5171 (initialize_tracepoint): Call init_trace_buffer with
5172 DEFAULT_TRACE_BUFFER_SIZE.
5173 * server.c (handle_query): Add QTBuffer:size in the
5176 2013-03-07 Yao Qi <yao@codesourcery.com>
5178 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5179 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5181 (cmd_qtsp): Adjust condition. Do post increment.
5182 Set cur_action and cur_step_action back to 0.
5184 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5187 * linux-low.c (linux_write_memory): Return early success if LEN is
5190 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5192 * configure.srv: Add x86_64-*-cygwin* as target.
5194 2013-02-28 Tom Tromey <tromey@redhat.com>
5196 * configure.ac: Invoke AC_SYS_LARGEFILE.
5197 * configure, config.in: Rebuild.
5199 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5201 * win32-low.c: Throughout, fix format strings and casts of
5202 printf-like functions to avoid type related warnings on all
5204 (get_child_debug_event): Print dwDebugEventCode as hex since
5205 that's how it's usually documented.
5207 2013-02-28 Yao Qi <yao@codesourcery.com>
5209 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5212 2013-02-27 Jiong Wang <jiwang@tilera.com>
5214 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5215 (reg-tilegx32.c): New rule.
5216 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5217 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5218 different register info initializer according to elf class.
5219 (init_registers_tilgx32): New function. The tilegx32 register info
5221 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5222 (tile_store_gregset): Likewise.
5224 2013-02-27 Yao Qi <yao@codesourcery.com>
5226 * server.c (process_point_options): Print debug message when
5227 debug_threads is true.
5229 2013-02-26 Yao Qi <yao@codesourcery.com>
5231 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5233 2013-02-19 Pedro Alves <palves@redhat.com>
5234 Kai Tietz <ktietz@redhat.com>
5238 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5239 instead of strtoul to extract address from packet.
5240 (process_serial_event) <'z'>: Likewise.
5242 2013-02-18 Yao Qi <yao@codesourcery.com>
5244 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5246 2013-02-14 Pedro Alves <palves@redhat.com>
5250 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5251 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5253 2013-02-14 Pedro Alves <palves@redhat.com>
5255 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5257 2013-02-14 Pedro Alves <palves@redhat.com>
5259 * tracepoint.c (save_string): Delete.
5260 (add_tracepoint_action): Use savestring instead of save_string.
5262 2013-02-12 Pedro Alves <palves@redhat.com>
5264 * linux-xtensa-low.c: Ditto.
5265 * xtensa-xtregs.c: Ditto.
5267 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5269 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5272 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5274 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5275 aarch64_num_wp_regs and aarch64_num_bp_regs to
5276 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5278 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5280 * linux-aarch64-low.c (ps_get_thread_area): Replace
5281 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5283 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5284 Marcus Shawcroft <marcus.shawcroft@arm.com>
5285 Nigel Stephens <nigel.stephens@arm.com>
5286 Yufeng Zhang <yufeng.zhang@arm.com>
5288 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5289 (aarch64.c, aarch64-without-fpu.c): New targets.
5290 * configure.srv (aarch64*-*-linux*): New.
5291 * linux-aarch64-low.c: New file.
5293 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5295 * linux-low.c (handle_extended_wait, linux_create_inferior)
5296 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5297 (dequeue_one_deferred_signal, linux_resume_one_thread)
5298 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5299 (linux_tracefork_grandchild, linux_test_for_tracefork)
5300 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5301 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5302 where the argument is 0.
5304 2013-01-25 Yao Qi <yao@codesourcery.com>
5306 * event-loop.c: Include "queue.h".
5307 (gdb_event_p): New typedef.
5308 (struct gdb_event) <next_event>: Remove.
5309 (event_queue): Change to QUEUE(gdb_event_p).
5310 (async_queue_event): Remove.
5311 (gdb_event_xfree): New.
5312 (initialize_event_loop): New.
5313 (process_event): Use API from QUEUE.
5314 (wait_for_event): Likewise.
5315 * server.c (main): Call initialize_event_loop.
5316 * server.h (initialize_event_loop): Declare.
5318 2013-01-18 Yao Qi <yao@codesourcery.com>
5320 * ax.h (struct eval_agent_expr_context): New.
5321 (gdb_eval_agent_expr): Update declaration.
5322 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5323 TFRAME. Add new argument CTX.
5324 * server.h (struct eval_agent_expr_context): Declare.
5325 (agent_mem_read, agent_tsv_read): Update declaration.
5326 (agent_mem_read_string): Likewise.
5327 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5328 (add_traceframe_block): Add new argument TPOINT.
5329 Increase TPOINT->traceframe_usage.
5330 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5331 eval_tracepoint_agent_expr.
5332 (condition_true_at_tracepoint): Likewise.
5333 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5334 (agent_mem_read_string, agent_tsv_read): Likewise.
5336 2013-01-16 Yao Qi <yao@codesourcery.com>
5338 * linux-low.c (linux_resume_one_lwp): Don't check
5339 'lwp->bp_reinsert != 0'.
5341 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5342 Pedro Alves <palves@redhat.com>
5344 * lynx-low.c (ptrace_request_to_str): Define a temporary
5345 macro and use it to simplify this function's implementation.
5347 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5349 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5352 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5354 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5356 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5358 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5360 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5362 * lynx-low.c (lynx_resume): Use the resume_info parameter
5363 to determine the ptid for the lynx_ptrace call, unless
5364 it is equal to minus_one_ptid, in which case we use the
5365 ptid of the current_inferior.
5366 (lynx_wait_1): After having received a thread create/exit
5367 event, resume the inferior's execution using the signaling
5368 thread's ptid, rather than the old ptid.
5370 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5372 * lynx-low.c (lynx_resume): Delete variable ret.
5374 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5376 * gdbreplay.c (gdbreplay_version): Update copyright year.
5377 * server.c (gdbserver_version): Likewise.
5379 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5381 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5384 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5386 * lynx-low.c (ptrace_request_to_str): Add handling for
5389 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5391 * lynx-low.c (lynx_attach): Delete variable new_process.
5393 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5395 * lynx-low.c (lynx_create_inferior): Delete variable
5398 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5400 * lynx-low.c (ptrace_request_to_str): Do not handle
5401 PTRACE_GETTHREADLIST if this macro does not exist.
5403 2012-12-15 Yao Qi <yao@codesourcery.com>
5405 * Makefile.in (OBS): Add notif.o.
5406 * notif.c, notif.h: New.
5407 * server.c: Include "notif.h".
5408 (struct vstop_notif) <next>: Remove.
5410 (queue_stop_reply): Update.
5411 (push_event, send_next_stop_reply): Remove.
5412 (discard_queued_stop_replies): Update.
5413 (notif_stop): New variable.
5414 (handle_v_stopped): Remove.
5415 (handle_v_requests): Don't call handle_v_stopped. Call
5416 handle_ack_notif instead.
5417 (queue_stop_reply_callback): Call notif_event_enque instead
5418 of queue_stop_reply.
5419 (handle_status): Don't call send_next_stop_reply, call
5420 notif_write_event instead.
5421 (kill_inferior_callback): Likewise.
5422 (detach_or_kill_inferior_callback): Likewise.
5423 (main): Call initialize_notif.
5424 (process_serial_event): Call QUEUE_is_empty.
5425 (handle_target_event): Call notif_push instead of push event.
5426 * server.h (push_event): Remove declaration.
5428 2012-12-10 Tom Tromey <tromey@redhat.com>
5430 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5431 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5434 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5435 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5436 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5437 (amd64-linux-ipa.o, ax.o): Rewrite.
5438 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5439 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5440 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5441 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5442 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5443 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5444 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5445 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5446 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5447 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5448 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5449 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5450 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5451 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5452 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5453 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5454 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5455 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5456 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5457 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5458 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5459 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5460 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5461 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5462 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5463 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5464 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5465 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5466 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5467 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5468 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5469 (reg-tilegx.o): Remove.
5470 (all_object_files): New macro.
5471 Include .deps files.
5472 * aclocal.m4, configure: Rebuild.
5473 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5474 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5475 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5477 2012-12-05 Tom Tromey <tromey@redhat.com>
5480 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5482 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5484 * configure.ac: Check for linux/perf_event.h.
5485 * config.in: Regenerated.
5486 * configure: Regenerated.
5488 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5490 * hostio.c (handle_readlink): Decrease buffer size
5491 parameter passed to readlink by one byte.
5493 2012-11-26 Yao Qi <yao@codesourcery.com>
5495 * configure.ac (build_warnings): Append '-Wempty-body'.
5496 * configure: Regenerated.
5497 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5500 2012-11-15 Pierre Muller <muller@sourceware.org>
5502 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5503 * config.in: Regenerate.
5504 * configure: Regenerate.
5505 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5506 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5507 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5508 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5510 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5511 instead of <sys/wait.h> header.
5512 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5514 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5516 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5517 (various make rules): Remove -DGDBSERVER
5519 2012-11-09 Yao Qi <yao@codesourcery.com>
5521 * spu-low.c (current_ptid): Move it to ..
5522 * gdbthread.h: ... here. New.
5523 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5524 * server.c (myresume, process_serial_event): Likewise.
5525 * thread-db.c (thread_db_find_new_threads): Likewise.
5526 * tracepoint.c (run_inferior_command): Likewise.
5528 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5530 * server.c (handle_search_memory_1): Include access length in
5533 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5535 * linux-crisv32-low.c: Fix compile errors.
5537 2012-09-04 Yao Qi <yao@codesourcery.com>
5539 * tracepoint.c (cmd_qtsv): Adjust debug message.
5540 Don't check CUR_TPOINT.
5542 2012-08-28 Yao Qi <yao@codesourcery.com>
5544 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5545 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5546 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5547 Remove declarations of xmalloc, xreallloc, xstrdup and
5549 * Makefile.in (libiberty_h): New.
5550 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5551 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5553 2012-08-23 Yao Qi <yao@codesourcery.com>
5555 * server.h: Remove declaration of 'xsnprintf'.
5557 2012-08-22 Keith Seitz <keiths@redhat.com>
5559 * server.h: Include build-gnulib-gbserver/config.h.
5560 * gdbreplay.c: Likewise.
5562 2012-08-08 Doug Evans <dje@google.com>
5564 * Makefile.in (SFILES): Add gdb_vecs.c.
5565 (OBS): Add gdb_vecs.o.
5566 (gdb_vecs_h, host_defs_h): New variables.
5567 (thread-db.o): Add $(gdb_vecs_h) dependency.
5568 (gdb_vecs.o): New rule.
5569 * thread-db.c: #include "gdb_vecs.h".
5570 (thread_db_load_search): Use a vector to iterate over path elements.
5571 Handle text appearing after "$pdir".
5573 * configure.ac: Add check for strstr.
5574 * config.in: Regenerate.
5575 * configure: Regenerate.
5577 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5579 * hostio.c (handle_pread): If pread fails, fall back to attempting
5581 (handle_pwrite): Likewise for pwrite.
5583 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5585 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5586 between unsupported TYPE and unimplementable ADDR/LEN combination.
5587 (arm_insert_point): Act on new return value.
5589 2012-07-31 Pedro Alves <palves@redhat.com>
5591 * server.c (process_point_options): Only skip tokens if we find
5592 one that is unrecognized. Don't treat 'X' specially while
5593 skipping unrecognized tokens.
5595 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5597 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5598 to 4-byte-align HW breakpoint addresses for Thumb.
5600 2012-07-27 Yao Qi <yao@codesourcery.com>
5604 * server.h: Declare gdb_agent_about_to_close.
5605 * target.c (kill_inferior): Include "agent.h".
5606 New. Send command 'kill'.
5607 * target.h (kill_inferior): Removed macro.
5608 * tracepoint.c (gdb_agent_about_to_close): New.
5609 (gdb_agent_helper_thread): Handle command 'close'.
5610 Wait endlessly until the inferior stops.
5611 Install gdb_agent_remove_socket to atexit hook.
5612 (agent_socket_name): New static variable.
5613 (gdb_agent_socket_init): Replace local variable 'name' with
5614 'agent_socket_name'.
5615 (gdb_agent_remove_socket): New.
5617 2012-07-27 Yao Qi <yao@codesourcery.com>
5619 * server.c (process_point_options): Stop at 'X' when parsing.
5621 2012-07-19 Michael Eager <eager@eagercon.com>
5623 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5625 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5626 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5627 hardware breakpoint.
5629 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5631 * gdbserver/linux-low.c (initialize_low): Call
5632 linux_ptrace_init_warnings.
5634 2012-07-02 Doug Evans <dje@google.com>
5636 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5639 2012-07-02 Stan Shebs <stan@codesourcery.com>
5641 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5642 (ax.o): Add it to build rule.
5644 (OBS): Add format.o.
5645 (IPA_OBS): Add format.o.
5646 * server.c (handle_query): Claim support for breakpoint commands.
5647 (process_point_options): Add command case.
5648 (process_serial_event): Leave running if there are printfs in
5650 * mem-break.h (any_persistent_commands): Declare.
5651 (add_breakpoint_commands): Declare.
5652 (gdb_no_commands_at_breakpoint): Declare.
5653 (run_breakpoint_commands): Declare.
5654 * mem-break.c (struct point_command_list): New struct.
5655 (struct breakpoint): New field command_list.
5656 (any_persistent_commands): New function.
5657 (add_commands_to_breakpoint): New function.
5658 (add_breakpoint_commands): New function.
5659 (gdb_no_commands_at_breakpoint): New function.
5660 (run_breakpoint_commands): New function.
5661 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5663 * ax.c: Include format.h.
5664 (ax_printf): New function.
5665 (gdb_eval_agent_expr): Add printf opcode.
5667 2012-06-13 Yao Qi <yao@codesourcery.com>
5669 * server.c (start_inferior): Remove duplicated writes to fields
5670 'last_resume_kind' and 'last_status' of 'current_inferior'.
5672 2012-06-12 Yao Qi <yao@codesourcery.com>
5673 Pedro Alves <palves@redhat.com>
5675 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5677 * server.c (handle_v_cont): Extend comment.
5679 2012-06-11 Yao Qi <yao@codesourcery.com>
5681 * linux-low.c (linux_attach): Add 'static'.
5683 2012-06-06 Yao Qi <yao@codesourcery.com>
5685 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5687 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5689 Fix gcc -flto compilation warning.
5690 * server.c (main): Make variable multi_mode and attach volatile.
5692 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5694 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5695 if the platform doesn't know about it.
5697 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5699 * Makefile.in (SFILES): Add linux-tile-low.c.
5700 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5701 * configure.srv: Handle tilegx-*-linux*.
5702 * linux-tile-low.c: New file.
5704 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5706 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5708 2012-05-24 Pedro Alves <palves@redhat.com>
5712 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5714 2012-05-24 Pedro Alves <palves@redhat.com>
5718 Replace target_signal with gdb_signal throughout.
5720 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5722 * linux-low.c (linux_store_registers): Avoid the copying sequence
5723 when no data has been retrieved by ptrace.
5725 2012-05-22 Will Deacon <will.deacon@arm.com>
5727 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5728 Include asm/ptrace.h.
5729 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5732 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5734 * linux-low.c (linux_store_registers): Don't re-retrieve data
5735 with ptrace that has already been obtained from /proc. Always
5736 copy any data retrieved with ptrace to the buffer supplied.
5738 2012-05-11 Yao Qi <yao@codesourcery.com>
5739 Pedro Alves <palves@redhat.com>
5741 * linux-low.c (enum stopping_threads_kind): New.
5742 (stopping_threads): Change type to `enum stopping_threads_kind'.
5743 (handle_extended_wait): If stopping and suspending threads, leave
5744 the new_lwp suspended too.
5745 (linux_wait_for_event): Adjust.
5746 (stop_all_lwps): Set `stopping_threads' to
5747 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5748 whether we're suspending threads or just stopping them. Assert no
5751 2012-04-29 Yao Qi <yao@codesourcery.com>
5753 * server.h: Move some code to ...
5754 * gdbthread.h: ... here. New.
5755 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5756 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5757 (nto-low.o, win32-low.o): Likewise.
5758 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5759 * regcache.c, remote-utils.c, server.c: Likewise.
5760 * target.c, tracepoint.c, win32-low.c: Likewise.
5762 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5764 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5765 (PTRACE_ARG4_TYPE): Likewise.
5766 (PTRACE_XFER_TYPE): Likewise.
5767 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5768 ptrace to PTRACE_ARG3_TYPE.
5769 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5770 (PTRACE_ARG4_TYPE): Likewise.
5771 (PTRACE_XFER_TYPE): Likewise.
5772 (linux_detach_one_lwp): Cast fourth argument of
5773 ptrace to long then PTRACE_ARG4_TYPE.
5774 (regsets_fetch_inferior_registers): Cast third argument of
5775 ptrace to long then PTRACE_ARG3_TYPE.
5776 (regsets_store_inferior_registers): Likewise.
5778 2012-04-20 Pedro Alves <palves@redhat.com>
5780 * configure: Regenerate.
5782 2012-04-19 Pedro Alves <palves@redhat.com>
5784 * Makefile.in (GNULIB_BUILDDIR): New.
5785 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5786 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5787 (all, install-only, uninstall, clean-info, all-lib, clean): No
5788 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5789 (maintainer-clean realclean distclean): Use subdir_do.
5791 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5792 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5793 * acinclude.m4: Include acx_configure_dir.m4.
5794 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5795 calls. Call AC_PROG_RANLIB. Configure gnulib using
5798 (GNULIB_STDINT_H): Adjust.
5799 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5800 * gdbreplay.c: Include build-gnulib/config.h.
5801 * server.h: Likewise.
5802 * aclocal.m4: Regenerate.
5803 * config.in: Regenerate.
5804 * configure: Regenerate.
5806 2012-04-19 Pedro Alves <palves@redhat.com>
5808 * Makefile.in (LIBGNU, INCGNU): Adjust.
5809 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5810 (all, install-only, uninstall, clean-info, all-lib, clean)
5811 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5812 * configure.ac: Adjust AC_OUTPUT output.
5813 * aclocal.m4: Regenerate.
5814 * configure: Regenerate.
5816 2012-04-19 Pedro Alves <palves@redhat.com>
5818 * Makefile.in (generated_files): New.
5819 (server_h): Remove the explicit dependency on config.h, and depend
5820 on $generated_files.
5822 2012-04-19 Pedro Alves <palves@redhat.com>
5824 * Makefile.in (INCGNU): Add -Ignulib.
5826 2012-04-19 Pedro Alves <palves@redhat.com>
5828 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5829 (INCGNU): ... this, and spell out -I here.
5830 (GNULIB_LIB): Rename to ...
5832 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5834 2012-04-19 Pedro Alves <palves@redhat.com>
5836 * config.in: Regenerate.
5838 2012-04-19 Pedro Alves <palves@redhat.com>
5840 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5841 * server.h (memmem): Remove declaration.
5842 * config.in: Regenerate.
5843 * configure: Regenerate.
5845 2012-04-19 Yao Qi <yao@codesourcery.com>
5847 * Makefile.in (SFILES): Add common/vec.c.
5851 2012-04-19 Yao Qi <yao@codesourcery.com>
5853 * remote-utils.c (prepare_resume_reply): Replace with macro
5854 target_core_of_thread.
5855 * server.c (handle_qxfer_threads_proper): Likewise.
5856 * target.h (traget_core_of_thread): New macro.
5858 2012-04-18 Pedro Alves <palves@redhat.com>
5860 * aclocal.m4: Regenerate.
5861 * configure: Regenerate.
5863 2012-04-16 Yao Qi <yao@codesourcery.com>
5865 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5866 duplicated on address.
5868 2012-04-16 Yao Qi <yao@codesourcery.com>
5870 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5871 (struct tracepoint_action_ops) <send>: New field.
5872 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5873 (agent_expr_send, x_tracepoint_action_send): New.
5874 (l_tracepoint_action_send): New.
5875 (cmd_qtdp): Download and install tracepoint
5876 according to `use_agent'.
5877 (run_inferior_command): Add one more parameter `len'.
5879 (tracepoint_send_agent): New.
5880 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5882 2012-04-16 Yao Qi <yao@codesourcery.com>
5884 * tracepoint.c (download_tracepoints): Moved to ...
5885 (cmd_qtstart): ... here.
5887 2012-04-14 Yao Qi <yao@codesourcery.com>
5889 * tracepoint.c: Include inttypes.h.
5890 (struct collect_memory_action): Use sized types.
5891 (struct tracepoint): Likewise.
5892 (cmd_qtdp, stop_tracing): Update print specifiers.
5893 (cmd_qtp, response_tracepoint): Likewise.
5894 (collect_data_at_tracepoint): Likewise.
5895 (collect_data_at_step): Likewise.
5897 2012-04-14 Yao Qi <yao@codesourcery.com>
5899 Import gnulib module inttypes.
5900 * aclocal.m4, config.in, configure: Regenerated.
5902 2012-04-14 Yao Qi <yao@codesourcery.com>
5904 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5905 Makefile and config.status at last.
5907 2012-04-13 Yao Qi <yao@codesourcery.com>
5909 * tracepoint.c: Include stdint.h unconditionally.
5911 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5913 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5914 on BFD_HAVE_SYS_PROCFS_TYPE.
5915 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5916 * configure: Regenerate.
5917 * config.in: Likewise.
5919 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5921 * Makefile.in (clean): Also remove x32.c x32-linux.c
5922 x32-avx.c x32-avx-linux.c.
5923 (x32.o): New target.
5925 (x32-linux.o): Likewise.
5926 (x32-linux.c): Likewise.
5927 (x32-avx.o): Likewise.
5928 (x32-avx.c): Likewise.
5929 (x32-avx-linux.o): Likewise.
5930 (x32-avx-linux.c): Likewise.
5932 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5933 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5934 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5935 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5936 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5937 i386/x32-avx-linux.xml.
5939 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5940 (init_registers_x32_avx_linux): Likwise.
5941 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5942 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5944 2012-04-13 Pedro Alves <palves@redhat.com>
5946 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5947 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5948 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5949 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5952 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5954 * linux-x86-low.c (compat_x32_clock_t): New.
5955 (compat_x32_siginfo_t): Likewise.
5956 (compat_x32_siginfo_from_siginfo): Likewise.
5957 (siginfo_from_compat_x32_siginfo): Likewise.
5958 (linux_is_elf64): Likewise.
5959 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5960 and siginfo_from_compat_x32_siginfo for x32.
5961 (x86_arch_setup): Set linux_is_elf64.
5963 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5966 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5968 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5969 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5970 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5971 compatible with process.
5973 2012-04-12 Yao Qi <yao@codesourcery.com>
5975 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5976 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5977 (install-only, install-info, clean): Handle sub dir gnulib.
5978 (all-lib, am--refresh): New targets.
5979 (memmem.o): Remove target.
5980 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5981 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5982 (AC_REPLACE_FUNCS): Remove memmem.
5983 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5984 (AC_OUTPUT): Generate Makefile in gnulib/.
5985 * aclocal.m4, config.in, configure: Regenerated.
5987 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5989 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5991 2012-04-05 Pedro Alves <palves@redhat.com>
5993 -Werror=strict-aliasing
5995 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5998 2012-04-04 Pedro Alves <palves@redhat.com>
6000 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6001 (sparc_store_gregset_from_stack, sparc_store_gregset)
6002 (sparc_breakpoint_at): Fix formatting.
6004 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6006 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6008 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6009 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6010 * config.in: Regenerate.
6011 * configure: Likewise.
6013 2012-03-29 Pedro Alves <palves@redhat.com>
6015 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6016 Correct ptrace arguments.
6018 2012-03-28 Pedro Alves <palves@redhat.com>
6020 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6021 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6022 (IA64_FR1_REGNUM): New defines.
6023 (ia64_fetch_register): New.
6024 (the_low_target): Install it.
6025 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6027 * linux-low.c (linux_fetch_registers): Try the
6028 the_low_target.fetch_register hook first.
6030 * linux-arm-low.c (the_low_target): Adjust.
6031 * linux-bfin-low.c (the_low_target): Adjust.
6032 * linux-cris-low.c (the_low_target): Adjust.
6033 * linux-crisv32-low.c (the_low_target): Adjust.
6034 * linux-m32r-low.c (the_low_target): Adjust.
6035 * linux-m68k-low.c (the_low_target): Adjust.
6036 * linux-mips-low.c (the_low_target): Adjust.
6037 * linux-ppc-low.c (the_low_target): Adjust.
6038 * linux-s390-low.c (the_low_target): Adjust.
6039 * linux-sh-low.c (the_low_target): Adjust.
6040 * linux-sparc-low.c (the_low_target): Adjust.
6041 * linux-tic6x-low.c (the_low_target): Adjust.
6042 * linux-x86-low.c (the_low_target): Adjust.
6043 * linux-xtensa-low.c (the_low_target): Adjust.
6045 2012-03-26 Pedro Alves <palves@redhat.com>
6047 * server.c (handle_qxfer_libraries): Don't bail early if
6048 the_target->qxfer_libraries_svr4 is not NULL.
6050 2012-03-26 Pedro Alves <palves@redhat.com>
6052 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6054 2012-03-23 Pedro Alves <palves@redhat.com>
6056 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6057 "library-list-svr4" element's start tag when the the DSO list is
6060 2012-03-23 Pedro Alves <palves@redhat.com>
6062 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6063 a variable whose type size is the same as the inferior's pointer
6066 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6068 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6070 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6071 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6072 * linux-low.h: Include <signal.h>.
6073 (struct siginfo): Remove forward declaration.
6074 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6077 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6079 * .gitignore: Ignore more files.
6081 2012-03-19 Pedro Alves <palves@redhat.com>
6082 Jan Kratochvil <jan.kratochvil@redhat.com>
6084 * server.c (cont_thread, general_thread): Add describing comments.
6085 (start_inferior): Clear `cont_thread'.
6086 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6089 2012-03-15 Yao Qi <yao@codesourcery.com>
6091 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6093 (cmd_qtdp): ... here.
6095 2012-03-15 Yao Qi <yao@codesourcery.com>
6097 * tracepoint.c (struct tracepoint_action_ops): New.
6098 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6099 (m_tracepoint_action_download): New.
6100 (r_tracepoint_action_download): New.
6101 (x_tracepoint_action_download): New.
6102 (l_tracepoint_action_download): New.
6103 (add_tracepoint_action): Install `action->ops' according type.
6104 (download_tracepoint_1): Move code `download' function pointer
6105 of various tracepoint_action_ops.
6107 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6109 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6110 linux_ptrace_attach_warnings.
6112 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6114 * Makefile.in (linux-ptrace.o): New.
6115 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6116 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6117 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6118 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6119 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6121 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6123 2012-03-08 Yao Qi <yao@codesourcery.com>
6124 Pedro Alves <palves@redhat.com>
6126 Fix PR server/13392.
6127 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6129 * tracepoint.c (remove_tracepoint): New.
6130 (cmd_qtdp): Call remove_tracepoint when failed to install.
6132 2012-03-07 Pedro Alves <palves@redhat.com>
6134 * linux-low.c (get_detach_signal): New.
6135 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6136 Pass on pending signals to PTRACE_DETACH. Check the result of the
6138 * server.c (program_signals, program_signals_p): New.
6139 (handle_general_set): Handle QProgramSignals.
6140 * server.h (program_signals, program_signals_p): Declare.
6142 2012-03-05 Pedro Alves <palves@redhat.com>
6143 Jan Kratochvil <jan.kratochvil@redhat.com>
6145 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6148 2012-03-03 Yao Qi <yao@codesourcery.com>
6150 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6151 agent_look_up_symbols.
6153 2012-03-03 Yao Qi <yao@codesourcery.com>
6155 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6156 (linux-x86-low.o): Likewise.
6157 * server.h: Remove in_process_agent_loaded.
6158 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6162 2012-03-03 Yao Qi <yao@codesourcery.com>
6164 * tracepoint.c (gdb_agent_capability): New global.
6165 (in_process_agent_loaded_ust): Renamed to
6166 `in_process_agent_supports_ust'.
6168 (in_process_agent_supports_ust): Call agent_capability_check.
6169 (clear_installed_tracepoints): Assert that agent supports
6172 2012-03-03 Yao Qi <yao@codesourcery.com>
6174 * linux-low.c (linux_supports_agent): New.
6175 (linux_target_ops): Initialize field `supports_agent' with
6176 linux_supports_agent.
6177 * target.h (struct target_ops) <supports_agent>: New.
6178 (target_supports_agent): New macro.
6179 * server.c (handle_general_set): Handle packet 'QAgent'.
6180 (handle_query): Send `QAgent+'.
6181 * Makefile.in (server.o): Depends on agent.h.
6183 2012-03-03 Yao Qi <yao@codesourcery.com>
6185 * Makefile.in (OBS): Add agent.o.
6186 Add new rule for agent.o.
6187 Track dependence of tracepoint.c on agent.h.
6188 * tracepoint.c (run_inferior_command_1):
6189 (run_inferior_command): Call agent_run_command.
6190 (gdb_ust_connect_sync_socket): Deleted. Move it to
6192 (resume_thread, stop_thread): Likewise.
6193 (gdb_ust_socket_init): Renamed to ...
6194 (gdb_agent_socket_init): ... New.
6195 (gdb_ust_thread): Renamed to ...
6196 (gdb_agent_helper_thread): ... New.
6197 (gdb_ust_init): Move some code to ...
6198 (gdb_agent_init): ... here. New.
6199 [HAVE_UST]: Call gdb_ust_init.
6200 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6201 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6202 * config.in, configure: Regenerated.
6204 2012-03-02 Pedro Alves <palves@redhat.com>
6206 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6207 * linux-low.c (struct simple_pid_list): New.
6208 (stopped_pids): New a struct simple_pid_list pointer.
6209 (add_to_pid_list, pull_pid_from_list): New.
6210 (handle_extended_wait): Don't assume the first signal new children
6211 report is SIGSTOP. Adjust call to pull_pid_from_list.
6212 (linux_wait_for_lwp): Adjust.
6214 2012-03-02 Yao Qi <yao@codesourcery.com>
6216 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6219 2012-03-02 Yao Qi <yao@codesourcery.com>
6221 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6222 `stop_pc' and `tpoint'. Update caller.
6224 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6226 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6227 * linux-low.c (use_linux_regsets): New macro.
6228 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6229 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6230 (linux_register_in_regsets): New function.
6231 (usr_fetch_inferior_registers): Skip registers covered by
6233 (usr_store_inferior_registers): Likewise.
6234 (usr_fetch_inferior_registers): New macro.
6235 (usr_store_inferior_registers): Likewise.
6236 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6237 (linux_store_registers): Likewise.
6238 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6240 (init_registers_mips64_dsp_linux): Likewise.
6241 (init_registers_mips_linux): New macro.
6242 (init_registers_mips_dsp_linux): Likewise.
6243 (mips_dsp_num_regs): Likewise.
6244 (DSP_BASE, DSP_CONTROL): New fallback macros.
6245 (mips_base_regs): New macro.
6246 (mips_regmap): Use it. Fix the size.
6247 (mips_dsp_regmap): New variable.
6248 (mips_dsp_regset_bitmap): Likewise.
6249 (mips_arch_setup): New function.
6250 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6252 (mips_cannot_store_register): Likewise.
6253 (the_low_target): Update .arch_setup, .num_regs and .regmap
6254 initializers. Add .regset_bitmap initializer.
6255 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6257 * linux-bfin-low.c (the_low_target): Likewise.
6258 * linux-cris-low.c (the_low_target): Likewise.
6259 * linux-crisv32-low.c (the_low_target): Likewise.
6260 * linux-ia64-low.c (the_low_target): Likewise.
6261 * linux-m32r-low.c (the_low_target): Likewise.
6262 * linux-m68k-low.c (the_low_target): Likewise.
6263 * linux-ppc-low.c (the_low_target): Likewise.
6264 * linux-s390-low.c (the_low_target): Likewise.
6265 * linux-sh-low.c (the_low_target): Likewise.
6266 * linux-sparc-low.c (the_low_target): Likewise.
6267 * linux-tic6x-low.c (the_low_target): Likewise.
6268 * linux-x86-low.c (the_low_target): Likewise.
6269 * linux-xtensa-low.c (the_low_target): Likewise.
6270 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6271 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6272 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6274 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6275 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6277 2012-02-29 Yao Qi <yao@codesourcery.com>
6278 Pedro Alves <palves@redhat.com>
6280 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6281 `step_over_finished' is true.
6283 2012-02-27 Pedro Alves <palves@redhat.com>
6285 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6286 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6288 2012-02-27 Pedro Alves <palves@redhat.com>
6291 * linux-low.c (pid_is_stopped): New.
6292 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6294 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6296 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6299 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6301 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6303 2012-02-24 Luis Machado <lgustavo@codesourcery>
6305 * server.c (handle_query): Advertise support for target-side
6306 breakpoint condition evaluation.
6307 (process_point_options): New function.
6308 (process_serial_event): When inserting a breakpoint, check for
6309 a target-side condition that should be evaluated.
6311 * mem-break.c: Include regcache.h and ax.h.
6312 (point_cond_list_t): New data structure.
6313 (breakpoint) <cond_list>: New field.
6314 (find_gdb_breakpoint_at): Make non-static.
6315 (delete_gdb_breakpoint_at): Clear any target-side
6317 (clear_gdb_breakpoint_conditions): New function.
6318 (add_condition_to_breakpoint): Likewise.
6319 (add_breakpoint_condition): Likewise.
6320 (gdb_condition_true_at_breakpoint): Likewise.
6321 (gdb_breakpoint_here): Return result directly instead
6322 of going through a local variable.
6324 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6325 (clear_gdb_breakpoint_conditions): Likewise.
6326 (add_breakpoint_condition): Likewise.
6327 (gdb_condition_true_at_breakpoint): Likewise.
6329 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6330 (need_step_over_p): Take target-side breakpoint condition into
6333 2012-02-24 Luis Machado <lgustavo@codesourcery>
6335 * server.h: Include tracepoint.h.
6336 (agent_mem_read, agent_get_trace_state_variable_value,
6337 agent_set_trace_state_variable_value,
6338 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6339 get_set_tsv_func_addr): New prototypes.
6341 * ax.h: New include file.
6342 * ax.c: New source file.
6344 * tracepoint.c: Include ax.h.
6345 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6346 agent_expr, eval_result_type): Move to ax.h.
6347 (parse_agent_expr): Rename to ...
6348 (gdb_parse_agent_expr): ... this, make it non-static and move
6350 (unparse_agent_expr) Rename to ...
6351 (gdb_unparse_agent_expr): ... this, make it non-static and move
6353 (eval_agent_expr): Rename to ...
6354 (eval_tracepoint_agent_expr): ... this.
6355 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6356 forward declarations.
6357 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6358 (agent_get_trace_state_variable_value): New function.
6359 (agent_set_trace_state_variable_value): New function.
6360 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6361 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6362 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6363 (condition_true_at_tracepoint): Likewise.
6364 (parse_agent_expr): Rename to ...
6365 (gdb_parse_agent_expr): ... this and move to ax.c.
6366 (unparse_agent_expr): Rename to ...
6367 (gdb_unparse_agent_expr): ... this and move to ax.c.
6368 (gdb_agent_op_name): Move to ax.c.
6369 (eval_agent_expr): Rename to ...
6370 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6372 (eval_tracepoint_agent_expr): New function.
6373 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6375 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6377 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6378 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6379 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6380 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6381 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6382 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6383 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6384 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6385 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6386 (compile_bytecodes): Remove forward declaration.
6387 (is_goto_target): Move to ax.c.
6388 (compile_bytecodes): Move to ax.c and call
6389 agent_get_trace_state_variable_value (...) and
6390 agent_set_trace_state_variable_value (...).
6392 * Makefile.in: Update ax.c and IPA dependencies.
6394 2012-02-24 Pedro Alves <palves@redhat.com>
6396 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6397 (cmd_bigqtbuffer_circular): ... this. Only handle
6398 'QTBuffer:circular:'.
6399 (handle_tracepoint_general_set): Adjust.
6401 2012-02-16 Yao Qi <yao@codesourcery.com>
6403 * inferiors.c: Move code to ...
6404 * dll.c: .... here. New.
6405 * server.h: Declare clear_dlls.
6406 * Makefile.in (SFILES): Add dll.c.
6410 2012-02-11 Yao Qi <yao@codesourcery.com>
6412 * server.c: (handle_monitor_command): Add a new parameter
6414 (handle_query): Update caller.
6416 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6418 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6419 * configure, config.in: Regenerate.
6420 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6423 2012-02-02 Pedro Alves <palves@redhat.com>
6425 Try SIGKILL first, then PTRACE_KILL.
6426 * linux-low.c (linux_kill_one_lwp): New.
6427 (linux_kill_one_lwp): Rename to ...
6428 (kill_one_lwp_callback): ... this. Use the new
6431 2012-02-02 Pedro Alves <palves@redhat.com>
6433 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6436 2012-01-27 Pedro Alves <palves@redhat.com>
6438 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6439 (elf_64_file_p): Make static.
6440 (linux_pid_exe_is_elf_64_file): New.
6441 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6442 Delete declarations.
6443 (linux_pid_exe_is_elf_64_file): Declare.
6444 * linux-x86-low.c (x86_arch_setup): Use
6445 linux_pid_exe_is_elf_64_file.
6447 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6449 * linux-low.c (linux_wait_for_event_1): Rename to ...
6450 (linux_wait_for_event): ... here and merge it with former
6451 linux_wait_for_event - new variable wait_ptid, use it.
6452 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6454 2012-01-23 Pedro Alves <palves@redhat.com>
6456 * server.c (main): Avoid yet another case of infinite loop while
6457 detaching/killing after a longjmp.
6459 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6462 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6464 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6466 * hostio.c (handle_readlink): New function.
6467 (handle_vFile): Call it to handle "vFile:readlink" packets.
6469 2012-01-20 Pedro Alves <palves@redhat.com>
6470 Ulrich Weigand <ulrich.weigand@linaro.org>
6472 * server.c (handle_v_requests): Only support vAttach and vRun to
6473 start multiple processes when in extended protocol mode.
6475 2012-01-17 Pedro Alves <palves@redhat.com>
6477 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6478 memalign plus mprotect to allocate the scratch buffer.
6480 2012-01-13 Pedro Alves <palves@redhat.com>
6482 * server.c (attach_inferior): Clear `cont_thread'.
6484 2012-01-13 Pedro Alves <palves@redhat.com>
6486 * server.c (main): Avoid infinite loop while detaching/killing
6489 2012-01-09 Doug Evans <dje@google.com>
6491 * server.c (start_inferior): Set last_ptid in --wrapper case.
6493 2012-01-06 Yao Qi <yao@codesourcery.com>
6495 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6497 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6499 2012-01-04 Yao Qi <yao@codesourcery.com>
6501 * tracepoint.c (cmd_qtdp): Print debug message
6502 for static tracepoint.
6504 2012-01-04 Yao Qi <yao@codesourcery.com>
6506 * tracepoint.c (trace_vdebug): Differentiate debug message
6507 between gdbserver and IPA.
6509 2012-01-03 Yao Qi <yao@codesourcery.com>
6511 * tracepoint.c (tracepoint_was_hit): Don't collect for
6514 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6516 * terminal.h: Reformat copyright header.
6518 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6520 * server.c (gdbserver_version): Update copyright year.
6521 * gdbreplay.c (gdbreplay_version): Likewise.
6523 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6525 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6528 2011-12-18 Hui Zhu <teawater@gmail.com>
6529 * linux-low.c (linux_create_inferior): Save return value to ret.
6531 2011-12-18 Hui Zhu <teawater@gmail.com>
6533 * linux-low.c (linux_create_inferior): Save return value to ret.
6535 2011-12-16 Doug Evans <dje@google.com>
6537 * linux-low.c (linux_create_inferior): If stdio connection,
6538 redirect stdin from /dev/null, stdout to stderr.
6539 * remote-utils.c (remote_is_stdio): New static global.
6540 (remote_connection_is_stdio): New function.
6541 (remote_prepare): Handle stdio connection.
6542 (remote_open): Ditto.
6543 (remote_close): Don't close stdin for stdio connections.
6544 (read_prim,write_prim): New functions. Replace all calls to
6545 read/write to these.
6546 * server.c (main): Watch for "-" argument. Move call to
6547 remote_prepare before start_inferior.
6548 * server.h (STDIO_CONNECTION_NAME): New macro.
6549 (remote_connection_is_stdio): Declare.
6551 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6552 in debugging output.
6554 2011-12-15 Yao Qi <yao@codesourcery.com>
6556 * tracepoint.c: Include sys/syscall.h.
6557 (gdb_ust_thread): Remove preprocessor conditional.
6559 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6561 * linux-low.c (linux_detach_one_lwp): Call
6562 the_low_target.prepare_to_resume before detaching.
6564 2011-12-14 Yao Qi <yao@codesourcery.com>
6566 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6569 2011-12-14 Yao Qi <yao@codesourcery.com>
6571 * i386-low.c (i386_low_stopped_data_address): Initialize local
6574 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6578 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6579 DR_CONTROL unless necessary. Extend comments.
6580 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6581 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6583 2011-12-13 Yao Qi <yao@codesourcery.com>
6585 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6587 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6589 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6591 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6592 Print new debug message for such case.
6594 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6596 Fix overlapping memcpy.
6597 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6598 the read_inferior_memory transfer.
6599 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6600 write_inferior_memory transfer.
6601 (set_fast_tracepoint_jump): New variable buf. Use it for the
6602 read_inferior_memory and write_inferior_memory transfers.
6603 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6604 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6605 Use it for the write_inferior_memory transfer.
6606 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6609 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6611 * linux-low.c (fetch_register, store_register): Make code
6612 consistent, fix formatting.
6614 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6616 * linux-low.c (usr_store_inferior_registers): Factor out code
6617 to handle individual registers into...
6618 (store_register): ... this new function.
6620 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6622 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6623 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6624 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6625 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6626 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6627 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6628 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6629 (srv_xmlfiles): Add new XML files.
6631 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6633 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6634 (init_registers_s390_linux32v1): Add prototype.
6635 (init_registers_s390_linux32v2): Likewise.
6636 (init_registers_s390_linux64v1): Likewise.
6637 (init_registers_s390_linux64v2): Likewise.
6638 (init_registers_s390x_linux64v1): Likewise.
6639 (init_registers_s390x_linux64v2): Likewise.
6640 (s390_num_regs): Increment to 52.
6641 (s390_regmap): Add orig_r2 register.
6642 (s390_num_regs_3264): Increment to 68.
6643 (s390_regmap_3264): Add orig_r2 register.
6644 (s390_collect_ptrace_register): Handle orig_r2 register.
6645 (s390_supply_ptrace_register): Likewise.
6646 (s390_fill_last_break): New function.
6647 (s390_store_last_break): Likewise.
6648 (s390_fill_system_call): New function.
6649 (s390_store_system_call): Likewise.
6650 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6652 (s390_check_regset): New function.
6653 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6654 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6655 Update target_regsets for available register sets.
6657 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6658 Jan Kratochvil <jan.kratochvil@redhat.com>
6660 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6661 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6663 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6664 * linux-low.h (struct process_info_private): New member r_debug.
6665 * server.c (handle_qxfer_libraries): Call
6666 the_target->qxfer_libraries_svr4.
6667 (handle_qxfer_libraries_svr4): New function.
6668 (qxfer_packets): New entry "libraries-svr4".
6669 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6670 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6671 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6672 PACKET_qXfer_libraries_svr4.
6674 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6676 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6677 PSW address/mask between 8-byte and 16-byte formats.
6678 (s390_supply_ptrace_register): Likewise.
6679 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6680 basic addressing mode bit.
6682 2011-11-24 Stan Shebs <stan@codesourcery.com>
6684 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6686 2011-11-17 Stan Shebs <stan@codesourcery.com>
6688 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6689 (tracing_start_time): New global.
6690 (tracing_stop_time): New global.
6691 (tracing_user_name): New global.
6692 (tracing_notes): New global.
6693 (tracing_stop_note): New global.
6694 (cmd_qtstart): Set traceframe_usage, start_time.
6695 (stop_tracing): Set stop_time.
6696 (cmd_qtstatus): Report additional status.
6697 (cmd_qtp): New function.
6698 (handle_tracepoint_query): Call it.
6699 (cmd_qtnotes): New function.
6700 (handle_tracepoint_general_set): Call it.
6701 (get_timestamp): Rename from tsv_get_timestamp.
6703 2011-11-14 Stan Shebs <stan@codesourcery.com>
6704 Kwok Cheung Yeung <kcy@codesourcery.com>
6706 * linux-x86-low.c (small_jump_insn): New.
6707 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6708 trampoline and error message, build a trampoline and issue a small
6709 jump instruction to it.
6710 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6711 trampoline and error message.
6712 (x86_get_min_fast_tracepoint_insn_len): New.
6713 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6714 * linux-low.h (struct linux_target_ops): Add arguments to
6715 install_fast_tracepoint_jump_pad operation, add new operation.
6716 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6718 (linux_get_min_fast_tracepoint_insn_len): New function.
6719 (linux_target_op): Add new operation.
6720 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6721 (gdb_trampoline_buffer_end): Ditto.
6722 (gdb_trampoline_buffer_error): Ditto.
6723 (struct ipa_sym_addresses): Add fields for new IPA variables.
6724 (symbol_list): Add entries for new IPA variables.
6725 (struct tracepoint): Add fields to hold the address range of the
6726 trampoline used by the tracepoint.
6727 (trampoline_buffer_head): New static variable.
6728 (trampoline_buffer_tail): Ditto.
6729 (claim_trampoline_space): New function.
6730 (have_fast_tracepoint_trampoline_buffer): New function.
6731 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6733 (install_fast_tracepoint): Ditto, also add error buffer argument.
6734 (cmd_qtminftpilen): New function.
6735 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6736 (fast_tracepoint_from_trampoline_address): New function.
6737 (fast_tracepoint_collecting): Handle trampoline as part of jump
6739 (set_trampoline_buffer_space): New function.
6740 (initialize_tracepoint): Initialize new IPA variables.
6741 * target.h (struct target_ops): Add arguments to
6742 install_fast_tracepoint_jump_pad operation, add new
6743 get_min_fast_tracepoint_insn_len operation.
6744 (target_get_min_fast_tracepoint_insn_len): New.
6745 (install_fast_tracepoint_jump_pad): Add arguments.
6746 * server.h (IPA_BUFSIZ): Define.
6747 * linux-i386-ipa.c: Include extra header files.
6748 (initialize_fast_tracepoint_trampoline_buffer): New function.
6749 (initialize_low_tracepoint): Call it.
6750 * server.h (set_trampoline_buffer_space): Declare.
6751 (claim_trampoline_space): Ditto.
6752 (have_fast_tracepoint_trampoline_buffer): Ditto.
6754 2011-11-14 Yao Qi <yao@codesourcery.com>
6756 * server.c (handle_query): Handle InstallInTrace for qSupported.
6757 * tracepoint.c (add_tracepoint): Sort list.
6758 (install_tracepoint, download_tracepoint): New.
6759 (cmd_qtdp): Call them to install and download tracepoints.
6760 (sort_tracepoints): Removed.
6761 (cmd_qtstart): Update.
6763 2011-11-14 Yao Qi <yao@codesourcery.com>
6765 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6766 * mem-break.h: Declare.
6767 * tracepoint.c (cmd_qtstart): Move some code to ...
6768 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6770 (download_tracepoints): Move some code to ...
6771 (download_tracepoint_1): ... here. New.
6773 2011-11-08 Yao Qi <yao@codesourcery.com>
6775 * remote-utils.c (relocate_instruction): A comment fix.
6777 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6779 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6780 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6781 dr_status_mirror and dr_control_mirror from debug_reg_state.
6782 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6783 (i386_initial_stuff): Remove use of deleted globals.
6784 (i386_get_thread_context, i386_set_thread_context,
6785 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6786 from debug_reg_state.
6788 2011-11-05 Yao Qi <yao@codesourcery.com>
6790 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6791 address as TPOINT's.
6793 2011-11-02 Stan Shebs <stan@codesourcery.com>
6795 * tracepoint.c (agent_mem_read_string): New function.
6796 (eval_agent_expr): Call it for tracenz.
6797 * server.c (handle_query): Report support for tracenz.
6799 2011-11-02 Yao Qi <yao@codesourcery.com>
6801 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6803 2011-11-02 Yao Qi <yao@codesourcery.com>
6805 * target.h: Fix a typo in comment.
6807 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6809 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6810 clobber the breakpoints' shadows with fast tracepoint jumps.
6811 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6812 * target.c (write_inferior_memory): Also pass MYADDR down to
6815 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6817 * configure.ac: Check support for personality routine.
6818 * configure: Regenerate.
6819 * config.in: Likewise.
6820 * linux-low.c: Include <sys/personality.h>.
6821 Define ADDR_NO_RANDOMIZE if necessary.
6822 (linux_create_inferior): Disable address space randomization when
6823 forking inferior, if requested.
6824 (linux_supports_disable_randomization): New function.
6825 (linux_target_ops): Install it.
6826 * server.h (disable_randomization): Declare.
6827 * server.c (disable_randomization): New global variable.
6828 (handle_general_set): Handle QDisableRandomization.
6829 (handle_query): Likewise for qSupported.
6830 (main): Support --disable-randomization and --no-disable-randomization
6831 command line arguments.
6832 * target.h (struct target_ops): Add supports_disable_randomization.
6833 (target_supports_disable_randomization): New macro.
6835 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6837 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6839 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6840 [!PT_GETDSBT] (target_loadmap): New definition.
6841 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6842 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6843 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6844 and PT_GETDSBT to LINUX_LOADMAP.
6845 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6846 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6848 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6850 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6851 (arm_linux_hwbp_cap): New static variable.
6852 (arm_linux_get_hwbp_cap): Replace by ...
6853 (arm_linux_init_hwbp_cap): ... this new function.
6854 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6855 (arm_linux_get_hw_watchpoint_count): Likewise.
6856 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6857 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6858 (arm_prepare_to_resume): Use perror_with_name instead of error.
6860 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6862 * linux-arm-low.c: Include <signal.h>.
6863 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6864 (struct arm_linux_hwbp_cap): New data type.
6865 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6866 (struct arm_linux_hw_breakpoint): New data type.
6867 (MAX_BPTS, MAX_WPTS): Define.
6868 (struct arch_process_info, struct arch_lwp_info): New data types.
6869 (arm_linux_get_hwbp_cap): New function.
6870 (arm_linux_get_hw_breakpoint_count): Likewise.
6871 (arm_linux_get_hw_watchpoint_count): Likewise.
6872 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6873 (arm_hwbp_control_initialize): Likewise.
6874 (arm_hwbp_control_is_enabled): Likewise.
6875 (arm_hwbp_control_is_initialized): Likewise.
6876 (arm_hwbp_control_disable): Likewise.
6877 (arm_linux_hw_breakpoint_equal): Likewise.
6878 (arm_linux_hw_point_initialize): Likewise.
6879 (struct update_registers_data): New data structure.
6880 (update_registers_callback: New function.
6881 (arm_insert_point): Likewise.
6882 (arm_remove_point): Likewise.
6883 (arm_stopped_by_watchpoint): Likewise.
6884 (arm_stopped_data_address): Likewise.
6885 (arm_new_process): Likewise.
6886 (arm_new_thread): Likewise.
6887 (arm_prepare_to_resume): Likewise.
6888 (the_low_target): Register arm_insert_point, arm_remove_point,
6889 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6890 arm_new_thread, and arm_prepare_to_resume.
6892 2011-09-15 Stan Shebs <stan@codesourcery.com>
6894 * server.h (struct emit_ops): Add compare-goto fields.
6895 * tracepoint.c (gdb_agent_op_sizes): New table.
6896 (emit_eq_goto): New function.
6897 (emit_ne_goto): New function.
6898 (emit_lt_goto): New function.
6899 (emit_le_goto): New function.
6900 (emit_gt_goto): New function.
6901 (emit_ge_goto): New function.
6902 (is_goto_target): New function.
6903 (compile_bytecodes): Recognize special cases of compare-goto
6904 combinations and call specialized emitters for them.
6905 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6906 (amd64_emit_ne_goto): New function.
6907 (amd64_emit_lt_goto): New function.
6908 (amd64_emit_le_goto): New function.
6909 (amd64_emit_gt_goto): New function.
6910 (amd64_emit_ge_goto): New function.
6911 (amd64_emit_ops): Add the new functions.
6912 (i386_emit_eq_goto): New function.
6913 (i386_emit_ne_goto): New function.
6914 (i386_emit_lt_goto): New function.
6915 (i386_emit_le_goto): New function.
6916 (i386_emit_gt_goto): New function.
6917 (i386_emit_ge_goto): New function.
6918 (i386_emit_ops): Add the new functions.
6920 2011-09-08 Stan Shebs <stan@codesourcery.com>
6922 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6923 (i386_emit_epilogue): Restore %ebx.
6925 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6927 * server.c (step_thread): Remove definition.
6928 (process_serial_event): Don't handle Hs.
6929 * server.h (step_thread): Remove declaration.
6930 * target.c (set_desired_inferior): Remove use of step_thread.
6932 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6934 * linux-low.c: Include linux-procfs.h.
6935 (linux_attach_lwp_1): Update comments.
6936 (linux_attach): Scan for existing threads when attaching to a
6937 process that is the tgid.
6938 * Makefile.in: Update dependencies.
6940 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6942 * configure.srv: Add linux-procfs.o dependencies.
6944 2011-08-14 Yao Qi <yao@codesourcery.com>
6946 * target.h (struct target_ops): Fix indent.
6947 * win32-low.c (win32_target_ops): Fix comment.
6949 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6950 Yao Qi <yao@codesourcery.com>
6952 * Makefile.in (clean): Remove tic6x-*.c files.
6953 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6954 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6955 (tic6x-c64xp-linux.c): Likewise.
6956 * configure.srv: Add support for tic6x-*-uclinux.
6957 * linux-tic6x-low.c: New.
6958 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6960 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6961 Yao Qi <yao@codesourcery.com>
6963 * target.h (struct target_ops): Add read_loadmap.
6964 * linux-low.c (struct target_loadseg): New type.
6965 (struct target_loadmap): New type.
6966 (linux_read_loadmap): New function.
6967 (linux_target_ops): Add linux_read_loadmap.
6968 * server.c (handle_query): Support qXfer:fdpic:read packet.
6969 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6972 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6974 * win32-low.c: Include <stdint.h>.
6976 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6978 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6979 to the inferior here.
6980 (i386_remove_aligned_watchpoint): Ditto.
6981 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6982 fit part of the watchpoint in the debug registers.
6983 (i386_update_inferior_debug_regs): New.
6984 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6985 registers, and only update the inferior on success.
6986 (i386_low_remove_watchpoint): Ditto.
6988 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6990 * linux-low.c (compare_ints, unique, list_threads, show_process,
6991 linux_core_of_thread): Delete.
6992 (linux_target_ops): Change linux_core_of_thread to
6993 linux_common_core_of_thread.
6994 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6995 * utils.c (malloc_failure): Change type of argument.
6996 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6997 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6998 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6999 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7000 (IPA_OBJS): Add common-utils-ipa.o.
7001 (ptid_h, linux_osdata_h): New macros.
7002 (server_h): Add common/common-utils.h, common/xml-utils.h,
7003 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7005 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7006 ptid.o, buffer.o): New rules.
7007 (linux-low.o): Add common/linux-osdata.h as a dependency.
7008 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7009 * configure.ac: Add AC_HEADER_DIRENT check.
7010 * config.in: Regenerate.
7011 * configure: Regenerate.
7012 * remote-utils.c (xml_escape_text): Delete.
7013 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7014 buffer_xml_printf): Move to common/buffer.c.
7015 * server.c (main): Remove call to initialize_inferiors.
7016 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7017 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7018 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7019 internal_error, gdb_assert, gdb_assert_fail): Delete.
7020 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7021 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7023 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7024 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7025 initialize_inferiors): Delete.
7027 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7029 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7032 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7034 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7036 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7038 2011-05-26 Yao Qi <yao@codesourcery.com>
7040 * Makefile.in (thread-db.o): Track dependence to
7041 common/gdb_thread_db.h.
7042 * thread-db.c: include gdb_thread_db.h from right place.
7044 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7046 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7047 __FILE__ and __LINE__ to internal_error.
7049 2011-05-13 Doug Evans <dje@google.com>
7051 * thread-db.c (try_thread_db_load_from_sdir): New function.
7052 (try_thread_db_load_from_dir): New function.
7053 (thread_db_load_search): Handle $sdir, ignore $pdir.
7054 Remove trying of system directories if search of
7055 libthread-db-search-path fails, that is now done via $sdir.
7057 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7059 * server.c (handle_query): Add EnableDisableTracepoints to the list
7060 of supported features.
7061 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7063 (cmd_qtenable_disable): New.
7064 (cmd_qtstart): Install tracepoints even if disabled.
7065 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7066 receiving a QTEnable or QTDisable packet.
7067 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7068 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7070 (gdb_probe): Skip data collection if static tracepoint is disabled.
7072 2011-05-10 Doug Evans <dje@google.com>
7074 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7076 2011-05-04 Doug Evans <dje@google.com>
7078 * linux-low.c (linux_join): Skip process lookup.
7079 * spu-low.c (spu_join): Ditto.
7080 * server.c (join_inferiors_callback): Delete.
7081 (process_serial_event): For 'D' packet (detach) call join_inferior
7084 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7086 * README: Don't mention xscale*-*-linux*.
7087 * configure.srv (xscale*-*-linux*): Don't handle target.
7089 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7091 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7093 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7094 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7095 (i386_emit_void_call_2): Likewise.
7097 2011-04-26 Yao Qi <yao@codesourcery.com>
7099 * linux-low.c: Move common macros to linux-ptrace.h.
7100 Include linux-ptrace.h.
7101 * Makefile.in (linux_ptrace_h): New.
7102 (linux-low.o): Depends on linux-ptrace.h.
7104 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7106 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7107 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7108 (remote_prepare): New function with most of the TCP code from ...
7109 (remote_open): ... here. Detect PORT here unconditionally. Move also
7110 setting transport_is_reliable.
7111 * server.c (run_once): New variable.
7112 (gdbserver_usage): Document it.
7113 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7114 the first run if RUN_ONCE.
7115 * server.h (run_once, remote_prepare): New declarations.
7117 2011-04-19 Tom Tromey <tromey@redhat.com>
7119 * win32-low.c (handle_load_dll): Remove duplicate "the".
7121 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7123 Remove support for old Cygwin 1.5 versions.
7124 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7125 function to avoid warning.
7126 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7129 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7131 * gdbserver/server.h (Macro _): Define it if not available.
7133 2011-03-14 Michael Snyder <msnyder@vmware.com>
7135 * hostio.c (handle_close): Remove unnecessary null test.
7137 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7139 * Makefile.in (maintainer-clean realclean distclean): Remove
7140 "make ... subdir_do" command.
7142 2011-03-10 Michael Snyder <msnyder@vmware.com>
7144 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7146 * server.c (handle_v_run): Free alloced buffer on early return.
7148 2011-03-09 Yao Qi <yao@codesourcery.com>
7151 2011-03-04 Yao Qi <yao@codesourcery.com>
7153 * Makefile.in: Remove GNU make feature --directory.
7155 2011-03-05 Yao Qi <yao@codesourcery.com>
7157 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7158 (subdir_do): New make target. Copied from gdb/Makefile.
7159 (maintainer-clean, realclean, distclean, clean): Call corresponding
7160 make targets in common/Makefile.
7162 2011-02-11 Yao Qi <yao@codesourcery.com>
7164 * configure.ac: Call AC_PROG_RANLIB.
7165 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7166 * configure: Regenerate.
7168 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7170 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7172 2011-03-06 Yao Qi <yao@codesourcery.com>
7174 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7176 2011-03-05 Yao Qi <yao@codesourcery.com>
7178 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7179 (subdir_do): New make target. Copied from gdb/Makefile.
7180 (maintainer-clean, realclean, distclean, clean): Call corresponding
7181 make targets in common/Makefile.
7183 2011-03-04 Yao Qi <yao@codesourcery.com>
7185 * Makefile.in: Remove GNU make feature --directory.
7187 2011-03-04 Michael Snyder <msnyder@vmware.com>
7189 * server.c (queue_stop_reply): Call xmalloc not malloc.
7191 2011-03-02 Michael Snyder <msnyder@vmware.com>
7193 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7195 2011-02-28 Michael Snyder <msnyder@vmware.com>
7197 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7198 (cmd_qtframe): Ditto.
7199 (cmd_qtbuffer): Ditto.
7200 (cmd_bigqtbuffer): Ditto.
7202 * utils.c (decimal2str): Initialize 'width' to nine, then
7205 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7207 * hostio.c (require_data): Free *data, not data.
7209 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7211 * hostio.c (require_data): Use free, not xfree.
7213 2011-02-27 Michael Snyder <msnyder@vmware.com>
7215 * server.c (handle_query): Discard unused value.
7217 * hostio.c (require_data): Free malloc memory before returning
7220 2011-02-26 Michael Snyder <msnyder@vmware.com>
7222 * linux-low.c (list_threads): Call closedir for dirent.
7224 2011-02-27 Michael Snyder <msnyder@vmware.com>
7226 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7227 a case statement falls through.
7229 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7231 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7234 2011-02-26 Michael Snyder <msnyder@vmware.com>
7236 * utils.c (decimal2str): Eliminate dead code and dead param.
7237 (pulongest): Drop dead param from call to decimal2str.
7240 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7242 Revert the following patch (not approved yet):
7243 2011-02-21 Hui Zhu <teawater@gmail.com>
7244 * tracepoint.c (tp_printf): New function.
7245 (eval_agent_expr): Handle gdb_agent_op_printf.
7247 2011-02-21 Hui Zhu <teawater@gmail.com>
7249 * tracepoint.c (tp_printf): New function.
7250 (eval_agent_expr): Handle gdb_agent_op_printf.
7252 2011-02-18 Tom Tromey <tromey@redhat.com>
7254 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7255 (tracepoint.o): Likewise.
7256 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7257 (gdb_agent_op_names): Likewise.
7259 2011-02-18 Tom Tromey <tromey@redhat.com>
7261 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7262 gdb_agent_op_rot>: New constants.
7263 (gdb_agent_op_names): Add pick and roll.
7264 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7267 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7269 * aclocal.m4: Regenerated with aclocal-1.11.1.
7271 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7273 * server.c (handle_qxfer_traceframe_info): New.
7274 (qxfer_packets): Register "traceframe-info".
7275 (handle_query): Report support for qXfer:traceframe-info:read+.
7276 * tracepoint.c (match_blocktype): New.
7277 (traceframe_find_block_type): Rename to ...
7278 (traceframe_walk_blocks): ... this. Add callback filter argument,
7280 (traceframe_find_block_type): New, reimplemented on top of
7281 traceframe_walk_blocks.
7282 (build_traceframe_info_xml): New.
7283 (traceframe_read_info): New.
7284 * server.h (traceframe_read_info): Declare.
7286 2011-02-11 Yao Qi <yao@codesourcery.com>
7288 * configure.ac: Call AC_PROG_RANLIB.
7289 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7290 * configure: Regenerate.
7292 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7294 * server.c (gdb_read_memory): Change return semantics to allow
7296 (handle_search_memory_1): Adjust.
7297 (process_serial_event) <'m' packet>: Handle partial transfers.
7298 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7300 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7302 * regcache.c (init_register_cache): Initialize
7303 regcache->register_status.
7304 (free_register_cache): Release regcache->register_status.
7305 (regcache_cpy): Copy register_status.
7306 (registers_to_string): Print 'x's for unavailable registers.
7307 (supply_register): Mark the register's status valid or
7308 unavailable, depending on whether a buffer was passed in or not.
7309 (supply_register_zeroed): New.
7310 (supply_regblock): Mark the registers' status valid or
7311 unavailable, depending on whether a buffer was passed in or not.
7312 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7313 (struct regcache): New `register_status' field.
7314 (supply_register_zeroed): Declare.
7315 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7316 supply_register_zeroed, rather than passing a NULL buffer to
7318 * tracepoint.c (fetch_traceframe_registers): Update comment.
7320 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7322 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7325 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7327 * server.h (decode_xfer_write): Change prototype.
7328 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7329 and don't extract the annex here.
7330 * server.c (decode_xfer_read): Remove `annex' parameter,
7331 and don't extract the annex here.
7333 (struct qxfer): New.
7334 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7335 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7336 (handle_qxfer_statictrace): New functions, abstracted out from
7337 handle_query, and made to use the struct qxfer interface.
7338 (handle_threads_qxfer_proper): Rename to ...
7339 (handle_qxfer_threads_proper): ... this.
7340 (handle_threads_qxfer): Rename to ...
7341 (handle_qxfer_threads): ... this. Adjust.
7342 (qxfer_packets): New array.
7343 (handle_qxfer): New function.
7344 (handle_query): Use handle_qxfer.
7346 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7348 * gdbreplay.c: Shorten lines of >= 80 columns.
7349 * linux-low.c: Ditto.
7350 * linux-ppc-low.c: Ditto.
7351 * linux-s390-low.c: Ditto.
7352 * linux-sparc-low.c: Ditto.
7353 * linux-x86-low.c: Ditto.
7354 * linux-xtensa-low.c: Ditto.
7355 * mem-break.c: Ditto.
7357 * regcache.h: Ditto.
7358 * remote-utils.c: Ditto.
7361 * thread-db.c: Ditto.
7362 * tracepoint.c: Ditto.
7364 * win32-low.h: Ditto.
7366 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7368 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7371 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7373 * server.c (gdbserver_version): Update copyright year in version
7375 * gdbreplay.c (gdbreplay_version): Ditto.
7377 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7379 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7380 * linux-bfin-low.c: New file.
7381 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7382 PT_DATA_ADDR for BFIN targets.
7383 * Makefile.in (SFILES): Add linux-bfin-low.c.
7384 (clean): Remove reg-bfin.c.
7385 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7386 * README: Mention supported Blackfin targets.
7388 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7390 * .gitignore: New file.
7392 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7394 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7396 2010-10-22 Jie Zhang <jie@codesourcery.com>
7398 * Makefile.in: Add FLAGS_TO_PASS variable.
7399 (install): Remove dependency of install-only and recursively
7400 invoke make for install-only.
7402 2010-10-04 Doug Evans <dje@google.com>
7404 * Makefile.in (uninstall): Use $(DESTDIR).
7406 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7410 * linux-x86-low.c (compat_siginfo_from_siginfo)
7411 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7412 si_code is < 0. Check for si_code == SI_TIMER before checking for
7415 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7417 * lynx-i386-low.c: New file.
7418 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7420 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7422 * lynx-low.c (ptrace_request_to_str): Remove handling for
7423 request values that have been removed in LynxOS 5.x.
7425 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7427 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7430 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7432 * configure.ac: Add --enable-inprocess-agent option.
7433 * configure: Rebuilt.
7435 2010-09-06 Yao Qi <yao@codesourcery.com>
7437 * linux-low.c (linux_kill): Remove unused variable.
7438 (linux_stabilize_threads): Likewise.
7439 * server.c (start_inferior): Likewise.
7440 (queue_stop_reply_callback): Likewise.
7441 * tracepoint.c (do_action_at_tracepoint): Likewise.
7443 2010-09-06 Yao Qi <yao@codesourcery.com>
7445 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7448 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7450 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7452 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7454 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7457 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7459 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7460 gdbserver/lynx-ppc-low.c: New files.
7461 * Makefile.in (lynx_low_h): New variable.
7462 (lynx-low.o, lynx-ppc-low.o): New rules.
7463 * configure.ac: On LynxOS, link with -lnetinet.
7464 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7465 * configure: regenerate.
7467 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7469 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7470 * configure.ac: Add check for vasprintf and vsnprintf.
7471 * configure, config.in: Regenerate.
7472 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7474 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7476 * gdbreplay.c: Move include of alloca.h up, next to include of
7478 * server.h: Add include of malloc.h.
7479 * mem-break.c: Remove include of malloc.h.
7480 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7482 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7484 * Makefile.in (memmem.o): Build with -Wno-error.
7486 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7488 * utils.c (xsnprintf): Make non-static.
7489 * server.h: Add xsnprintf declaration.
7490 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7491 replace calls to snprintf by calls to xsnprintf throughout.
7493 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7495 * configure.ac: Add configure check for alloca.
7496 * configure, config.in: Regenerate.
7497 * server.h: Include alloca.h if it exists.
7498 * gdbreplay.c: Include alloca.h if it exists.
7500 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7502 * linux-low.c (__SIGRTMIN): Define if not already defined.
7503 (linux_create_inferior): Check for __ANDROID__ rather than
7505 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7506 are already deferred.
7507 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7508 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7509 stopped and already has a pending signal to report.
7510 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7511 a pending signal to report or is moving out of a jump pad.
7512 (linux_init_signals): Check for __ANDROID__ rather than
7515 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7517 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7518 debug_threads check. Avoid a linear search when not doing debug
7521 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7523 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7524 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7525 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7526 (process_event): Change local fd's type to gdb_fildes_t.
7527 (create_file_handler): Adjust prototype.
7528 (delete_file_handler): Adjust prototype.
7529 (handle_file_event): Adjust prototype. Use pfildes.
7530 (create_file_event): Adjsut prototype.
7531 * remote-utils.c (remote_desc, listen_desc): Change type to
7533 * server.h: New gdb_fildes_t typedef.
7534 [USE_WIN32API]: Include winsock2.h.
7535 (delete_file_handler, add_file_handler): Adjust prototypes.
7537 * utils.c (pfildes): New.
7539 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7541 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7542 * configure: Regenerate.
7544 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7546 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7547 (linux_done_accessing_memory): ... this.
7548 (linux_target_ops): Adjust.
7549 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7550 * nto-low.c (nto_target_ops): Adjust comment.
7551 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7552 * spu-low.c (spu_target_ops): Adjust comment.
7553 * target.h (target_ops): Rename unprepare_to_access_memory field
7554 to done_accessing_memory.
7555 (unprepare_to_access_memory): Rename to ...
7556 (done_accessing_memory): ... this.
7558 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7560 * linux-low.c (linux_prepare_to_access_memory): New.
7561 (linux_unprepare_to_access_memory): New.
7562 (linux_target_ops): Install them.
7563 * server.c (read_memory): Rename to ...
7564 (gdb_read_memory): ... this. Use
7565 prepare_to_access_memory/prepare_to_access_memory.
7566 (write_memory): Rename to ...
7567 (gdb_write_memory): ... this. Use
7568 prepare_to_access_memory/prepare_to_access_memory.
7569 (handle_search_memory_1): Adjust.
7570 (process_serial_event): Adjust.
7571 * target.h (struct target_ops): New fields
7572 prepare_to_access_memory and unprepare_to_access_memory.
7573 (prepare_to_access_memory, unprepare_to_access_memory): New.
7574 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7575 prepare_to_access_memory/prepare_to_access_memory.
7576 * nto-low.c (nto_target_ops): Adjust.
7577 * spu-low.c (spu_target_ops): Adjust.
7578 * win32-low.c (win32_target_ops): Adjust.
7580 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7582 * Makefile.in (WARN_CFLAGS): Get it from configure.
7583 (WERROR_CFLAGS): New.
7584 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7585 * configure.ac: Introduce --enable-werror, which adds -Werror to
7586 the compiler command line. Enabled by default. Disable with
7587 --disable-werror. Add -Wdeclaration-after-statement
7588 Wpointer-arith and -Wformat-nonliteral to warning flags.
7589 * configure: Regenerate.
7591 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7593 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7595 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7597 * gdbreplay.c (remote_error): New.
7599 (expect): Use gdbchar. Check for error reading from GDB.
7600 Clarify sync error output.
7601 (play): Check for errors writing to GDB.
7602 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7603 * remote-utils.c (getpkt): Check for errors writing to the remote
7606 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7608 * linux-low.c (linux_wait_1): Move non-debugging code out of
7609 `debug_threads' control.
7611 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7613 * linux-low.c (linux_wait_1): Don't set last_status here.
7614 * server.c (push_event, queue_stop_reply_callback): Assert we're
7615 not pushing a TARGET_WAITKIND_IGNORE event.
7616 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7617 (myresume, handle_target_event): Set the thread's last_resume_kind
7618 and last_status from the target returned status.
7620 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7624 * linux-x86-low.c (update_debug_registers_callback): New.
7625 (i386_dr_low_set_addr): Use it.
7626 (i386_dr_low_get_addr): New.
7627 (i386_dr_low_set_control): Use update_debug_registers_callback.
7628 (i386_dr_low_get_control): New.
7629 (i386_dr_low_get_status): Adjust.
7630 * linux-low.c (linux_stop_lwp): New.
7631 * linux-low.h (linux_stop_lwp): Declare.
7633 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7634 argument instead of a i386_debug_reg_state.
7635 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7636 a i386_debug_reg_state.
7637 (i386_insert_aligned_watchpoint): Adjust.
7638 (i386_remove_aligned_watchpoint): Adjust.
7639 (i386_low_stopped_data_address): Read the debug registers from the
7640 inferior instead of from the mirrors.
7641 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7642 (i386_dr_low_get_addr): Declare.
7643 (i386_dr_low_get_control): Declare.
7644 (i386_dr_low_get_status): Change prototype.
7646 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7647 (i386_dr_low_get_addr): New.
7648 (i386_dr_low_get_control): New.
7649 (i386_dr_low_get_status): Adjust prototype. Return
7651 (i386_initial_stuff): Clear dr_status_mirror and
7653 (i386_get_thread_context): Adjust.
7654 (i386_set_thread_context): Adjust.
7655 (i386_thread_added): Adjust.
7657 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7659 * linux-low.h (linux_thread_area): Delete declaration.
7661 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7663 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7664 after its termination.
7666 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7668 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7669 (gdb_wants_all_stopped): Delete.
7670 (linux_wait_1): Don't call them.
7671 * server.c (handle_v_cont): Tag all threads as want-stopped.
7672 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7673 stopped as "client-wants-stopped".
7675 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7677 * Makefile.in (signals_h): New.
7678 (server_h): Depend on it.
7679 (server.o): Don't depend on $(signals_def).
7680 (signals.o): Depend on $(signals_def).
7682 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7684 * Makefile.in (signals_def): New.
7685 (server_h): Append include/gdb/signals.h and signals_def.
7686 (server.o): Append signals_def.
7688 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7690 * server.c (handle_target_event): Use target_signal_to_host for
7691 resume_info.sig initialization.
7692 * target.h (struct thread_resume) <sig>: New comment.
7694 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7696 * server.c (handle_query): strcpy() the returned string from paddress()
7697 instead of sprintf().
7698 * utils.c (paddress): Return phex_nz().
7700 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7702 * server.c (handle_v_cont): Call mourn_inferior if process
7704 (myresume): Likewise.
7706 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7708 Static tracepoints, and integration with UST.
7710 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7711 * mem-break.c (uninsert_all_breakpoints)
7712 (reinsert_all_breakpoints): New.
7713 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7714 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7715 (gdb_agent_ust_loaded, helper_thread_id)
7716 (gdb_agent_helper_thread_id): New macros.
7717 (struct ipa_sym_addresses): Add addr_ust_loaded,
7718 addr_helper_thread_id, addr_cmd_buf.
7719 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7720 (in_process_agent_loaded_ust): New.
7721 (write_e_ust_not_loaded): New.
7722 (maybe_write_ipa_ust_not_loaded): New.
7723 (struct collect_static_trace_data_action): New.
7724 (enum tracepoint_type) <static_tracepoint>: New.
7725 (struct tracepoint) <handle>: Mention static tracepoints.
7726 (struct static_tracepoint_ctx): New.
7727 (CMD_BUF_SIZE): New.
7728 (add_tracepoint_action): Handle static tracepoint actions.
7729 (unprobe_marker_at): New.
7730 (clear_installed_tracepoints): Handle static tracepoints.
7731 (cmd_qtdp): Handle static tracepoints.
7732 (probe_marker_at): New.
7733 (cmd_qtstart): Handle static tracepoints.
7734 (response_tracepoint): Handle static tracepoints.
7735 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7736 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7737 (get_context_regcache): Handle static tracepoints.
7738 (do_action_at_tracepoint): Handle static tracepoint actions.
7739 (traceframe_find_block_type): Handle static trace data blocks.
7740 (traceframe_read_sdata): New.
7741 (download_tracepoints): Download static tracepoint actions.
7742 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7743 (GDB_PROBE_NAME): New.
7748 (ust_marker_to_static_tracepoint): New.
7750 (collect_ust_data_at_tracepoint): New.
7751 (gdb_ust_probe): New.
7752 (UNIX_PATH_MAX, SOCK_DIR): New.
7753 (gdb_ust_connect_sync_socket): New.
7754 (resume_thread, stop_thread): New.
7755 (run_inferior_command): New.
7756 (init_named_socket): New.
7757 (gdb_ust_socket_init): New.
7758 (cstr_to_hexstr): New.
7760 (first_marker, next_marker): New.
7761 (response_ust_marker): New.
7762 (cmd_qtfstm, cmd_qtsstm): New.
7763 (unprobe_marker_at, probe_marker_at): New.
7764 (cmd_qtstmat, gdb_ust_thread): New.
7765 (gdb_ust_init): New.
7766 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7767 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7769 (x86_64_st_collect_regmap): New.
7770 (X86_64_NUM_ST_COLLECT_GREGS): New.
7771 (AMD64_RIP_REGNUM): New.
7772 (supply_static_tracepoint_registers): New.
7773 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7775 (i386_st_collect_regmap): New.
7776 (i386_NUM_ST_COLLECT_GREGS): New.
7777 (supply_static_tracepoint_registers): New.
7778 * server.c (handle_query): Handle qXfer:statictrace:read.
7779 <qSupported>: Report support for StaticTracepoints, and
7780 qXfer:statictrace:read features.
7781 * server.h (traceframe_read_sdata)
7782 (supply_static_tracepoint_registers): Declare.
7783 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7784 (unpack_varlen_hex): Include in IPA build.
7785 * Makefile.in (ustlibs, ustinc): New.
7786 (IPA_OBJS): Add remote-utils-ipa.o.
7787 ($(IPA_LIB)): Link -ldl and -lpthread.
7789 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7790 * config.in, configure: Regenerate.
7792 2010-06-20 Ian Lance Taylor <iant@google.com>
7793 Pedro Alves <pedro@codesourcery.com>
7795 * linux-x86-low.c (always_true): Delete.
7796 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7797 trying to fool the compiler with always_true.
7799 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7801 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7802 conditions in gdbserver.
7804 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7806 * spu-low.c (spu_read_memory): Wrap around local store limit.
7807 (spu_write_memory): Likewise.
7809 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7811 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7812 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7814 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7816 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7817 uses with LONGEST uses.
7819 2010-06-14 Stan Shebs <stan@codesourcery.com>
7820 Pedro Alves <pedro@codesourcery.com>
7824 * linux-x86-low.c: Include limits.h.
7829 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7830 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7831 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7832 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7833 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7834 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7835 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7836 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7837 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7838 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7839 (amd64_emit_void_call_2): New.
7840 (amd64_emit_ops): New.
7841 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7842 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7843 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7844 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7845 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7846 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7847 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7848 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7849 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7850 (i386_emit_stack_adjust, i386_emit_int_call_1)
7851 (i386_emit_void_call_2): New.
7852 (i386_emit_ops): New.
7853 (x86_emit_ops): New.
7854 (the_low_target): Install x86_emit_ops.
7855 * server.h (struct emit_ops): New.
7856 (get_raw_reg_func_addr): Declare.
7857 (current_insn_ptr, emit_error): Declare.
7858 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7859 (set_trace_state_variable_value): New defines.
7860 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7861 addr_get_trace_state_variable_value and
7862 addr_set_trace_state_variable_value.
7863 (symbol_list): New fields for get_raw_reg,
7864 get_trace_state_variable_value and set_trace_state_variable_value.
7865 (condfn): New typedef.
7866 (struct tracepoint): New field `compiled_cond'.
7867 (do_action_at_tracepoint): Clear compiled_cond.
7868 (get_trace_state_variable_value, set_trace_state_variable_value):
7870 (condition_true_at_tracepoint): If there's a compiled condition,
7872 (current_insn_ptr, emit_error): New globals.
7873 (struct bytecode_address): New.
7874 (get_raw_reg_func_addr): New.
7875 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7876 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7877 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7878 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7879 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7880 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7881 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7882 (compile_tracepoint_condition, compile_bytecodes): New.
7883 * target.h (emit_ops): Forward declare.
7884 (struct target_ops): New field emit_ops.
7885 (target_emit_ops): New.
7886 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7887 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7888 * linux-low.c (linux_emit_ops): New.
7889 (linux_target_ops): Install it.
7890 * linux-low.h (struct linux_target_ops): New field emit_ops.
7892 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7894 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7895 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7897 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7898 Stan Shebs <stan@codesourcery.com>
7900 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7901 (all): Depend on $(extra_libraries).
7902 (install-only): Install the IPA.
7903 (IPA_OBJS, IPA_LIB): New.
7904 (clean): Remove the IPA lib.
7905 (IPAGENT_CFLAGS): New.
7906 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7907 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7908 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7909 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7910 * configure.ac: Check for atomic builtins support in the compiler.
7911 (IPA_DEPFILES, extra_libraries): Define.
7912 * configure.srv (ipa_obj): Add description.
7913 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7914 (i[34567]86-*-linux*): Set ipa_obj.
7915 (x86_64-*-linux*): Set ipa_obj.
7916 * linux-low.c (stabilizing_threads): New.
7917 (supports_fast_tracepoints): New.
7918 (linux_detach): Stabilize threads before detaching.
7919 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7920 the lwp is either not stabilizing, or is moving out of a jump pad.
7921 (linux_fast_tracepoint_collecting): New.
7922 (maybe_move_out_of_jump_pad): New.
7923 (enqueue_one_deferred_signal): New.
7924 (dequeue_one_deferred_signal): New.
7925 (linux_wait_for_event_1): If moving out of a jump pad, defer
7926 pending signals to later.
7927 (linux_stabilize_threads): New.
7928 (linux_wait_1): Check if threads need moving out of jump pads, and
7930 (stuck_in_jump_pad_callback): New.
7931 (move_out_of_jump_pad_callback): New.
7933 (linux_resume_one_lwp): Handle moving out of jump pads.
7934 (linux_set_resume_request): Dequeue deferred signals.
7935 (need_step_over_p): Also step over fast tracepoint jumps.
7936 (start_step_over): Also uninsert fast tracepoint jumps.
7937 (finish_step_over): Also reinsert fast tracepoint jumps.
7938 (linux_install_fast_tracepoint_jump): New.
7939 (linux_target_ops): Install linux_stabilize_threads and
7940 linux_install_fast_tracepoint_jump_pad.
7941 * linux-low.h (linux_target_ops) <get_thread_area,
7942 install_fast_tracepoint_jump_pad>: New fields.
7943 (struct lwp_info) <collecting_fast_tracepoint,
7944 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7945 (linux_get_thread_area): Declare.
7946 * linux-x86-low.c (jump_insn): New.
7947 (x86_get_thread_area): New.
7948 (append_insns): New.
7950 (amd64_install_fast_tracepoint_jump_pad): New.
7951 (i386_install_fast_tracepoint_jump_pad): New.
7952 (x86_install_fast_tracepoint_jump_pad): New.
7953 (the_low_target): Install x86_get_thread_area and
7954 x86_install_fast_tracepoint_jump_pad.
7955 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7956 (struct fast_tracepoint_jump): New.
7957 (fast_tracepoint_jump_insn): New.
7958 (fast_tracepoint_jump_shadow): New.
7959 (find_fast_tracepoint_jump_at): New.
7960 (fast_tracepoint_jump_here): New.
7961 (delete_fast_tracepoint_jump): New.
7962 (set_fast_tracepoint_jump): New.
7963 (uninsert_fast_tracepoint_jumps_at): New.
7964 (reinsert_fast_tracepoint_jumps_at): New.
7965 (set_breakpoint_at): Use write_inferior_memory.
7966 (uninsert_raw_breakpoint): Use write_inferior_memory.
7967 (check_mem_read): Mask out fast tracepoint jumps.
7968 (check_mem_write): Mask out fast tracepoint jumps.
7969 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7970 (set_fast_tracepoint_jump): Declare.
7971 (delete_fast_tracepoint_jump)
7972 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7973 (reinsert_fast_tracepoint_jumps_at): Declare.
7974 * regcache.c: Don't compile many functions when building the
7975 in-process agent library.
7976 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7977 the register buffer in the heap.
7978 (free_register_cache): If the register buffer isn't owned by the
7979 regcache, don't free it.
7980 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7981 pre-existing register caches.
7982 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7984 (convert_ascii_to_int): : Constify `from' parameter type.
7985 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7986 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7987 the needed buffer in-place.
7988 (relocate_instruction): New.
7989 * server.c (handle_query) <qSymbols>: If the target supports
7990 tracepoints, give it a chance of looking up symbols. Report
7991 support for fast tracepoints.
7992 (handle_status): Stabilize threads.
7993 (process_serial_event): Adjust.
7994 * server.h (struct fast_tracepoint_jump): Forward declare.
7995 (struct process_info) <fast_tracepoint_jumps>: New field.
7996 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7997 (decode_X_packet, decode_M_packet): Adjust.
7998 (relocate_instruction): Declare.
7999 (in_process_agent_loaded): Declare.
8000 (tracepoint_look_up_symbols): Declare.
8001 (struct fast_tpoint_collect_status): Declare.
8002 (fast_tracepoint_collecting): Declare.
8003 (force_unlock_trace_buffer): Declare.
8004 (handle_tracepoint_bkpts): Declare.
8005 (initialize_low_tracepoint)
8006 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8007 * target.h (struct target_ops) <stabilize_threads,
8008 install_fast_tracepoint_jump_pad>: New fields.
8009 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8010 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8011 [HAVE_STDINT_H]: Include stdint.h.
8012 (trace_debug_1): Rename to ...
8013 (trace_vdebug): ... this.
8014 (trace_debug): Rename to ...
8015 (trace_debug_1): ... this. Add `level' parameter.
8017 (ATTR_USED, ATTR_NOINLINE): New.
8018 (IP_AGENT_EXPORT): New.
8019 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8020 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8021 (about_to_request_buffer_space, trace_buffer_is_full)
8022 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8023 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8024 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8025 (traceframe_write_count, traceframes_created)
8026 (trace_state_variables)
8027 New renaming defines.
8028 (struct ipa_sym_addresses): New.
8029 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8031 (ipa_sym_addrs): New.
8032 (all_tracepoint_symbols_looked_up): New.
8033 (in_process_agent_loaded): New.
8034 (write_e_ipa_not_loaded): New.
8035 (maybe_write_ipa_not_loaded): New.
8036 (tracepoint_look_up_symbols): New.
8037 (debug_threads) [IN_PROCESS_AGENT]: New.
8038 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8039 (UNKNOWN_SIDE_EFFECTS): New.
8040 (stop_tracing): New.
8041 (flush_trace_buffer): New.
8042 (stop_tracing_bkpt): New.
8043 (flush_trace_buffer_bkpt): New.
8044 (read_inferior_integer): New.
8045 (read_inferior_uinteger): New.
8046 (read_inferior_data_pointer): New.
8047 (write_inferior_data_pointer): New.
8048 (write_inferior_integer): New.
8049 (write_inferior_uinteger): New.
8050 (struct collect_static_trace_data_action): Delete.
8051 (enum tracepoint_type): New.
8052 (struct tracepoint) <type>: New field `type'.
8053 <actions_str, step_actions, step_actions_str>: Only include in
8055 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8056 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8057 (tracepoints): Use IP_AGENT_EXPORT.
8058 (last_tracepoint): Don't include in the IPA.
8059 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8060 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8061 (alloced_trace_state_variables): New.
8062 (trace_state_variables): Use IP_AGENT_EXPORT.
8063 (traceframe_t): Delete unused variable.
8064 (circular_trace_buffer): Don't include in the IPA.
8065 (trace_buffer_start): Delete.
8066 (struct trace_buffer_control): New.
8067 (trace_buffer_free): Delete.
8068 (struct ipa_trace_buffer_control): New.
8069 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8070 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8072 (trace_buffer_ctrl): New.
8073 (TRACE_BUFFER_CTRL_CURR): New.
8074 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8075 Reimplement as macros.
8076 (trace_buffer_wrap): Delete.
8077 (traceframe_write_count, traceframe_read_count)
8078 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8079 (struct tracepoint_hit_ctx) <type>: New field.
8080 (struct fast_tracepoint_ctx): New.
8081 (memory_barrier): New.
8083 (record_tracepoint_error): Update atomically in the IPA.
8084 (clear_inferior_trace_buffer): New.
8085 (about_to_request_buffer_space): New.
8086 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8087 updating the same buffer.
8088 (add_tracepoint): Default the tracepoint's type to trap
8089 tracepoint, and orig_size to -1.
8090 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8092 (create_trace_state_variable): New parameter `gdb'. Handle it.
8093 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8094 (cmd_qtdp): Handle fast tracepoints.
8096 (max_jump_pad_size): New.
8097 (gdb_jump_pad_head): New.
8098 (get_jump_space_head): New.
8099 (claim_jump_space): New.
8100 (sort_tracepoints): New.
8101 (MAX_JUMP_SIZE): New.
8102 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8104 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8105 support. Upload fast traceframes, and delete internal IPA
8107 (stop_tracing_handler): New.
8108 (flush_trace_buffer_handler): New.
8109 (cmd_qtstop): Upload fast tracepoints.
8110 (response_tracepoint): Handle fast tracepoints.
8111 (tracepoint_finished_step): Upload fast traceframes. Set the
8112 tracepoint hit context's tracepoint type.
8113 (handle_tracepoint_bkpts): New.
8114 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8115 type. Add comment about fast tracepoints.
8116 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8117 non-existing action_str field.
8118 (get_context_regcache): Handle fast tracepoints.
8119 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8121 (fast_tracepoint_from_jump_pad_address): New.
8122 (fast_tracepoint_from_ipa_tpoint_address): New.
8123 (collecting_t): New.
8124 (force_unlock_trace_buffer): New.
8125 (fast_tracepoint_collecting): New.
8128 (write_inferior_data_ptr): New.
8129 (target_tp_heap): New.
8130 (target_malloc): New.
8131 (download_agent_expr): New.
8133 (download_tracepoints): New.
8134 (download_trace_state_variables): New.
8135 (upload_fast_traceframes): New.
8136 (IPA_FIRST_TRACEFRAME): New.
8137 (IPA_NEXT_TRACEFRAME_1): New.
8138 (IPA_NEXT_TRACEFRAME): New.
8139 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8140 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8141 (gdb_jump_pad_buffer_end): New.
8142 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8143 (initialize_tracepoint): Adjust.
8144 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8145 buffer. Initialize the low module.
8146 * utils.c (PREFIX, TOOLNAME): New.
8147 (malloc_failure): Use PREFIX.
8148 (error): In the IPA, an error causes an exit.
8149 (fatal, warning): Use PREFIX.
8150 (internal_error): Use TOOLNAME.
8151 (NUMCELLS): Increase to 10.
8152 * configure, config.in: Regenerate.
8154 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8156 * server.c (handle_query) <qSupported>: Do two passes over the
8157 qSupported string to avoid nesting strtok.
8159 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8161 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8163 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8165 * configure: Regenerate.
8166 * proc-service.list: New.
8168 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8170 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8173 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8175 * gdbreplay.c (remote_open): Check error return from socket() call by
8176 its equality to -1 not by it being negative.
8177 * remote-utils.c (remote_open): Likewise.
8179 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8181 * config.h: Regenerate.
8183 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8185 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8186 doesn't provide PTRACE_GET_THREAD_AREA.
8188 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8190 * linux-m68k-low.c: Include <asm/ptrace.h>
8191 (ps_get_thread_area): Implement.
8193 2010-05-03 Doug Evans <dje@google.com>
8195 * event-loop.c (struct callback_event): New struct.
8196 (callback_list): New global.
8197 (append_callback_event, delete_callback_event): New functions.
8198 (process_callback): New function.
8199 (start_event_loop): Call it.
8200 * remote-utils.c (NOT_SCHEDULED): Define.
8201 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8202 moved out of readchar.
8203 (readchar): Rewrite. Call reschedule before returning.
8204 (reset_readchar): New function.
8205 (remote_close): Call it.
8206 (process_remaining, reschedule): New functions.
8207 * server.h (callback_handler_func): New typedef.
8208 (append_callback_event, delete_callback_event): Declare.
8210 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8212 * proc-service.c (ps_pglobal_lookup): Use
8213 thread_db_look_up_one_symbol.
8214 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8215 parameter. Use it instead of all_symbols_looked_up.
8216 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8218 (all_symbols_looked_up): Don't declare.
8219 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8220 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8222 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8223 Set all_symbols_looked_up here.
8224 (thread_db_look_up_one_symbol): New.
8225 (thread_db_get_tls_address): Adjust.
8226 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8227 thread_db object on the heap, and tentatively set it in the
8229 (thread_db_init): Don't set all_symbols_looked_up here.
8230 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8232 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8234 * linux-low.c (linux_kill, linux_detach): Adjust.
8235 (status_pending_p_callback): Remove redundant statement. Check
8236 for !TARGET_WAITIKIND_IGNORE, instead of
8237 TARGET_WAITKIND_STOPPED.
8238 (handle_tracepoints): Make sure LWP is locked. Adjust.
8239 (linux_wait_for_event_1): Adjust.
8240 (linux_cancel_breakpoints): New.
8241 (unsuspend_one_lwp): New.
8242 (unsuspend_all_lwps): New.
8243 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8244 (send_sigstop_callback): Change return type to int, add new
8245 `except' parameter and handle it.
8246 (suspend_and_send_sigstop_callback): New.
8247 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8248 pass them down. If SUSPEND, also increment the lwp's suspend
8250 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8251 (need_step_over_p): Don't consider suspended LWPs.
8252 (start_step_over): Adjust.
8253 (proceed_one_lwp): Change return type to int, add new `except'
8254 parameter and handle it.
8255 (unsuspend_and_proceed_one_lwp): New.
8256 (proceed_all_lwps): Use find_inferior instead of
8258 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8259 also decrement the suspend count of LWPs. Pass `except' down,
8260 instead of hacking its suspend count.
8261 (linux_pause_all): Add `freeze' parameter. Adjust.
8262 (linux_unpause_all): New.
8263 (linux_target_ops): Install linux_unpause_all.
8264 * server.c (handle_status): Adjust.
8265 * target.h (struct target_ops): New fields `unpause_all' and
8266 `cancel_breakpoints'. Add new parameter to `pause_all'.
8267 (pause_all): Add new `freeze' parameter.
8269 (cancel_breakpoints): New.
8270 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8272 (cmd_qtstart): Pause threads.
8273 (stop_tracing): Pause threads, and cancel breakpoints.
8274 * win32-low.c (win32_target_ops): Adjust.
8276 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8278 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8279 the inferior right away from here...
8280 (linux_wait_1): ... to here, and adjust to check the thread's
8281 last_resume_kind instead of the lwp's step or stop_expected flags.
8283 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8285 * README: Use consistent `GDB' and `GDBserver' spellings.
8287 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8289 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8290 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8291 (linux_detach_one_lwp): Assume the lwp is stopped.
8292 (any_thread_of): Delete.
8293 (linux_detach): Stop all lwps here. Don't blindly delete all
8295 (delete_lwp_callback): New.
8296 (linux_mourn): Delete all lwps of the process that is gone.
8297 (linux_wait_1): Don't delete the last lwp of the process here.
8298 * mem-break.h (mark_breakpoints_out): Declare.
8299 * mem-break.c (mark_breakpoints_out): New.
8300 (free_all_breakpoints): Use it.
8301 * server.c (handle_target_event): If the process is gone, mark
8303 * thread-db.c (struct thread_db) <create_bp>: New field.
8304 (thread_db_enable_reporting): Fix prototype. Store a thread event
8305 breakpoint reference in the thread_db struct.
8306 (thread_db_load_search): Clear the thread_db object.
8307 (try_thread_db_load_1): Ditto.
8308 (switch_to_process): New.
8309 (disable_thread_event_reporting): Use it.
8310 (remove_thread_event_breakpoints): New.
8311 (thread_db_detach, thread_db_mourn): Use it.
8313 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8315 * linux-low.c (linux_enable_event_reporting): New.
8316 (linux_wait_for_event_1, handle_extended_wait): Use it.
8318 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8320 * linux-low.c (linux_kill_one_lwp, linux_kill)
8321 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8322 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8323 SIGSTOP even if the LWP is stopped.
8324 (send_sigstop_callback): New.
8325 (stop_all_lwps): Use send_sigstop_callback instead.
8326 (linux_resume_one_thread): Adjust.
8327 (proceed_one_lwp): Still proceed an LWP that the client has
8328 requested to stop, if we haven't reported it as stopped yet. Make
8329 sure that LWPs the client want stopped, have a pending SIGSTOP.
8331 2010-04-26 Doug Evans <dje@google.com>
8333 * server.c (handle_general_set): Make static.
8335 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8336 Print received char after testing for error/eof instead of before.
8337 (input_interrupt): Tweak comment.
8339 2010-04-23 Doug Evans <dje@google.com>
8341 * server.c (start_inferior): Print inferior argv if --debug.
8343 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8345 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8346 * nto-x86-low.c: Include server.h
8348 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8350 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8351 be consistent with other sources of this directory.
8352 (init_registers_amd64): Correct name of source file of this function
8355 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8357 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8360 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8362 * win32-i386-low.c: Add 64-bit support.
8363 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8364 (init_registers_amd64): Declare.
8365 (mappings): Add 64-bit version of array.
8366 (init_windows_x86): New function.
8367 (the_low_target): Change init_arch field to init_windows_x86.
8369 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8371 * win32-low.c: Adapt to support also 64-bit architecture.
8372 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8373 (get_image_name): Use SIZE_T type for local variable `done'.
8374 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8375 (toolhelp_get_dll_name): Idem.
8376 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8377 Use uintptr_t typecast to avoid warning.
8378 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8379 (handle_exception): Use phex_nz to avoid warning.
8380 (win32_wait): Remove unused local variable `process'.
8382 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8384 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8387 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8389 * configure.ac: Use `ws2_32' library for srv_mingw.
8390 * configure: Regenerate.
8391 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8392 * remote-utils.c: Likewise.
8394 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8396 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8397 if __x86_64__ is defined.
8399 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8401 * configure: Regenerate.
8403 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8405 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8406 * target.h (target_ops): New get_tib_address field.
8407 * win32-low.h (win32_thread_info): Add thread_local_base field.
8408 * win32-low.c (child_add_thread): Add tlb argument.
8409 Set thread_local_base field to TLB.
8410 (get_child_debug_event): Adapt to child_add_thread change.
8411 (win32_get_tib_address): New function.
8412 (win32_target_ops): Set get_tib_address field to
8413 win32_get_tib_address.
8414 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8416 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8418 * linux-low.c (linux_mourn): Also remove the process.
8419 * server.c (handle_target_event): Don't remove the process here.
8420 * nto-low.c (nto_mourn): New.
8421 (nto_target_ops): Install it.
8422 * spu-low.c (spu_mourn): New.
8423 (spu_target_ops): Install it.
8424 * win32-low.c (win32_mourn): New.
8425 (win32_target_ops): Install it.
8427 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8429 * server.h (buffer_xml_printf): Remove redundant `;'.
8431 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8433 * regcache.c (set_register_cache): Invalidate regcaches before
8434 changing the register cache layout.
8435 (regcache_invalidate_one): Allow a NULL regcache.
8436 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8437 regcaches before changing the register cache layout or the target
8440 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8442 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8443 variable warning on Linux/x86-64.
8445 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8447 GDBserver disconnected tracing support.
8449 * linux-low.c (linux_remove_process): Delete.
8450 (add_lwp): Don't set last_resume_kind here.
8451 (linux_kill): Use `mourn'.
8452 (linux_detach): Use `thread_db_detach', and `mourn'.
8454 (linux_attach_lwp_1): Adjust comment.
8455 (linux_attach): last_resume_kind moved the thread_info; adjust.
8456 (status_pending_p_callback): Adjust.
8457 (linux_wait_for_event_1): Adjust.
8458 (count_events_callback, select_singlestep_lwp_callback)
8459 (select_event_lwp_callback, cancel_breakpoints_callback)
8460 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8461 (proceed_one_lwp): Adjust.
8462 (linux_async): Add debug output.
8463 (linux_thread_stopped): New.
8464 (linux_pause_all): New.
8465 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8467 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8468 (thread_db_free): Delete declaration.
8469 (thread_db_detach, thread_db_mourn): Declare.
8470 * thread-db.c (thread_db_init): Use thread_db_mourn.
8471 (thread_db_free): Delete, split in two.
8472 (disable_thread_event_reporting): New.
8473 (thread_db_detach): New.
8474 (thread_db_mourn): New.
8476 * server.h (struct thread_info) <last_resume_kind>: New field.
8477 <attached>: Add comment.
8478 <gdb_detached>: New field.
8479 (handler_func): Change return type to int.
8480 (handle_serial_event, handle_target_event): Ditto.
8481 (gdb_connected): Declare.
8483 (disconnected_tracing): Declare.
8484 (stop_tracing): Declare.
8486 * server.c (handle_query) <qSupported>: Report support for
8487 disconnected tracing.
8488 (queue_stop_reply_callback): Account for running threads.
8489 (gdb_wants_thread_stopped): New.
8490 (gdb_wants_all_threads_stopped): New.
8491 (gdb_reattached_process): New.
8492 (handle_status): Clear the `gdb_detached' flag of all processes.
8493 In all-stop, stop all threads.
8494 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8495 (process_serial_event): If the remote connection breaks, or if an
8496 exit was forced with "monitor exit", force an event loop exit.
8497 Handle disconnected tracing on detach.
8498 (handle_serial_event): Adjust.
8499 (handle_target_event): If GDB isn't connected, forward events back
8500 to the inferior, unless the last process exited, in which case,
8501 exit gdbserver. Adjust interface.
8503 * remote-utils.c (remote_open): Don't block in accept. Instead
8504 register an event loop source on the listen socket file
8505 descriptor. Refactor bits into ...
8506 (listen_desc): ... this new global.
8507 (gdb_connected): ... this new function.
8508 (enable_async_notification): ... this new function.
8509 (handle_accept_event): ... this new function.
8510 (remote_close): Clear remote_desc.
8512 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8514 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8516 (mourn_inferior): Define.
8517 (target_process_qsupported): Avoid the dangling else problem.
8518 (thread_stopped): Define.
8519 (pause_all): Define.
8520 (target_waitstatus_to_string): Declare.
8521 * target.c (target_waitstatus_to_string): New.
8523 * tracepoint.c (tracing): Make extern.
8524 (disconnected_tracing): New.
8525 (stop_tracing): Make extern. Handle tracing stops due to GDB
8527 (cmd_qtdisconnected): New.
8528 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8529 (handle_tracepoint_general_set): Handle QTDisconnected.
8531 * event-loop.c (event_handler_func): Change return type to int.
8532 (process_event): Bail out if the event handler wants the event
8534 (handle_file_event): Ditto.
8535 (start_event_loop): Bail out if the event handler wants the event
8538 * nto-low.c (nto_target_ops): Adjust.
8539 * spu-low.c (spu_wait): Don't remove the process here.
8540 (spu_target_ops): Adjust.
8541 * win32-low.c (win32_wait): Don't remove the process here.
8542 (win32_target_ops): Adjust.
8544 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8546 * regcache.c (realloc_register_cache): Invalidate inferior's
8547 regcache before recreating it.
8549 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8551 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8553 2010-04-09 Stan Shebs <stan@codesourcery.com>
8554 Pedro Alves <pedro@codesourcery.com>
8556 * server.h (LONGEST): New.
8557 (struct thread_info) <while_stepping>: New field.
8558 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8560 (initialize_tracepoint, handle_tracepoint_general_set)
8561 (handle_tracepoint_query, tracepoint_finished_step)
8562 (tracepoint_was_hit, release_while_stepping_state_list):
8563 (current_traceframe): Declare.
8564 * server.c (handle_general_set): Handle tracepoint packets.
8566 (write_memory): New.
8567 (handle_search_memory_1): Use read_memory.
8568 (handle_query): Report support for conditional tracepoints, trace
8569 state variables, and tracepoint sources. Handle tracepoint
8571 (main): Initialize the tracepoints module.
8572 (process_serial_event): Handle traceframe reads/writes.
8574 * linux-low.c (handle_tracepoints): New.
8575 (linux_wait_1): Call it.
8576 (linux_resume_one_lwp): Handle while-stepping.
8577 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8578 (linux_target_ops): Install them.
8579 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8581 * linux-x86-low.c (x86_supports_tracepoints): New.
8582 (the_low_target). Install it.
8584 * mem-break.h (delete_breakpoint): Declare.
8585 * mem-break.c (delete_breakpoint): Make external.
8587 * target.h (struct target_ops): Add `supports_tracepoints',
8588 `read_pc', and `write_pc' fields.
8589 (target_supports_tracepoints): Define.
8590 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8593 * regcache.h (struct regcache) <registers_owned>: New field.
8594 (init_register_cache, regcache_cpy): Declare.
8595 (regcache_read_pc, regcache_write_pc): Declare.
8596 (register_cache_size): Declare.
8597 (supply_regblock): Declare.
8598 * regcache.c (init_register_cache): New.
8599 (new_register_cache): Use it.
8600 (regcache_cpy): New.
8601 (register_cache_size): New.
8602 (supply_regblock): New.
8603 (regcache_read_pc, regcache_write_pc): New.
8605 * tracepoint.c: New.
8607 * Makefile.in (OBS): Add tracepoint.o.
8608 (tracepoint.o): New rule.
8610 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8612 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8614 (i386-mmx.c): Likewise.
8615 (i386-mmx-linux.o): Likewise.
8616 (i386-mmx-linux.c): Likewise.
8618 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8619 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8620 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8621 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8623 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8624 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8625 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8627 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8629 * Makefile.in (clean): Updated.
8631 (i386-avx.c): Likewise.
8632 (i386-avx-linux.o): Likewise.
8633 (i386-avx-linux.c): Likewise.
8634 (amd64-avx.o): Likewise.
8635 (amd64-avx.c): Likewise.
8636 (amd64-avx-linux.o): Likewise.
8637 (amd64-avx-linux.c): Likewise.
8639 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8640 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8641 (srv_amd64_regobj): Add amd64-avx.o.
8642 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8643 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8644 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8645 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8646 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8647 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8648 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8650 * i387-fp.c: Include "i386-xstate.h".
8652 (i387_cache_to_xsave): Likewise.
8653 (i387_xsave_to_cache): Likewise.
8654 (x86_xcr0): Likewise.
8656 * i387-fp.h (i387_cache_to_xsave): Likewise.
8657 (i387_xsave_to_cache): Likewise.
8658 (x86_xcr0): Likewise.
8660 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8661 * linux-crisv32-low.c (target_regsets): Likewise.
8662 * linux-m68k-low.c (target_regsets): Likewise.
8663 * linux-mips-low.c (target_regsets): Likewise.
8664 * linux-ppc-low.c (target_regsets): Likewise.
8665 * linux-s390-low.c (target_regsets): Likewise.
8666 * linux-sh-low.c (target_regsets): Likewise.
8667 * linux-sparc-low.c (target_regsets): Likewise.
8668 * linux-xtensa-low.c (target_regsets): Likewise.
8670 * linux-low.c: Include <sys/uio.h>.
8671 (regsets_fetch_inferior_registers): Support nt_type.
8672 (regsets_store_inferior_registers): Likewise.
8673 (linux_process_qsupported): New.
8674 (linux_target_ops): Add linux_process_qsupported.
8676 * linux-low.h (regset_info): Add nt_type.
8677 (linux_target_ops): Add process_qsupported.
8679 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8681 (init_registers_i386_avx_linux): New.
8682 (init_registers_amd64_avx_linux): Likewise.
8683 (xmltarget_i386_linux_no_xml): Likewise.
8684 (xmltarget_amd64_linux_no_xml): Likewise.
8685 (PTRACE_GETREGSET): Likewise.
8686 (PTRACE_SETREGSET): Likewise.
8687 (x86_fill_xstateregset): Likewise.
8688 (x86_store_xstateregset): Likewise.
8689 (use_xml): Likewise.
8690 (x86_linux_update_xmltarget): Likewise.
8691 (x86_linux_process_qsupported): Likewise.
8692 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8693 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8694 init_registers_i386_linux here. Call
8695 x86_linux_update_xmltarget.
8696 (the_low_target): Add x86_linux_process_qsupported.
8698 * server.c (handle_query): Call target_process_qsupported.
8700 * target.h (target_ops): Add process_qsupported.
8701 (target_process_qsupported): New.
8703 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8705 * inferiors.c (add_thread): Set last_status kind to
8706 TARGET_WAITKIND_IGNORE.
8707 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8708 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8709 (linux_wait_1): Move `thread' local definition to block that uses
8710 it. Don't NULL initialize `event_child'.
8711 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8712 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8713 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8715 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8717 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8718 an extended waitstatus, or by a watchpoint.
8719 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8720 thread was stepping or has been stopped by a watchpoint.
8722 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8724 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8725 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8726 of another, then delete the previous, and validate all
8728 (validate_inserted_breakpoint): New.
8729 (delete_disabled_breakpoints): New.
8730 (validate_breakpoints): New.
8731 (check_mem_read): Validate breakpoints before trusting their
8732 shadow. Delete disabled breakpoints.
8733 (check_mem_write): Validate breakpoints before trusting they
8734 should be inserted. Delete disabled breakpoints.
8735 * mem-break.h (validate_breakpoints):
8736 * server.c (handle_query): Validate breakpoints when we see a
8739 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8741 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8742 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8743 if we could tell there's a GDB breakpoint at stop_pc.
8744 (need_step_over_p): Don't do a step over if we find a GDB
8745 breakpoint at the resume PC.
8747 * mem-break.c (struct raw_breakpoint): New.
8748 (enum bkpt_type): New type `gdb_breakpoint'.
8749 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8750 fields. New field `raw'.
8751 (find_raw_breakpoint_at): New.
8752 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8754 (set_breakpoint_at): Adjust.
8755 (delete_raw_breakpoint): New.
8756 (release_breakpoint): New.
8757 (delete_breakpoint): Rename to...
8758 (delete_breakpoint_1): ... this. Add proc parameter. Use
8759 release_breakpoint. Return ENOENT.
8760 (delete_breakpoint): Reimplement.
8761 (find_breakpoint_at): Delete.
8762 (find_gdb_breakpoint_at): New.
8763 (delete_breakpoint_at): Delete.
8764 (set_gdb_breakpoint_at): New.
8765 (delete_gdb_breakpoint_at): New.
8766 (gdb_breakpoint_here): New.
8767 (set_reinsert_breakpoint): Use release_breakpoint.
8768 (uninsert_breakpoint): Rename to ...
8769 (uninsert_raw_breakpoint): ... this.
8770 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8771 (reinsert_raw_breakpoint): Change parameter type to
8773 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8775 (check_breakpoints): Adjust. Use release_breakpoint.
8776 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8777 (breakpoint_inserted_here): Ditto.
8778 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8779 Don't trust the breakpoint's shadow if it is not inserted.
8780 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8781 (delete_all_breakpoints): Adjust.
8782 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8783 use delete_breakpoint_1.
8785 * mem-break.h (breakpoints_supported): Delete declaration.
8786 (set_gdb_breakpoint_at): Declare.
8787 (gdb_breakpoint_here): Declare.
8788 (delete_breakpoint_at): Delete.
8789 (delete_gdb_breakpoint_at): Declare.
8791 * server.h (struct raw_breakpoint): Forward declare.
8792 (struct process_info): New field `raw_breakpoints'.
8794 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8797 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8799 * linux-low.c (status_pending_p_callback): Fix comment.
8800 (linux_wait_for_event_1): Move most of the internal breakpoint
8801 handling from here...
8802 (linux_wait_1): ... to here.
8803 (count_events_callback): New.
8804 (select_singlestep_lwp_callback): New.
8805 (select_event_lwp_callback): New.
8806 (cancel_breakpoints_callback): New.
8807 (select_event_lwp): New.
8808 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8809 priority to all LWPs that have had events that should be reported
8810 to the client. Cancel breakpoints when about to reporting the
8811 event to the client, not while stopping lwps. No longer cancel
8812 finished single-steps here.
8813 (cancel_finished_single_step): Delete.
8814 (cancel_finished_single_steps): Delete.
8816 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8818 * mem-break.c (enum bkpt_type): New.
8819 (struct breakpoint): New field `type'.
8820 (set_breakpoint_at): Change return type to struct breakpoint
8821 pointer. Set type to `other_breakpoint' by default.
8822 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8823 in the breakpoint list.
8824 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8825 (reinsert_breakpoint): Rename to ...
8826 (reinsert_raw_breakpoint): ... this.
8827 (reinsert_breakpoints_at): Adjust.
8828 * mem-break.h (struct breakpoint): Declare.
8829 (set_breakpoint_at): Change return type to struct breakpoint
8832 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8834 * server.c (handle_query): Assign, not compare.
8836 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8838 Teach linux gdbserver to step-over-breakpoints.
8840 * linux-low.c (can_hardware_single_step): New.
8841 (supports_breakpoints): New.
8842 (handle_extended_wait): If stopping threads, read the stop pc of
8845 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8846 low target doesn't support retrieving the PC.
8847 (add_lwp): Set last_resume_kind to resume_continue.
8848 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8849 (linux_attach): Don't clear stop_expected. Set the lwp's
8850 last_resume_kind to resume_stop.
8851 (linux_detach_one_lwp): Don't check for removed breakpoints.
8852 (check_removed_breakpoint): Delete.
8853 (status_pending_p): Rename to ...
8854 (status_pending_p_callback): ... this. Don't check for removed
8855 breakpoints. Don't consider threads that are stopped from GDB's
8857 (linux_wait_for_lwp): Always read the stop_pc here.
8858 (cancel_breakpoint): New.
8859 (step_over_bkpt): New global.
8860 (linux_wait_for_event_1): Implement stepping over breakpoints.
8861 (gdb_wants_lwp_stopped): New.
8862 (gdb_wants_all_stopped): New.
8863 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8864 single-step traps here. Store the thread's last reported target
8866 (send_sigstop): Don't clear stop_expected. Always set it,
8868 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8869 (cancel_finished_single_step): New.
8870 (cancel_finished_single_steps): New.
8871 (wait_for_sigstop): Don't cancel finished single-step traps here.
8872 (linux_resume_one_lwp): Don't check for removed breakpoints.
8873 Don't set `step' on non-hardware step archs.
8874 (linux_set_resume_request): Ignore resume_stop requests if already
8875 stopping or stopped. Set the lwp's last_resume_kind.
8876 (resume_status_pending_p): Don't check for removed breakpoints.
8877 (need_step_over_p): New.
8878 (start_step_over): New.
8879 (finish_step_over): New.
8880 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8881 requests. Clear the thread's last reported target waitstatus.
8882 Don't use the `suspended' flag. Don't consider pending breakpoints.
8883 (linux_resume): Start a step-over if necessary.
8884 (proceed_one_lwp): New.
8885 (proceed_all_lwps): New.
8886 (unstop_all_lwps): New.
8887 * linux-low.h (struct lwp_info): Rewrite comment for the
8888 `suspended' flag. Add the `stop_pc' field. Delete the
8889 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8890 Add `'last_resume_kind' and `need_step_over' fields.
8891 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8892 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8893 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8894 (set_raw_breakpoint_at): New.
8895 (set_breakpoint_at): Rewrite to use it.
8896 (reinsert_breakpoint_handler): Delete.
8897 (set_reinsert_breakpoint): New.
8898 (reinsert_breakpoint_by_bp): Delete.
8899 (delete_reinsert_breakpoints): New.
8900 (uninsert_breakpoint): Rewrite.
8901 (uninsert_breakpoints_at): New.
8902 (reinsert_breakpoint): Rewrite.
8903 (reinsert_breakpoints_at): New.
8904 (check_breakpoints): Rewrite.
8905 (breakpoint_here): New.
8906 (breakpoint_inserted_here): New.
8907 (check_mem_read): Adjust.
8908 * mem-break.h (breakpoints_supported, breakpoint_here)
8909 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8910 (reinsert_breakpoint_by_bp): Delete declaration.
8911 (delete_reinsert_breakpoints): Declare.
8912 (reinsert_breakpoint): Delete declaration.
8913 (reinsert_breakpoints_at): Declare.
8914 (uninsert_breakpoint): Delete declaration.
8915 (uninsert_breakpoints_at): Declare.
8916 (check_breakpoints): Adjust prototype.
8917 * server.h: Adjust include order.
8918 (struct thread_info): Declare here. Add a `last_status' field.
8920 2010-03-23 Michael Snyder <msnyder@vmware.com>
8922 * server.c (crc32): New function.
8923 (handle_query): Add handling for 'qCRC:' request.
8925 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8927 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8928 lwp had been stopped by a watchpoint.
8930 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8932 * server.h (internal_error): Declare.
8933 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8934 * utils.c (internal_error): New function.
8936 2010-03-15 Andreas Schwab <schwab@redhat.com>
8938 * configure.srv: Fix typo setting srv_regobj.
8940 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8942 * linux-low.c (fetch_register): Avoid passing a non string literal
8944 (usr_store_inferior_registers): Ditto.
8946 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8948 * linux-low.c (linux_write_memory): Bail out early if peeking
8951 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8953 * linux-low.h (struct lwp_info): New fields
8954 `stopped_by_watchpoint' and `stopped_data_address'.
8955 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8956 here, and cache them in the lwp object.
8957 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8959 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8961 (linux_stopped_by_watchpoint): Rewrite.
8962 (linux_stopped_data_address): Rewrite.
8964 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8966 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8967 switching the current inferior, not before.
8969 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8971 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8972 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8973 i386-linux.c and amd64-linux.c.
8974 (reg-i386.o): Removed.
8975 (reg-i386.c): Likewise.
8976 (reg-i386-linux.o): Likewise.
8977 (reg-i386-linux.c): Likewise.
8978 (reg-x86-64.o): Likewise.
8979 (reg-x86-64.c): Likewise.
8980 (reg-x86-64-linux.o): Likewise.
8981 (reg-x86-64-linux.c): Likewise.
8984 (i386-linux.o): Likewise.
8985 (i386-linux.c): Likewise.
8986 (amd64.o): Likewise.
8987 (amd64.c): Likewise.
8988 (amd64-linux.o): Likewise.
8989 (amd64-linux.c): Likewise.
8991 * configure.srv (srv_i386_regobj): New.
8992 (srv_i386_linux_regobj): Likewise.
8993 (srv_amd64_regobj): Likewise.
8994 (srv_amd64_linux_regobj): Likewise.
8995 (srv_i386_32bit_xmlfiles): Likewise.
8996 (srv_i386_64bit_xmlfiles): Likewise.
8997 (srv_i386_xmlfiles): Likewise.
8998 (srv_amd64_xmlfiles): Likewise.
8999 (srv_i386_linux_xmlfiles): Likewise.
9000 (srv_amd64_linux_xmlfiles): Likewise.
9001 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9002 srv_xmlfiles to $srv_i386_xmlfiles.
9003 (i[34567]86-*-mingw32ce*): Likewise.
9004 (i[34567]86-*-mingw*): Likewise.
9005 (i[34567]86-*-nto*): Likewise.
9006 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9007 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9008 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9009 (x86_64-*-linux*): Likewise.
9011 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9012 (init_registers_amd64_linux): New.
9013 (x86_arch_setup): Replace init_registers_x86_64_linux with
9014 init_registers_amd64_linux.
9016 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9018 * configure.ac: Check for libdl. If it is not available link against
9019 static libthread_db.
9020 * configure: Regenerate.
9022 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9026 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9027 handing a read watchpoint.
9028 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9030 2010-02-12 Doug Evans <dje@google.com>
9032 * linux-low.c (linux_supports_tracefork_flag): Document.
9033 (linux_look_up_symbols): Add comment.
9035 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9037 * regcache.c (supply_register): Clear regcache if buf is NULL.
9039 2010-02-02 Nicolas Roche <roche@sourceware.org>
9040 Joel Brobecker <brobecker@adacore.com>
9042 * inferiors.c (find_inferior): Add function documentation.
9043 (unloaded_dll): Handle the case where the unloaded dll has not
9044 been previously registered in the dll list.
9046 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9048 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9049 (thumb2_breakpoint): New.
9050 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9052 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9054 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9055 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9058 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9060 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9062 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9064 * linux-s390-low.c (s390_collect_ptrace_register)
9065 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9067 2010-01-21 Doug Evans <dje@google.com>
9069 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9070 (PTRACE_ARG4_TYPE): New macro.
9071 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9072 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9073 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9074 (usr_store_inferior_registers): Ditto.
9075 (linux_read_memory, linux_write_memory): Ditto.
9076 (linux_test_for_tracefork): Ditto.
9078 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9079 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9081 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9083 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9086 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9088 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9089 prototype to take a regcache. Adjust.
9091 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9093 * regcache.h (struct thread_info): Forward declare.
9094 (struct regcache): New.
9095 (new_register_cache): Adjust prototype.
9096 (get_thread_regcache): Declare.
9097 (free_register_cache): Adjust prototype.
9098 (registers_to_string, registers_from_string): Ditto.
9099 (supply_register, supply_register_by_name, collect_register)
9100 (collect_register_as_string, collect_register_by_name): Ditto.
9101 * regcache.c (struct inferior_regcache_data): Delete.
9102 (get_regcache): Rename to ...
9103 (get_thread_regcache): ... this. Adjust. Switch inferior before
9105 (regcache_invalidate_one): Adjust.
9106 (regcache_invalidate): Fix prototype.
9107 (new_register_cache): Return the new register cache.
9108 (free_register_cache): Change prototype.
9109 (realloc_register_cache): Adjust.
9110 (registers_to_string): Change prototype to take a regcache. Adjust.
9111 (registers_from_string): Ditto.
9112 (register_data): Ditto.
9113 (supply_register): Ditto.
9114 (supply_register_by_name): Ditto.
9115 (collect_register): Ditto.
9116 (collect_register_as_string): Ditto.
9117 (collect_register_by_name): Ditto.
9118 * server.c (process_serial_event): Adjust.
9119 * linux-low.h (regset_fill_func, regset_store_func): Change
9121 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9123 * linux-low.c (get_stop_pc): Adjust.
9124 (check_removed_breakpoint): Adjust.
9125 (linux_wait_for_event): Adjust.
9126 (linux_resume_one_lwp): Adjust.
9127 (fetch_register): Add regcache parameter. Adjust.
9128 (usr_store_inferior_registers): Ditto.
9129 (regsets_fetch_inferior_registers): Ditto.
9130 (regsets_store_inferior_registers): Ditto.
9131 (linux_fetch_registers, linux_store_registers): Ditto.
9132 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9134 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9136 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9137 prototype to take a regcache.
9138 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9139 * remote-utils.c (convert_ascii_to_int, outreg)
9140 (prepare_resume_reply): Change prototype to take a regcache.
9142 * target.h (struct target_ops) <fetch_registers, store_registers>:
9143 Change prototype to take a regcache.
9144 (fetch_inferior_registers, store_inferior_registers): Change
9145 prototype to take a regcache. Adjust.
9146 * proc-service.c (ps_lgetregs): Adjust.
9147 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9148 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9149 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9150 take a regcache. Adjust.
9151 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9152 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9153 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9154 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9155 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9156 (cris_cannot_fetch_register):
9157 (cris_breakpoint_at): Change prototype to take a regcache.
9159 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9160 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9161 to take a regcache. Adjust.
9162 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9164 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9165 take a regcache. Adjust.
9166 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9167 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9168 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9169 * linux-mips-low.c (mips_get_pc):
9170 (mips_set_pc): Change prototype to take a regcache. Adjust.
9171 (mips_reinsert_addr): Adjust.
9172 (mips_collect_register): Change prototype to take a regcache.
9174 (mips_supply_register):
9175 (mips_collect_register_32bit, mips_supply_register_32bit)
9176 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9177 (mips_store_fpregset): Ditto.
9178 * linux-ppc-low.c (ppc_supply_ptrace_register)
9179 (ppc_supply_ptrace_register): Ditto.
9180 (parse_spufs_run): Adjust.
9181 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9182 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9183 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9184 take a regcache. Adjust.
9185 * linux-s390-low.c (s390_collect_ptrace_register)
9186 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9187 (s390_set_pc): Change prototype to take a regcache. Adjust.
9188 (s390_arch_setup): Adjust.
9189 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9190 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9191 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9192 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9193 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9195 (sparc_breakpoint_at): Adjust.
9196 * linux-xtensa-low.c (xtensa_fill_gregset):
9197 (xtensa_store_gregset):
9198 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9199 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9200 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9201 prototype to take a regcache. Adjust.
9202 * win32-arm-low.c (arm_fetch_inferior_register)
9203 (arm_store_inferior_register): Change prototype to take a
9205 * win32-i386-low.c (i386_fetch_inferior_register)
9206 (i386_store_inferior_register): Change prototype to take a
9208 * win32-low.c (child_fetch_inferior_registers)
9209 (child_store_inferior_registers): Change prototype to take a
9211 (win32_wait): Adjust.
9212 (win32_fetch_inferior_registers): Change prototype to take a
9214 (win32_store_inferior_registers): Adjust.
9215 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9216 store_inferior_register>: Change prototype to take a regcache.
9218 2010-01-20 Doug Evans <dje@google.com>
9220 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9222 (linux_wait_for_event1, linux_init_signals): Ditto.
9223 (W_STOPCODE): Provide definition if missing.
9225 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9227 * linux-low.c (linux_core_of_thread): New.
9228 (compare_ints, show_process, list_threads): New.
9229 (linux_qxfer_osdata): Report threads and cores.
9230 (linux_target_op): Register linux_core_of_thread.
9231 * remote-utils.c (prepare_resume_reply): Report the core.
9232 (buffer_xml_printf): Support %d specifier.
9233 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9235 (handle_query): Handle qXfer:threads. Announce availability
9237 * target.h (struct target_ops): New field core_of_thread.
9239 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9241 * Makefile.in (clean): Remove new generated files.
9242 (reg-s390.o, reg-s390.c): Remove rules.
9243 (reg-s390x.o, reg-s390x.c): Likewise.
9244 (s390-linux32.o, s390-linux32.c): Add rules.
9245 (s390-linux64.o, s390-linux64.c): Likewise.
9246 (s390x-linux64.o, s390x-linux64.c): Likewise.
9247 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9248 * linux-s390-low.c: Include <elf.h>.
9249 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9250 (init_registers_s390): Remove prototype.
9251 (init_registers_s390x): Likewise.
9252 (init_registers_s390_linux32): Add prototype.
9253 (init_registers_s390_linux64): Likewise.
9254 (init_registers_s390x_linux64): Likewise.
9255 (s390_num_regs_3264): New define.
9256 (s390_regmap_3264): New global variable.
9257 (s390_cannot_fetch_register): Remove obsolete check.
9258 (s390_cannot_store_register): Likewise.
9259 (s390_collect_ptrace_register): Handle upper/lower register halves.
9260 (s390_supply_ptrace_register): Likewise.
9261 (s390_fill_gregset): Update to register number changes.
9262 (s390_get_hwcap): New routine.
9263 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9264 Install appropriate regmap and register set.
9266 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9268 * server.c (gdbserver_version): Update copyright year to 2010.
9269 * gdbreplay.c (gdbreplay_version): Likewise.
9271 2009-12-28 Doug Evans <dje@google.com>
9273 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9274 elf/external.h. Include <elf.h> instead but only if necessary.
9276 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9278 * linux-low.c (linux_remove_process): Remove `detaching'
9279 parameter. Don't release/detach from thread_db here.
9280 (linux_kill): Release/detach from thread_db here, ...
9281 (linux_detach): ... and here, before actually detaching.
9282 (linux_wait_1): ... and here, when a process exits.
9283 * thread-db.c (any_thread_of): New.
9284 (thread_db_free): Switch the current inferior to a thread of the
9287 2009-12-21 Doug Evans <dje@google.com>
9289 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9291 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9292 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9293 warning ifndef __NR_tkill. Move setting of errno there too.
9294 Delete unnecessary resetting of errno after syscall.
9295 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9297 * configure.ac: Check for dladdr.
9298 * config.in: Regenerate.
9299 * configure: Regenerate.
9300 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9301 (try_thread_db_load): Update.
9303 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9305 2009-12-18 Doug Evans <dje@google.com>
9307 * event-loop.c: Include unistd.h if it exists.
9309 * linux-low.c (my_waitpid): Move definition away from being in
9310 between linux_tracefork_child/linux_test_for_tracefork.
9312 * gdb_proc_service.h (psaddr_t): Fix type.
9313 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9314 signature to match glibc.
9316 2009-12-16 Doug Evans <dje@google.com>
9318 * linux-low.c (linux_read_memory): Fix argument to read.
9320 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9322 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9323 events, don't leave current_inferior pointing at null.
9325 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9327 * win32-low.c (LOG): Delete.
9328 (OUTMSG): Output to stderr.
9329 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9330 on compile time LOG macro.
9331 (win32_wait): Fix debug output.
9333 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9335 * win32-low.c (win32_add_one_solib): If the dll name is
9336 "ntdll.dll", prepend the system directory to the dll path.
9338 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9340 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9342 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9343 Vladimir Prus <vladimir@codesourcery.com>
9345 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9346 * configure.ac: Check for __mcoldfire__ and set
9347 gdb_cv_m68k_is_coldfire.
9348 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9349 reg-cf.o and reg-m68k.o.
9350 * configure: Regenerated.
9352 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9354 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9355 Pass it to thread_db_free.
9356 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9357 proper `detaching' argument to linux_remove_process.
9358 * linux-low.h (thread_db_free): Add `detaching' parameter.
9359 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9361 (thread_db_free): Add `detaching' parameter. Only
9362 call td_ta_clear_event if detaching from process.
9364 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9366 * thread-db.c (thread_db_free): Fix typo.
9368 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9371 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9373 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9375 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9376 with an i686 compiler.
9377 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9379 * configure: Rebuilt.
9381 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9385 * server.c (handle_search_memory_1): Correct read_addr initialization
9386 in loop for searching subsequent chunks.
9388 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9390 * configure.ac: New --with-libthread-db option.
9391 * thread-db.c: Allow direct dependence on libthread_db.
9392 (thread_db_free): Adjust.
9393 * config.in: Regenerate.
9394 * configure: Likewise.
9396 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9399 * thread-db.c (attach_thread): New function.
9400 (maybe_attach_thread): Return success/failure.
9401 (find_new_threads_callback): Adjust.
9402 (thread_db_find_new_threads): Loop until no new threads.
9404 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9406 * proc-service.c (ps_lgetregs): Formatting.
9408 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9410 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9411 * configure.ac: Adjust.
9412 * linux-low.h (struct process_info_private): Move members to struct
9414 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9415 * linux-low.c (linux_remove_process): Adjust.
9416 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9417 * server.c (handle_query): Move code ...
9418 (handle_monitor_command): ... here. New function.
9419 * target.h (struct target_ops): New member.
9420 * thread-db.c (struct thread_db): New.
9421 (libthread_db_search_path): New variable.
9422 (thread_db_create_event, thread_db_enable_reporting)
9423 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9424 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9425 (try_thread_db_load_1, dladdr_to_soname): New functions.
9426 (try_thread_db_load, thread_db_load_search): New functions.
9427 (thread_db_init): Search for libthread_db.
9428 (thread_db_free): New function.
9429 (thread_db_handle_monitor_command): Likewise.
9430 * config.in: Regenerate.
9431 * configure: Regenerate.
9433 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9435 * spu-low.c (spu_kill): Wait for inferior to terminate.
9436 Call clear_inferiors.
9437 (spu_detach): Call clear_inferiors.
9439 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9441 * aclocal.m4: Regenerate.
9442 * config.in: Likewise.
9443 * configure: Likewise.
9445 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9447 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9448 (parse_spufs_run): New function.
9449 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9450 (ppc_breakpoint_at): Handle SPU breakpoints.
9452 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9454 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9455 (SPUFS_MAGIC): Define.
9456 (spu_enumerate_spu_ids): New function.
9457 (linux_qxfer_spu): New function.
9458 (linux_target_ops): Install linux_qxfer_spu.
9460 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9462 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9463 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9464 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9465 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9466 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9467 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9468 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9469 (init_registers_powerpc_cell32l): Add prototype.
9470 (init_registers_powerpc_cell64l): Likewise.
9471 (ppc_arch_setup): Detect Cell/B.E. architecture.
9473 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9475 * Makefile.in (datarootdir): New variable.
9477 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9479 * linux-low.c (linux_write_memory): Update debugging output.
9480 * Makefile.in (clean): Add new descriptions.
9481 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9482 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9483 * configure.srv: Add new files for arm*-*-linux*.
9484 * linux-arm-low.c: Add new declarations.
9485 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9486 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9487 (HWCAP_VFPv3D16): New.
9488 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9489 instead of __IWMMXT__.
9490 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9491 (arm_arch_setup): New.
9492 (target_regsets): Remove #ifdef. Add VFP regset.
9493 (the_low_target): Use arm_arch_setup.
9495 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9497 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9498 the main thread again.
9500 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9502 Adding Neutrino gdbserver.
9503 * configure: Regenerated.
9504 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9505 * configure.srv (i[34567]86-*-nto*): New target.
9506 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9507 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9508 (nto_comctrl) [__QNX__]: New function.
9509 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9511 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9513 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9516 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9517 Pedro Alves <pedro@codesourcery.com>
9519 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9520 don't support CONTEXT_EXTENDED_REGISTERS.
9521 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9522 (the_low_target): Install them.
9523 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9524 failing with ERROR_PIPE_NOT_CONNECTED.
9526 2009-06-30 Doug Evans <dje@google.com>
9527 Pierre Muller <muller@ics.u-strasbg.fr>
9529 Add h/w watchpoint support to x86-linux, win32-i386.
9530 * Makefile.in (SFILES): Add i386-low.c
9531 (i386_low_h): Define.
9532 (i386-low.o): Add dependencies.
9533 (linux-x86-low.o): Add i386-low.h dependency.
9534 (win32-i386-low.o): Ditto.
9535 * i386-low.c: New file.
9536 * i386-low.h: New file.
9537 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9538 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9539 * linux-low.c (linux_add_process): Initialize arch_private.
9540 (linux_remove_process): Free arch_private.
9541 (add_lwp): Initialize arch_private.
9542 (delete_lwp): Free arch_private.
9543 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9545 * linux-low.h (process_info_private): New member arch_private.
9546 (lwp_info): New member arch_private.
9547 (linux_target_ops): New members new_process, new_thread,
9549 (ptid_of): New macro.
9550 * linux-x86-low.c: Include stddef.h, i386-low.h.
9551 (arch_process_info): New struct.
9552 (arch_lwp_info): New struct.
9553 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9554 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9555 (i386_dr_low_get_status): New function.
9556 (x86_insert_point, x86_remove_point): New functions.
9557 (x86_stopped_by_watchpoint): New function.
9558 (x86_stopped_data_address): New function.
9559 (x86_linux_new_process, x86_linux_new_thread): New functions.
9560 (x86_linux_prepare_to_resume): New function.
9561 (the_low_target): Add entries for insert_point, remove_point,
9562 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9564 * server.c (debug_hw_points): New global.
9565 (monitor_show_help): Document set debug-hw-points.
9566 (handle_query): Process "set debug-hw-points".
9567 * server.h (debug_hw_points): Declare.
9568 (paddress): Declare.
9569 * utils.c (NUMCELLS, CELLSIZE): New macros.
9570 (get_sell, xsnprintf, paddress): New functions.
9571 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9572 remove_point, stopped_by_watchpoint, stopped_data_address.
9573 * win32-i386-low.c: Include i386-low.h.
9574 (debug_reg_state): Replaces dr.
9575 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9576 (i386_dr_low_get_status): New function.
9577 (i386_insert_point, i386_remove_point): New functions.
9578 (i386_stopped_by_watchpoint): New function.
9579 (i386_stopped_data_address): New function.
9580 (i386_initial_stuff): Update.
9581 (get_thread_context,set_thread_context,i386_thread_added): Update.
9582 (the_low_target): Add entries for insert_point,
9583 remove_point, stopped_by_watchpoint, stopped_data_address.
9584 * win32-low.c (win32_insert_watchpoint): New function.
9585 (win32_remove_watchpoint): New function.
9586 (win32_stopped_by_watchpoint): New function.
9587 (win32_stopped_data_address): New function.
9588 (win32_target_ops): Add entries for insert_watchpoint,
9589 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9590 * win32-low.h (win32_target_ops): New members insert_point,
9591 remove_point, stopped_by_watchpoint, stopped_data_address.
9593 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9595 * server.c (process_serial_event): Re-return unsupported, not
9596 error, if the type isn't recognized. Re-allow supporting only
9597 insert or remove packets. Also call require_running for
9598 breakpoints. Add missing break statement to default case. Tidy.
9599 * target.h (struct target_ops): Rename insert_watchpoint to
9600 insert_point, and remove_watchpoint to remove_point.
9602 * linux-low.h (struct linux_target_ops): Likewise.
9603 * linux-low.c (linux_insert_watchpoint): Rename to ...
9604 (linux_insert_point): ... this. Adjust.
9605 (linux_remove_watchpoint): Rename to ...
9606 (linux_remove_point): ... this. Adjust.
9607 (linux_target_ops): Adjust.
9608 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9609 (cris_insert_point): ... this.
9610 (cris_remove_watchpoint): Rename to ...
9611 (cris_remove_point): ... this.
9612 (the_low_target): Adjust.
9614 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9616 * server.c (handle_v_kill): Pass signal_pid to
9617 kill_inferior if multi_process is zero.
9619 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9621 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9622 * target.h (target_ops): Comment for *_watchpoint to make it clear
9623 the functions can get types '0' and '1'.
9625 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9627 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9628 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9629 * regcache.c (get_regcache): Likewise.
9630 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9631 * win32-low.c (child_fetch_inferior_registers): Remove check for
9634 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9635 Pedro Alves <pedro@codesourcery.com>
9637 * target.h (struct target_ops) <supports_multi_process>: New
9639 (target_supports_multi_process): New.
9640 * server.c (handle_query): Even if GDB reports support, only
9641 enable multi-process if the target also supports it. Report
9642 multi-process support only if the target backend supports it.
9643 * linux-low.c (linux_supports_multi_process): New function.
9644 (linux_target_ops): Install it as target_supports_multi_process
9647 2009-05-24 Doug Evans <dje@google.com>
9649 Global renaming of find_thread_pid to find_thread_ptid.
9650 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9651 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9652 All callers updated.
9654 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9655 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9658 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9659 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9660 (linux_resume_one_lwp): Ditto.
9662 2009-05-23 Doug Evans <dje@google.com>
9664 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9665 from struct inferior_list_entry * to struct lwp_info *.
9666 All callers updated.
9668 2009-05-13 Doug Evans <dje@google.com>
9670 * linux-x86-low.c: Don't include assert.h.
9671 (x86_siginfo_fixup): Use fatal, not assert.
9672 (x86_arch_setup): Fix comment.
9674 2009-05-12 Doug Evans <dje@google.com>
9676 Biarch support for i386/amd64 gdbserver.
9677 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9678 Add linux-x86-low.c.
9679 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9680 (linux-x86-low.o): Add.
9681 * linux-x86-64-low.c: Delete.
9682 * linux-i386-low.c: Delete.
9683 * linux-x86-low.c: New file.
9684 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9686 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9688 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9689 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9690 (linux_child_pid_to_exec_file): New function.
9691 (elf_64_header_p, elf_64_file_p): New functions.
9692 (siginfo_fixup): New function.
9693 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9694 give target a chance to convert layout.
9695 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9696 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9698 2009-05-07 Doug Evans <dje@google.com>
9700 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9701 (regsets_store_inferior_registers): Ditto.
9703 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9707 * linux-low.c (must_set_ptrace_flags): Delete.
9708 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9710 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9711 `lwp->must_set_ptrace_flags' instead.
9712 (linux_wait_for_event_1): Set ptrace options here.
9713 (linux_wait_1): ... not here.
9715 2009-04-30 Doug Evans <dje@google.com>
9717 * inferiors.c (started_inferior_callback): New function.
9718 (attached_inferior_callback): New function.
9719 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9720 * server.c (print_started_pid, print_attached_pid): New functions.
9721 (detach_or_kill_for_exit): New function.
9722 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9723 * server.h (have_started_inferiors_p): Declare.
9724 (have_attached_inferiors_p): Declare.
9726 * inferiors.c (remove_process): Fix memory leak, free process.
9727 * linux-low.c (linux_remove_process): New function.
9728 (linux_kill): Call it instead of remove_process.
9729 (linux_detach, linux_wait_1): Ditto.
9731 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9733 * configure.srv: Add x86 Windows CE target.
9735 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9737 * inferiors.c (get_thread_process): Make global.
9738 * server.h (get_thread_process): Add prototype.
9739 * thread-db.c (find_one_thread): Use get_thread_process
9740 instead of current_process.
9741 (thread_db_get_tls_address): Do not crash if called when
9742 thread layer is not yet initialized.
9744 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9746 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9747 * spu-low.c (current_tid): Rename to ...
9748 (current_ptid): ... this.
9749 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9750 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9751 ptid_get_lwp (current_ptid) instead of current_tid.
9752 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9753 instead of current_tid. Use find_process_pid to verify pid
9754 argument is valid. Pass proper argument to remove_process.
9755 (spu_thread_alive): Compare current_ptid instead of current_tid.
9756 (spu_resume): Likewise.
9758 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9760 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9763 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9765 Implement the multiprocess extensions, and add linux multiprocess
9768 * server.h (ULONGEST): Declare.
9769 (struct ptid, ptid_t): New.
9770 (minus_one_ptid, null_ptid): Declare.
9771 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9772 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9773 (struct inferior_list_entry): Change `id' type from unsigned from
9775 (struct sym_cache, struct breakpoint, struct
9776 process_info_private): Forward declare.
9777 (struct process_info): Declare.
9778 (current_process): Declare.
9779 (all_processes): Declare.
9780 (initialize_inferiors): Declare.
9781 (add_thread): Adjust to use ptid_t.
9782 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9783 (add_process, remove_process, find_thread_pid): Declare.
9784 (find_inferior_id): Adjust to use ptid_t.
9785 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9786 (multi_process): Declare.
9787 (push_event): Adjust to use ptid_t.
9788 (read_ptid, write_ptid): Declare.
9789 (prepare_resume_reply): Adjust to use ptid_t.
9790 (clear_symbol_cache): Declare.
9791 * inferiors.c (all_processes): New.
9792 (null_ptid, minus_one_ptid): New.
9793 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9794 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9795 (add_thread): Change unsigned long to ptid. Remove gdb_id
9797 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9798 (gdb_id_to_thread): Rename to ...
9799 (find_thread_pid): ... this. Change unsigned long to ptid.
9800 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9801 (loaded_dll, pull_pid_from_list): Adjust.
9802 (add_process, remove_process, find_process_pid)
9803 (get_thread_process, current_process, initialize_inferiors): New.
9804 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9805 (struct target_waitstatus) <related_pid>: Ditto.
9806 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9808 (struct target_ops) <join>: Add `pid' argument.
9809 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9810 (struct target_ops) <wait>: Add `ptid' field. Change return type
9812 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9813 (mywait): Add `ptid' argument. Change return type to ptid_t.
9814 (target_pid_to_str): Declare.
9815 * target.c (set_desired_inferior): Adjust to use ptids.
9816 (mywait): Add new `ptid' argument. Adjust.
9817 (target_pid_to_str): New.
9818 * mem-break.h (free_all_breakpoints): Declare.
9819 * mem-break.c (breakpoints): Delelete.
9820 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9821 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9822 to use per-process breakpoint list.
9823 (free_all_breakpoints): New.
9824 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9825 (symbol_cache, all_symbols_looked_up): Delete.
9827 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9829 (prepare_resume_reply): Change ptid argument's type from unsigned
9830 long to ptid_t. Adjust. Implement W;process and X;process.
9831 (free_sym_cache, clear_symbol_cache): New.
9832 (look_up_one_symbol): Adjust to per-process symbol cache. *
9833 * server.c (cont_thread, general_thread, step_thread): Change type
9836 (multi_process): New.
9837 (last_ptid): Change type to ptid_t.
9838 (struct vstop_notif) <ptid>: Change type to ptid_t.
9839 (queue_stop_reply, push_event): Change `ptid' argument's type to
9841 (discard_queued_stop_replies): Add `pid' argument.
9842 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9843 changes. Don't reference the `attached' global.
9844 (attach_inferior): Adjust to mywait interface changes.
9845 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9846 features. Handle and report "multiprocess+". Handle
9848 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9850 (handle_v_kill): New.
9851 (handle_v_stopped): Adjust to use target_pid_to_str.
9852 (handle_v_requests): Allow multiple attaches and runs when
9853 multiprocess extensions are in effect. Handle "vKill".
9854 (myresume): Adjust to use ptids.
9855 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9856 (handle_status): Adjust to discard_queued_stop_replies interface
9858 (first_thread_of, kill_inferior_callback)
9859 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9860 (main): Call initialize_inferiors. Adjust to use ptids, killing
9861 and detaching from all inferiors. Handle multiprocess packet
9863 * linux-low.h: Include gdb_proc_service.h.
9864 (struct process_info_private): New.
9865 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9866 <lwpid_of>: Use ptid_get_lwp.
9867 (get_lwp_thread): Adjust.
9868 (struct lwp_info): Add `dead' member.
9869 (find_lwp_pid): Declare.
9870 * linux-low.c (thread_db_active): Delete.
9871 (new_inferior): Adjust comment.
9872 (inferior_pid): Delete.
9873 (linux_add_process): New.
9874 (handle_extended_wait): Adjust.
9875 (add_lwp): Change unsigned long to ptid.
9876 (linux_create_inferior): Add process to processes table. Adjust
9877 to use ptids. Don't set new_inferior here.
9878 (linux_attach_lwp): Rename to ...
9879 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9880 it. Adjust to use ptids.
9881 (linux_attach_lwp): New.
9882 (linux_attach): Add process to processes table. Don't set
9884 (struct counter): New.
9885 (second_thread_of_pid_p, last_thread_of_process_p): New.
9886 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9888 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9889 processes. Remove process from process table.
9890 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9891 to multiple processes.
9892 (any_thread_of): New.
9893 (linux_detach): Add `pid' argument, and handle it. Remove process
9894 from processes table.
9895 (linux_join): Add `pid' argument. Handle it.
9896 (linux_thread_alive): Change unsighed long argument to ptid_t.
9897 Consider dead lwps as not being alive.
9898 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9899 threads we're not interested in.
9900 (same_lwp, find_lwp_pid): New.
9901 (linux_wait_for_lwp): Change `pid' argument's type from int to
9903 (linux_wait_for_event): Rename to ...
9904 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9905 from int to ptid_t. Adjust.
9906 (linux_wait_for_event): New.
9907 (linux_wait_1): Add `ptid' argument. Change return type to
9908 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9909 that exit from the process table.
9910 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9912 (mark_lwp_dead): New.
9913 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9914 stopping all threads, mark its main lwp as dead.
9915 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9917 (fetch_register, usr_store_inferior_registers)
9918 (regsets_fetch_inferior_registers)
9919 (regsets_store_inferior_registers, linux_read_memory)
9920 (linux_write_memory): Inline `inferior_pid'.
9921 (linux_look_up_symbols): Adjust to use per-process
9923 (linux_request_interrupt): Adjust to use ptids.
9924 (linux_read_auxv): Inline `inferior_pid'.
9925 (initialize_low): Don't reference thread_db_active.
9926 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9927 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9928 (ps_getpid): Return the pid of the current inferior.
9929 * thread-db.c (proc_handle, thread_agent): Delete.
9930 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9932 (find_one_thread): Change argument type to ptid_t. Adjust to
9934 (maybe_attach_thread): Adjust to per-process data and ptids.
9935 (thread_db_find_new_threads): Ditto.
9936 (thread_db_init): Ditto.
9937 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9938 processes table. Adjust to use ptids.
9939 (spu_kill, spu_detach): Adjust interface. Remove process from
9941 (spu_join, spu_thread_alive): Adjust interface.
9942 (spu_wait): Adjust interface. Remove process from processes
9943 table. Adjust to use ptids.
9944 * win32-low.c (current_inferior_tid): Delete.
9945 (current_inferior_ptid): New.
9946 (debug_event_ptid): New.
9947 (thread_rec): Take a ptid. Adjust.
9948 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9949 (child_delete_thread): Ditto.
9950 (do_initial_child_stuff): Add `attached' argument. Add process to
9952 (child_fetch_inferior_registers, child_store_inferior_registers):
9954 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9955 (win32_attach): Pass 1 to do_initial_child_stuff.
9956 (win32_kill): Adjust interface. Remove process from processes
9958 (win32_detach): Ditto.
9959 (win32_join): Adjust interface.
9960 (win32_thread_alive): Take a ptid.
9961 (win32_resume): Adjust to use ptids.
9962 (get_child_debug_event): Ditto.
9963 (win32_wait): Adjust interface. Remove exiting process from
9966 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9968 Non-stop mode support.
9970 * server.h (non_stop): Declare.
9971 (gdb_client_data, handler_func): Declare.
9972 (delete_file_handler, add_file_handler, start_event_loop):
9974 (handle_serial_event, handle_target_event, push_event)
9975 (putpkt_notif): Declare.
9976 * target.h (enum resume_kind): New.
9977 (struct thread_resume): Replace `step' field by `kind' field.
9978 (TARGET_WNOHANG): Define.
9979 (struct target_ops) <wait>: Add `options' argument.
9980 <supports_non_stop, async, start_non_stop>: New fields.
9981 (target_supports_non_stop, target_async): New.
9982 (start_non_stop): Declare.
9983 (mywait): Add `options' argument.
9984 * target.c (mywait): Add `options' argument. Print child exit
9986 (start_non_stop): New.
9987 * server.c (non_stop, own_buf, mem_buf): New globals.
9988 (struct vstop_notif): New.
9989 (notif_queue): New global.
9990 (queue_stop_reply, push_event, discard_queued_stop_replies)
9991 (send_next_stop_reply): New.
9992 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9994 (attach_inferior): In non-stop mode, don't wait for the target
9996 (handle_general_set): Handle QNonStop.
9997 (handle_query): When handling qC, return the current general
9998 thread, instead of the first thread of the list.
9999 (handle_query): If the backend supports non-stop mode, include
10000 QNonStop+ in the qSupported query response.
10001 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10003 (handle_v_attach, handle_v_run): Handle non-stop mode.
10004 (handle_v_stopped): New.
10005 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10006 (myresume): Adjust to use resume_kind. Handle non-stop.
10007 (queue_stop_reply_callback): New.
10008 (handle_status): Handle non-stop mode.
10009 (main): Clear non_stop flag on reconnection. Use the event-loop.
10010 Refactor serial protocol handling from here ...
10011 (process_serial_event): ... to this new function. When GDB
10012 selects any thread, select one here. In non-stop mode, wait until
10013 GDB acks all pending events before exiting.
10014 (handle_serial_event, handle_target_event): New.
10015 * remote-utils.c (remote_open): Install remote_desc in the event
10017 (remote_close): Remove remote_desc from the event loop.
10018 (putpkt_binary): Rename to...
10019 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10020 (putpkt_binary): New as wrapper around putpkt_binary_1.
10021 (putpkt_notif): New.
10022 (prepare_resume_reply): In non-stop mode, don't change the
10024 * event-loop.c: New.
10025 * Makefile.in (OBJ): Add event-loop.o.
10026 (event-loop.o): New rule.
10028 * linux-low.h (pid_of): Moved here.
10030 (get_lwp_thread): Use lwpid_of.
10031 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10032 * linux-low.c (pid_of): Delete.
10033 (inferior_pid): Use lwpid_of.
10034 (linux_event_pipe): New.
10035 (target_is_async_p): New.
10037 (handle_extended_wait): Use lwpid_of.
10038 (add_lwp): Don't set lwpid field.
10039 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10040 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10041 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10042 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10043 first. Adjust to linux_wait_for_event interface changes. Use
10045 (linux_detach): Don't delete the main lwp here.
10046 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10047 (status_pending_p): Don't consider explicitly suspended lwps.
10048 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10049 pointer. Add OPTIONS argument. Change return type to int. Use
10050 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10051 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10052 pointer. Add status pointer argument. Return a pid instead of a
10053 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10054 changes. In non-stop mode, don't switch to a random thread.
10055 (linux_wait): Rename to...
10056 (linux_wait_1): ... this. Add target_options argument, and handle
10057 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10058 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10059 clean exit and signal exit code. Don't stop all threads in
10060 non-stop mode. In all-stop mode, only stop all threads when
10061 reporting a stop to GDB. Handle explicit thread stop requests.
10062 (async_file_flush, async_file_mark): New.
10064 (send_sigstop): Use lwpid_of.
10065 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10066 interface changes. In non-stop mode, don't switch to a random
10068 (linux_resume_one_lwp): Use lwpid_of.
10069 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10070 (linux_resume_one_thread): ... this. Handle resume_stop. In
10071 non-stop mode, don't look for pending flag in all threads.
10072 (resume_status_pending_p): Don't consider explicitly suspended
10074 (my_waitpid): Reimplement. Emulate __WALL.
10075 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10077 (sigchld_handler, linux_supports_non_stop, linux_async)
10078 (linux_start_non_stop): New.
10079 (linux_target_ops): Register linux_supports_non_stop, linux_async
10080 and linux_start_non_stop.
10081 (initialize_low): Install SIGCHLD handler.
10082 * thread-db.c (thread_db_create_event, find_one_thread)
10083 (thread_db_get_tls_address): Use lwpid_of.
10084 * win32-low.c (win32_detach): Adjust to use resume_kind.
10085 (win32_wait): Add `options' argument.
10086 * spu-low.c (spu_resume): Adjust to use resume_kind.
10087 (spu_wait): Add `options' argument.
10089 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10091 Decouple target code from remote protocol.
10093 * target.h (enum target_waitkind): New.
10094 (struct target_waitstatus): New.
10095 (struct target_ops) <wait>: Return an unsigned long. Take a
10096 target_waitstatus pointer instead of a char pointer.
10097 (mywait): Likewise.
10098 * target.c (mywait): Change prototype to return an unsigned long.
10099 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10100 * server.h (thread_from_wait, old_thread_from_wait): Delete
10102 (prepare_resume_reply): Change prototype to take a
10104 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10105 (last_status, last_ptid): New.
10106 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10107 pid instead of a signal.
10108 (attach_inferior): Remove "status" and "signal" parameters.
10110 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10112 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10113 (handle_v_requests, myresume): Remove "status" and "signal"
10114 parameters. Adjust.
10115 (handle_status): New.
10116 (main): Delete local `status'. Adjust.
10117 * remote-utils.c: Include target.h.
10118 (prepare_resume_reply): Change prototype to take a
10119 target_waitstatus. Adjust.
10121 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10123 * spu-low.c (spu_wait): Adjust.
10124 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10126 (win32_wait): Adjust.
10128 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10130 * target.h (struct thread_resume): Delete leave_stopped member.
10131 (struct target_ops): Add a `n' argument to the `resume' callback.
10132 * server.c (start_inferior): Adjust.
10133 (handle_v_cont, myresume): Adjust.
10134 * linux-low.c (check_removed_breakpoint): Adjust to resume
10135 interface change, and to removed leave_stopped field.
10136 (resume_ptr): Delete.
10137 (struct thread_resume_array): New.
10138 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10139 resume interface change.
10140 (linux_continue_one_thread, linux_queue_one_thread)
10141 (resume_status_pending_p): Check if the resume field is NULL
10142 instead of checking the leave_stopped member.
10143 (linux_resume): Adjust to the target resume interface change.
10144 * spu-low.c (spu_resume): Adjust to the target resume interface
10146 * win32-low.c (win32_detach, win32_resume): Ditto.
10148 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10150 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10152 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10154 (linux_continue_one_thread): Only preserve the stepping flag if
10155 there's a pending breakpoint.
10157 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10159 * server.c (main): After the inferior having exited, call
10160 remote_close before exiting gdbserver.
10162 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10164 Fix size of FPSCR in Power 7 processors.
10165 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10166 (PPC_FEATURE_HAS_DFP): New #define.
10167 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10170 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10172 * server.c (handle_query) Whitespace and formatting.
10174 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10176 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10177 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10178 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10179 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10180 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10181 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10182 Makefile.in, configure.ac: Fix whitespace throughout.
10183 * configure: Regenerate.
10185 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10187 * inferiors.c (find_inferior): Make it safe for the callback
10188 function to delete the currently iterated inferior.
10190 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10192 * Makefile.in (linuw_low_h): Move higher.
10193 (thread-db.o): Depend on $(linux_low_h).
10195 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10197 Rename "process" to "lwp" throughout.
10199 * linux-low.c (all_processes): Rename to...
10200 (all_lwps): ... this.
10201 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10202 (add_process): Rename to ...
10203 (add_lwp): ... this. Adjust.
10204 (linux_create_inferior): Adjust.
10205 (linux_attach_lwp): Adjust.
10206 (linux_attach): Adjust.
10207 (linux_kill_one_process): Rename to ...
10208 (linux_kill_one_lwp): ... this. Adjust.
10209 (linux_kill): Adjust.
10210 (linux_detach_one_process): Rename to ...
10211 (linux_detach_one_lwp): ... this. Adjust.
10212 (linux_detach): Adjust.
10213 (check_removed_breakpoint): Adjust.
10214 (status_pending_p): Adjust.
10215 (linux_wait_for_process): Rename to ...
10216 (linux_wait_for_lwp): ... this. Adjust.
10217 (linux_wait_for_event): Adjust.
10218 (send_sigstop): Adjust.
10219 (wait_for_sigstop): Adjust.
10220 (stop_all_processes): Rename to ...
10221 (stop_all_lwps): ... this.
10222 (linux_resume_one_process): Rename to ...
10223 (linux_resume_one_lwp): ... this. Adjust.
10224 (linux_set_resume_request, linux_continue_one_thread)
10225 (linux_queue_one_thread, resume_status_pending_p)
10226 (usr_store_inferior_registers, regsets_store_inferior_registers)
10227 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10229 * linux-low.h (get_process): Rename to ...
10230 (get_lwp): ... this. Adjust.
10231 (get_thread_process): Rename to ...
10232 (get_thread_lwp): ... this. Adjust.
10233 (get_process_thread): Rename to ...
10234 (get_lwp_thread): ... this. Adjust.
10235 (struct process_info): Rename to ...
10236 (struct lwp_info): ... this.
10237 (all_processes): Rename to ...
10238 (all_lwps): ... this.
10239 * proc-service.c (ps_lgetregs): Adjust.
10240 * thread-db.c (thread_db_create_event, find_one_thread)
10241 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10243 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10245 * server.c (handle_query): Handle "qAttached".
10247 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10249 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10250 GPLv3, update license URL.
10252 2009-03-01 Doug Evans <dje@google.com>
10254 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10255 (server_h): Add gdb_signals.h.
10256 (signals.o): Update.
10257 * server.h (target_signal_from_host,target_signal_to_host_p)
10258 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10260 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10262 * remote-utils.c (getpkt): Also generate remote-debug
10263 information if noack_mode is set.
10265 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10267 * server.c (handle_query): Report qXfer:siginfo:read and
10268 qXfer:siginfo:write as supported and handle them.
10269 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10270 * linux-low.c (linux_xfer_siginfo): New.
10271 (linux_target_ops): Set it.
10273 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10275 * server.c (gdbserver_usage): Mention --remote-debug.
10276 (main): Accept '--remote-debug' switch.
10278 2009-01-18 Doug Evans <dje@google.com>
10280 * regcache.c (new_register_cache): No need to check result of xcalloc.
10281 * server.c (handle_search_memory): Back out calls to xmalloc,
10282 result is checked and error is returned to user upon failure.
10283 (handle_query): Ditto. Add more checks for result of malloc.
10284 (handle_v_cont): Check result of malloc, report error back to
10286 (handle_v_run): Ditto. Call freeargv.
10287 * server.h (freeargv): Declare.
10288 * utils.c (freeargv): New fn.
10290 2009-01-15 Doug Evans <dje@google.com>
10292 * gdbreplay.c (perror_with_name): Make arg const char *.
10293 * server.h (target_signal_to_name): Make return type const char *.
10294 * thread-db.c (thread_db_err_str): Make return type const char *.
10295 * utils.c (perror_with_name): Make arg const char *.
10297 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10299 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10300 when handling a EXIT_PROCESS_DEBUG_EVENT.
10302 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10304 * gdbreplay.c (gdbreplay_version): Update copyright year.
10305 * server.c (gdbserver_version): Likewise.
10307 2009-01-05 Doug Evans <dje@google.com>
10309 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10310 (handle_extended_wait): Improve comment.
10312 2008-12-13 Doug Evans <dje@google.com>
10314 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10315 * server.h (ATTR_MALLOC): New macro.
10316 (xmalloc,xcalloc,xstrdup): Declare.
10317 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10318 * inferiors.c: Ditto.
10319 * linux-low.c: Ditto.
10320 * mem-break.c: Ditto.
10321 * regcache.c: Ditto.
10322 * remote-utils.c: Ditto.
10325 * win32-low.c: Ditto.
10327 2008-12-12 Doug Evans <dje@google.com>
10329 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10330 in debugging printf.
10332 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10334 2008-12-09 Doug Evans <dje@google.com>
10336 * linux-low.h (struct process_info): Delete member tid, unused.
10337 * thread-db.c (find_one_thread): Update.
10338 (maybe_attach_thread): Update.
10340 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10342 * target.h (struct target_ops): Add qxfer_osdata member.
10343 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10345 (linux_qxfer_osdata): New functions.
10346 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10348 * server.c (handle_query): Handle "qXfer:osdata:read:".
10349 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10350 (buffer_xml_printf): New functions.
10351 * server.h (struct buffer): New.
10352 (buffer_grow_str, buffer_grow_str0): New macros.
10353 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10354 (buffer_xml_printf): Declare.
10356 2008-11-24 Doug Evans <dje@google.com>
10358 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10360 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10362 * server.c (handle_v_run): Always use the supplied argument list.
10364 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10366 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10367 (xtensa_regmap_table): Add entry for scompare1.
10369 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10371 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10372 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10373 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10374 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10375 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10376 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10377 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10378 XML target descriptions.
10379 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10380 when inferior is running on an ISA 2.05 or later processor. Add
10381 special case to return offset for full 64-bit slot of FPSCR when
10384 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10386 * Makefile.in (SFILES, clean): Added sparc64 files.
10387 (reg-sparc64.o, reg-sparc64.c): New.
10388 * configure.srv (sparc*-*-linux*): New configuration.
10389 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10390 syscall arguments for SPARC.
10391 (regsets_store_inferior_registers): Likewise.
10392 * linux-sparc-low.c: New file.
10394 2008-10-21 Doug Evans <dje@google.com>
10396 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10397 (READLINE_DIR,READLINE_DEP): Delete.
10398 (INTERNAL_CFLAGS): Update.
10399 (LINTFLAGS): Update.
10401 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10403 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10404 whole argv from the last run, not just argv[0].
10406 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10408 * regcache.c (new_register_cache): Return NULL if the register
10409 cache size isn't known yet.
10410 (free_register_cache): Avoid dereferencing a NULL regcache.
10412 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10414 * configure.srv: Merge MIPS and MIPS64.
10416 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10418 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10420 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10422 * Makefile.in: Add required vsx dependencies.
10424 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10425 Declare init_registers_powerpc_vsx32l.
10426 Declare init_registers_powerpc_vsx64l.
10427 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10428 (ppc_arch_setup): Check for VSX in hwcap.
10429 (ppc_fill_vsxregset): New function.
10430 (ppc_store_vsxregset): New function.
10431 Add new VSX entry in regset_info target_regsets.
10433 * configure.srv: Add new VSX dependencies.
10435 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10437 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10438 (remote_open): Set or clear transport_is_reliable.
10439 (putpkt_binary): Don't expect acks in noack mode.
10440 (getpkt): Don't send ack/nac in noack mode.
10441 * server.c (handle_general_set): Handle QStartNoAckMode.
10442 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10444 (main): Reset noack_mode on every connection.
10445 * server.h (noack_mode): Declare.
10447 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10449 * Makefile.in (GDBREPLAY_OBS): New variable.
10450 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10452 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10453 Daniel Jacobowitz <dan@codesourcery.com>
10455 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10456 (usr_store_inferior_registers): Likewise.
10457 (regsets_store_inferior_registers): Likewise.
10459 2008-07-31 Rolf Jansen <rj@surtec.com>
10460 Pedro Alves <pedro@codesourcery.com>
10462 * configure.ac: Check for memmem declaration.
10463 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10464 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10465 (disable_packet_qfThreadInfo): Unconditionally compile.
10466 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10467 * configure, config.in: Regenerate.
10469 2008-07-28 Doug Kwan <dougkwan@google.com>
10471 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10472 (linux_write_memory): Remove declaration of errno.
10474 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10476 * linux-low.c (handle_extended_wait): Do not use "status"
10477 variable uninitialized.
10479 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10481 * server.c (handle_v_attach): Inhibit reporting dll changes.
10483 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10485 * remote-utils.c (prepare_resume_reply): If requested, don't
10486 output "thread:TID" in the T stop reply.
10488 * server.c (disable_packet_vCont, disable_packet_Tthread)
10489 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10490 (handle_query): If requested, disable support for qC, qfThreadInfo
10492 (handle_v_requests): If requested, disable support for vCont.
10493 (gdbserver_show_disableable): New.
10494 (main): Handle --disable-packet and --disable-packet=LIST.
10496 * server.h (disable_packet_vCont, disable_packet_Tthread)
10497 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10499 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10501 * server.c (gdbserver_usage): Mention --version.
10503 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10505 * Makefile.in (gdbreplay.o): New rule.
10507 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10509 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10510 message, not gdbserver.
10512 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10513 Nathan Sidwell <nathan@codesourcery.com>
10514 Joseph Myers <joseph@codesourcery.com>
10516 * acinclude.m4: Include ../../config/acx.m4.
10517 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10518 * configure, config.in: Regenerate.
10519 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10520 * server.c (gdbserver_version): Print PKGVERSION.
10521 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10522 (main): Adjust gdbserver_usage calls.
10523 * gdbreplay.c (version, host_name): Add declarations.
10524 (gdbreplay_version, gdbreplay_usage): New.
10525 (main): Accept --version and --help options.
10527 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10529 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10530 (arm_breakpoint_at): Handle Thumb.
10531 (the_low_target): Add comment.
10533 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10535 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10537 2008-05-09 Doug Evans <dje@google.com>
10539 * server.h (decode_search_memory_packet): Declare.
10540 * remote-utils.c (decode_search_memory_packet): New fn.
10541 * server.c (handle_search_memory_1): New fn.
10542 (handle_search_memory): New fn.
10543 (handle_query): Process qSearch:memory packets.
10545 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10547 * regcache.c (registers_length): Remove.
10548 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10549 full register packet.
10550 * regcache.h (registers_length): Remove prototype.
10551 * server.h (PBUFSIZ): Define to 16384.
10553 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10555 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10556 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10557 powerpc-64l.o, and powerpc-altivec64l.o.
10558 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10559 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10560 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10561 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10562 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10565 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10566 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10567 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10568 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10569 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10570 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10571 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10572 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10573 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10574 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10577 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10578 (init_registers_powerpc_32l): ... this new prototype.
10579 (init_registers_powerpc_32): Remove, replace by ...
10580 (init_registers_powerpc_altivec32l): ... this new prototype.
10581 (init_registers_powerpc_e500): Remove, replace by ...
10582 (init_registers_powerpc_e500l): ... this new prototype.
10583 (init_registers_ppc64): Remove, replace by ...
10584 (init_registers_powerpc_64l): ... this new prototype.
10585 (init_registers_powerpc_64): Remove, replace by ...
10586 (init_registers_powerpc_altivec64l): ... this new prototype.
10587 (ppc_num_regs): Set to 73.
10588 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10589 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10590 (ppc_cannot_store_register): Handle orig_r3 and trap.
10591 (ppc_arch_setup): Update init_registers_... calls.
10592 (ppc_fill_gregset): Handle orig_r3 and trap.
10594 * inferiors.c (clear_inferiors): Reset current_inferior.
10596 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10598 * acinclude.m4: Add override.m4.
10599 * configure: Regenerate.
10601 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10603 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10604 initial call to init_register_ppc64.
10606 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10608 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10609 single powerpc*-*-linux* case.
10610 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10612 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10614 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10615 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10617 * linux-ppc-low.c: Include <elf.h>.
10618 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10619 (ppc_hwcap): New global variable.
10620 (ppc_regmap): Remove __SPE__ #ifdef sections.
10621 (ppc_regmap_e500): New global variable.
10622 (ppc_cannot_store_register): Update __SPE__ special case.
10623 (ppc_get_hwcap): New function.
10624 (ppc_arch_setup): Use it to determine whether inferior supports
10625 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10626 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10627 Do not access registers if target does not support AltiVec.
10628 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10629 Do not access registers if target does not support SPE.
10630 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10632 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10634 * linux-low.c (disabled_regsets, num_regsets): New.
10635 (use_regsets_p): Delete.
10636 (linux_wait_for_process): Clear disabled_regsets.
10637 (regsets_fetch_inferior_registers): Check and set it.
10638 (regsets_store_inferior_registers): Likewise.
10639 (linux_fetch_registers, linux_store_registers): Do not use
10641 (initialize_low): Allocate disabled_regsets.
10643 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10645 * Makefile.in (LIBOBJS): New.
10646 (OBS): Use LIBOBJS.
10647 (memmem.o): New rule.
10648 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10649 * configure: Regenerated.
10651 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10653 * server.c (handle_query): Never return "unsupported" for
10654 qXfer:features:read queries.
10656 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10658 * server.c (get_features_xml): Fix inverted condition.
10659 (handle_query): Always support qXfer:feature:read.
10661 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10663 * server.c (wrapper_argv): New.
10664 (start_inferior): Handle wrapper_argv. If set, expect an extra
10666 (gdbserver_usage): Document --wrapper.
10667 (main): Parse --wrapper.
10669 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10671 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10672 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10673 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10674 (ppc_set_pc): Likewise.
10675 (ppc_arch_setup): New function.
10676 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10677 of collect_register.
10678 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10680 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10682 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10683 instead of linux-ppc64-low.o.
10684 * linux-ppc64-low.c: Remove file.
10685 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10686 (linux-ppc64-low.o): Remove rule.
10688 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10689 (init_registers_powerpc_64): Likewise.
10690 (ppc_regmap): Conditionally define depending on __powerpc64__.
10691 (ppc_cannot_store_register): Do not special-case "fpscr" when
10692 compiled on __powerpc64__.
10693 (ppc_collect_ptrace_register): New function.
10694 (ppc_supply_ptrace_register): New function.
10695 (ppc_breakpoint): Change type to "unsigned int".
10696 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10697 (the_low_target): Conditionally provide initializers for the
10698 arch_setup member depending on __powerpc64__. Install
10699 collect_ptrace_register and supply_ptrace_register members.
10701 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10703 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10704 * server.c (gdbserver_xmltarget): Define.
10705 (get_features_xml): Use it to replace "target.xml" and arch_string.
10707 * configure.srv: Remove srv_xmltarget. Add XML files that were
10708 mentioned there to srv_xmlfiles instead. Remove conditional tests
10709 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10710 srv_xmlfiles and srv_regobj to include all possible choices.
10711 * configure.ac (srv_xmltarget): Remove.
10712 (srv_xmlfiles): Do not add "target.xml".
10713 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10714 checks for supplementary target information.
10715 * configure: Regenerate.
10716 * Makefile.in (XML_TARGET): Remove.
10717 (target.xml): Remove rule.
10718 (clean): Do not clean up target.xml.
10719 (.PRECIOUS): Do not mention target.xml.
10721 * target.h (struct target_ops): Remove arch_string member.
10722 * linux-low.c (linux_arch_string): Remove.
10723 (linux_target_ops): Remove arch_string initializer.
10724 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10725 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10726 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10727 * spu-low.c (spu_arch_string): Remove.
10728 (spu_target_ops): Remove arch_string initializer.
10729 * win32-low.c (win32_arch_string): Remove.
10730 (win32_target_ops): Remove arch_string initializer.
10731 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10732 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10733 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10735 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10737 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10738 by collect_ptrace_register and supply_ptrace_register hooks.
10739 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10740 instead of checking for the_low_target.left_pad_xfer.
10741 (usr_store_inferior_registers): Use collect_ptrace_register callback
10742 instead of checking for the_low_target.left_pad_xfer.
10744 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10745 (s390_supply_ptrace_register): Likewise.
10746 (s390_fill_gregset): Call s390_collect_ptrace_register.
10747 (the_low_target): Update.
10749 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10750 (ppc_supply_ptrace_register): Likewise.
10751 (the_low_target): Update.
10753 * linux-i386-low.c (the_low_target): Update.
10754 * linux-x86-64-low.c (the_low_target): Update.
10756 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10758 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10759 reg-s390.o and reg-s390x.o.
10761 * linux-low.c (new_inferior): New global variable.
10762 (linux_create_inferior, linux_attach): Set it.
10763 (linux_wait_for_process): Call the_low_target.arch_setup after the
10764 target has stopped for the first time.
10765 (initialize_low): Do not call the_low_target.arch_setup.
10767 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10768 (s390_set_pc): Likewise.
10769 (s390_arch_setup): New function.
10770 (the_low_target): Use s390_arch_setup as arch_setup routine.
10772 * regcache.c (realloc_register_cache): New function.
10773 (set_register_cache): Call it for each existing regcache.
10775 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10777 * server.h (init_registers): Remove prototype.
10779 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10780 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10781 instead of init_registers ().
10782 * linux-arm-low.c (init_registers_arm): Add prototype.
10783 (init_registers_arm_with_iwmmxt): Likewise.
10784 (the_low_target): Add initializer for arch_setup field.
10785 * linux-cris-low.c (init_registers_cris): Add prototype.
10786 (the_low_target): Add initializer for arch_setup field.
10787 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10788 (the_low_target): Add initializer for arch_setup field.
10789 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10790 (the_low_target): Add initializer for arch_setup field.
10791 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10792 (the_low_target): Add initializer for arch_setup field.
10793 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10794 (the_low_target): Add initializer for arch_setup field.
10795 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10796 (the_low_target): Add initializer for arch_setup field.
10797 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10798 (init_registers_mips64_linux): Likewise.
10799 (the_low_target): Add initializer for arch_setup field.
10800 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10801 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10802 (the_low_target): Add initializer for arch_setup field.
10803 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10804 (init_registers_powerpc_64): Likewise.
10805 (the_low_target): Add initializer for arch_setup field.
10806 * linux-s390-low.c (init_registers_s390): Add prototype.
10807 (init_registers_s390x): Likewise.
10808 (the_low_target): Add initializer for arch_setup field.
10809 * linux-sh-low.c (init_registers_sh): Add prototype.
10810 (the_low_target): Add initializer for arch_setup field.
10811 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10812 (the_low_target): Add initializer for arch_setup field.
10813 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10814 (the_low_target): Add initializer for arch_setup field.
10816 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10817 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10818 instead of init_registers ().
10819 * win32-arm-low.c (init_registers_arm): Add prototype.
10820 (the_low_target): Add initializer for arch_setup field.
10821 * win32-i386-low.c (init_registers_i386): Add prototype.
10822 (the_low_target): Add initializer for arch_setup field.
10824 * spu-low.c (init_registers_spu): Add prototype.
10825 (initialize_low): Call initialie_registers_spu () instead of
10826 initialize_registers ().
10828 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10830 * server.c (handle_v_requests): When handling the vRun and vAttach
10831 packets, if already debugging a process, don't kill it. Return an
10834 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10836 * server.c (handle_query): Correct length check.
10838 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10840 * win32-low.c (do_initial_child_stuff): Add process handle
10841 parameter. Set current_process_handle and current_process_id from the
10842 parameters. Clear globals.
10843 (win32_create_inferior): Don't set current_process_handle and
10844 current_process_id here. Instead pass them on the call to
10845 do_initial_child_stuff.
10846 (win32_attach): Likewise.
10847 (win32_clear_inferiors): New.
10848 (win32_kill): Don't close the current process handle or the
10849 current thread handle here. Instead call win32_clear_inferiors.
10850 (win32_detach): Don't open a new handle to the process. Call
10851 win32_clear_inferiors.
10852 (win32_join): Don't rely on current_process_handle; open a new
10853 handle using the process id.
10854 (win32_wait): Call win32_clear_inferiors when the inferior process
10857 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10859 * server.c (monitor_show_help): Add "exit".
10861 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10863 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10864 (clean): Add reg-xtensa.c.
10865 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10866 * configure.srv (xtensa*-*-linux*) New target.
10867 * linux-xtensa-low.c: New.
10868 * xtensa-xtregs.c: New.
10870 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10872 * hostio.c: Don't include errno.h.
10873 (errno_to_fileio_errno): Move to hostio-errno.
10874 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10875 error number outputting to the target->hostio_last_error callback.
10876 (hostio_packet_error): Use FILEIO_EINVAL directly.
10877 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10878 calls to hostio_error.
10879 * hostio-errno.c: New.
10880 * server.h (hostio_last_error_from_errno): Declare.
10881 * target.h (target_ops): Add hostio_last_error member.
10882 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10883 as hostio_last_error handler.
10884 * spu-low.c (spu_target_ops): Likewise.
10885 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10886 (wince_hostio_last_error): New functions.
10887 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10888 as hostio_last_error handler.
10889 (win32_target_ops) [!_WIN32_WCE]: Register
10890 hostio_last_error_from_errno as hostio_last_error handler.
10891 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10892 (hostio-errno.o): New rule.
10893 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10894 * configure.srv (srv_hostio_err_objs): New variable. Default to
10896 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10897 * configure: Regenerate.
10899 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10901 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10902 (linux_kill, linux_detach): Clean up the process list.
10903 * remote-utils.c (remote_open): Improve port number parsing.
10904 (putpkt_binary, input_interrupt): Only send interrupts if the target
10906 * server.c (extended_protocol): Make static.
10907 (attached): Define earlier.
10908 (exit_requested, response_needed, program_argv): New variables.
10909 (target_running): New.
10910 (start_inferior): Clear attached here.
10911 (attach_inferior): Set attached here.
10912 (require_running): Define.
10913 (handle_query): Use require_running and target_running. Implement
10915 (handle_v_attach, handle_v_run): New.
10916 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10917 (gdbserver_usage): Update.
10918 (main): Redo argument parsing. Handle --debug and --multi. Handle
10919 --attach along with other options or after the port. Save
10920 program_argv. Support no initial program. Resynchronize
10921 communication with GDB after an error. Handle "monitor exit".
10922 Use require_running and target_running. Always allow the extended
10923 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10924 restart in extended mode.
10925 * README: Refer to the GDB manual. Update --attach usage.
10927 2007-12-20 Andreas Schwab <schwab@suse.de>
10929 * linux-low.c (STACK_SIZE): Define.
10930 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10931 (linux_test_for_tracefork): Likewise.
10933 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10935 * linux-low.c (linux_wait_for_event): Update messages. Do not
10936 reinsert auto-delete breakpoints.
10937 * mem-break.c (struct breakpoint): Change return type of handler to
10939 (set_breakpoint_at): Update handler type.
10940 (reinsert_breakpoint_handler): Return 1 instead of calling
10942 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10944 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10945 * mem-break.h (set_breakpoint_at): Update handler type.
10946 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10947 * win32-low.c (auto_delete_breakpoint): New.
10948 (get_child_debug_event): Use it.
10950 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10952 * configure.ac: Check for pread and pwrite.
10953 * hostio.c (handle_pread): Fall back to lseek and read.
10954 (handle_pwrite): Fall back to lseek and write.
10955 * config.in, configure: Regenerated.
10957 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10959 * server.c (myresume): Add own_buf argument.
10960 (main): Update calls.
10962 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10964 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10965 * remote-utils.c (remote_open): Do not call disable_async_io.
10966 (block_async_io): Delete.
10967 (unblock_async_io): Make static.
10968 (initialize_async_io): New.
10969 * server.c (handle_v_cont): Handle async I/O here.
10970 (myresume): Likewise. Move other common resume tasks here...
10971 (main): ... from here. Call initialize_async_io. Disable async
10972 I/O before the main loop.
10973 * server.h (initialize_async_io): Declare.
10974 (block_async_io, unblock_async_io): Delete prototypes.
10975 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10977 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10979 * remote-utils.c (readchar): Allow binary data in received messages.
10981 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10983 * win32-low.c (attaching): New global.
10984 (win32_create_inferior): Clear the `attaching' global.
10985 (win32_attach): Set the `attaching' global.
10986 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10987 attaching. Only set a breakpoint at the entry point if not
10990 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10992 * server.c (main): Don't report dll events on the initial
10993 connection on attaches.
10995 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10997 * server.c (main): Relax numerical bases supported for the pid of
10998 the --attach command line argument.
11000 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11002 * win32-low.c (win32_attach): Call OpenProcess before
11003 DebugActiveProcess, not after. Add last error output to error
11006 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11008 * win32-low.c (win32_get_thread_context)
11009 (win32_set_thread_context): New functions.
11010 (thread_rec): Use win32_get_thread_context.
11011 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11012 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11015 2007-12-03 Leo Zayas
11016 Pedro Alves <pedro_alves@portugalmail.pt>
11018 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11020 (child_add_thread): Minor cleanup.
11021 (child_continue): Resume artificially suspended threads before
11022 calling ContinueDebugEvent.
11023 (suspend_one_thread): New.
11024 (fake_breakpoint_event): New.
11025 (get_child_debug_event): Change return type to int. Check here if
11026 gdb sent an interrupt request. If a soft interrupt was requested,
11027 fake a breakpoint event. Return 0 if there is no event to handle,
11029 (win32_wait): Don't check here if gdb sent an interrupt request.
11030 Ensure there is a valid event to handle.
11031 (win32_request_interrupt): Add soft interruption method as last
11034 2007-12-03 Leo Zayas
11035 Pedro Alves <pedro_alves@portugalmail.pt>
11037 * win32-low.h (win32_thread_info): Add descriptions to the
11038 structure members. Replace `suspend_count' counter by a
11040 * win32-low.c (thread_rec): Update condition of when to get the
11041 context from the inferior. Rely on ContextFlags being set if it
11042 has already been retrieved. Only suspend the inferior thread if
11043 we haven't already. Warn if that fails.
11044 (continue_one_thread): s/suspend_count/suspended/. Only call
11045 ResumeThread once. Warn if that fails.
11047 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11049 * win32-low.c (win32_wait): Don't read from the inferior when it
11050 has already exited.
11052 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11054 * Makefile.in (win32_low_h): New variable.
11055 (win32-low.o): Add dependency on $(win32_low_h).
11056 (win32-arm-low.o, win32-i386-low.o): New rules.
11058 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11060 * hostio.c: Correct copyright year.
11062 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11064 * Makefile.in (OBS): Add hostio.o.
11065 (hostio.o): New rule.
11066 * server.h (handle_vFile): Declare.
11067 * hostio.c: New file.
11068 * server.c (handle_v_requests): Take packet_len and new_packet_len
11069 for binary packets. Call handle_vFile.
11070 (main): Update call to handle_v_requests.
11072 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11074 * linux-low.c: Include <sched.h>.
11076 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11078 * linux-low.c (linux_tracefork_grandchild): New.
11079 (linux_tracefork_child): Use clone.
11080 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11082 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11084 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11086 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11088 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11090 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11092 * inferiors.c (change_inferior_id): Delete.
11093 (add_pid_to_list, pull_pid_from_list): New.
11094 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11095 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11096 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11097 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11098 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11099 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11100 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11101 (using_threads): Always set to 1.
11102 (handle_extended_wait): New.
11103 (add_process): Do not set TID.
11104 (linux_create_inferior): Set must_set_ptrace_flags.
11105 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11106 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11107 (linux_thread_alive): Rename TID argument to LWPID.
11108 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11109 (linux_wait_for_event): Do not use TID or check using_threads. Update
11110 call to dead_thread_notify. Call handle_extended_wait.
11111 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11112 (send_sigstop): Delete sigstop_sent.
11113 (wait_for_sigstop): Avoid TID.
11114 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11115 (linux_test_for_tracefork): New.
11116 (linux_lookup_signals): Use thread_db_active and
11117 linux_supports_tracefork_flag.
11118 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11119 * linux-low.h (get_process_thread): Avoid TID.
11120 (struct process_ifo): Move thread_known and tid to the end. Remove
11122 (linux_attach_lwp, thread_db_init): Update prototypes.
11123 * server.h (change_inferior_id): Delete prototype.
11124 (add_pid_to_list, pull_pid_from_list): New prototypes.
11125 * thread-db.c (thread_db_use_events): New.
11126 (find_first_thread): Rename to...
11127 (find_one_thread): ...this. Update callers and messages. Do not
11128 call fatal. Check thread_db_use_events. Do not call
11129 change_inferior_id or new_thread_notify.
11130 (maybe_attach_thread): Update. Do not call new_thread_notify.
11131 (thread_db_init): Set thread_db_use_events. Check use_events.
11132 * utils.c (fatal, warning): Correct message prefix.
11134 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11136 * Makefile.in (clean): Remove new files.
11137 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11138 (powerpc-64.o, powerpc-64.c): New rules.
11139 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11140 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11142 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11144 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11145 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11146 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11147 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11148 (target_regsets): Add AltiVec and SPE register sets.
11149 * configure.ac: Check for AltiVec and SPE.
11150 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11151 (ppc_fill_vrregset, ppc_store_vrregset): New.
11152 (target_regsets): Add AltiVec register set.
11153 * configure: Regenerated.
11155 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11157 * linux-low.c (O_LARGEFILE): Define.
11158 (linux_read_memory): Use /proc/PID/mem.
11159 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11160 * configure, config.in: Regenerated.
11162 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11164 * linux-low.c (linux_wait_for_event): Do not pass signals while
11167 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11169 * win32-low.c (create_process): New.
11170 (win32_create_inferior): Use create_process instead of
11171 CreateProcess. If create_process failed retry appending an ".exe"
11172 suffix. Store the GetLastError result immediatelly after
11173 create_process calls and use it on the call to error.
11175 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11177 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11179 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11181 * configure.ac: Switch license to GPLv3.
11183 2007-08-01 Michael Snyder <msnyder@access-company.com>
11185 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11187 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11189 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11191 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11192 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11193 CloseToolhelp32Snapshot.
11194 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11195 CloseToolhelp32Snapshot.
11197 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11199 * server.c (main): Check for inferior exit before main loop.
11201 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11203 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11204 instead of on tmp_desc.
11206 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11207 Daniel Jacobowitz <dan@codesourcery.com>
11209 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11210 (add_thread): Minor cleanups.
11211 (clear_inferiors): Move lower in the file. Clear the DLL
11213 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11214 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11215 (xml_escape_text): New.
11216 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11218 (handle_v_cont): Report errors.
11219 (gdbserver_version): Update.
11220 (main): Correct size of own_buf. Do not report initial DLL events.
11221 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11222 (unloaded_dll, xml_escape_text): New.
11223 * win32-low.c (enum target_waitkind): Update comments.
11224 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11225 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11226 (win32_EnumProcessModules, win32_GetModuleInformation)
11227 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11228 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11229 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11230 (win32_Module32First, win32_Module32Next, load_toolhelp)
11231 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11232 (get_child_debug_event): Handle DLL events.
11233 (win32_wait): Likewise.
11235 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11237 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11238 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11240 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11242 * win32-low.c (handle_output_debug_string): Ignore event if not
11245 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11247 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11249 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11251 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11253 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11255 * inferiors.c (change_inferior_id): Add comment.
11256 * linux-low.c (check_removed_breakpoint): Add an early
11257 prototype. Improve debug output.
11258 (linux_attach): Doc update.
11259 (linux_detach_one_process, linux_detach): Clean up before releasing
11261 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11262 * linux-low.h (struct process_info): Doc improvement.
11263 * mem-break.c (delete_all_breakpoints): New.
11264 * mem-break.h (delete_all_breakpoints): New prototype.
11265 * thread-db.c (find_first_thread): New.
11266 (thread_db_create_event): Call it instead of
11267 thread_db_find_new_threads. Clean up unused variables.
11268 (maybe_attach_thread): Remove first thread handling.
11269 (thread_db_find_new_threads): Use find_first_thread.
11270 (thread_db_get_tls_address): Likewise.
11272 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11274 * thread-db.c (thread_db_find_new_threads): Add prototype.
11275 (thread_db_create_event): Check for the main thread before adding
11277 (maybe_attach_thread): Only enable event reporting if TID == 0.
11278 (thread_db_get_tls_address): Check for new threads.
11280 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11282 * linux-low.c (linux_create_inferior): Try execv before execvp.
11283 * spu-low.c (spu_create_inferior): Likewise.
11285 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11287 * linux-low.c (linux_create_inferior): Change execv to execvp.
11288 * spu-low.c (spu_create_inferior): Likewies.
11290 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11292 * Makefile.in (clean): Clean new files instead of deleted ones.
11293 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11294 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11296 * configure.srv: Specify XML files and new regformats for MIPS and
11298 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11299 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11300 an entry for the restart register.
11301 (mips_cannot_fetch_register, mips_cannot_store_register)
11302 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11303 register names to match the XML descriptions.
11304 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11305 restart register instead of $0.
11307 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11308 Markus Deuling <deuling@de.ibm.com>
11310 * remote-utils.c (decode_xfer_write): New function.
11311 * server.h (decode_xfer_write): Add prototype.
11312 * server.c (handle_query): Add PACKET_LEN argument. Support
11313 qXfer:spu:read and qXfer:spu:write packets.
11314 (main): Pass packet_len to handle_query.
11315 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11316 * target.h (target_ops): Add qxfer_spu.
11318 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11320 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11321 accessing non-seekable spufs files.
11323 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11325 * server.c (handle_query): Add reply for qC packet.
11327 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11328 Leo Zayas <lerele@champenstudios@com>
11330 * server.h (check_remote_input_interrupt_request): New function.
11331 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11332 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11333 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11334 (check_remote_input_interrupt_request): New function.
11335 * server.h (check_remote_input_interrupt_request): Declare.
11336 * win32-low.c (winapi_DebugBreakProcess,
11337 winapi_GenerateConsoleCtrlEvent): New typedefs.
11338 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11340 (win32_wait): Check for remote interrupt request
11341 with check_remote_input_interrupt_request.
11342 (win32_request_interrupt): New function.
11343 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11345 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11347 * win32-low.c (debug_registers_changed,
11348 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11349 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11350 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11351 (thread_rec): Get context using the low target.
11352 (child_add_thread): Call thread_added on the low target,
11353 which does the same thing.
11355 (do_initial_child_stuff): Remove debug registers references.
11356 Set context using the low target. Resume threads after
11357 setting the contexts.
11358 (child_continue): Remove dead variable. Remove debug
11359 registers references.
11360 (child_fetch_inferior_registers): Go through the low target.
11361 (do_child_store_inferior_registers): Remove.
11362 (child_store_inferior_registers): Go through the low target.
11363 (win32_resume): Remove debug registers references.
11364 Set context using the low target.
11365 (handle_exception): Change return type to void. Don't record
11366 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11367 first chance exception.
11368 (get_child_debug_event): Change return type to void. Remove
11369 goto loop. Always return after waiting for debug event.
11370 (win32_wait): Convert to switch statement. Handle spurious
11373 * win32-i386-low.c (debug_registers_changed,
11374 debug_registers_used): New.
11375 (initial_stuff): Rename to ...
11376 (i386_initial_stuff): ... this. Clear debug registers
11378 (store_debug_registers): Delete.
11379 (i386_get_thread_context): New.
11380 (load_debug_registers): Delete.
11381 (i386_set_thread_context): New.
11382 (i386_thread_added): New.
11383 (single_step): Rename to ...
11384 (i386_single_step): ... this.
11385 (do_fetch_inferior_registers): Rename to ...
11386 (i386_fetch_inferior_register): ... this.
11387 (i386_store_inferior_register): New.
11388 (the_low_target): Adapt to new interface.
11390 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11391 (arm_get_thread_context): New.
11392 (arm_set_thread_context): New.
11394 (do_fetch_inferior_registers): Rename to ...
11395 (arm_fetch_inferior_register): ... this.
11396 (arm_store_inferior_register): New.
11397 (arm_wince_breakpoint): Reimplement as unsigned long.
11398 (arm_wince_breakpoint_len): Define.
11399 (the_low_target): Adapt to new interface.
11401 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11402 load_debug_registers. Add get_thread_context, set_thread_context,
11403 thread_added and store_inferior_register. Rename
11404 fetch_inferior_registers to fetch_inferior_register.
11405 (regptr): Remove declaration.
11407 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11409 * linux-low.c (linux_detach): Change return type to int. Return 0.
11410 * spu-low.c (spu_detach): Likewise.
11412 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11414 * target.h (target_ops): Change return type of detach to int.
11416 (join_inferior): New.
11417 * server.c (main): Don't skip detach support on mingw32.
11418 If the inferior doesn't support detaching return error.
11419 Call join_inferior instead of using waitpid.
11420 * linux-low.c (linux_join): New.
11421 (linux_target_op): Add linux_join.
11422 * spu-low.c (spu_join): New.
11423 (spu_target_ops): Add spu_join.
11424 * win32-low.c (win32_detach): Adapt to new interface.
11425 Reopen current_process_handle before detaching. Issue a child
11426 resume before detaching.
11428 (win32_target_op): Add win32_join.
11430 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11432 * win32-low.c (win32-attach): Fix return value.
11433 * target.h (target_ops): Describe ATTACH return values.
11435 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11437 * win32-low.c (GETPROCADDRESS): Define.
11438 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11439 (winapi_DebugSetProcessKillOnExit): Likewise.
11440 (win32_create_inferior): Force usage of ansi CreateProcessA.
11441 (win32_attach): Use GETPROCADDRESS.
11442 (win32_detach): Likewise.
11444 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11446 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11448 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11450 * win32-low.c: Commit leftover changes from 2007-03-29.
11452 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11454 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11455 fields short instead of int. Add explicit padding.
11456 (i387_cache_to_fsave): Remove unnecessary casts.
11457 (i387_fsave_to_cache): Doc fix.
11458 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11460 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11462 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11463 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11465 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11467 * configure.srv (arm*-*-mingw32ce*): Move near the other
11470 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11472 * configure.ac: Add errno checking.
11473 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11474 sys/file.h and malloc.h.
11475 (AC_CHECK_DECLS): Add perror.
11476 (srv_mingwce): Handle.
11477 * configure.srv (i[34567]86-*-cygwin*): Add
11478 win32-i386-low.o to srv_tgtobj.
11479 (i[34567]86-*-mingw*): Likewise.
11480 (arm*-*-mingw32ce*): Add case.
11481 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11482 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11483 [__MINGW32CE__] (strerror): New function.
11484 [__MINGW32CE__] (errno): Define to GetLastError.
11485 [__MINGW32CE__] (COUNTOF): New macro.
11486 (remote_open): Remove extra close call.
11487 * mem-break.c (delete_breakpoint_at): New function.
11488 * mem-break.h (delete_breakpoint_at): Declare.
11489 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11490 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11491 [USE_WIN32API] (read, write): Add char* casts.
11492 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11493 * server.h: Include wincecompat.h on Windows CE.
11494 [HAVE_ERRNO_H]: Check.
11495 (perror): Declare if not declared.
11496 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11497 (perror_with_name): Remove errno declaration.
11498 * wincecompat.h: New.
11499 * wincecompat.c: New.
11500 * win32-low.h: New.
11501 * win32-arm-low.c: New.
11502 * win32-i386-low.c: New.
11503 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11504 (OUTMSG2): Make it safe.
11506 (COUNTOF): New macro.
11507 (NUM_REGS): Get it from the low target.
11508 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11509 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11510 (thread_rec): Let low target handle debug registers.
11511 (child_add_thread): Likewise.
11512 (child_init_thread_list): Likewise.
11513 (continue_one_thread): Likewise.
11515 (do_child_fetch_inferior_registers): Move to ...
11516 * win32-i386-low.c: ... here, and rename to ...
11517 (do_fetch_inferior_registers): ... this.
11518 * win32-low.c (child_fetch_inferior_registers):
11519 Go through the low target.
11520 (do_child_store_inferior_registers): Use regptr.
11521 (strwinerror): New function.
11522 (win32_create_inferior): Handle Windows CE.
11523 Use strwinerror instead of strerror on Windows error
11524 codes. Add program to the error output.
11525 Don't close the main thread handle on Windows CE.
11526 (win32_attach): Use coredll.dll on Windows CE.
11527 (win32_kill): Close current process and current
11529 (win32_detach): Use coredll.dll on Windows CE.
11530 (win32_resume): Let low target handle debug registers, and
11532 (handle_exception): Add/Remove initial breakpoint. Avoid
11533 non-existant WSTOPSIG on Windows CE.
11534 (win32_read_inferior_memory): Cast to remove warning.
11535 (win32_arch_string): Go through the low target.
11536 (initialize_low): Call set_breakpoint_data with the low
11537 target's breakpoint.
11538 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11539 FOP_REGNUM, mappings): Move to ...
11540 * win32-i386-low.c: ... here.
11541 * win32-low.c (win32_thread_info): Move to ...
11542 * win32-low.h: ... here.
11543 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11544 win32-arm-low.c and wincecompat.c.
11545 (all:): Add $EXEEXT.
11546 (install-only:): Likewise.
11547 (gdbserver:): Likewise.
11548 (gdbreplay:): Likewise.
11549 * config.in: Regenerate.
11550 * configure: Regenerate.
11552 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11554 * win32-low.c: Rename typedef thread_info to
11555 win32_thread_info throughout.
11557 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11559 * win32-i386-low.c: Rename to ...
11560 * win32-low.c: ... this.
11561 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11562 * Makefile.in: Likewise.
11564 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11566 * remote-utils.c (monitor_output): Constify msg parameter.
11567 * server.h (monitor_output): Likewise.
11568 * win32-i386-low.c (handle_output_debug_string): New.
11569 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11570 handle_output_debug_string.
11571 (get_child_debug_event): Likewise.
11573 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11575 * server.c (main): Correct strtoul check.
11577 2007-03-27 Jon Ringle <jon@ringle.org>
11579 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11581 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11583 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11585 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11587 * terminal.h: Check HAVE_SGTTY_H.
11589 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11591 * remote-utils.c (remote_open): Print out the assigned port number.
11593 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11595 * remote-utils.c (monitor_output): New function.
11596 * server.c (debug_threads): Define here.
11597 (monitor_show_help): New function.
11598 (handle_query): Handle qRcmd.
11599 (main): Do not handle 'd' packet.
11600 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11601 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11604 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11606 * Makefile.in (EXEEXT): New.
11607 (clean): Use $(EXEEXT).
11609 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11611 * target.h (target_ops): Rename send_signal to request_interrupt,
11612 and remove enum target_signal parameter.
11613 * linux-low.c (linux_request_interrupt): Rename from
11614 linux_send_signal, and always send SIGINT.
11615 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11616 and always send SIGINT.
11617 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11619 (input_interrupt): Likewise.
11621 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11623 * server.c (get_features_xml): Check if target implemented
11625 * win32-i386-low.c (win32_arch_string): New.
11626 (win32_target_ops): Add win32_arch_string as arch_string member.
11628 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11630 * spu-low.c (spu_arch_string): New.
11631 (spu_target_ops): Add spu_arch_string.
11633 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11635 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11636 * configure.ac: Do not check for terminal.h.
11637 * configure, config.in: Regenerated.
11639 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11641 * Makefile.in (OBS): Add $(XML_BUILTIN).
11642 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11644 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11645 (arm-with-iwmmxt.c): New.
11646 * config.in, configure: Regenerate.
11647 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11648 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11649 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11650 (arm*-*-linux*): Add iWMMXt and regset support.
11651 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11652 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11653 (arm_store_wmmxregset, target_regsets): New.
11654 * server.c (get_features_xml): Take annex argument. Check builtin
11656 (handle_query): Handle multiple annexes.
11658 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11660 * remote-utils.c [USE_WIN32API] (read, write): Define.
11661 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11664 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11666 * linux-i386-low.c (the_low_target): Set arch_string.
11667 * linux-x86-64-low.c (the_low_target): Likewise.
11668 * linux-low.c (linux_arch_string): New.
11669 (linux_target_ops): Add it.
11670 * linux-low.h (struct linux_target_ops): Add arch_string.
11671 * server.c (write_qxfer_response): Use const void * for DATA.
11672 (get_features_xml): New.
11673 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11674 * target.h (struct target_ops): Add arch_string method.
11676 2007-01-03 Denis Pilat <denis.pilat@st.com>
11677 Daniel Jacobowitz <dan@codesourcery.com>
11679 * linux-low.c (linux_kill): Handle being called with no threads.
11680 * win32-i386-low.c (win32_kill): Likewise.
11681 (get_child_debug_event): Clear current_process_handle.
11683 2006-12-30 Denis PILAT <denis.pilat@st.com>
11684 Daniel Jacobowitz <dan@codesourcery.com>
11686 * remote-utils.c (remote_open): Check the type of specified
11687 serial port devices before opening them.
11688 * server.c (main): Kill the inferior if an error occurs during
11689 the first remote_open.
11691 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11693 * README: Update supported targets.
11695 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11697 * Makefile.in (clean): Remove reg-mips64.c.
11698 (reg-mips64.c, reg-mips64.o): New rules.
11699 * configure.srv: Handle mips64. Include regset support for mips.
11700 * linux-mips-low.c (union mips_register): New.
11701 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11702 (mips_breakpoint, mips_breakpoint_at): Use int.
11703 (mips_collect_register, mips_supply_register)
11704 (mips_collect_register_32bit, mips_supply_register_32bit)
11705 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11706 (mips_store_fpregset, target_regsets): New.
11707 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11709 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11711 * configure.srv: Add target "spu*-*-*".
11712 * Makefile.in (clean): Remove reg-spu.c.
11713 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11714 * spu-low.c: New file.
11716 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11718 * configure.ac: Correct td_thr_tls_get_addr test.
11719 * configure: Regenerated.
11721 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11723 * linux-low.c (linux_wait_for_event): Reformat. Use the
11724 pass_signals array.
11725 * remote-utils.c (decode_address_to_semicolon): New.
11726 * server.c (pass_signals, handle_general_set): New.
11727 (handle_query): Mention QPassSignals for qSupported.
11728 (main): Call handle_general_set.
11729 * server.h (pass_signals, decode_address_to_semicolon): New.
11731 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11733 * server.c (handle_query): Correct error handling for read_auxv.
11735 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11737 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11738 and srv_linux_thread_db to yes.
11739 * linux-s390-low.c (s390_fill_gregset): New function.
11740 (target_regsets): Define data structure.
11742 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11744 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11745 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11746 * config.in, configure: Regenerated.
11747 * inferiors.c (gdb_id_to_thread): New function.
11748 (gdb_id_to_thread_id): Use it.
11749 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11750 * linux-low.h (struct process_info): Add th member.
11751 (thread_db_get_tls_address): New prototype.
11752 * remote-utils.c (decode_address): Make non-static.
11753 * server.c (handle_query): Handle qGetTLSAddr.
11754 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11755 * target.h (struct target_ops): Add get_tls_address.
11756 * thread-db.c (maybe_attach_thread): Save the thread handle.
11757 (thread_db_get_tls_address): New.
11759 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11761 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11762 (linux_resume_one_process): Take a siginfo_t *. Update all
11763 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11764 (struct pending_signals): Add a siginfo_t.
11765 (linux_wait_for_process): Always set last_status.
11766 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11767 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11768 * linux-low.h (struct process_info): Add last_status.
11770 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11772 * remote-utils.c (try_rle): New function.
11773 (putpkt_binary): Use it.
11775 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11777 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11778 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11779 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11780 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11781 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11784 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11786 * server.c (terminal_fd): New variable.
11787 (old_foreground_pgrp): Likewise.
11788 (restore_old_foreground_pgrp): New function.
11789 (start_inferior): Record the terminal file descriptor in terminal_fd
11790 and its original foreground group in old_foreground_pgrp. Register
11791 restore_old_foreground_pgrp with atexit().
11793 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11795 * server.c (handle_query): Correct qPart to qXfer.
11797 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11799 * configure.ac: Check for more headers which are missing on
11800 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11801 * configure.srv: Add Cygwin and mingw32.
11802 * remote-utils.c: Don't include headers unconditionally which
11803 are missing on mingw32. Include <winsock.h> for mingw32.
11804 (remote_open): Adjust for mingw32 support. Flush
11805 standard error after writing to it.
11806 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11807 (unblock_async_io, enable_async_io, disable_async_io)
11808 (readchar, getpkt): Update for Winsock support.
11809 (prepare_resume_reply): Expect a protocol signal number.
11810 * server.c: Disable <sys/wait.h> on mingw32.
11811 (start_inferior): Adjust for mingw32 support. Flush
11812 standard error after writing to it.
11813 (attach_inferior): Likewise. Use protocol signal
11815 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11817 * win32-i386-low.c: New file.
11818 * Makefile.in (XM_CLIBS): Set.
11819 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11820 (win32-i386-low.o): New dependency rule.
11821 * linux-low.c (linux_wait): Use target signal numbers.
11822 * target.h (struct target_ops): Doc fix.
11823 * server.h (target_signal_to_name): New prototype.
11824 * gdbreplay.c: Don't include headers unconditionally which
11825 are missing on mingw32. Include <winsock.h> for mingw32.
11826 (remote_close, remote_open): Adjust for Winsock support.
11827 * configure, config.in: Regenerated.
11829 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11831 * server.c (decode_xfer_read, write_qxfer_response): New.
11832 (handle_query): Take a packet length argument. Handle
11833 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11834 the qSupported response.
11835 (main): Update call to handle_query.
11837 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11839 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11840 (putpkt_binary): Renamed from putpkt and adjusted for binary
11842 (putpkt): New wrapper for putpkt_binary.
11843 (readchar): Don't mask off the high bit.
11844 (decode_X_packet): New function.
11845 * server.c (main): Call putpkt_binary if a handler sets the packet
11846 length. Save the length of the incoming packet. Handle 'X'.
11847 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11849 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11851 * server.c (handle_query): Handle qSupported.
11853 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11855 * remote-utils.c (all_symbols_looked_up): New variable.
11856 (look_up_one_symbol): Check it.
11857 * server.h (look_up_one_symbol): New declaration.
11858 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11860 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11862 * Makefile.in (linux-arm-low.o): Update dependencies.
11863 * linux-arm-low.c: Include "gdb_proc_service.h".
11864 (PTRACE_GET_THREAD_AREA): Define.
11865 (ps_get_thread_area): New function.
11867 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11869 * configure.srv (m68k*-*-uclinux*): New target.
11870 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11871 (linux_resume_one_process): Remove extraneous cast.
11872 (linux_read_offsets): New.
11873 (linux_target_op): Add linux_read_offsets on mmuless systems.
11874 * server.c (handle_query): Add qOffsets logic.
11875 * target.h (struct target_ops): Add read_offsets.
11877 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11879 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11880 (PTRACE_GET_THREAD_AREA): Define.
11881 (ps_get_thread_area): New function.
11882 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11883 (linux-x86-64-low.o): Update.
11885 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11887 * configure.ac: Remove checks for prfpregset_t.
11888 * gdb_proc_service.h: New file.
11889 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11890 new "gdb_proc_service.h".
11891 * proc-service.c: Likewise.
11892 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11893 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11894 * Makefile.in (gdb_proc_service_h): Updated.
11895 * configure, config.in: Regenerated.
11897 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11899 * remote-utils.c (prepare_resume_reply): Move declaration
11900 of gdb_id_from_wait to the top of the block.
11902 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11904 * linux-low.c (regsets_store_inferior_registers): Read the regset
11905 from the target before filling it.
11907 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11909 * server.c (attach_inferior): Return SIGTRAP for a successful
11912 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11914 * Makefile.in (OBS): Add version.o.
11915 (STAGESTUFF): Delete.
11916 (version.o): Add dependencies.
11917 (version.c): Replace rule.
11918 (clean): Remove version.c.
11919 * server.c (gdbserver_version): New.
11920 (gdbserver_usage): Use printf.
11921 (main): Handle --version and --help.
11922 * server.h (version, host_name): Add declarations.
11924 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11936 * linux-x86-64-low.c:
11938 * linux-s390-low.c:
11939 * linux-ppc64-low.c:
11941 * linux-mips-low.c:
11942 * linux-m68k-low.c:
11943 * linux-m32r-low.c:
11946 * linux-ia64-low.c:
11947 * linux-i386-low.c:
11948 * linux-crisv32-low.c:
11960 * gdbserver.1: Add (C) after Copyright. Update the FSF
11963 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11965 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11966 (arm_breakpoint_at): Recognize both breakpoints.
11967 (the_low_target): Use the correct breakpoint instruction.
11969 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11971 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11972 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11973 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11974 (the_low_target): Update.
11976 2005-10-25 Andreas Schwab <schwab@suse.de>
11978 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11980 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11981 (ia64_num_regs): Reduce to 462.
11983 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11985 * acinclude.m4: Correct quoting.
11986 * aclocal.m4: Regenerated.
11988 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11989 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11990 (thread_db_init): Call thread_db_err_str.
11991 * configure.ac: Check for TD_VERSION.
11992 * config.in, configure: Regenerated.
11994 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11996 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11998 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12000 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12001 is not available. Define HAVE_PTRACE_GETREGS if it is.
12002 * config.in, configure: Regenerated.
12003 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12004 * linux-i386-low.c, linux-m68k-low.c: Update to use
12005 HAVE_PTRACE_GETREGS.
12006 * linux-low.c (regsets_fetch_inferior_registers)
12007 (regsets_store_inferior_registers): Only return 0 if we processed
12009 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12010 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12012 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12014 * inferiors.c (struct thread_info): Add gdb_id.
12015 (add_thread): Add gdb_id argument.
12016 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12017 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12018 calls to add_thread.
12019 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12020 * server.c (handle_query): Use thread_to_gdb_id.
12021 (handle_v_cont, main): Use gdb_id_to_thread_id.
12022 * server.h (add_thread): Update prototype.
12023 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12026 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12028 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12029 left-padded registers.
12030 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12031 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12033 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12035 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12036 * configure: Regenerate.
12037 * config.in: Regenerate.
12038 * server.h (NEED_DECLARATION_STRERROR):
12039 Replace with !HAVE_DECL_STRERROR.
12041 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12043 * linux-low.c (linux_wait, linux_send_signal): Don't test
12044 an unsigned long variable for > 0 if it could be MAX_ULONG.
12045 * server.c (myresume): Likewise.
12046 * target.c (set_desired_inferior): Likewise.
12048 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12050 * configure.ac: Simplify and improve check for socklen_t.
12051 * configure, config.in: Regenerate.
12053 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12055 * acconfig.h: Remove.
12056 * configure.ac: Add a test for socklen_t. Use three-argument
12057 AC_DEFINE throughout.
12058 * config.in: Regenerated using autoheader 2.59.
12059 * configure: Regenerated.
12061 * gdbreplay.c (socklen_t): Provide a default.
12062 (remote_open): Use socklen_t.
12063 * remote-utils.c (socklen_t): Provide a default.
12064 (remote_open): Use socklen_t.
12065 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12068 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12070 * linux-low.c (linux_read_memory, linux_write_memory)
12071 (linux_read_auxv): Likewise.
12072 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12073 (check_mem_write): Likewise.
12074 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12076 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12077 (registers_from_string, register_data): Likewise.
12078 * server.c (handle_query, main): Likewise.
12079 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12080 (decode_M_packet): Likewise.
12081 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12082 * target.h (struct target_ops): Update read_memory, write_memory,
12084 (read_inferior_memory, write_inferior_memory): Update.
12085 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12086 to unsigned char *.
12087 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12088 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12089 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12090 linux-s390-low.c, linux-sh-low.c: Update for changes in
12091 read_inferior_memory and the_low_target->breakpoint.
12093 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12095 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12096 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12097 * configure.srv: Add powerpc64-*-linux*.
12098 * linux-ppc64-low.c: New file.
12100 2005-05-23 Orjan Friberg <orjanf@axis.com>
12102 * linux-cris-low.c: New file with support for CRIS.
12103 * linux-crisv32-low.c: Ditto for CRISv32.
12104 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12105 (clean): Add reg-cris.c and reg-crisv32.c.
12106 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12107 reg-crisv32.o, and reg-crisv32.c to make rules.
12108 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12109 recognized targets.
12111 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12113 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12114 of sizeof (PTRACE_XFER_TYPE).
12115 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12117 2005-05-12 Orjan Friberg <orjanf@axis.com>
12119 * target.h (struct target_ops): Add insert_watchpoint,
12120 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12121 pointers for hardware watchpoint support.
12122 * linux-low.h (struct linux_target_ops): Ditto.
12123 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12124 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12125 to linux_target_ops.
12126 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12128 * server.c (main): Recognize 'Z' and 'z' packets.
12130 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12132 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12133 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12134 (the_low_target): Add new members.
12136 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12138 * proc-service.c (ps_lgetregs): Search all_processes instead of
12141 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12143 * server.c (start_inferior): Change return type to int.
12144 (attach_inferior): Change sigptr to int *.
12145 (handle_v_cont, handle_v_requests): Change signal to int *.
12146 (main): Change signal to int.
12148 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12150 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12151 * configure.srv: Add m32r*-*-linux*.
12152 * linux-m32r-low.c: New file.
12154 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12156 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12158 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12160 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12161 Take unsigned long arguments for PIDs.
12162 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12163 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12164 (wait_for_sigstop, linux_resume_one_process)
12165 (regsets_fetch_inferior_registers, linux_send_signal)
12166 (linux_read_auxv): Likewise. Update the types of variables holding
12167 PIDs. Update format string specifiers.
12168 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12169 * remote-utils.c (prepare_resume_reply): Likewise.
12170 * server.c (cont_thread, general_thread, step_thread)
12171 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12173 (handle_query): Update format specifiers.
12174 (handle_v_cont, main): Use strtoul for thread IDs.
12175 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12176 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12177 (general_thread, step_thread, thread_from_wait)
12178 (old_thread_from_wait): Update.
12179 * target.h (struct thread_resume): Use unsigned long for THREAD.
12180 (struct target_ops): Use unsigned long for arguments to attach and
12183 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12185 * acinclude.m4: Include bfd/bfd.m4 directly.
12186 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12187 <agriffis@toolchain.org>.
12188 * aclocal.m4, configure: Regenerated.
12190 2005-01-07 Andrew Cagney <cagney@gnu.org>
12192 * configure.ac: Rename configure.in, require autoconf 2.59.
12193 * configure: Re-generate.
12195 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12197 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12198 LIBS when finished.
12199 * aclocal.m4: Regenerated.
12200 * configure: Regenerated.
12202 2004-11-21 Andreas Schwab <schwab@suse.de>
12204 * linux-m68k-low.c (m68k_num_gregs): Define.
12205 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12206 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12207 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12208 (m68k_breakpoint_at): New. Add to the_low_target.
12210 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12211 srv_linux_thread_db to yes.
12213 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12215 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12216 (ARCH_SET_FS): Likewise.
12217 (ARCH_GET_FS): Likewise.
12218 (ARCH_GET_GS): Likewise.
12220 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12222 * linux-i386-low.c (ps_get_thread_area): New.
12223 * linux-x86-64-low.c (ps_get_thread_area): New.
12224 * linux-low.c: Include <sys/syscall.h>.
12225 (linux_kill_one_process): Don't kill the first thread here.
12226 (linux_kill): Kill the first thread here.
12227 (kill_lwp): New function.
12228 (send_sigstop, linux_send_signal): Use it.
12229 * proc-service.c: Clean up #ifdefs.
12230 (fpregset_info): Delete.
12231 (ps_lgetregs): Update and enable implementation.
12232 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12234 * remote-utils.c (struct sym_cache, symbol_cache): New.
12235 (input_interrupt): Print a clearer message.
12236 (async_io_enabled): New variable.
12237 (enable_async_io, disable_async_io): Use it. Update comments.
12238 (look_up_one_symbol): Use the symbol cache.
12239 * thread-db.c (thread_db_look_up_symbols): New function.
12240 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12242 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12244 * configure.in: Test for -rdynamic.
12245 * configure: Regenerated.
12246 * Makefile (INTERNAL_LDFLAGS): New.
12247 (gdbserver, gdbreplay): Use it.
12249 2004-09-02 Andrew Cagney <cagney@gnu.org>
12251 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12253 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12255 * linux-low.c (linux_wait): Clear all_processes list also.
12257 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12259 * linux-low.c: Include <errno.h>. Remove extern declaration of
12262 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12264 * gdbreplay.c, server.h, utils.c: Update copyright years.
12266 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12268 * server.c (main): Print child status or termination signal from
12269 variable 'signal', not 'sig'.
12271 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12273 * linux-low.c (linux_read_memory): Change return type to
12274 int. Check for and return error from ptrace().
12275 * target.c (read_inferior_memory): Change return type to int. Pass
12276 back return status from the_target->read_memory().
12277 * target.h (struct target_ops): Adapt *read_memory() prototype.
12279 (read_inferior_memory): Adapt prototype.
12280 * server.c (main): Return an error packet if
12281 read_inferior_memory() returns an error.
12283 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12285 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12286 Unify with other clean targets.
12288 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12290 * server.c (handle_v_cont): Call set_desired_inferior.
12292 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12294 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12296 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12298 * linux-low.c (linux_wait): Unblock async I/O.
12299 (linux_resume): Block and enable async I/O.
12300 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12301 * server.h (block_async_io, unblock_async_io): Add prototypes.
12303 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12305 * remote-utils.c (remote_open): Print a status notice after
12306 opening a TCP port.
12307 * server.c (attach_inferior): Print a status notice after
12310 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12312 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12314 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12316 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12318 * server.c, target.h: Update copyright years.
12320 2004-02-25 Roland McGrath <roland@redhat.com>
12322 * target.h (struct target_ops): New member `read_auxv'.
12323 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12324 * linux-low.c (linux_read_auxv): New function.
12325 (linux_target_ops): Initialize `read_auxv' member to that.
12327 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12329 Committed by Jim Blandy <jimb@redhat.com>.
12331 * linux-s390-low.c (s390_num_regs): Update.
12332 (s390_regmap): Remove control registers. Use __s390x__ predefine
12333 instead of GPR_SIZE to distiguish s390 and s390x targets.
12335 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12337 * linux-low.c: Update copyright year.
12338 (check_removed_breakpoint): Clear pending_is_breakpoint.
12339 (linux_set_resume_request, linux_queue_one_thread)
12340 (resume_status_pending_p): New functions.
12341 (linux_continue_one_thread): Use process->resume.
12342 (linux_resume): Only resume threads if there are no pending events.
12343 * linux-low.h (struct process_info): Add resume request
12346 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12348 * regcache.c (new_register_cache): Clear the allocated register
12349 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12351 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12353 * linux-low.c (linux_resume): Take a struct thread_resume *
12355 (linux_wait): Update call.
12356 (resume_ptr): New static variable.
12357 (linux_continue_one_thread): Renamed from
12358 linux_continue_one_process. Use resume_ptr.
12359 (linux_resume): Use linux_continue_one_thread.
12360 * server.c (handle_v_cont, handle_v_requests): New functions.
12361 (myresume): New function.
12362 (main): Handle 'v' case.
12363 * target.h (struct thread_resume): New type.
12364 (struct target_ops): Change argument of "resume" to struct
12366 (myresume): Delete macro.
12368 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12370 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12371 (uninstall): Support DESTDIR.
12373 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12375 * configure.srv: Add xscale*linux copy of arm*linux entry.
12377 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12379 * linux-arm-low.c (arm_reinsert_addr): New function.
12380 (the_low_target): Add arm_reinsert_addr.
12382 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12384 * mem-break.c: Remove whitespace at end of file.
12386 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12388 * configure.in: Check whether we need to prototype strerror.
12389 * server.h: Optionally prototype strerror.
12390 * gdbreplay.c (perror_with_name): Use strerror.
12391 * linux-low.c (linux_attach_lwp): Use strerror.
12392 * utils.c (perror_with_name): Use strerror.
12393 * config.in, configure: Regenerated.
12395 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12397 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12398 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12400 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12402 * Makefile.in (SFILES): Update.
12403 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12404 low-sun3.c: Remove files.
12406 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12408 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12409 (linux_detach_one_process, linux_detach): New functions.
12410 (linux_target_ops): Add linux_detach.
12411 * server.c (main): Handle 'D' packet.
12412 * target.h (struct target_ops): Add "detach" member.
12413 (detach_inferior): Define.
12415 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12417 From Kelley Cook <kelleycook@wideopenwest.com>:
12418 * configure.srv: Accept i[34567]86 variants.
12420 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12422 * linux-low.c (linux_wait_for_event): Correct comment typos.
12423 (linux_resume_one_process): Call check_removed_breakpoint.
12424 (linux_send_signal): New function.
12425 (linux_target_ops): Add linux_send_signal.
12426 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12428 * target.h (struct target_ops): Add send_signal.
12430 2003-05-29 Jim Blandy <jimb@redhat.com>
12432 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12433 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12434 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12435 away part of the register's value.
12437 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12439 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12440 (linux_wait_for_event, linux_init_signals): Likewise.
12442 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12444 * configure.in: Check for stdlib.h.
12445 * configure: Regenerated.
12446 * config.in: Regenerated.
12448 2003-01-04 Andreas Schwab <schwab@suse.de>
12450 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12452 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12454 * Makefile.in: Remove obsolete code.
12456 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12458 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12459 defined(PT_FPR0_HI).
12461 2002-11-17 Stuart Hughes <seh@zee2.com>
12463 * linux-arm-low.c (arm_num_regs): Increase.
12464 (arm_regmap): Include status register.
12466 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12468 * linux-low.c (register_addr): Remove incorrect -1 check.
12470 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12472 * linux-low.c (linux_create_inferior): Call setpgid. Return
12474 (unstopped_p, linux_signal_pid): Remove.
12475 (linux_target_ops): Remove linux_signal_pid.
12476 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12477 global instead of target method.
12478 * target.h (struct target_ops): Remove signal_pid. Update comment
12479 for create_inferior.
12480 * server.c (signal_pid): New variable.
12481 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12482 gdbserver. Set the child to be the foreground process group.
12483 (attach_inferior): Set signal_pid.
12485 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12487 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12489 2002-08-20 Jim Blandy <jimb@redhat.com>
12491 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12494 2002-08-01 Andrew Cagney <cagney@redhat.com>
12496 * Makefile.in: Make chill references obsolete.
12498 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12500 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12501 * configure: Regenerate.
12502 * config.in: Regenerate.
12504 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12506 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12507 (perror_with_name, remote_close, remote_open, expect, play): Static.
12509 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12511 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12512 byte offsets instead of an array of indexes.
12513 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12515 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12517 * regcache.c: Add comment.
12519 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12521 * thread-db.c: New file.
12522 * proc-service.c: New file.
12523 * acinclude.m4: New file.
12524 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12525 proc-service.o, and thread-db.o.
12526 (linux-low.o): Add USE_THREAD_DB.
12527 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12528 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12529 * aclocal.m4: Regenerated.
12530 * config.in: Regenerated.
12531 * configure: Regenerated.
12532 * configure.in: Check for proc_service.h, sys/procfs.h,
12533 thread_db.h, and linux/elf.h headrs.
12534 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12535 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12536 Check for -lthread_db and thread support.
12537 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12538 PowerPC, and SuperH.
12539 * i387-fp.c: Constify arguments.
12540 * i387-fp.h: Likewise.
12541 * inferiors.c: (struct thread_info): Renamed from
12542 `struct inferior_info'. Remove PID member. Use generic inferior
12543 list header. All uses updated.
12544 (inferiors, signal_pid): Removed.
12545 (all_threads): New variable.
12546 (get_thread): Define.
12547 (add_inferior_to_list): New function.
12548 (for_each_inferior): New function.
12549 (change_inferior_id): New function.
12550 (add_inferior): Removed.
12551 (remove_inferior): New function.
12552 (add_thread): New function.
12553 (free_one_thread): New function.
12554 (remove_thread): New function.
12555 (clear_inferiors): Use for_each_inferior and free_one_thread.
12556 (find_inferior): New function.
12557 (find_inferior_id): New function.
12558 (inferior_target_data): Update argument type.
12559 (set_inferior_target_data): Likewise.
12560 (inferior_regcache_data): Likewise.
12561 (set_inferior_regcache_data): Likewise.
12562 * linux-low.c (linux_bp_reinsert): Remove.
12563 (all_processes, stopping_threads, using_thrads)
12564 (struct pending_signals, debug_threads, pid_of): New.
12565 (inferior_pid): Replace with macro.
12566 (struct inferior_linux_data): Remove.
12567 (get_stop_pc, add_process): New functions.
12568 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12569 Use add_process and add_thread.
12570 (linux_attach_lwp): New function, based on old linux_attach. Use
12571 add_process and add_thread. Set stop_expected for new threads.
12572 (linux_attach): New function.
12573 (linux_kill_one_process): New function.
12574 (linux_kill): Kill all LWPs.
12575 (linux_thread_alive): Use find_inferior_id.
12576 (check_removed_breakpoints, status_pending_p): New functions.
12577 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12578 Update. Use WNOHANG. Wait for cloned processes also. Update process
12579 struct for the found process.
12580 (linux_wait_for_event): New function.
12581 (linux_wait): Use it. Support LWPs.
12582 (send_sigstop, wait_for_sigstop, stop_all_processes)
12583 (linux_resume_one_process, linux_continue_one_process): New functions.
12584 (linux_resume): Support LWPs.
12585 (REGISTER_RAW_SIZE): Remove.
12586 (fetch_register): Use register_size instead. Call supply_register.
12587 (usr_store_inferior_registers): Likewise. Call collect_register.
12588 Fix recursive case.
12589 (regsets_fetch_inferior_registers): Improve error message.
12590 (regsets_store_inferior_registers): Add debugging.
12591 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12592 (unstopped_p, linux_signal_pid): New functions.
12593 (linux_target_ops): Add linux_signal_pid.
12594 (linux_init_signals): New function.
12595 (initialize_low): Call it. Initialize using_threads.
12596 * regcache.c (inferior_regcache_data): Add valid
12598 (get_regcache): Fetch registers lazily. Add fetch argument
12599 and update all callers.
12600 (regcache_invalidate_one, regcache_invalidate): New
12602 (new_register_cache): Renamed from create_register_cache.
12603 Return the new regcache.
12604 (free_register_cache): Change argument to a void *.
12605 (registers_to_string, registers_from_string): Call get_regcache
12606 with fetch flag set.
12607 (register_data): Make static. Pass fetch flag to get_regcache.
12608 (supply_register): Call get_regcache with fetch flag clear.
12609 (collect_register): Call get_regcache with fetch flag set.
12610 (collect_register_as_string): New function.
12611 * regcache.h: Update.
12612 * remote-utils.c (putpkt): Flush after debug output and use
12614 Handle input interrupts while waiting for an ACK.
12615 (input_interrupt): Use signal_pid method.
12616 (getpkt): Flush after debug output and use stderr.
12617 (outreg): Use collect_register_as_string.
12618 (new_thread_notify, dead_thread_notify): New functions.
12619 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12620 and general_thread.
12621 (look_up_one_symbol): Flush after debug output.
12622 * server.c (step_thread, server_waiting): New variables.
12623 (start_inferior): Don't use signal_pid. Update call to mywait.
12624 (attach_inferior): Update call to mywait.
12625 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12626 (main): Don't fetch/store registers explicitly. Use
12627 set_desired_inferior. Support proposed ``Hs'' packet. Update
12629 * server.h: Update.
12630 (struct inferior_list, struct_inferior_list_entry): New.
12631 * target.c (set_desired_inferior): New.
12632 (write_inferior_memory): Constify.
12633 (mywait): New function.
12634 * target.h: Update.
12635 (struct target_ops): New signal_pid method.
12636 (mywait): Removed macro, added prototype.
12638 * linux-low.h (regset_func): Removed.
12639 (regset_fill_func, regset_store_func): New.
12640 (enum regset_type): New.
12641 (struct regset_info): Add type field. Use new operation types.
12642 (struct linux_target_ops): stop_pc renamed to get_pc.
12643 Add decr_pc_after_break and breakpoint_at.
12644 (get_process, get_thread_proess, get_process_thread)
12645 (strut process_info, all_processes, linux_attach_lwp)
12646 (thread_db_init): New.
12648 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12649 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12650 (the_low_target): Add new members.
12651 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12652 (i386_store_fpxregset): Constify.
12653 (target_regsets): Add new kind identifier.
12654 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12655 (i386_set_pc): Add debugging.
12656 (i386_breakpoint_at): New function.
12657 (the_low_target): Add new members.
12658 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12659 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12660 (mips_breakpoint_at): New.
12661 (the_low_target): Add new members.
12662 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12663 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12664 (the_low_target): Add new members.
12665 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12666 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12667 (the_low_target): Add new members.
12668 * linux-x86-64-low.c (target_regsets): Add new kind
12671 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12673 From Martin Pool <mbp@samba.org>:
12674 * server.c (gdbserver_usage): New function.
12677 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12679 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12680 stop_at -> stop_pc.
12682 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12684 * Makefile.in: Remove obsolete code.
12686 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12688 * linux-low.c (regsets_fetch_inferior_registers),
12689 (regsets_store_inferior_registers): Removed cast to int from
12691 * regcache.h: Added declaration of struct inferior_info.
12693 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12695 * inferiors.c (struct inferior_info): Add regcache_data.
12696 (add_inferior): Call create_register_cache.
12697 (clear_inferiors): Call free_register_cache.
12698 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12699 * regcache.c (struct inferior_regcache_data): New.
12700 (registers): Remove.
12701 (get_regcache): New function.
12702 (create_register_cache, free_register_cache): New functions.
12703 (set_register_cache): Don't initialize the register cache here.
12704 (registers_to_string, registers_from_string, register_data): Call
12706 * regcache.h: Add prototypes.
12707 * server.h: Likewise.
12709 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12711 * mem-break.c: New file.
12712 * mem-break.h: New file.
12713 * Makefile.in: Add mem-break.o rule; update server.h
12715 * inferiors.c (struct inferior_info): Add target_data
12717 (clear_inferiors): Free target_data member if set.
12718 (inferior_target_data, set_inferior_target_data): New functions.
12719 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12720 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12721 * linux-low.c (linux_bp_reinsert): New variable.
12722 (struct inferior_linux_data): New.
12723 (linux_create_inferior): Use set_inferior_target_data.
12724 (linux_attach): Likewise. Call add_inferior.
12725 (linux_wait_for_one_inferior): New function.
12726 (linux_wait): Call it.
12727 (linux_write_memory): Add const.
12728 (initialize_low): Call set_breakpoint_data.
12729 * linux-low.h (struct linux_target_ops): Add breakpoint
12731 * server.c (attach_inferior): Remove extra add_inferior
12733 * server.h: Include mem-break.h. Update inferior.c
12735 * target.c (read_inferior_memory)
12736 (write_inferior_memory): New functions.
12737 * target.h (read_inferior_memory)
12738 (write_inferior_memory): Change macros to prototypes.
12739 (struct target_ops): Update comments. Add const to write_memory
12742 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12744 * linux-low.c (usr_store_inferior_registers): Support
12745 registers which are allowed to fail to store.
12746 * linux-low.h (linux_target_ops): Likewise.
12747 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12748 (ppc_cannot_store_register): FPSCR may not be storable.
12750 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12752 * server.h: Include <string.h> if HAVE_STRING_H.
12753 * ChangeLog: Correct paths in last ChangeLog entry.
12755 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12757 * linux-low.h: Remove obsolete prototypes.
12758 (struct linux_target_ops): New.
12759 (extern the_low_target): New.
12760 * linux-low.c (num_regs, regmap): Remove declarations.
12761 (register_addr): Use the_low_target explicitly.
12762 (fetch_register): Likewise.
12763 (usr_fetch_inferior_registers): Likewise.
12764 (usr_store_inferior_registers): Likewise.
12765 * linux-arm-low.c (num_regs): Remove.
12766 (arm_num_regs): Define.
12767 (arm_regmap): Renamed from regmap, made static.
12768 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12770 (arm_cannot_store_register): Renamed from cannot_store_register,
12772 (the_low_target): New.
12773 * linux-i386-low.c (num_regs): Remove.
12774 (i386_num_regs): Define.
12775 (i386_regmap): Renamed from regmap, made static.
12776 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12778 (i386_cannot_store_register): Renamed from cannot_store_register,
12780 (the_low_target): New.
12781 * linux-ia64-low.c (num_regs): Remove.
12782 (ia64_num_regs): Define.
12783 (ia64_regmap): Renamed from regmap, made static.
12784 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12786 (ia64_cannot_store_register): Renamed from cannot_store_register,
12788 (the_low_target): New.
12789 * linux-m68k-low.c (num_regs): Remove.
12790 (m68k_num_regs): Define.
12791 (m68k_regmap): Renamed from regmap, made static.
12792 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12794 (m68k_cannot_store_register): Renamed from cannot_store_register,
12796 (the_low_target): New.
12797 * linux-mips-low.c (num_regs): Remove.
12798 (mips_num_regs): Define.
12799 (mips_regmap): Renamed from regmap, made static.
12800 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12802 (mips_cannot_store_register): Renamed from cannot_store_register,
12804 (the_low_target): New.
12805 * linux-ppc-low.c (num_regs): Remove.
12806 (ppc_num_regs): Define.
12807 (ppc_regmap): Renamed from regmap, made static.
12808 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12810 (ppc_cannot_store_register): Renamed from cannot_store_register,
12812 (the_low_target): New.
12813 * linux-s390-low.c (num_regs): Remove.
12814 (s390_num_regs): Define.
12815 (s390_regmap): Renamed from regmap, made static.
12816 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12818 (s390_cannot_store_register): Renamed from cannot_store_register,
12820 (the_low_target): New.
12821 * linux-sh-low.c (num_regs): Remove.
12822 (sh_num_regs): Define.
12823 (sh_regmap): Renamed from regmap, made static.
12824 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12826 (sh_cannot_store_register): Renamed from cannot_store_register,
12828 (the_low_target): New.
12829 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12830 (the_low_target): New.
12832 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12834 * Makefile.in: Add stamp-h target.
12835 * configure.in: Create stamp-h.
12836 * configure: Regenerated.
12838 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12840 * inferiors.c: New file.
12841 * target.c: New file.
12842 * target.h: New file.
12843 * Makefile.in: Add target.o and inferiors.o. Update
12845 * linux-low.c (inferior_pid): New static variable,
12846 moved from server.c.
12847 (linux_create_inferior): Renamed from create_inferior.
12848 Call add_inferior. Return 0 on success instead of a PID.
12849 (linux_attach): Renamed from myattach.
12850 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12851 (linux_thread_alive): Renamed from mythread_alive.
12852 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12854 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12855 (regsets_store_inferior_registers): Correct error message.
12856 Add missing ``return 0''.
12857 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12858 (linux_store_registers): Renamed from store_inferior_registers.
12859 (linux_read_memory): Renamed from read_inferior_memory.
12860 (linux_write_memory): Renamed from write_inferior_memory.
12861 (linux_target_ops): New structure.
12862 (initialize_low): Call set_target_ops ().
12863 * remote-utils.c (unhexify): New function.
12864 (hexify): New function.
12865 (input_interrupt): Send signals to ``signal_pid''.
12866 * server.c (inferior_pid): Remove.
12867 (start_inferior): Update create_inferior call.
12868 (attach_inferior): Call add_inferior.
12869 (handle_query): New function.
12870 (main): Call handle_query for `q' packets.
12871 * server.h: Include "target.h". Remove obsolete prototypes.
12872 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12874 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12876 * Makefile.in: Add WARN_CFLAGS. Update configury
12878 * configure.in: Check for <string.h>
12879 * configure: Regenerate.
12880 * config.in: Regenerate.
12881 * gdbreplay.c: Include needed system headers.
12882 (remote_open): Remove strchr prototype.
12883 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12884 * regcache.c (supply_register): Change buf argument to const void *.
12885 (supply_register_by_name): Likewise.
12886 (collect_register): Change buf argument to void *.
12887 (collect_register_by_name): Likewise.
12888 * regcache.h: Add missing prototypes.
12889 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12890 * server.c (handle_query): New function.
12891 (attached): New static variable, moved out of main.
12892 (main): Quiet longjmp clobber warnings.
12893 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12894 * utils.c (error): Remove NORETURN.