1 2015-12-04 Josh Stone <jistone@redhat.com>
3 * target.h (struct target_ops) <arch_setup>: Rename to ...
4 (struct target_ops) <post_create_inferior>: ... this.
5 (target_arch_setup): Rename to ...
6 (target_post_create_inferior): ... this, calling post_create_inferior.
7 * server.c (start_inferior): Update target_arch_setup calls to
8 target_post_create_inferior.
9 * linux-low.c (linux_low_ptrace_options): Forward declare.
10 (linux_arch_setup): Update its comment for general use.
11 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
12 (struct linux_target_ops): Use linux_post_create_inferior.
13 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
14 to post_create_inferior.
15 * nto-low.c (struct nto_target_ops): Likewise.
16 * spu-low.c (struct spu_target_ops): Likewise.
17 * win32-low.c (struct win32_target_ops): Likewise.
19 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
21 * linux-arm-low.c: Remove duplicate arch/arm.h include.
23 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
25 * linux-arm-low.c (arm_reinsert_addr): Remove function.
26 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
27 * linux-cris-low.c (cris_reinsert_addr> Remove function.
28 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
29 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
30 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
31 * linux-mips-low.c (mips_reinsert_addr): Remove function.
32 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
33 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
34 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
35 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
36 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
38 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
40 * linux-low.c (linux_look_up_symbols): Don't call
41 linux_supports_traceclone.
42 * linux-low.h (thread_db_init): Remove use_events argument.
43 * thread-db.c (thread_db_use_event): Remove global variable.
44 (struct thread_db) <td_thr_event_enable_p>: Remove field.
45 (struct thread_db) <td_create_bp>: Remove field.
46 (thread_db_create_event): Remove function.
47 (thread_db_enable_reporting): Likewise.
48 (find_one_thread): Don't check for thread_db_use_events.
49 (attach_thread): Likewise.
50 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
51 (try_thread_db_load_1): Don't check for thread_db_use_events.
52 (thread_db_init): Remove use_events argument and thread events
54 (remove_thread_event_breakpoints): Remove function.
55 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
57 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
59 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
61 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
62 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
63 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
64 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
65 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
67 * linux-crisv32-low.c (cris_supports_hardware_single_step):
69 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
70 * linux-low.c (can_hardware_single_step): Use
71 supports_hardware_single_step.
72 (can_software_single_step): New function.
73 (start_step_over): Call can_software_single_step.
74 (linux_supports_hardware_single_step): New function.
75 (struct target_ops) <supports_software_single_step>: Initialize.
76 * linux-low.h (struct linux_target_ops)
77 <supports_hardware_single_step>: Initialize.
78 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
79 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
80 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
81 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
82 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
83 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
84 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
85 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
86 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
87 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
89 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
90 (struct linux_target_ops) <tile_supports_hardware_single_step>:
92 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
93 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
94 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
96 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
97 * target.h (struct target_ops): <supports_software_single_step>:
99 (target_supports_software_single_step): New macro.
101 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
103 * linux-low.c (linux_wait_1): Fix pc advance condition.
104 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
105 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
107 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
109 * linux-arm-low.c (arm_is_thumb_mode): New function.
110 (arm_breakpoint_at): Use arm_is_thumb_mode.
111 (arm_breakpoint_kind_from_current_state): New function.
112 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
114 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
115 (linux_breakpoint_kind_from_current_state): New function.
116 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
117 * linux-low.h (struct linux_target_ops)
118 <breakpoint_kind_from_current_state>: New field.
119 * target.h (struct target_ops): Likewise.
120 (target_breakpoint_kind_from_current_state): New macro.
122 2015-11-30 Pedro Alves <palves@redhat.com>
124 * linux-low.c (linux_resume): Wake up the event loop before
127 2015-11-30 Pedro Alves <palves@redhat.com>
129 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
131 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
133 * target.c (struct thread_search): New structure.
134 (thread_search_callback): New function.
135 (prev_general_thread): New global.
136 (prepare_to_access_memory, done_accessing_memory): New functions.
137 * target.h (prepare_to_access_memory, done_accessing_memory):
138 Replace macros with function declarations.
140 2015-11-30 Pedro Alves <palves@redhat.com>
143 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
144 report TARGET_WAITKIND_NO_RESUMED.
145 * remote-utils.c (prepare_resume_reply): Handle
146 TARGET_WAITKIND_NO_RESUMED.
147 * server.c (report_no_resumed): New global.
148 (handle_query) <qSupported>: Handle "no-resumed+". Report
149 "no-resumed+" support.
150 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
151 return error if the client doesn't support no-resumed events.
152 (push_stop_notification): New function.
153 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
154 events if the client supports them.
156 2015-11-30 Pedro Alves <palves@redhat.com>
158 * linux-low.c (thread_still_has_status_pending_p): Don't check
160 (lwp_resumed): New function.
161 (status_pending_p_callback): Return early if the LWP is not
162 supposed to be resumed.
164 2015-11-30 Pedro Alves <palves@redhat.com>
166 * linux-low.c (handle_extended_wait): Assert that the LWP's
167 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
168 thread create events, leave the new child's status pending.
169 (linux_low_filter_event): If GDB wants to hear about thread exit
170 events, leave the LWP marked dead and don't delete it.
171 (linux_wait_for_event_filtered): Don't check for thread exit.
172 (filter_exit_event): New function.
173 (linux_wait_1): Use it, when returning an exit event.
174 (linux_resume_one_lwp_throw): Assert that the LWP's
175 waitstatus is TARGET_WAITKIND_IGNORE.
176 * remote-utils.c (prepare_resume_reply): Handle
177 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
178 * server.c (report_thread_events): New global.
179 (handle_general_set): Handle QThreadEvents.
180 (handle_query) <qSupported>: Handle and report QThreadEvents+;
181 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
182 TARGET_WAITKIND_THREAD_EXITED.
183 * server.h (report_thread_events): Declare.
185 2015-11-30 Pedro Alves <palves@redhat.com>
187 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
188 the thread's last_resume_kind was resume_stop.
190 2015-11-30 Pedro Alves <palves@redhat.com>
192 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
195 2015-11-30 Pedro Alves <palves@redhat.com>
197 * server.c (handle_v_requests): Handle vCtrlC.
199 2015-11-30 Pedro Alves <palves@redhat.com>
201 * gdbthread.h (find_any_thread_of_pid): Declare.
202 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
204 * server.c (handle_query): If current_thread is NULL, look for
205 another thread of the selected process.
207 2015-11-26 Daniel Colascione <dancol@dancol.org>
208 Simon Marchi <simon.marchi@ericsson.com>
210 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
211 * server.c (handle_qxfer_threads_worker): Refactor to include thread
213 * target.h (struct target_ops) <thread_name>: New field.
214 (target_thread_name): New macro.
216 2015-11-23 Joel Brobecker <brobecker@adacore.com>
218 * regcache.h (regcache_invalidate_pid): Add declaration.
219 * regcache.c (regcache_invalidate_pid): New function, extracted
220 from regcache_invalidate.
221 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
222 Add trivial documentation comment.
223 * lynx-low.c: Use regcache_invalidate_pid instead of
226 2015-11-23 Joel Brobecker <brobecker@adacore.com>
228 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
229 and Elf64_auxv_t if the target is Android.
231 2015-11-22 Doug Evans <xdje42@gmail.com>
233 * target.h: #include <sys/types.h>.
235 2015-11-19 Pedro Alves <palves@redhat.com>
237 * linux-low.c (linux_process_qsupported): Change prototype.
239 * linux-low.h (struct linux_target_ops) <process_qsupported>:
241 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
242 and adjust to loop over all features.
243 * server.c (handle_query) <qSupported>: Adjust to call
244 target_process_qsupported once, passing it a vector of unprocessed
246 * target.h (struct target_ops) <process_qsupported>: Change
248 (target_process_qsupported): Adjust.
250 2015-11-19 Pedro Alves <palves@redhat.com>
252 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
254 * configure: Regenerate.
256 2015-11-19 Pedro Alves <palves@redhat.com>
258 * configure: Regenerate.
260 2015-11-19 Yao Qi <yao.qi@linaro.org>
262 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
265 2015-11-19 Yao Qi <yao.qi@linaro.org>
267 * linux-aarch64-low.c (enum aarch64_operand_type): New.
268 (struct aarch64_operand): Move enum out.
270 2015-11-19 Yao Qi <yao.qi@linaro.org>
272 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
273 struct user_fpsimd_state *.
274 (aarch64_store_fpregset): Likewise.
276 2015-11-19 Yao Qi <yao.qi@linaro.org>
278 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
279 struct user_pt_regs *.
280 (aarch64_store_gregset): Likewise.
282 2015-11-18 Pedro Alves <palves@redhat.com>
284 * Makefile.in (all_object_files): Add $IPA_OBJS.
286 2015-11-17 Pedro Alves <palves@redhat.com>
288 * win32-low.c (win32_resume): Use gdb_signal_from_host,
289 GDB_SIGNAL_0 and gdb_signal_to_string.
291 2015-11-17 Pedro Alves <palves@redhat.com>
293 * win32-low.c (handle_output_debug_string): Remove parameter.
294 (win32_kill): Remove our_status local and adjust call to
295 handle_output_debug_string.
296 (get_child_debug_event): Adjust call to
297 handle_output_debug_string.
299 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
301 * linux-mips-low.c (mips_fill_gregset): Add cast.
302 (mips_store_gregset): Likewise.
303 (mips_fill_fpregset): Likewise.
304 (mips_store_fpregset): Likewise.
306 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
308 * linux-mips-low.c (mips_add_watchpoint): Rename private to
311 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
313 * linux-mips-low.c (mips_linux_new_thread): Change type of
314 watch_type to enum target_hw_bp_type.
316 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
318 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
319 Change return type to arm_hwbp_type.
321 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
323 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
324 (arm_store_gregset): Likewise.
325 * linux-arm-low.c (arm_get_hwcap): Likewise.
326 (arm_read_description): Likewise.
328 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
330 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
332 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
334 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
335 (ppc_fill_vsxregset): Likewise.
336 (ppc_store_vsxregset): Likewise.
337 (ppc_fill_vrregset): Likewise.
338 (ppc_store_vrregset): Likewise.
339 (ppc_fill_evrregset): Likewise.
340 (ppc_store_evrregset): Likewise.
342 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
344 * linux-ppc-low.c (ppc_usrregs_info): Remove
346 (ppc_arch_setup): Move lower in file.
348 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
350 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
351 (ps_pdwrite): Likewise.
353 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
355 * linux-arm-low.c (arm_new_thread): Move pointer dereference
356 to after assert checks.
358 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
360 * proc-service.c (ps_pdread): Add/adjust casts.
361 (ps_pdwrite): Add/adjust casts.
363 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
365 * server.c (handle_search_memory_1): Cast return value of
368 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
370 * server.c (write_qxfer_response): Change type of data to
373 2015-10-29 Pedro Alves <palves@redhat.com>
375 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
377 2015-10-29 Pedro Alves <palves@redhat.com>
379 * tracepoint.c (clear_installed_tracepoints): Add casts.
381 2015-10-29 Pedro Alves <palves@redhat.com>
383 * server.c (handle_v_cont, process_serial_event): Add enum
384 gdb_signal casts to signal parsing code.
386 2015-10-29 Pedro Alves <palves@redhat.com>
388 * linux-low.h (NULL_REGSET): Define.
389 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
390 * linux-arm-low.c (arm_regsets): Likewise.
391 * linux-crisv32-low.c (cris_regsets): Likewise.
392 * linux-m68k-low.c (m68k_regsets): Likewise.
393 * linux-mips-low.c (mips_regsets): Likewise.
394 * linux-nios2-low.c (nios2_regsets): Likewise.
395 * linux-ppc-low.c (ppc_regsets): Likewise.
396 * linux-s390-low.c (s390_regsets): Likewise.
397 * linux-sh-low.c (sh_regsets): Likewise.
398 * linux-sparc-low.c (sparc_regsets): Likewise.
399 * linux-tic6x-low.c (tic6x_regsets): Likewise.
400 * linux-tile-low.c (tile_regsets): Likewise.
401 * linux-x86-low.c (x86_regsets): Likewise.
402 * linux-xtensa-low.c (xtensa_regsets): Likewise.
404 2015-10-29 Pedro Alves <palves@redhat.com>
406 * linux-low.h (NULL_REGSET): Define.
407 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
408 * linux-arm-low.c (arm_regsets): Likewise.
409 * linux-crisv32-low.c (cris_regsets): Likewise.
410 * linux-m68k-low.c (m68k_regsets): Likewise.
411 * linux-mips-low.c (mips_regsets): Likewise.
412 * linux-nios2-low.c (nios2_regsets): Likewise.
413 * linux-ppc-low.c (ppc_regsets): Likewise.
414 * linux-s390-low.c (s390_regsets): Likewise.
415 * linux-sh-low.c (sh_regsets): Likewise.
416 * linux-sparc-low.c (sparc_regsets): Likewise.
417 * linux-tic6x-low.c (tic6x_regsets): Likewise.
418 * linux-tile-low.c (tile_regsets): Likewise.
419 * linux-x86-low.c (x86_regsets): Likewise.
420 * linux-xtensa-low.c (xtensa_regsets): Likewise.
422 2015-10-26 Doug Evans <dje@google.com>
424 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
426 2015-10-26 Doug Evans <dje@google.com>
428 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
430 2015-10-26 Doug Evans <dje@google.com>
432 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
434 (attach_thread, find_new_threads_callback): Ditto.
436 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
438 * mem-break.h (set_breakpoint_data): Remove.
440 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
442 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
443 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
444 (initialize_low): Remove set_breakpoint_data call.
445 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
446 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
447 (initialize_low): Remove set_breakpoint_data call.
448 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
449 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
450 (initialize_low): Remove set_breakpoint_data call.
452 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
454 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
455 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
456 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
457 * target.h (target_breakpoint_kind_from_pc): New macro.
459 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
461 * linux-low.c (default_breakpoint_kind_from_pc): New function.
462 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
463 the default breakpoint kind.
465 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
467 * linux-arm-low.c (arm_supports_z_point_type): Add software
470 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
472 * linux-arm-low.c: Refactor breakpoint definitions.
473 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
474 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
476 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
478 * Makefile.in: Add arm.c/o.
479 * configure.srv: Likewise.
480 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
481 (arm_breakpoint_kind_from_pc): New function.
482 (arm_sw_breakpoint_from_kind): Return proper kind.
483 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
485 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
487 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
489 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
490 (struct raw_breakpoint) <size>: Remove.
491 (struct raw_breakpoint) <kind>: Add.
492 (bp_size): New function.
493 (bp_opcode): Likewise.
494 (find_raw_breakpoint_at): Adjust for kind.
495 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
496 (remove_memory_breakpoint): Adjust for kind call bp_size.
497 (set_raw_breakpoint_at): Adjust for kind.
498 (set_breakpoint): Likewise.
499 (set_breakpoint_at): Call breakpoint_kind_from_pc.
500 (delete_raw_breakpoint): Adjust for kind.
501 (delete_breakpoint): Likewise.
502 (find_gdb_breakpoint): Likewise.
503 (set_gdb_breakpoint_1): Likewise.
504 (set_gdb_breakpoint): Likewise.
505 (delete_gdb_breakpoint_1): Likewise.
506 (delete_gdb_breakpoint): Likewise.
507 (uninsert_raw_breakpoint): Likewise.
508 (reinsert_raw_breakpoint): Likewise.
509 (set_breakpoint_data): Remove.
510 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
511 (check_mem_read): Adjust for kind call bp_size.
512 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
513 (clone_one_breakpoint): Adjust for kind.
514 * mem-break.h (set_gdb_breakpoint): Likewise.
515 (delete_gdb_breakpoint): Likewise.
516 * server.c (process_serial_event): Likewise.
518 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
520 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
521 (struct linux_target_ops) <breakpoint>: Remove.
522 (struct linux_target_ops) <breakpoint_len>: Remove.
523 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
524 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
525 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
526 (arm_sw_breakpoint_from_kind): New function.
527 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
528 (struct linux_target_ops) <breakpoint>: Remove.
529 (struct linux_target_ops) <breakpoint_len>: Remove.
530 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
531 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
532 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
533 (struct linux_target_ops) <breakpoint>: Remove.
534 (struct linux_target_ops) <breakpoint_len>: Remove.
535 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
536 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
537 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
538 (struct linux_target_ops) <breakpoint>: Remove.
539 (struct linux_target_ops) <breakpoint_len>: Remove.
540 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
541 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
542 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
543 and sw_breakpoint_from_kind to increment the pc.
544 (linux_breakpoint_kind_from_pc): New function.
545 (linux_sw_breakpoint_from_kind): New function.
546 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
547 (initialize_low): Call breakpoint_kind_from_pc and
548 sw_breakpoint_from_kind to replace breakpoint_data/len.
549 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
551 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
552 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
553 (struct linux_target_ops) <breakpoint>: Remove.
554 (struct linux_target_ops) <breakpoint_len>: Remove.
555 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
556 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
557 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
558 (struct linux_target_ops) <breakpoint>: Remove.
559 (struct linux_target_ops) <breakpoint_len>: Remove.
560 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
561 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
562 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
563 (struct linux_target_ops) <breakpoint>: Remove.
564 (struct linux_target_ops) <breakpoint_len>: Remove.
565 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
566 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
567 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
568 (struct linux_target_ops) <breakpoint>: Remove.
569 (struct linux_target_ops) <breakpoint_len>: Remove.
570 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
571 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
572 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
573 (struct linux_target_ops) <breakpoint>: Remove.
574 (struct linux_target_ops) <breakpoint_len>: Remove.
575 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
576 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
577 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
578 (struct linux_target_ops) <breakpoint>: Remove.
579 (struct linux_target_ops) <breakpoint_len>: Remove.
580 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
581 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
582 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
583 (struct linux_target_ops) <breakpoint>: Remove.
584 (struct linux_target_ops) <breakpoint_len>: Remove.
585 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
586 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
587 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
588 (struct linux_target_ops) <breakpoint>: Remove.
589 (struct linux_target_ops) <breakpoint_len>: Remove.
590 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
591 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
592 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
593 (struct linux_target_ops) <breakpoint>: Remove.
594 (struct linux_target_ops) <breakpoint_len>: Remove.
595 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
596 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
597 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
598 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
599 (struct linux_target_ops) <breakpoint>: Remove.
600 (struct linux_target_ops) <breakpoint_len>: Remove.
601 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
602 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
603 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
604 (struct linux_target_ops) <breakpoint>: Remove.
605 (struct linux_target_ops) <breakpoint_len>: Remove.
606 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
609 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
611 * linux-cris-low.c (cris_get_pc): Remove void arg.
613 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
615 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
618 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
620 * inferiors.c (thread_pid_matches_callback): New function.
621 (find_thread_process): New function.
622 (remove_thread): Reset current_thread.
623 (remove_process): Assert threads have been removed first.
625 2015-10-15 Yao Qi <yao.qi@linaro.org>
627 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
629 (aarch64_remove_point): Likewise.
630 * regcache.c (regcache_register_size): New function.
632 2015-10-12 Yao Qi <yao.qi@linaro.org>
634 * linux-aarch64-low.c: Update all callers as emit_load_store
635 is renamed to aarch64_emit_load_store.
637 2015-10-12 Yao Qi <yao.qi@linaro.org>
639 * linux-aarch64-low.c: Update all callers of function renaming
640 from emit_insn to aarch64_emit_insn.
642 2015-10-12 Yao Qi <yao.qi@linaro.org>
644 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
646 (struct aarch64_memory_operand): Likewise.
648 (emit_insn): Move to arch/aarch64-insn.c.
649 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
650 (emit_load_store): Move to arch/aarch64-insn.c.
651 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
652 (can_encode_int32): Remove.
654 2015-10-12 Yao Qi <yao.qi@linaro.org>
656 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
657 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
658 (aarch64_relocate_instruction): Likewise.
659 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
660 (struct aarch64_insn_visitor): Likewise.
662 2015-10-12 Yao Qi <yao.qi@linaro.org>
664 * linux-aarch64-low.c (struct aarch64_insn_data): New.
665 (struct aarch64_insn_visitor): New.
666 (struct aarch64_insn_relocation_data): New.
667 (aarch64_ftrace_insn_reloc_b): New function.
668 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
669 (aarch64_ftrace_insn_reloc_cb): Likewise.
670 (aarch64_ftrace_insn_reloc_tb): Likewise.
671 (aarch64_ftrace_insn_reloc_adr): Likewise.
672 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
673 (aarch64_ftrace_insn_reloc_others): Likewise.
675 (aarch64_relocate_instruction): Use visitor.
677 2015-10-12 Yao Qi <yao.qi@linaro.org>
679 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
680 int. Add argument buf.
681 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
682 aarch64_relocate_instruction.
684 2015-10-12 Yao Qi <yao.qi@linaro.org>
686 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
687 argument insn. Remove local variable insn. Don't call
689 (aarch64_install_fast_tracepoint_jump_pad): Call
692 2015-09-30 Yao Qi <yao.qi@linaro.org>
694 * linux-aarch64-low.c (emit_movk): Shorten a long line.
695 (emit_load_store_pair): Likewise.
697 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
699 * dll.c (match_dll): Add cast(s).
700 (unloaded_dll): Likewise.
701 * linux-low.c (second_thread_of_pid_p): Likewise.
702 (delete_lwp_callback): Likewise.
703 (count_events_callback): Likewise.
704 (select_event_lwp_callback): Likewise.
705 (linux_set_resume_request): Likewise.
706 * server.c (accumulate_file_name_length): Likewise.
707 (emit_dll_description): Likewise.
708 (handle_qxfer_threads_worker): Likewise.
709 (visit_actioned_threads): Likewise.
710 * thread-db.c (any_thread_of): Likewise.
711 * tracepoint.c (same_process_p): Likewise.
712 (match_blocktype): Likewise.
713 (build_traceframe_info_xml): Likewise.
715 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
717 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
719 (gdb_unparse_agent_expr): Likewise.
720 * hostio.c (require_data): Likewise.
721 (handle_pread): Likewise.
722 * linux-low.c (disable_regset): Likewise.
723 (fetch_register): Likewise.
724 (store_register): Likewise.
725 (get_dynamic): Likewise.
726 (linux_qxfer_libraries_svr4): Likewise.
727 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
728 (set_fast_tracepoint_jump): Likewise.
729 (uninsert_fast_tracepoint_jumps_at): Likewise.
730 (reinsert_fast_tracepoint_jumps_at): Likewise.
731 (validate_inserted_breakpoint): Likewise.
732 (clone_agent_expr): Likewise.
733 * regcache.c (init_register_cache): Likewise.
734 * remote-utils.c (putpkt_binary_1): Likewise.
735 (decode_M_packet): Likewise.
736 (decode_X_packet): Likewise.
737 (look_up_one_symbol): Likewise.
738 (relocate_instruction): Likewise.
739 (monitor_output): Likewise.
740 * server.c (handle_search_memory): Likewise.
741 (handle_qxfer_exec_file): Likewise.
742 (handle_qxfer_libraries): Likewise.
743 (handle_qxfer): Likewise.
744 (handle_query): Likewise.
745 (handle_v_cont): Likewise.
746 (handle_v_run): Likewise.
747 (captured_main): Likewise.
748 * target.c (write_inferior_memory): Likewise.
749 * thread-db.c (try_thread_db_load_from_dir): Likewise.
750 * tracepoint.c (init_trace_buffer): Likewise.
751 (add_tracepoint_action): Likewise.
752 (add_traceframe): Likewise.
753 (add_traceframe_block): Likewise.
754 (cmd_qtdpsrc): Likewise.
755 (cmd_qtdv): Likewise.
756 (cmd_qtstatus): Likewise.
757 (response_source): Likewise.
758 (response_tsv): Likewise.
759 (cmd_qtnotes): Likewise.
760 (gdb_collect): Likewise.
761 (initialize_tracepoint): Likewise.
763 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
765 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
766 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
767 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
769 (enum aarch64_condition_codes): New enum.
770 (w0): New static global.
773 (struct aarch64_memory_operand) <type>: New
774 MEMORY_OPERAND_POSTINDEX type.
775 (postindex_memory_operand): New helper function.
776 (emit_ret): New function.
777 (emit_load_store_pair): New function, factored out of emit_stp
778 with support for MEMORY_OPERAND_POSTINDEX.
779 (emit_stp): Rewrite using emit_load_store_pair.
780 (emit_ldp): New function.
781 (emit_load_store): Likewise.
782 (emit_ldr): Mention post-index instruction in comment.
783 (emit_ldrh): New function.
784 (emit_ldrb): New function.
785 (emit_ldrsw): Mention post-index instruction in comment.
786 (emit_str): Likewise.
787 (emit_subs): New function.
788 (emit_cmp): Likewise.
789 (emit_and): Likewise.
790 (emit_orr): Likewise.
791 (emit_orn): Likewise.
792 (emit_eor): Likewise.
793 (emit_mvn): Likewise.
794 (emit_lslv): Likewise.
795 (emit_lsrv): Likewise.
796 (emit_asrv): Likewise.
797 (emit_mul): Likewise.
798 (emit_sbfm): Likewise.
799 (emit_sbfx): Likewise.
800 (emit_ubfm): Likewise.
801 (emit_ubfx): Likewise.
802 (emit_csinc): Likewise.
803 (emit_cset): Likewise.
804 (emit_nop): Likewise.
805 (emit_ops_insns): New helper function.
806 (emit_pop): Likewise.
807 (emit_push): Likewise.
808 (aarch64_emit_prologue): New function.
809 (aarch64_emit_epilogue): Likewise.
810 (aarch64_emit_add): Likewise.
811 (aarch64_emit_sub): Likewise.
812 (aarch64_emit_mul): Likewise.
813 (aarch64_emit_lsh): Likewise.
814 (aarch64_emit_rsh_signed): Likewise.
815 (aarch64_emit_rsh_unsigned): Likewise.
816 (aarch64_emit_ext): Likewise.
817 (aarch64_emit_log_not): Likewise.
818 (aarch64_emit_bit_and): Likewise.
819 (aarch64_emit_bit_or): Likewise.
820 (aarch64_emit_bit_xor): Likewise.
821 (aarch64_emit_bit_not): Likewise.
822 (aarch64_emit_equal): Likewise.
823 (aarch64_emit_less_signed): Likewise.
824 (aarch64_emit_less_unsigned): Likewise.
825 (aarch64_emit_ref): Likewise.
826 (aarch64_emit_if_goto): Likewise.
827 (aarch64_emit_goto): Likewise.
828 (aarch64_write_goto_address): Likewise.
829 (aarch64_emit_const): Likewise.
830 (aarch64_emit_call): Likewise.
831 (aarch64_emit_reg): Likewise.
832 (aarch64_emit_pop): Likewise.
833 (aarch64_emit_stack_flush): Likewise.
834 (aarch64_emit_zero_ext): Likewise.
835 (aarch64_emit_swap): Likewise.
836 (aarch64_emit_stack_adjust): Likewise.
837 (aarch64_emit_int_call_1): Likewise.
838 (aarch64_emit_void_call_2): Likewise.
839 (aarch64_emit_eq_goto): Likewise.
840 (aarch64_emit_ne_goto): Likewise.
841 (aarch64_emit_lt_goto): Likewise.
842 (aarch64_emit_le_goto): Likewise.
843 (aarch64_emit_gt_goto): Likewise.
844 (aarch64_emit_ge_got): Likewise.
845 (aarch64_emit_ops_impl): New static global variable.
846 (aarch64_emit_ops): New target function, return
847 &aarch64_emit_ops_impl.
848 (struct linux_target_ops): Install it.
850 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
852 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
853 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
855 * linux-aarch64-ipa.c: New file.
856 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
858 (aarch64_get_thread_area): New target method.
859 (extract_signed_bitfield): New helper function.
860 (aarch64_decode_ldr_literal): New function.
861 (enum aarch64_opcodes): New enum.
862 (struct aarch64_register): New struct.
863 (struct aarch64_operand): New struct.
864 (x0): New static global.
873 (aarch64_register): New helper function.
874 (register_operand): Likewise.
875 (immediate_operand): Likewise.
876 (struct aarch64_memory_operand): New struct.
877 (offset_memory_operand): New helper function.
878 (preindex_memory_operand): Likewise.
879 (enum aarch64_system_control_registers): New enum.
881 (emit_insn): New helper function.
882 (emit_b): New function.
883 (emit_bcond): Likewise.
886 (emit_blr): Likewise.
887 (emit_stp): Likewise.
888 (emit_ldp_q_offset): Likewise.
889 (emit_stp_q_offset): Likewise.
890 (emit_load_store): Likewise.
891 (emit_ldr): Likewise.
892 (emit_ldrsw): Likewise.
893 (emit_str): Likewise.
894 (emit_ldaxr): Likewise.
895 (emit_stxr): Likewise.
896 (emit_stlr): Likewise.
897 (emit_data_processing_reg): Likewise.
898 (emit_data_processing): Likewise.
899 (emit_add): Likewise.
900 (emit_sub): Likewise.
901 (emit_mov): Likewise.
902 (emit_movk): Likewise.
903 (emit_mov_addr): Likewise.
904 (emit_mrs): Likewise.
905 (emit_msr): Likewise.
906 (emit_sevl): Likewise.
907 (emit_wfe): Likewise.
908 (append_insns): Likewise.
909 (can_encode_int32_in): New helper function.
910 (aarch64_relocate_instruction): New function.
911 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
912 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
913 (struct linux_target_ops): Install aarch64_get_thread_area,
914 aarch64_install_fast_tracepoint_jump_pad and
915 aarch64_get_min_fast_tracepoint_insn_len.
917 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
919 * Makefile.in (aarch64-insn.o): New rule.
920 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
922 2015-09-21 Yao Qi <yao.qi@linaro.org>
924 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
926 2015-09-21 Yao Qi <yao.qi@linaro.org>
928 * tracepoint.c (max_jump_pad_size): Remove.
930 2015-09-18 Yao Qi <yao.qi@linaro.org>
932 * linux-aarch64-low.c: Don't include sys/uio.h.
933 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
935 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
937 * tracepoint.c (eval_result_type): Change prototype.
938 (condition_true_at_tracepoint): Fix argument to compiled_cond.
940 2015-09-15 Pedro Alves <palves@redhat.com>
942 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
943 Check whether to report exec events instead of checking whether
944 multiprocess is enabled.
946 2015-09-15 Pedro Alves <palves@redhat.com>
949 * remote-utils.c (prepare_resume_reply): Merge
950 TARGET_WAITKIND_VFORK_DONE switch case with the
951 TARGET_WAITKIND_FORKED case.
953 2015-09-15 Yao Qi <yao.qi@linaro.org>
955 * server.c (handle_query): Check string comparison using
956 "else if" instead of "if".
958 2015-09-15 Yao Qi <yao.qi@linaro.org>
960 * server.c (vCont_supported): New global variable.
961 (handle_query): Set vCont_supported to 1 if "vContSupported+"
962 matches. Append ";vContSupported+" to own_buf.
963 (handle_v_requests): Append ";s;S" to own_buf if target supports
964 hardware single step or vCont_supported is false.
965 (capture_main): Set vCont_supported to zero.
967 2015-09-15 Yao Qi <yao.qi@linaro.org>
969 * linux-low.c (linux_supports_conditional_breakpoints): Rename
971 (linux_supports_hardware_single_step): ... New function.
972 (linux_target_ops): Update.
973 * lynx-low.c (lynx_target_ops): Set field
974 supports_hardware_single_step to target_can_do_hardware_single_step.
975 * nto-low.c (nto_target_ops): Likewise.
976 * spu-low.c (spu_target_ops): Likewise.
977 * win32-low.c (win32_target_ops): Likewise.
978 * target.c (target_can_do_hardware_single_step): New function.
979 * target.h (struct target_ops) <supports_conditional_breakpoints>:
980 Remove. <supports_hardware_single_step>: New field.
981 (target_supports_conditional_breakpoints): Remove.
982 (target_supports_hardware_single_step): New macro.
983 (target_can_do_hardware_single_step): Declare.
984 * server.c (handle_query): Use target_supports_hardware_single_step
985 instead of target_supports_conditional_breakpoints.
987 2015-09-15 Yao Qi <yao.qi@linaro.org>
989 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
991 (struct linux_target_ops the_low_target): Install
992 aarch64_linux_siginfo_fixup.
994 2015-09-11 Don Breazeal <donb@codesourcery.com>
995 Luis Machado <lgustavo@codesourcery.com>
997 * linux-low.c (linux_mourn): Static declaration.
998 (linux_arch_setup): Move in front of
999 handle_extended_wait.
1000 (linux_arch_setup_thread): New function.
1001 (handle_extended_wait): Handle exec events. Call
1002 linux_arch_setup_thread. Make event_lwp argument a
1003 pointer-to-a-pointer.
1004 (check_zombie_leaders): Do not check stopped threads.
1005 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1006 (linux_low_filter_event): Add lwp and thread for exec'ing
1007 non-leader thread if leader thread has been deleted.
1008 Refactor code into linux_arch_setup_thread and call it.
1009 Pass child lwp pointer by reference to handle_extended_wait.
1010 (linux_wait_for_event_filtered): Update comment.
1011 (linux_wait_1): Prevent clobbering exec event status.
1012 (linux_supports_exec_events): New function.
1013 (linux_target_ops) <supports_exec_events>: Initialize new member.
1014 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1016 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1017 * server.c (report_exec_events): New global variable.
1018 (handle_query): Handle qSupported query for exec-events feature.
1019 (captured_main): Initialize report_exec_events.
1020 * server.h (report_exec_events): Declare new global variable.
1021 * target.h (struct target_ops) <supports_exec_events>: New
1023 (target_supports_exec_events): New macro.
1024 * win32-low.c (win32_target_ops) <supports_exec_events>:
1025 Initialize new member.
1027 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1029 * linux-low.c (linux_low_enable_btrace): Remove.
1030 (linux_target_ops): Replace linux_low_enable_btrace with
1031 linux_enable_btrace.
1033 2015-09-03 Yao Qi <yao.qi@linaro.org>
1035 * linux-aarch64-low.c (aarch64_insert_point): Call
1036 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1039 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1041 * linux-low.c (check_stopped_by_breakpoint): Use
1042 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1044 2015-08-27 Pedro Alves <palves@redhat.com>
1046 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1048 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1050 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1051 the XNEW-family equivalent.
1052 (compile_bytecodes): Likewise.
1053 * dll.c (loaded_dll): Likewise.
1054 * event-loop.c (append_callback_event): Likewise.
1055 (create_file_handler): Likewise.
1056 (create_file_event): Likewise.
1057 * hostio.c (handle_open): Likewise.
1058 * inferiors.c (add_thread): Likewise.
1059 (add_process): Likewise.
1060 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1061 * linux-arm-low.c (arm_new_process): Likewise.
1062 (arm_new_thread): Likewise.
1063 * linux-low.c (add_to_pid_list): Likewise.
1064 (linux_add_process): Likewise.
1065 (handle_extended_wait): Likewise.
1066 (add_lwp): Likewise.
1067 (enqueue_one_deferred_signal): Likewise.
1068 (enqueue_pending_signal): Likewise.
1069 (linux_resume_one_lwp_throw): Likewise.
1070 (linux_resume_one_thread): Likewise.
1071 (linux_read_memory): Likewise.
1072 (linux_write_memory): Likewise.
1073 * linux-mips-low.c (mips_linux_new_process): Likewise.
1074 (mips_linux_new_thread): Likewise.
1075 (mips_add_watchpoint): Likewise.
1076 * linux-x86-low.c (initialize_low_arch): Likewise.
1077 * lynx-low.c (lynx_add_process): Likewise.
1078 * mem-break.c (set_raw_breakpoint_at): Likewise.
1079 (set_breakpoint): Likewise.
1080 (add_condition_to_breakpoint): Likewise.
1081 (add_commands_to_breakpoint): Likewise.
1082 (clone_agent_expr): Likewise.
1083 (clone_one_breakpoint): Likewise.
1084 * regcache.c (new_register_cache): Likewise.
1085 * remote-utils.c (look_up_one_symbol): Likewise.
1086 * server.c (queue_stop_reply): Likewise.
1087 (start_inferior): Likewise.
1088 (queue_stop_reply_callback): Likewise.
1089 (handle_target_event): Likewise.
1090 * spu-low.c (fetch_ppc_memory): Likewise.
1091 (store_ppc_memory): Likewise.
1092 * target.c (set_target_ops): Likewise.
1093 * thread-db.c (thread_db_load_search): Likewise.
1094 (try_thread_db_load_1): Likewise.
1095 * tracepoint.c (add_tracepoint): Likewise.
1096 (add_tracepoint_action): Likewise.
1097 (create_trace_state_variable): Likewise.
1098 (cmd_qtdpsrc): Likewise.
1099 (cmd_qtro): Likewise.
1100 (add_while_stepping_state): Likewise.
1101 * win32-low.c (child_add_thread): Likewise.
1102 (get_image_name): Likewise.
1104 2015-08-25 Yao Qi <yao.qi@linaro.org>
1106 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1108 2015-08-25 Yao Qi <yao.qi@linaro.org>
1110 * Makefile.in (aarch64-linux.o): New rule.
1111 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1113 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1114 (aarch64_init_debug_reg_state): Make it extern.
1115 (aarch64_linux_prepare_to_resume): Remove.
1117 2015-08-25 Yao Qi <yao.qi@linaro.org>
1119 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1120 lwp_arch_private_info and ptid_of_lwp.
1122 2015-08-25 Yao Qi <yao.qi@linaro.org>
1124 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1125 Find proc_info by find_process_pid. All callers updated.
1127 2015-08-25 Yao Qi <yao.qi@linaro.org>
1129 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1131 (debug_reg_change_callback): Remove.
1132 (aarch64_notify_debug_reg_change): Remove.
1134 2015-08-25 Yao Qi <yao.qi@linaro.org>
1136 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1137 Call current_lwp_ptid.
1139 2015-08-25 Yao Qi <yao.qi@linaro.org>
1141 * linux-aarch64-low.c (debug_reg_change_callback): Use
1144 2015-08-25 Yao Qi <yao.qi@linaro.org>
1146 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1148 2015-08-25 Yao Qi <yao.qi@linaro.org>
1150 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1152 2015-08-25 Yao Qi <yao.qi@linaro.org>
1154 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1157 2015-08-25 Yao Qi <yao.qi@linaro.org>
1159 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1161 (debug_reg_change_callback): Remove argument entry and add argument
1162 lwp. Remove local variable thread. Don't print thread id in the
1163 debugging output. Don't check whether pid of thread equals to pid.
1164 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1165 iterate_over_lwps instead find_inferior.
1167 2015-08-24 Pedro Alves <palves@redhat.com>
1169 * inferiors.c (get_first_process): New function.
1170 * inferiors.h (get_first_process): New declaration.
1171 * remote-utils.c (read_ptid): Default to the first process in the
1172 list, instead of to the current thread's process.
1174 2015-08-24 Pedro Alves <palves@redhat.com>
1176 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1177 * event-loop.c: Likewise.
1178 * remote-utils.c: Likewise.
1179 * tracepoint.c: Likewise.
1181 2015-08-24 Pedro Alves <palves@redhat.com>
1183 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1186 2015-08-21 Pedro Alves <palves@redhat.com>
1188 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1189 instead of literal 1.
1191 2015-08-21 Pedro Alves <palves@redhat.com>
1193 * tdesc.c (default_description): Explicitly zero-initialize.
1195 2015-08-21 Pedro Alves <palves@redhat.com>
1198 * inferiors.c (remove_thread): Discard any pending stop reply for
1200 * server.c (remove_all_on_match_pid): Rename to ...
1201 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1203 (discard_queued_stop_replies): Change parameter to a ptid. Now
1205 (handle_v_kill, kill_inferior_callback, captured_main)
1206 (process_serial_event): Adjust.
1207 * server.h (discard_queued_stop_replies): Declare.
1209 2015-08-21 Pedro Alves <palves@redhat.com>
1211 * linux-low.c (wait_for_sigstop): Always switch to no thread
1212 selected if the previously current thread dies.
1213 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1214 process instead of the current thread's.
1215 * remote-utils.c (input_interrupt): Don't check if there's no
1217 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1218 current thread to the general thread fails, error out.
1219 (handle_qxfer_auxv, handle_qxfer_libraries)
1220 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1221 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1222 (handle_query): Check if there's a thread selected instead of
1223 checking whether there's any thread in the thread list.
1224 (handle_qxfer_threads, handle_qxfer_btrace)
1225 (handle_qxfer_btrace_conf): Don't error out early if there's no
1226 thread in the thread list.
1227 (handle_v_cont, myresume): Don't set the current thread to the
1229 (process_serial_event) <Hg handling>: Also set thread_id if the
1230 previous general thread is still alive.
1231 (process_serial_event) <g/G handling>: If setting the current
1232 thread to the general thread fails, error out.
1233 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1234 thread's lwp instead of the current thread's.
1235 * target.c (set_desired_thread): If the desired thread was not
1236 found, leave the current thread pointing to NULL. Return an int
1237 (boolean) indicating success.
1238 * target.h (set_desired_thread): Change return type to int.
1240 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1242 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1243 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1245 (ps_get_thread_area): New function.
1247 2015-08-19 Gary Benson <gbenson@redhat.com>
1249 * hostio.c (handle_pread): Do not attempt to read more data
1250 than hostio_reply_with_data can fit in a packet.
1252 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1254 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1256 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1258 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1260 2015-08-06 Pedro Alves <palves@redhat.com>
1262 * tracepoint.c (expr_eval_result): Now an int.
1264 2015-08-06 Pedro Alves <palves@redhat.com>
1266 * gdbthread.h (struct regcache): Forward declare.
1267 (struct thread_info) <regcache_data>: Now a struct regcache
1269 * inferiors.c (inferior_regcache_data)
1270 (set_inferior_regcache_data): Now work with struct regcache
1272 * inferiors.h (struct regcache): Forward declare.
1273 (inferior_regcache_data, set_inferior_regcache_data): Now work
1274 with struct regcache pointers.
1275 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1276 (free_register_cache_thread): Remove struct regcache pointer
1279 2015-08-06 Pedro Alves <palves@redhat.com>
1281 * server.c (captured_main): On error, print the exception message
1282 to stderr, and if run_once is set, throw a quit.
1284 2015-08-06 Pedro Alves <palves@redhat.com>
1286 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1289 2015-08-06 Pedro Alves <palves@redhat.com>
1291 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1292 reading beyond the passed in buffer length.
1294 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1296 * tracepoint.c (symbol_list) <required>: Remove.
1298 2015-08-06 Pedro Alves <palves@redhat.com>
1300 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1301 count if stopping and suspending threads.
1302 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1303 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1304 (linux_detach): Complete an ongoing step-over.
1305 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1307 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1308 (linux_wait_1): If passing a signal to the inferior after
1309 finishing a step-over, unsuspend and re-resume all lwps. If we
1310 see a single-step event but the thread should be continuing, don't
1311 pass the trap to gdb.
1312 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1313 internal_error instead of gdb_assert.
1314 (enqueue_pending_signal): New function.
1315 (check_ptrace_stopped_lwp_gone): Add debug output.
1316 (start_step_over): Use internal_error instead of gdb_assert.
1317 (complete_ongoing_step_over): New function.
1318 (linux_resume_one_thread): Don't resume a suspended thread.
1319 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1322 2015-08-06 Pedro Alves <palves@redhat.com>
1324 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1325 (linux_thread_alive): Use lwp_is_marked_dead.
1326 (extended_event_reported): Delete.
1327 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1328 instead of extended_event_reported.
1329 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1331 (lwp_is_marked_dead): New function.
1332 (lwp_running): Use lwp_is_marked_dead.
1333 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1336 2015-08-06 Pedro Alves <palves@redhat.com>
1338 * linux-low.c (linux_wait_1): Move fork event output out of the
1339 !report_to_gdb check. Pass event_child->waitstatus to
1340 target_waitstatus_to_string instead of ourstatus.
1342 2015-08-04 Yao Qi <yao.qi@linaro.org>
1344 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1345 if current_thread is 32 bit.
1347 2015-08-04 Yao Qi <yao.qi@linaro.org>
1349 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1350 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1351 * server.c (extended_protocol): Remove "static".
1352 * server.h (extended_protocol): Declare it.
1354 2015-08-04 Yao Qi <yao.qi@linaro.org>
1356 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1357 both aarch64 and aarch32.
1358 (aarch64_set_pc): Likewise.
1360 2015-08-04 Yao Qi <yao.qi@linaro.org>
1362 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1363 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1364 arm-with-neon.xml to srv_xmlfiles.
1365 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1366 (is_64bit_tdesc): New function.
1367 (aarch64_linux_read_description): New function.
1368 (aarch64_arch_setup): Call aarch64_linux_read_description.
1369 (regs_info): Rename to regs_info_aarch64.
1370 (aarch64_regs_info): Return right regs_info.
1371 (initialize_low_arch): Call initialize_low_arch_aarch32.
1373 2015-08-04 Yao Qi <yao.qi@linaro.org>
1375 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1376 * linux-aarch32-low.c: New file.
1377 * linux-aarch32-low.h: New file.
1378 * linux-arm-low.c (arm_fill_gregset): Move it to
1379 linux-aarch32-low.c.
1380 (arm_store_gregset): Likewise.
1381 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1382 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1383 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1384 (regs_info): Rename to regs_info_arm.
1385 (arm_regs_info): Return regs_info_aarch32 if
1386 have_ptrace_getregset is 1 and target description is
1387 arm_with_neon or arm_with_vfpv3.
1388 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1389 Call initialize_low_arch_aarch32 instead.
1391 2015-08-04 Yao Qi <yao.qi@linaro.org>
1393 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1394 * linux-low.c: ... here.
1395 * linux-low.h (have_ptrace_getregset): Declare it.
1397 2015-08-04 Pedro Alves <palves@redhat.com>
1399 * thread-db.c (struct thread_db): Use new typedefs.
1400 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1402 (disable_thread_event_reporting): Cast result of dlsym to
1403 destination function pointer type.
1404 (thread_db_mourn): Use td_ta_delete_ftype.
1406 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1408 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1410 (CDX_BREAKPOINT): Define for R2.
1411 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1412 (the_low_target): Add comments.
1414 2015-07-30 Yao Qi <yao.qi@linaro.org>
1416 * linux-arm-low.c (arm_hwcap): Remove it.
1417 (arm_read_description): New local variable arm_hwcap. Don't
1418 set arm_hwcap to zero.
1420 2015-07-30 Yao Qi <yao.qi@linaro.org>
1422 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1423 Use regcache->tdesc instead.
1424 (arm_store_wmmxregset): Likewise.
1425 (arm_fill_vfpregset): Likewise.
1426 (arm_store_vfpregset): Likewise.
1428 2015-07-30 Yao Qi <yao.qi@linaro.org>
1430 * linux-arm-low.c: Include arch/arm.h.
1431 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1432 (arm_store_gregset): Likewise.
1434 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1436 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1437 ptrace's 4th parameter.
1439 2015-07-27 Yao Qi <yao.qi@linaro.org>
1441 * configure.srv (case aarch64*-*-linux*): Don't set
1444 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1446 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1448 * linux-arm-low.c: Likewise.
1449 * linux-cris-low.c: Likewise.
1450 * linux-crisv32-low.c: Likewise.
1451 * linux-low.c: Likewise.
1452 * linux-m68k-low.c: Likewise.
1453 * linux-mips-low.c: Likewise.
1454 * linux-nios2-low.c: Likewise.
1455 * linux-s390-low.c: Likewise.
1456 * linux-sparc-low.c: Likewise.
1457 * linux-tic6x-low.c: Likewise.
1458 * linux-tile-low.c: Likewise.
1459 * linux-x86-low.c: Likewise.
1461 2015-07-24 Pedro Alves <palves@redhat.com>
1463 * config.in: Regenerate.
1464 * configure: Regenerate.
1466 2015-07-24 Pedro Alves <palves@redhat.com>
1468 * acinclude.m4: Include ../ptrace.m4.
1469 * configure.ac: Call GDB_AC_PTRACE.
1470 * config.in, configure: Regenerate.
1472 2015-07-24 Yao Qi <yao.qi@linaro.org>
1474 * linux-low.c (linux_create_inferior): Remove setting to
1475 proc->priv->new_inferior.
1476 (linux_attach): Likewise.
1477 (linux_low_filter_event): Likewise.
1478 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1480 2015-07-24 Yao Qi <yao.qi@linaro.org>
1482 * linux-low.c (linux_arch_setup): New function.
1483 (linux_low_filter_event): If proc->tdesc is NULL and
1484 proc->attached is true, call the_low_target.arch_setup.
1485 Otherwise, keep status pending, and return.
1486 (linux_resume_one_lwp_throw): Don't call get_pc if
1487 thread->while_stepping isn't NULL. Don't call
1488 get_thread_regcache if proc->tdesc is NULL.
1489 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1490 (linux_target_ops): Install arch_setup.
1491 * server.c (start_inferior): Call the_target->arch_setup.
1492 * target.h (struct target_ops) <arch_setup>: New field.
1493 (target_arch_setup): New marco.
1494 * lynx-low.c (lynx_target_ops): Update.
1495 * nto-low.c (nto_target_ops): Update.
1496 * spu-low.c (spu_target_ops): Update.
1497 * win32-low.c (win32_target_ops): Update.
1499 2015-07-24 Yao Qi <yao.qi@linaro.org>
1501 * linux-low.c (linux_add_process): Don't set
1502 proc->priv->new_inferior.
1503 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1504 (linux_attach): Likewise.
1506 2015-07-24 Yao Qi <yao.qi@linaro.org>
1508 * server.c (start_inferior): Code refactor.
1510 2015-07-24 Yao Qi <yao.qi@linaro.org>
1512 * server.c (process_serial_event): Set general_thread.
1514 2015-07-21 Yao Qi <yao.qi@linaro.org>
1516 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1517 aarch64_linux_get_debug_reg_capacity.
1519 2015-07-17 Yao Qi <yao.qi@linaro.org>
1521 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1522 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1523 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1524 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1525 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1526 (AARCH64_HWP_ALIGNMENT): Likewise.
1527 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1528 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1529 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1530 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1531 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1532 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1533 (struct aarch64_debug_reg_state): Likewise.
1534 (struct arch_lwp_info): Likewise.
1535 (aarch64_align_watchpoint): Likewise.
1536 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1537 (aarch64_watchpoint_length): Likewise.
1538 (aarch64_point_encode_ctrl_reg): Likewise
1539 (aarch64_point_is_aligned): Likewise.
1540 (aarch64_align_watchpoint): Likewise.
1541 (aarch64_linux_set_debug_regs):
1542 (aarch64_dr_state_insert_one_point): Likewise.
1543 (aarch64_dr_state_remove_one_point): Likewise.
1544 (aarch64_handle_breakpoint): Likewise.
1545 (aarch64_handle_aligned_watchpoint): Likewise.
1546 (aarch64_handle_unaligned_watchpoint): Likewise.
1547 (aarch64_handle_watchpoint): Likewise.
1549 2015-07-17 Yao Qi <yao.qi@linaro.org>
1551 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1552 and don't aarch64_get_debug_reg_state. All callers update.
1553 (aarch64_handle_aligned_watchpoint): Likewise.
1554 (aarch64_handle_unaligned_watchpoint): Likewise.
1555 (aarch64_handle_watchpoint): Likewise.
1556 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1557 (aarch64_remove_point): Likewise.
1559 2015-07-17 Yao Qi <yao.qi@linaro.org>
1561 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1563 (aarch64_handle_unaligned_watchpoint): Likewise.
1565 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1567 Revert the previous 3 commits:
1568 Move gdb_regex* to common/
1569 Move linux_find_memory_regions_full & co.
1570 gdbserver build-id attribute generator
1572 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1573 Jan Kratochvil <jan.kratochvil@redhat.com>
1575 gdbserver build-id attribute generator.
1576 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1577 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1578 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1580 (get_dynamic): Use find_pdhr to traverse program headers.
1581 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1582 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1583 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1584 (get_hex_build_id): New.
1585 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1586 to reply XML document.
1588 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1589 Jan Kratochvil <jan.kratochvil@redhat.com>
1591 * target.c: Include target/target-utils.h and fcntl.h.
1592 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1593 (target_fileio_read_stralloc): New functions.
1595 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1597 * Makefile.in (OBS): Add gdb_regex.o.
1599 * config.in: Rebuilt.
1600 * configure: Rebuilt.
1602 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1603 Jan Kratochvil <jan.kratochvil@redhat.com>
1605 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1606 * Makefile.in (OBS): Add target-utils.o.
1607 (linux-maps.o, target-utils.o): New.
1608 * configure.srv (srv_linux_obj): Add linux-maps.o.
1610 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1612 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1614 (the_low_target): Install it.
1616 2015-07-14 Pedro Alves <palves@redhat.com>
1618 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1619 Instead, ignore ECHILD, and throw an error for other errnos.
1621 2015-07-10 Pedro Alves <palves@redhat.com>
1623 * event-loop.c (struct callback_event) <data>: Change type to
1624 gdb_client_data instance instead of gdb_client_data pointer.
1625 (append_callback_event): Adjust.
1627 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1629 * linux-aarch64-low.c: Add comments for each linux_target_ops
1630 method. Remove comments already covered in target_ops and
1631 linux_target_ops definitions.
1632 (the_low_target): Add comments for each unimplemented method.
1634 2015-07-09 Yao Qi <yao.qi@linaro.org>
1636 * linux-aarch64-low.c (aarch64_regmap): Remove.
1637 (aarch64_usrregs_info): Remove.
1638 (regs_info): Set field usrregs to NULL.
1640 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1642 * linux-low.c: Include "rsp-low.h"
1643 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1644 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1645 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1646 (handle_btrace_enable_pt): New.
1647 (handle_btrace_general_set): Support "pt".
1648 (handle_btrace_conf_general_set): Support "pt:size".
1650 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1652 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1655 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1657 * linux-aarch64-low.c: Remove comment about endianness.
1658 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1659 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1662 2015-06-24 Gary Benson <gbenson@redhat.com>
1664 * linux-i386-ipa.c (stdint.h): Do not include.
1665 * lynx-i386-low.c (stdint.h): Likewise.
1666 * lynx-ppc-low.c (stdint.h): Likewise.
1667 * mem-break.c (stdint.h): Likewise.
1668 * thread-db.c (stdint.h): Likewise.
1669 * tracepoint.c (stdint.h): Likewise.
1670 * win32-low.c (stdint.h): Likewise.
1672 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1674 * server.c (write_qxfer_response): Update call to
1675 remote_escape_output.
1677 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1678 Jan Kratochvil <jan.kratochvil@redhat.com>
1680 Merge multiple hex conversions.
1681 * gdbreplay.c (tohex): Rename to 'fromhex'.
1682 (logchar): Use fromhex.
1684 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1686 * server.c (handle_qxfer_libraries): Set `version' attribute for
1689 2015-06-10 Gary Benson <gbenson@redhat.com>
1691 * target.h (struct target_ops) <multifs_open>: New field.
1692 <multifs_unlink>: Likewise.
1693 <multifs_readlink>: Likewise.
1694 * linux-low.c (nat/linux-namespaces.h): New include.
1695 (linux_target_ops): Initialize the_target->multifs_open,
1696 the_target->multifs_unlink and the_target->multifs_readlink.
1697 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1698 * hostio.c (hostio_fs_pid): New static variable.
1699 (hostio_handle_new_gdb_connection): New function.
1700 (handle_setfs): Likewise.
1701 (handle_open): Use the_target->multifs_open as appropriate.
1702 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1703 (handle_readlink): Use the_target->multifs_readlink as
1705 (handle_vFile): Handle vFile:setfs packets.
1706 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1707 after target_handle_new_gdb_connection.
1709 2015-06-10 Gary Benson <gbenson@redhat.com>
1711 * configure.ac (AC_CHECK_FUNCS): Add setns.
1712 * config.in: Regenerate.
1713 * configure: Likewise.
1714 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1715 (linux-namespaces.o): New rule.
1716 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1718 2015-06-09 Gary Benson <gbenson@redhat.com>
1720 * hostio.c (handle_open): Process mode argument with
1721 fileio_to_host_mode.
1723 2015-06-01 Yao Qi <yao.qi@linaro.org>
1725 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1726 * linux-x86-low.c: Likewise.
1728 2015-05-28 Don Breazeal <donb@codesourcery.com>
1730 * linux-low.c (handle_extended_wait): Initialize
1731 thread_info.last_resume_kind for new fork children.
1733 2015-05-15 Pedro Alves <palves@redhat.com>
1735 * target.h (target_handle_new_gdb_connection): Rewrite using if
1736 wrapped in do/while.
1738 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1740 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1741 * configure, config.in: Regenerate.
1742 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1745 2015-05-12 Don Breazeal <donb@codesourcery.com>
1747 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1748 PTRACE_EVENT_VFORK_DONE.
1749 (linux_low_ptrace_options, extended_event_reported): Add vfork
1751 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1752 and "vforkdone" for RSP 'T' Stop Reply Packet.
1753 * server.h (report_vfork_events): Declare
1756 2015-05-12 Don Breazeal <donb@codesourcery.com>
1758 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1759 (the_low_target) <new_fork>: Initialize new member.
1760 * linux-arm-low.c (arm_new_fork): New function.
1761 (the_low_target) <new_fork>: Initialize new member.
1762 * linux-low.c (handle_extended_wait): Call new target function
1764 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1765 * linux-mips-low.c (mips_add_watchpoint): New function
1766 extracted from mips_insert_point.
1767 (the_low_target) <new_fork>: Initialize new member.
1768 (mips_linux_new_fork): New function.
1769 (mips_insert_point): Call mips_add_watchpoint.
1770 * linux-x86-low.c (x86_linux_new_fork): New function.
1771 (the_low_target) <new_fork>: Initialize new member.
1773 2015-05-12 Don Breazeal <donb@codesourcery.com>
1775 * linux-low.c (handle_extended_wait): Implement return value,
1776 rename argument 'event_child' to 'event_lwp', handle
1777 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1778 (linux_low_ptrace_options): New function.
1779 (linux_low_filter_event): Call linux_low_ptrace_options,
1780 use different argument fo linux_enable_event_reporting,
1781 use return value from handle_extended_wait.
1782 (extended_event_reported): New function.
1783 (linux_wait_1): Call extended_event_reported and set
1784 status to report fork events.
1785 (linux_write_memory): Add pid to debug message.
1786 (reset_lwp_ptrace_options_callback): New function.
1787 (linux_handle_new_gdb_connection): New function.
1788 (linux_target_ops): Initialize new structure member.
1789 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1790 * lynx-low.c: Initialize new structure member.
1791 * remote-utils.c (prepare_resume_reply): Implement stop reason
1792 "fork" for "T" stop message.
1793 * server.c (handle_query): Call handle_new_gdb_connection.
1794 * server.h (report_fork_events): Declare global flag.
1795 * target.h (struct target_ops) <handle_new_gdb_connection>:
1797 (target_handle_new_gdb_connection): New macro.
1798 * win32-low.c: Initialize new structure member.
1800 2015-05-12 Don Breazeal <donb@codesourcery.com>
1802 * mem-break.c (APPEND_TO_LIST): Define macro.
1803 (clone_agent_expr): New function.
1804 (clone_one_breakpoint): New function.
1805 (clone_all_breakpoints): New function.
1806 * mem-break.h: Declare new functions.
1808 2015-05-12 Don Breazeal <donb@codesourcery.com>
1810 * linux-low.c (linux_supports_fork_events): New function.
1811 (linux_supports_vfork_events): New function.
1812 (linux_target_ops): Initialize new structure members.
1813 (initialize_low): Call linux_check_ptrace_features.
1814 * lynx-low.c (lynx_target_ops): Initialize new structure
1816 * server.c (report_fork_events, report_vfork_events):
1818 (handle_query): Add new features to qSupported packet and
1820 (captured_main): Initialize new global variables.
1821 * target.h (struct target_ops) <supports_fork_events>:
1823 <supports_vfork_events>: New member.
1824 (target_supports_fork_events): New macro.
1825 (target_supports_vfork_events): New macro.
1826 * win32-low.c (win32_target_ops): Initialize new structure
1829 2015-05-12 Gary Benson <gbenson@redhat.com>
1831 * server.c (handle_qxfer_exec_file): Use current process
1834 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1836 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1837 Remove HAVE_PTRACE_GETREGS conditionals.
1838 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1839 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1841 2015-05-08 Yao Qi <yao.qi@linaro.org>
1843 * linux-low.c (linux_supports_conditional_breakpoints): New
1845 (linux_target_ops): Install new target method.
1846 * lynx-low.c (lynx_target_ops): Install NULL hook for
1847 supports_conditional_breakpoints.
1848 * nto-low.c (nto_target_ops): Likewise.
1849 * spu-low.c (spu_target_ops): Likewise.
1850 * win32-low.c (win32_target_ops): Likewise.
1851 * server.c (handle_query): Check
1852 target_supports_conditional_breakpoints.
1853 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1855 (target_supports_conditional_breakpoints): New macro.
1857 2015-05-06 Pedro Alves <palves@redhat.com>
1860 * server.c (start_inferior): If the process exits, mourn it.
1862 2015-04-21 Gary Benson <gbenson@redhat.com>
1864 * hostio.c (fileio_open_flags_to_host): Factored out to
1865 fileio_to_host_openflags in common/fileio.c. Single use
1868 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1870 * linux-xtensa-low.c (xtensa_fill_gregset)
1871 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1874 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1876 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1877 (regs_info): Replace usrregs pointer with NULL.
1879 2015-04-17 Gary Benson <gbenson@redhat.com>
1881 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1882 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1883 * server.c (handle_qxfer_exec_file): New function.
1884 (qxfer_packets): Add exec-file entry.
1885 (handle_query): Report qXfer:exec-file:read as supported packet.
1887 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1889 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1891 2015-04-09 Gary Benson <gbenson@redhat.com>
1893 * hostio-errno.c (errno_to_fileio_error): Remove function.
1894 Update caller to use remote_fileio_to_fio_error.
1896 2015-04-09 Yao Qi <yao.qi@linaro.org>
1898 * linux-low.c (linux_insert_point): Call
1899 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1900 (linux_remove_point): Call remove_memory_breakpoint if type is
1902 * linux-x86-low.c (x86_insert_point): Don't call
1903 insert_memory_breakpoint.
1904 (x86_remove_point): Don't call remove_memory_breakpoint.
1906 2015-04-01 Pedro Alves <palves@redhat.com>
1907 Cleber Rosa <crosa@redhat.com>
1909 * server.c (gdbserver_usage): Reorganize and extend the usage
1912 2015-03-24 Pedro Alves <palves@redhat.com>
1914 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1915 output. Also dump TRAP_TRACE.
1916 (linux_low_filter_event): In debug output, distinguish a
1917 resume_stop SIGSTOP from a delayed SIGSTOP.
1919 2015-03-24 Gary Benson <gbenson@redhat.com>
1921 * linux-x86-low.c (x86_linux_new_thread): Moved to
1923 (x86_linux_prepare_to_resume): Likewise.
1925 2015-03-24 Gary Benson <gbenson@redhat.com>
1927 * Makefile.in (x86-linux-dregs.o): New rule.
1928 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1929 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1930 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1931 (x86_linux_dr_get): Likewise.
1932 (x86_linux_dr_set): Likewise.
1933 (update_debug_registers_callback): Likewise.
1934 (x86_linux_dr_set_addr): Likewise.
1935 (x86_linux_dr_get_addr): Likewise.
1936 (x86_linux_dr_set_control): Likewise.
1937 (x86_linux_dr_get_control): Likewise.
1938 (x86_linux_dr_get_status): Likewise.
1939 (x86_linux_update_debug_registers): Likewise.
1941 2015-03-24 Gary Benson <gbenson@redhat.com>
1943 * linux-x86-low.c (x86_linux_update_debug_registers):
1944 New function, factored out from...
1945 (x86_linux_prepare_to_resume): ...this.
1947 2015-03-24 Gary Benson <gbenson@redhat.com>
1949 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1950 (x86_linux_dr_set): Likewise.
1951 (update_debug_registers_callback): Likewise.
1952 (x86_linux_dr_set_addr): Likewise.
1953 (x86_linux_dr_get_addr): Likewise.
1954 (x86_linux_dr_set_control): Likewise.
1955 (x86_linux_dr_get_control): Likewise.
1956 (x86_linux_dr_get_status): Likewise.
1957 (x86_linux_prepare_to_resume): Likewise.
1959 2015-03-24 Gary Benson <gbenson@redhat.com>
1961 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1962 Use perror_with_name. Pass string through gettext.
1963 (x86_linux_dr_set): Likewise.
1965 2015-03-24 Gary Benson <gbenson@redhat.com>
1967 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1968 (x86_linux_dr_set_addr): ...this.
1969 (x86_dr_low_get_addr): Rename to...
1970 (x86_linux_dr_get_addr): ...this.
1971 (x86_dr_low_set_control): Rename to...
1972 (x86_linux_dr_set_control): ...this.
1973 (x86_dr_low_get_control): Rename to...
1974 (x86_linux_dr_get_control): ...this.
1975 (x86_dr_low_get_status): Rename to...
1976 (x86_linux_dr_get_status): ...this.
1977 (x86_dr_low): Update with new function names.
1979 2015-03-24 Gary Benson <gbenson@redhat.com>
1981 * Makefile.in (x86-linux.o): New rule.
1982 * configure.srv: Add x86-linux.o to relevant targets.
1983 * linux-low.c (lwp_set_arch_private_info): New function.
1984 (lwp_arch_private_info): Likewise.
1985 * linux-x86-low.c: Include nat/x86-linux.h.
1986 (arch_lwp_info): Removed structure.
1987 (update_debug_registers_callback):
1988 Use lwp_set_debug_registers_changed.
1989 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1990 and lwp_set_debug_registers_changed.
1991 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1993 2015-03-24 Gary Benson <gbenson@redhat.com>
1995 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1996 * linux-arm-low.c (arm_new_thread): Likewise.
1997 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1998 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1999 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2000 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2002 2015-03-24 Gary Benson <gbenson@redhat.com>
2004 * linux-low.c (ptid_of_lwp): New function.
2005 (lwp_is_stopped): Likewise.
2006 (lwp_stop_reason): Likewise.
2007 * linux-x86-low.c (update_debug_registers_callback):
2009 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2012 2015-03-24 Gary Benson <gbenson@redhat.com>
2014 * linux-low.h (linux_stop_lwp): Remove declaration.
2016 2015-03-24 Gary Benson <gbenson@redhat.com>
2018 * linux-low.h: Include nat/linux-nat.h.
2019 * linux-low.c (iterate_over_lwps_args): New structure.
2020 (iterate_over_lwps_filter): New function.
2021 (iterate_over_lwps): Likewise.
2022 * linux-x86-low.c (update_debug_registers_callback):
2023 Update signature to what iterate_over_lwps expects.
2024 Remove PID check that iterate_over_lwps now performs.
2025 (x86_dr_low_set_addr): Use iterate_over_lwps.
2026 (x86_dr_low_set_control): Likewise.
2028 2015-03-24 Gary Benson <gbenson@redhat.com>
2030 * linux-x86-low.c (x86_debug_reg_state): New function.
2031 (x86_linux_prepare_to_resume): Use the above.
2033 2015-03-24 Gary Benson <gbenson@redhat.com>
2035 * linux-low.c (current_lwp_ptid): New function.
2036 * linux-x86-low.c: Include nat/linux-nat.h.
2037 (x86_dr_low_get_addr): Use current_lwp_ptid.
2038 (x86_dr_low_get_control): Likewise.
2039 (x86_dr_low_get_status): Likewise.
2041 2015-03-20 Pedro Alves <palves@redhat.com>
2043 * tracepoint.c (cmd_qtstatus): Make "str" const.
2045 2015-03-20 Pedro Alves <palves@redhat.com>
2047 * server.c (handle_general_set): Make "req_str" const.
2049 2015-03-19 Pedro Alves <palves@redhat.com>
2051 * linux-low.c (linux_resume_one_lwp): Rename to ...
2052 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2053 instead call perror_with_name.
2054 (check_ptrace_stopped_lwp_gone): New function.
2055 (linux_resume_one_lwp): Reimplement as wrapper around
2056 linux_resume_one_lwp_throw that swallows errors if the LWP is
2059 2015-03-19 Pedro Alves <palves@redhat.com>
2061 * linux-low.c (count_events_callback, select_event_lwp_callback):
2062 No longer check whether the thread has resume_stop as last resume
2065 2015-03-19 Pedro Alves <palves@redhat.com>
2067 * linux-low.c (count_events_callback, select_event_lwp_callback):
2068 Use the lwp's status_pending_p field, not the thread's.
2070 2015-03-19 Pedro Alves <palves@redhat.com>
2072 * linux-low.c (select_event_lwp_callback): Update comments to
2073 no longer mention SIGTRAP.
2075 2015-03-18 Gary Benson <gbenson@redhat.com>
2077 * server.c (handle_query): Do not report vFile:fstat as supported.
2079 2015-03-11 Gary Benson <gbenson@redhat.com>
2081 * hostio.c (sys/types.h): New include.
2082 (sys/stat.h): Likewise.
2083 (common-remote-fileio.h): Likewise.
2084 (handle_fstat): New function.
2085 (handle_vFile): Handle vFile:fstat packets.
2087 2015-03-11 Gary Benson <gbenson@redhat.com>
2089 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2090 struct stat.st_blocks and struct stat.st_blksize.
2091 * configure: Regenerate.
2092 * config.in: Likewise.
2093 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2094 (OBS): Add common-remote-fileio.o.
2095 (common-remote-fileio.o): New rule.
2097 2015-03-09 Pedro Alves <palves@redhat.com>
2099 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2100 'struct sockaddr' pointer in 'accept' call.
2102 2015-03-09 Pedro Alves <palves@redhat.com>
2105 2015-03-07 Pedro Alves <palves@redhat.com>
2106 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2107 or <winsock2.h> here. Instead include "gdb_socket.h".
2108 (remote_open): Use union gdb_sockaddr_u.
2109 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2110 or <winsock2.h> here. Instead include "gdb_socket.h".
2111 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2112 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2114 (init_named_socket, gdb_agent_helper_thread): Use union
2117 2015-03-07 Pedro Alves <palves@redhat.com>
2119 * configure.ac (build_warnings): Move
2120 -Wdeclaration-after-statement to the C-specific set.
2121 * configure: Regenerate.
2123 2015-03-07 Pedro Alves <palves@redhat.com>
2125 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2126 or <winsock2.h> here. Instead include "gdb_socket.h".
2127 (remote_open): Use union gdb_sockaddr_u.
2128 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2129 or <winsock2.h> here. Instead include "gdb_socket.h".
2130 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2131 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2133 (init_named_socket, gdb_agent_helper_thread): Use union
2136 2015-03-07 Pedro Alves <palves@redhat.com>
2138 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2141 2015-03-06 Yao Qi <yao.qi@linaro.org>
2143 * linux-aarch64-low.c (aarch64_insert_point): Use
2144 show_debug_regs as a boolean.
2145 (aarch64_remove_point): Likewise.
2147 2015-03-05 Pedro Alves <palves@redhat.com>
2149 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2150 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2151 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2152 * nto-low.c (nto_target_ops): Likewise.
2153 * spu-low.c (spu_target_ops): Likewise.
2154 * win32-low.c (win32_target_ops): Likewise.
2156 2015-03-04 Pedro Alves <palves@redhat.com>
2158 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2159 Decide whether a breakpoint triggered based on the SIGTRAP's
2161 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2162 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2163 (linux_low_filter_event): Check for breakpoints before checking
2165 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2167 (linux_stopped_by_sw_breakpoint)
2168 (linux_supports_stopped_by_sw_breakpoint)
2169 (linux_stopped_by_hw_breakpoint)
2170 (linux_supports_stopped_by_hw_breakpoint): New functions.
2171 (linux_target_ops): Install new target methods.
2173 2015-03-04 Pedro Alves <palves@redhat.com>
2175 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2176 * server.c (swbreak_feature, hwbreak_feature): New globals.
2177 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2178 (captured_main): Clear swbreak_feature and hwbreak_feature.
2179 * server.h (swbreak_feature, hwbreak_feature): Declare.
2180 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2181 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2182 supports_stopped_by_hw_breakpoint>: New fields.
2183 (target_supports_stopped_by_sw_breakpoint)
2184 (target_stopped_by_sw_breakpoint)
2185 (target_supports_stopped_by_hw_breakpoint)
2186 (target_stopped_by_hw_breakpoint): Declare.
2188 2015-03-04 Pedro Alves <palves@redhat.com>
2190 enum lwp_stop_reason -> enum target_stop_reason
2191 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2192 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2193 (linux_wait_1, stuck_in_jump_pad_callback)
2194 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2195 (linux_stopped_by_watchpoint):
2196 * linux-low.h (enum lwp_stop_reason): Delete.
2197 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2198 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2200 2015-03-04 Yao Qi <yao.qi@linaro.org>
2202 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2204 2015-03-03 Gary Benson <gbenson@redhat.com>
2206 * hostio.c (handle_vFile): Fix prefix lengths.
2208 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2210 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2213 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2215 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2216 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2217 (clean): Add "rm -f" for above C files.
2218 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2219 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2220 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2221 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2222 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2223 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2224 (init_registers_s390x_vx_linux64)
2225 (init_registers_s390x_tevx_linux64)
2226 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2227 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2229 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2230 (s390_store_vxrs_high): New functions.
2231 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2233 (s390_arch_setup): Add logic for selecting one of the new target
2234 descriptions. Activate the new vector regsets if applicable.
2235 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2236 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2237 and init_registers_s390x_tevx_linux64.
2239 2015-03-01 Pedro Alves <palves@redhat.com>
2241 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2244 2015-02-27 Pedro Alves <palves@redhat.com>
2246 * linux-x86-low.c (u_debugreg_offset): New function.
2247 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2249 2015-02-27 Pedro Alves <palves@redhat.com>
2251 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2252 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2253 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2254 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2255 (ps_lsetfpregs, ps_getpid)
2256 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2257 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2258 (ps_lsetxregs, ps_plog): Declare.
2260 2015-02-27 Pedro Alves <palves@redhat.com>
2262 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2263 IP_AGENT_EXPORT_FUNC.
2264 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2265 IP_AGENT_EXPORT_FUNC.
2266 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2267 (IP_AGENT_EXPORT): Delete.
2268 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2269 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2270 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2271 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2272 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2273 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2274 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2275 (traceframe_read_count, traceframe_write_count)
2276 (traceframes_created, trace_state_variables, get_raw_reg)
2277 (get_trace_state_variable_value, set_trace_state_variable_value)
2278 (ust_loaded, helper_thread_id, cmd_buf): Use
2279 IPA_SYM_EXPORTED_NAME.
2280 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2281 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2282 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2283 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2284 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2285 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2286 EXTERN_C_PUSH/EXTERN_C_POP.
2287 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2288 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2289 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2290 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2291 (traceframe_write_count, traceframe_read_count)
2292 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2293 (about_to_request_buffer_space, get_trace_state_variable_value)
2294 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2295 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2296 EXTERN_C_PUSH/EXTERN_C_POP.
2297 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2298 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2299 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2300 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2301 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2302 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2303 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2304 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2306 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2307 (IP_AGENT_EXPORT_VAR_DECL): Define.
2309 (gdb_agent_get_raw_reg): Declare.
2311 2015-02-27 Tom Tromey <tromey@redhat.com>
2312 Pedro Alves <palves@redhat.com>
2314 Rename symbols whose names are reserved C++ keywords throughout.
2316 2015-02-27 Pedro Alves <palves@redhat.com>
2318 * Makefile.in (COMPILER): New, get it from autoconf.
2319 (CXX): Get from autoconf instead.
2320 (COMPILE.pre): Use COMPILER.
2321 (CC-LD): Rename to ...
2322 (CC_LD): ... this. Use COMPILER.
2323 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2324 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2325 * acinclude.m4: Include build-with-cxx.m4.
2326 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2327 Disable -Werror by default if building in C++ mode.
2328 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2329 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2330 the C++ compiler. Save/restore CXXFLAGS too.
2331 * configure: Regenerate.
2333 2015-02-27 Pedro Alves <palves@redhat.com>
2335 * acinclude.m4: Include libiberty.m4.
2336 * configure.ac: Call libiberty_INIT.
2337 * config.in, configure: Regenerate.
2339 2015-02-26 Pedro Alves <palves@redhat.com>
2341 * linux-low.c (linux_wait_1): When incrementing the PC past a
2342 program breakpoint always use the_low_target.breakpoint_len as
2343 increment, rather than the maximum between that and
2344 the_low_target.decr_pc_after_break.
2346 2015-02-23 Pedro Alves <palves@redhat.com>
2348 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2349 thread was doing a step-over; always adjust the PC if
2350 we stepped over a permanent breakpoint.
2351 (linux_wait_1): If we stepped over breakpoint that was on top of a
2352 permanent breakpoint, manually advance the PC past it.
2354 2015-02-23 Pedro Alves <palves@redhat.com>
2356 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2358 (x86_fill_gregset, x86_store_gregset): Use it when handling
2361 2015-02-20 Pedro Alves <palves@redhat.com>
2363 * thread-db.c: Include "nat/linux-procfs.h".
2364 (thread_db_init): Skip listing new threads if the kernel supports
2365 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2367 2015-02-20 Pedro Alves <palves@redhat.com>
2369 * linux-low.c (status_pending_p_callback): Use ptid_match.
2371 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2373 PR breakpoints/16812
2374 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2375 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2376 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2378 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2380 PR breakpoints/15956
2381 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2383 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2385 * linux-low.c (linux_low_btrace_conf): Print size.
2386 * server.c (handle_btrace_conf_general_set): New.
2387 (hanle_general_set): Call handle_btrace_conf_general_set.
2388 (handle_query): Report Qbtrace-conf:bts:size as supported.
2390 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2392 * linux-low.c (linux_low_enable_btrace): Update parameters.
2393 (linux_low_btrace_conf): New.
2394 (linux_target_ops)<to_btrace_conf>: Initialize.
2395 * server.c (current_btrace_conf): New.
2396 (handle_btrace_enable): Rename to ...
2397 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2398 to target_enable_btrace. Update comment. Update users.
2399 (handle_qxfer_btrace_conf): New.
2400 (qxfer_packets): Add btrace-conf entry.
2401 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2402 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2403 (target_ops)<read_btrace_conf>: New.
2404 (target_enable_btrace): Update parameters.
2405 (target_read_btrace_conf): New.
2407 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2409 * server.c (handle_btrace_general_set): Remove call to
2410 target_supports_btrace.
2411 (supported_btrace_packets): New.
2412 (handle_query): Call supported_btrace_packets.
2413 * target.h: include btrace-common.h.
2414 (btrace_target_info): Removed.
2415 (supports_btrace, target_supports_btrace): Update parameters.
2417 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2419 * Makefile.in (SFILES): Add common/btrace-common.c.
2420 (OBS): Add common/btrace-common.o.
2421 (btrace-common.o): Add build rules.
2422 * linux-low: Include btrace-common.h.
2423 (linux_low_read_btrace): Use struct btrace_data. Call
2424 btrace_data_init and btrace_data_fini.
2426 2015-02-06 Pedro Alves <palves@redhat.com>
2428 * thread-db.c (find_new_threads_callback): Add debug output.
2430 2015-02-04 Pedro Alves <palves@redhat.com>
2432 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2433 (resume_stopped_resumed_lwps): New function.
2434 (linux_wait_for_event_filtered): Use it.
2436 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2438 * Makefile.in (SFILES): Add linux-personality.c.
2439 (linux-personality.o): New rule.
2440 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2441 list of objects to be built.
2442 * linux-low.c: Include nat/linux-personality.h.
2443 (linux_create_inferior): Remove code to disable address space
2444 randomization (moved to ../nat/linux-personality.c). Create
2445 cleanup to disable address space randomization.
2447 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2449 * Makefile.in (posix-strerror.o): New rule.
2450 (mingw-strerror.o): Likewise.
2451 * configure: Regenerated.
2452 * configure.ac: Source file ../common/common.host. Initialize new
2453 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2455 2015-01-14 Yao Qi <yao@codesourcery.com>
2457 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2458 (ppc-linux.o): New rule.
2459 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2460 * configure.ac: AC_CHECK_FUNCS(getauxval).
2461 * config.in: Re-generated.
2462 * configure: Re-generated.
2463 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2464 ppc64_64bit_inferior_p
2466 2015-01-14 Yao Qi <yao@codesourcery.com>
2468 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2469 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2470 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2471 (PT_ORIG_R3, PT_TRAP): Likewise.
2472 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2473 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2474 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2476 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2478 * i387-fp.c (i387_cache_to_xsave): In look over
2479 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2480 zmmh_low_space field by use of zmmh_high_space.
2482 2015-01-09 Pedro Alves <palves@redhat.com>
2484 * linux-low.c (step_over_bkpt): Move higher up in the file.
2485 (handle_extended_wait): Don't store the stop_pc here.
2486 (get_stop_pc): Adjust comments and rename to ...
2487 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2488 stopped for a software breakpoint or hardware breakpoint.
2489 (thread_still_has_status_pending_p): New function.
2490 (status_pending_p_callback): Use
2491 thread_still_has_status_pending_p. If the event is no longer
2492 interesting, resume the LWP.
2493 (handle_tracepoints): Add assert.
2494 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2495 (wstatus_maybe_breakpoint): New function.
2496 (cancel_breakpoint): Delete function.
2497 (check_stopped_by_watchpoint): New function, factored out from
2498 linux_low_filter_event.
2499 (lp_status_maybe_breakpoint): Delete function.
2500 (linux_low_filter_event): Remove filter_ptid argument.
2501 Leave thread group exits pending here. Store the LWP's stop PC.
2502 Always leave events pending.
2503 (linux_wait_for_event_filtered): Pull all events out of the
2504 kernel, and leave them all pending.
2505 (count_events_callback, select_event_lwp_callback): Consider all
2507 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2508 (select_event_lwp): Only give preference to the stepping LWP in
2509 all-stop mode. Adjust comments.
2510 (ignore_event): New function.
2511 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2512 references to cancel_breakpoints. Adjust to renames. Also give
2513 equal priority to all LWPs that have had events in non-stop mode.
2514 If reporting a software breakpoint event, unadjust the LWP's PC.
2515 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2516 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2518 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2519 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2520 (linux_stopped_by_watchpoint): Adjust.
2521 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2522 * linux-low.h (enum lwp_stop_reason): New.
2523 (struct lwp_info) <stop_pc>: Adjust comment.
2524 <stopped_by_watchpoint>: Delete field.
2525 <stop_reason>: New field.
2526 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2527 * mem-break.c (software_breakpoint_inserted_here)
2528 (hardware_breakpoint_inserted_here): New function.
2529 * mem-break.h (software_breakpoint_inserted_here)
2530 (hardware_breakpoint_inserted_here): Declare.
2531 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2532 (cancel_breakpoints): Delete.
2533 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2534 (upload_fast_traceframes): Remove references to
2537 2015-01-09 Pedro Alves <palves@redhat.com>
2539 * thread-db.c (find_new_threads_callback): Ignore thread if the
2540 kernel thread ID is -1.
2542 2015-01-09 Pedro Alves <palves@redhat.com>
2544 * linux-low.c (linux_attach_fail_reason_string): Move to
2545 nat/linux-ptrace.c, and rename.
2546 (linux_attach_lwp): Update comment.
2547 (attach_proc_task_lwp_callback): New function.
2548 (linux_attach): Adjust to rename and use
2549 linux_proc_attach_tgid_threads.
2550 (linux_attach_fail_reason_string): Delete declaration.
2552 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2554 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2555 * server.c (gdbserver_version): Likewise.
2557 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2559 * remote-utils.c: Include ctype.h.
2560 (input_interrupt): Explicitly handle the case when the char
2561 received is the NUL byte. Improve the printing of non-ASCII
2564 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2566 * linux-low.c (linux_low_filter_event): Update call to
2567 linux_enable_event_reporting following the addition of
2568 a new parameter to that function.
2570 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2573 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2574 (AARCH64_FPCR_REGNO): Likewise.
2575 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2576 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2577 (aarch64_store_fpregset): Likewise.
2579 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2581 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2582 Remove FIXME comment about assumption about N.
2584 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2586 * configure.ac: If large-file support is disabled in GDBserver,
2587 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2588 * configure: Regenerate.
2590 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2592 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2593 warning upon ENODATA from ptrace.
2594 * linux-s390-low.c (s390_store_tdb): New.
2595 (s390_regsets): Add regset for NT_S390_TDB.
2597 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2599 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2600 without a fill_function.
2601 * linux-s390-low.c (s390_fill_last_break): Remove.
2602 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2603 (s390_arch_setup): Use regset's size instead of fill_function for
2606 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2608 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2609 the regset's store function when ptrace returned an error.
2610 * regcache.c (get_thread_regcache): Invalidate register cache
2611 before fetching inferior's registers.
2613 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2615 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2616 while-loop as for-loop.
2617 (regsets_store_inferior_registers): Likewise.
2619 2014-11-28 Yao Qi <yao@codesourcery.com>
2621 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2622 * config.in, configure: Re-generate.
2623 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2626 2014-11-21 Yao Qi <yao@codesourcery.com>
2628 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2629 (AC_CHECK_HEADERS): Remove malloc.h.
2630 * configure: Re-generated.
2631 * config.in: Re-generated.
2632 * server.h: Don't include alloca.h and malloc.h.
2633 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2634 Don't include malloc.h.
2636 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2638 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2639 corresponding ERRNO check in same block.
2641 2014-11-12 Pedro Alves <palves@redhat.com>
2643 * server.c (cont_thread): Update comment.
2644 (start_inferior, attach_inferior): No longer clear cont_thread.
2645 (handle_v_cont): No longer set cont_thread.
2646 (captured_main): Clear cont_thread each time a GDB connects.
2648 2014-11-12 Pedro Alves <palves@redhat.com>
2650 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2651 thread, and don't resume all threads if the Hc thread has exited.
2653 2014-11-12 Pedro Alves <palves@redhat.com>
2655 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2656 the process group instead of to a specific LWP.
2658 2014-10-15 Pedro Alves <palves@redhat.com>
2661 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2663 (arm_set_thread_context): Delete.
2664 (the_low_target): Adjust.
2665 * win32-i386-low.c (debug_registers_changed)
2666 (debug_registers_used): Delete.
2667 (update_debug_registers_callback): New function.
2668 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2669 needing to update their debug registers.
2670 (win32_get_current_dr): New function.
2671 (x86_dr_low_get_addr, x86_dr_low_get_control)
2672 (x86_dr_low_get_status): Fetch the debug register from the thread
2674 (i386_initial_stuff): Adjust.
2675 (i386_get_thread_context): Remove current_event parameter. Don't
2676 clear debug_registers_changed nor copy DR values to
2678 (i386_set_thread_context): Delete.
2679 (i386_prepare_to_resume): New function.
2680 (i386_thread_added): Mark the thread as needing to update irs
2682 (the_low_target): Remove i386_set_thread_context and install
2683 i386_prepare_to_resume.
2684 * win32-low.c (win32_get_thread_context): Adjust.
2685 (win32_set_thread_context): Use SetThreadContext
2687 (win32_prepare_to_resume): New function.
2688 (win32_require_context): New function, factored out from ...
2689 (thread_rec): ... this.
2690 (continue_one_thread): Call win32_prepare_to_resume on each thread
2691 we're about to continue.
2692 (win32_resume): Call win32_prepare_to_resume on the event thread.
2693 * win32-low.h (struct win32_thread_info)
2694 <debug_registers_changed>: New field.
2695 (struct win32_target_ops): Change prototype of set_thread_context,
2696 delete set_thread_context and add prepare_to_resume.
2697 (win32_require_context): New declaration.
2699 2014-10-08 Gary Benson <gbenson@redhat.com>
2701 * server.h: Do not include common-exceptions.h.
2703 2014-10-08 Gary Benson <gbenson@redhat.com>
2705 * server.h: Do not include cleanups.h.
2707 2014-09-30 James Hogan <james.hogan@imgtec.com>
2709 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2712 2014-09-23 Yao Qi <yao@codesourcery.com>
2714 * linux-low.c (lp_status_maybe_breakpoint): New function.
2715 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2716 (count_events_callback): Likewise.
2717 (select_event_lwp_callback): Likewise.
2718 (cancel_breakpoints_callback): Likewise.
2720 2014-09-19 Don Breazeal <donb@codesourcery.com>
2722 * linux-low.c (handle_extended_wait): Call
2723 linux_ptrace_get_extended_event.
2724 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2725 linux_is_extended_waitstatus.
2727 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2729 * Makefile.in (CPPFLAGS): Define.
2730 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2731 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2733 2014-09-16 Gary Benson <gbenson@redhat.com>
2735 * inferiors.h (current_inferior): Renamed as...
2736 (current_thread): New variable. All uses updated.
2737 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2738 (maybe_move_out_of_jump_pad): Likewise.
2739 (cancel_breakpoint): Likewise.
2740 (linux_low_filter_event): Likewise.
2741 (wait_for_sigstop): Likewise.
2742 (linux_resume_one_lwp): Likewise.
2743 (need_step_over_p): Likewise.
2744 (start_step_over): Likewise.
2745 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2746 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2747 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2748 and save_inferior as saved_thread.
2749 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2751 (regcache_invalidate_thread): Likewise.
2752 * remote-utils.c (prepare_resume_reply): Likewise.
2753 * thread-db.c (thread_db_get_tls_address): Likewise.
2754 (disable_thread_event_reporting): Likewise.
2755 (remove_thread_event_breakpoints): Likewise.
2756 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2758 * target.h (set_desired_inferior): Renamed as...
2759 (set_desired_thread): New declaration. All uses updated.
2760 * server.c (myresume): Updated comment to reference thread instead
2762 (handle_serial_event): Likewise.
2763 (handle_target_event): Likewise.
2765 2014-09-12 Tom Tromey <tromey@redhat.com>
2766 Gary Benson <gbenson@redhat.com>
2768 * regcache.h: Include common-regcache.h.
2769 (regcache_read_pc): Don't declare.
2770 * regcache.c (get_thread_regcache_for_ptid): New function.
2772 2014-09-11 Tom Tromey <tromey@redhat.com>
2773 Gary Benson <gbenson@redhat.com>
2775 * symbol.c: New file.
2776 * Makefile.in (SFILES): Add symbol.c.
2777 (OBS): Add symbol.o.
2779 2014-09-11 Gary Benson <gbenson@redhat.com>
2781 * target.c (target_stop_ptid, target_continue_ptid): New
2784 2014-09-11 Tom Tromey <tromey@redhat.com>
2785 Gary Benson <gbenson@redhat.com>
2787 * target.h: Include target/target.h.
2788 * target.c (target_read_memory, target_read_uint32)
2789 (target_write_memory): New functions.
2791 2014-09-11 Gary Benson <gbenson@redhat.com>
2793 * server.h (debug_hw_points): Don't declare.
2794 * server.c (debug_hw_points): Don't define. Replace all uses
2795 with show_debug_regs.
2796 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2797 all uses with show_debug_regs.
2799 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2801 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2802 endianness into account.
2803 (ppc_supply_ptrace_register): Likewise.
2805 2014-09-03 James Hogan <james.hogan@imgtec.com>
2807 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2808 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2810 2014-09-03 Gary Benson <gbenson@redhat.com>
2812 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2813 ALL_DEBUG_ADDRESS_REGISTERS.
2815 2014-09-02 Gary Benson <gbenson@redhat.com>
2817 * i386-low.h: Renamed as...
2818 * x86-low.h: New file. All type, function and variable name
2819 prefixes changed from "i386_" to "x86_". All references updated.
2820 * i386-low.c: Renamed as...
2821 * x86-low.c: New file. All type, function and variable name
2822 prefixes changed from "i386_" to "x86_". All references updated.
2824 2014-09-02 Gary Benson <gbenson@redhat.com>
2826 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2827 (x86_linux_new_thread): Likewise.
2829 2014-08-29 Gary Benson <gbenson@redhat.com>
2831 * server.h (setjmp.h): Do not include.
2832 (toplevel): Do not declare.
2833 (common-exceptions.h): Include.
2834 (cleanups.h): Likewise.
2835 * server.c (toplevel): Do not define.
2836 (exit_code): New static global.
2837 (detach_or_kill_for_exit_cleanup): New function.
2838 (main): New function. Original main renamed to...
2839 (captured_main): New function.
2840 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2842 2014-08-29 Gary Benson <gbenson@redhat.com>
2844 * Makefile.in (SFILES): Add common/common-exceptions.c.
2845 (OBS): Add common-exceptions.o.
2846 (common-exceptions.o): New rule.
2847 * utils.c (prepare_to_throw_exception): New function.
2849 2014-08-29 Gary Benson <gbenson@redhat.com>
2851 * config.in: Regenerate.
2852 * configure: Likewise.
2854 2014-08-29 Gary Benson <gbenson@redhat.com>
2856 * Makefile.in (SFILES): Add common/cleanups.c.
2858 (cleanups.o): New rule.
2860 2014-08-29 Gary Benson <gbenson@redhat.com>
2862 * utils.c (internal_vwarning): New function.
2864 2014-08-28 Gary Benson <gbenson@redhat.com>
2866 * utils.h (fatal): Remove declaration.
2867 * utils.c (fatal): Remove function.
2869 2014-08-28 Gary Benson <gbenson@redhat.com>
2871 * tracepoint.c (gdb_agent_init): Replace fatal with
2873 (initialize_tracepoint): Likewise.
2875 2014-08-28 Gary Benson <gbenson@redhat.com>
2877 * remote-utils.c (remote_prepare): Replace fatal with error.
2879 2014-08-28 Gary Benson <gbenson@redhat.com>
2881 * linux-low.c (linux_async): Replace fatal with warning.
2883 (linux_start_non_stop): Return -1 if linux_async failed.
2885 2014-08-28 Gary Benson <gbenson@redhat.com>
2887 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2889 (i386_dr_low_get_addr): Remove vague comment.
2890 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2893 2014-08-28 Gary Benson <gbenson@redhat.com>
2895 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2896 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2898 (linux_resume_one_lwp): Likewise.
2899 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2901 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2902 with internal_error.
2903 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2904 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2905 (find_register_by_name): Replace fatal with internal_error.
2906 (find_regno): Likewise.
2907 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2908 * thread-db.c (thread_db_create_event): Likewise.
2909 (thread_db_load_search): Likewise.
2910 (try_thread_db_load_1): Likewise.
2911 * tracepoint.c (get_jump_space_head): Replace fatal with
2913 (claim_trampoline_space): Likewise.
2914 (have_fast_tracepoint_trampoline_buffer): Likewise.
2915 (cmd_qtstart): Likewise.
2916 (stop_tracing): Likewise.
2917 (fast_tracepoint_collecting): Likewise.
2918 (target_malloc): Likewise.
2919 (download_tracepoint): Likewise.
2920 (download_trace_state_variables): Replace check with gdb_assert.
2921 (upload_fast_traceframes): Replace fatal with internal_error.
2923 2014-08-19 Tom Tromey <tromey@redhat.com>
2924 Gary Benson <gbenson@redhat.com>
2926 * Makefile.in (SFILES): Add common/common-debug.c.
2927 (OBS): Add common-debug.o.
2928 (common-debug.o): New rule.
2929 * debug.h (debug_printf): Don't declare.
2930 * debug.c (debug_printf): Renamed and rewritten as...
2931 (debug_vprintf): New function.
2933 2014-08-19 Gary Benson <gbenson@redhat.com>
2935 * utils.h: Do not include print-utils.h.
2937 2014-08-19 Tom Tromey <tromey@redhat.com>
2938 Gary Benson <gbenson@redhat.com>
2940 * server.h: Add static assertion.
2941 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2943 2014-08-19 Tom Tromey <tromey@redhat.com>
2944 Gary Benson <gbenson@redhat.com>
2946 * Makefile.in (SFILES): Add common/errors.c.
2947 (OBS): Add errors.o.
2948 (IPA_OBS): Add errors-ipa.o.
2949 (errors.o): New rule.
2950 (errors-ipa.o): Likewise.
2951 * utils.h (perror_with_name, error, warning): Don't declare.
2952 * utils.c (warning): Renamed and rewritten as...
2953 (vwarning): New function.
2954 (error): Renamed and rewritten as...
2955 (verror): New function.
2956 (internal_error): Renamed and rewritten as...
2957 (internal_verror): New function.
2959 2014-08-07 Gary Benson <gbenson@redhat.com>
2961 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2962 * configure: Regenerate.
2963 * config.in: Likewise.
2964 * server.h: Do not include errno.h.
2965 * event-loop.c: Likewise.
2966 * hostio-errno.c: Likewise.
2967 * linux-low.c: Likewise.
2968 * remote-utils.c: Likewise.
2969 * spu-low.c: Likewise.
2970 * utils.c: Likewise.
2971 * gdbreplay.c: Unconditionally include errno.h.
2973 2014-08-07 Gary Benson <gbenson@redhat.com>
2975 * server.h: Do not include string.h.
2976 * event-loop.c: Likewise.
2977 * linux-low.c: Likewise.
2978 * regcache.c: Likewise.
2979 * remote-utils.c: Likewise.
2980 * spu-low.c: Likewise.
2981 * utils.c: Likewise.
2983 2014-08-07 Gary Benson <gbenson@redhat.com>
2985 * server.h: Do not include gdb_assert.h.
2987 2014-08-07 Gary Benson <gbenson@redhat.com>
2989 * server.h: Do not include common-utils.h.
2991 2014-08-07 Gary Benson <gbenson@redhat.com>
2993 * server.h: Do not include ptid.h.
2994 * notif.h: Likewise.
2996 2014-08-07 Gary Benson <gbenson@redhat.com>
2998 * server.h: Do not include gdb_locale.h.
3000 2014-08-07 Gary Benson <gbenson@redhat.com>
3002 * server.h: Do not include gdb/signals.h.
3003 * win32-low.c: Likewise.
3005 2014-08-07 Gary Benson <gbenson@redhat.com>
3007 * server.h: Do not include pathmax.h.
3009 2014-08-07 Gary Benson <gbenson@redhat.com>
3011 * server.h: Do not include libiberty.h.
3012 * linux-bfin-low.c: Likewise.
3014 2014-08-07 Gary Benson <gbenson@redhat.com>
3016 * server.h: Do not include ansidecl.h.
3018 2014-08-07 Gary Benson <gbenson@redhat.com>
3020 * linux-x86-low.c: Do not include stddef.h.
3021 * lynx-ppc-low.c: Likewise.
3022 * tracepoint.c: Likewise.
3024 2014-08-07 Gary Benson <gbenson@redhat.com>
3026 * server.h: Do not include stdarg.h.
3027 * nto-low.c: Likewise.
3029 2014-08-07 Gary Benson <gbenson@redhat.com>
3031 * server.h: Do not include stdlib.h.
3032 * inferiors.c: Likewise.
3033 * linux-low.c: Likewise.
3034 * regcache.c: Likewise.
3035 * spu-low.c: Likewise.
3036 * tracepoint.c: Likewise.
3037 * utils.c: Likewise.
3039 2014-08-07 Gary Benson <gbenson@redhat.com>
3041 * server.h: Do not include stdio.h.
3042 * linux-low.c: Likewise.
3043 * remote-utils.c: Likewise.
3044 * spu-low.c: Likewise.
3045 * utils.c: Likewise.
3046 * wincecompat.c: Likewise.
3048 2014-08-06 Gary Benson <gbenson@redhat.com>
3050 * regcache.c (init_register_cache): Move conditionals inside if.
3052 2014-08-06 Gary Benson <gbenson@redhat.com>
3054 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3056 2014-07-31 Gary Benson <gbenson@redhat.com>
3058 * ax.h: Do not include server.h.
3059 * gdbthread.h: Likewise.
3060 * lynx-low.h: Likewise.
3061 * notif.h: Likewise.
3063 2014-07-30 Gary Benson <gbenson@redhat.com>
3065 * server.h: Include common-defs.h.
3066 Do not include config.h or build-gnulib-gdbserver/config.h.
3068 2014-07-30 Gary Benson <gbenson@redhat.com>
3070 * hostio-errno.c: Move server.h to top of includes list.
3071 * inferiors.c: Likewise.
3072 * linux-x86-low.c: Likewise.
3073 * notif.c: Include server.h.
3075 2014-07-24 Tom Tromey <tromey@redhat.com>
3076 Gary Benson <gbenson@redhat.com>
3078 * server.h (CORE_ADDR): Now unsigned.
3080 2014-07-16 Pedro Alves <palves@redhat.com>
3082 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3084 2014-07-15 Pedro Alves <palves@redhat.com>
3086 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3089 2014-07-11 Pedro Alves <palves@redhat.com>
3091 * linux-low.c (kill_wait_lwp): New function, based on
3092 kill_one_lwp_callback, but use my_waitpid directly.
3093 (kill_one_lwp_callback, linux_kill): Use it.
3095 2014-06-23 Pedro Alves <palves@redhat.com>
3097 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3098 before setting DR0..DR3.
3100 2014-06-20 Gary Benson <gbenson@redhat.com>
3102 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3103 * configure: Regenerated.
3104 * config.in: Likewise.
3106 2014-06-20 Gary Benson <gbenson@redhat.com>
3108 * Makefile.in (SFILES): Update locations for files moved
3110 (object file files): Reordered.
3112 2014-06-20 Gary Benson <gbenson@redhat.com>
3114 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3115 (i386_dr_low_set_addr): Likewise.
3116 (i386_dr_low_get_addr): Likewise.
3117 (i386_dr_low_can_set_control): Likewise.
3118 (i386_dr_low_set_control): Likewise.
3119 (i386_dr_low_get_control): Likewise.
3120 (i386_dr_low_get_status): Likewise.
3121 (i386_get_debug_register_length): Likewise.
3122 * linux-x86-low.c (i386_dr_low_set_addr):
3123 Changed signature. Made static.
3124 (i386_dr_low_get_addr): Likewise.
3125 (i386_dr_low_set_control): Likewise.
3126 (i386_dr_low_get_control): Likewise.
3127 (i386_dr_low_get_status): Likewise.
3128 (i386_dr_low): New global variable.
3129 * win32-i386-low.c (i386_dr_low_set_addr):
3130 Changed signature. Made static.
3131 (i386_dr_low_get_addr): Likewise.
3132 (i386_dr_low_set_control): Likewise.
3133 (i386_dr_low_get_control): Likewise.
3134 (i386_dr_low_get_status): Likewise.
3135 (i386_dr_low): New global variable.
3137 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3139 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3140 * Makefile.in (AR, AR_FLAGS): Define.
3141 * configure: Regenerate.
3143 2014-06-19 Gary Benson <gbenson@redhat.com>
3145 * Makefile.in (i386-dregs.o): New rule.
3146 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3147 * i386-low.c (target.h): Remove include.
3148 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3149 (DR_CONTROL_SHIFT): Likewise.
3150 (DR_CONTROL_SIZE): Likewise.
3151 (DR_RW_EXECUTE): Likewise.
3152 (DR_RW_WRITE): Likewise.
3153 (DR_RW_READ): Likewise.
3154 (DR_RW_IORW): Likewise.
3155 (DR_LEN_1): Likewise.
3156 (DR_LEN_2): Likewise.
3157 (DR_LEN_4): Likewise.
3158 (DR_LEN_8): Likewise.
3159 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3160 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3161 (DR_ENABLE_SIZE): Likewise.
3162 (DR_LOCAL_SLOWDOWN): Likewise.
3163 (DR_GLOBAL_SLOWDOWN): Likewise.
3164 (DR_CONTROL_RESERVED): Likewise.
3165 (I386_DR_CONTROL_MASK): Likewise.
3166 (I386_DR_VACANT): Likewise.
3167 (I386_DR_LOCAL_ENABLE): Likewise.
3168 (I386_DR_GLOBAL_ENABLE): Likewise.
3169 (I386_DR_DISABLE): Likewise.
3170 (I386_DR_SET_RW_LEN): Likewise.
3171 (I386_DR_GET_RW_LEN): Likewise.
3172 (I386_DR_WATCH_HIT): Likewise.
3173 (i386_wp_op_t): Likewise.
3174 (i386_show_dr): Likewise.
3175 (i386_length_and_rw_bits): Likewise.
3176 (i386_insert_aligned_watchpoint): Likewise.
3177 (i386_remove_aligned_watchpoint): Likewise.
3178 (i386_handle_nonaligned_watchpoint): Likewise.
3179 i386_update_inferior_debug_regs(): Likewise.
3180 (i386_dr_insert_watchpoint): Likewise.
3181 (i386_dr_remove_watchpoint): Likewise.
3182 (i386_dr_region_ok_for_watchpoint): Likewise.
3183 (i386_dr_stopped_data_address): Likewise.
3184 (i386_dr_stopped_by_watchpoint): Likewise.
3186 2014-06-19 Gary Benson <gbenson@redhat.com>
3188 * i386-low.c (i386_dr_show): Renamed to
3189 i386_show_dr and made static. All uses updated.
3190 (i386_dr_length_and_rw_bits): Renamed to
3191 i386_length_and_rw_bits and made static.
3193 (i386_dr_insert_aligned_watchpoint): Renamed to
3194 i386_insert_aligned_watchpoint and made static.
3196 (i386_dr_remove_aligned_watchpoint): Renamed to
3197 i386_remove_aligned_watchpoint and made static.
3199 (i386_dr_update_inferior_debug_regs): Renamed to
3200 i386_update_inferior_debug_regs and made static.
3203 2014-06-18 Gary Benson <gbenson@redhat.com>
3205 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3206 (i386_dr_low_can_set_control): Likewise.
3207 (i386_get_debug_register_length): Likewise.
3208 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3209 (i386_dr_low_can_set_control): Likewise.
3210 (i386_get_debug_register_length): Likewise.
3212 2014-06-17 Gary Benson <gbenson@redhat.com>
3214 * i386-low.h (i386-dregs.h): New include.
3215 (DR_FIRSTADDR): Now in i386-dregs.h.
3216 (DR_LASTADDR): Likewise.
3217 (DR_NADDR): Likewise.
3218 (DR_STATUS): Likewise.
3219 (DR_CONTROL): Likewise.
3220 (i386_debug_reg_state): Likewise.
3221 (i386_dr_insert_watchpoint): Likewise.
3222 (i386_dr_remove_watchpoint): Likewise.
3223 (i386_dr_region_ok_for_watchpoint): Likewise.
3224 (i386_dr_stopped_data_address): Likewise.
3225 (i386_dr_stopped_by_watchpoint): Likewise.
3226 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3228 2014-06-18 Gary Benson <gbenson@redhat.com>
3230 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3231 i386_dr_insert_watchpoint.
3232 (i386_low_remove_watchpoint): Renamed to
3233 i386_dr_remove_watchpoint.
3234 (i386_low_region_ok_for_watchpoint): Renamed to
3235 i386_dr_region_ok_for_watchpoint.
3236 (i386_low_stopped_data_address): Renamed to
3237 i386_dr_stopped_data_address.
3238 (i386_low_stopped_by_watchpoint): Renamed to
3239 i386_dr_stopped_by_watchpoint.
3240 * i386-low.c (i386_show_dr): Renamed to
3241 i386_dr_show and made nonstatic. All uses updated.
3242 (i386_length_and_rw_bits): Renamed to
3243 i386_dr_length_and_rw_bits and made nonstatic.
3245 (i386_insert_aligned_watchpoint): Renamed to
3246 i386_dr_insert_aligned_watchpoint and made nonstatic.
3248 (i386_remove_aligned_watchpoint): Renamed to
3249 i386_dr_remove_aligned_watchpoint and made nonstatic.
3251 (i386_update_inferior_debug_regs): Renamed to
3252 i386_dr_update_inferior_debug_regs and made nonstatic.
3254 (i386_low_insert_watchpoint): Renamed to
3255 i386_dr_insert_watchpoint. All uses updated.
3256 (i386_low_remove_watchpoint): Renamed to
3257 i386_dr_remove_watchpoint. All uses updated.
3258 (i386_low_region_ok_for_watchpoint): Renamed to
3259 i386_dr_region_ok_for_watchpoint. All uses updated.
3260 (i386_low_stopped_data_address): Renamed to
3261 i386_dr_stopped_data_address. All uses updated.
3262 (i386_low_stopped_by_watchpoint): Renamed to
3263 i386_dr_stopped_by_watchpoint. All uses updated.
3265 2014-06-18 Gary Benson <gbenson@redhat.com>
3267 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3268 (i386_dr_low_can_set_control): Likewise.
3269 (i386_insert_aligned_watchpoint): New check.
3271 2014-06-18 Gary Benson <gbenson@redhat.com>
3273 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3276 2014-06-18 Gary Benson <gbenson@redhat.com>
3278 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3279 instead of fatal and error.
3280 (i386_handle_nonaligned_watchpoint): Likewise.
3282 2014-06-18 Gary Benson <gbenson@redhat.com>
3284 * i386-low.c (i386_get_debug_register_length): New macro.
3285 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3286 (i386_show_dr): Use debug_printf instead of fprintf. Use
3287 phex to format values.
3289 2014-06-18 Gary Benson <gbenson@redhat.com>
3291 * i386-low.h: Comment changes.
3292 * i386-low.c: Likewise.
3294 2014-06-18 Gary Benson <gbenson@redhat.com>
3296 * i386-low.c: Whitespace changes.
3298 2014-06-12 Tom Tromey <tromey@redhat.com>
3300 * utils.c (freeargv): Remove.
3302 2014-06-12 Tom Tromey <tromey@redhat.com>
3304 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3305 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3306 (parse_debug_format_options): Likewise.
3307 (gdbserver_usage): Likewise.
3308 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3309 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3310 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3312 ($(LIBGNU)): Depend on libiberty.
3313 (all-lib): Recurse into all subdirs.
3314 (install-only): Invoke "install" target in subdirs.
3315 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3317 * configure: Rebuild.
3318 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3319 for vasprintf, vsnprintf, or gettimeofday.
3320 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3323 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3325 * development.sh: Delete.
3326 * Makefile.in (config.status): Adjust dependency on development.sh.
3327 * configure.ac: Adjust development.sh source call.
3328 * configure: Regenerate.
3330 2014-06-02 Pedro Alves <palves@redhat.com>
3332 * ax.c (gdb_free_agent_expr): New function.
3333 * ax.h (gdb_free_agent_expr): New declaration.
3334 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3336 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3338 (clear_breakpoint_conditions_and_commands): New function.
3339 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3340 (clear_breakpoint_conditions_and_commands): New declaration.
3342 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3344 * linux-aarch64-low.c (asm/ptrace.h): Include.
3346 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3348 Fix TLS access for -static -pthread.
3349 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3350 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3351 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3353 2014-05-20 Pedro Alves <palves@redhat.com>
3355 * linux-aarch64-low.c (aarch64_insert_point)
3356 (aarch64_remove_point): No longer check whether the type is
3357 supported here. Adjust to new interface.
3358 (the_low_target): Install aarch64_supports_z_point_type as
3359 supports_z_point_type method.
3360 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3361 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3362 instead of a Z packet char. Adjust.
3363 (arm_supports_z_point_type): New function.
3364 (arm_insert_point, arm_remove_point): Adjust to new interface.
3365 (the_low_target): Install arm_supports_z_point_type.
3366 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3367 (cris_insert_point, cris_remove_point): Adjust to new interface.
3368 Don't check whether the type is supported here.
3369 (the_low_target): Install cris_supports_z_point_type.
3370 * linux-low.c (linux_supports_z_point_type): New function.
3371 (linux_insert_point, linux_remove_point): Adjust to new interface.
3372 * linux-low.h (struct linux_target_ops) <insert_point,
3373 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3374 raw_breakpoint pointer parameter.
3375 <supports_z_point_type>: New method.
3376 * linux-mips-low.c (mips_supports_z_point_type): New function.
3377 (mips_insert_point, mips_remove_point): Adjust to new interface.
3378 Use mips_supports_z_point_type.
3379 (the_low_target): Install mips_supports_z_point_type.
3380 * linux-ppc-low.c (the_low_target): Install NULL as
3381 supports_z_point_type method.
3382 * linux-s390-low.c (the_low_target): Install NULL as
3383 supports_z_point_type method.
3384 * linux-sparc-low.c (the_low_target): Install NULL as
3385 supports_z_point_type method.
3386 * linux-x86-low.c (x86_supports_z_point_type): New function.
3387 (x86_insert_point): Adjust to new insert_point interface. Use
3388 insert_memory_breakpoint. Adjust to new
3389 i386_low_insert_watchpoint interface.
3390 (x86_remove_point): Adjust to remove_point interface. Use
3391 remove_memory_breakpoint. Adjust to new
3392 i386_low_remove_watchpoint interface.
3393 (the_low_target): Install x86_supports_z_point_type.
3394 * lynx-low.c (lynx_target_ops): Install NULL as
3395 supports_z_point_type callback.
3396 * nto-low.c (nto_supports_z_point_type): New.
3397 (nto_insert_point, nto_remove_point): Adjust to new interface.
3398 (nto_target_ops): Install nto_supports_z_point_type.
3399 * mem-break.c: Adjust intro comment.
3400 (struct raw_breakpoint) <raw_type, size>: New fields.
3401 <inserted>: Update comment.
3402 <shlib_disabled>: Delete field.
3403 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3404 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3405 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3406 (raw_bkpt_type_to_target_hw_bp_type): New function.
3407 (find_enabled_raw_code_breakpoint_at): New function.
3408 (find_raw_breakpoint_at): New type and size parameters. Use them.
3409 (insert_memory_breakpoint): New function, based off
3410 set_raw_breakpoint_at.
3411 (remove_memory_breakpoint): New function.
3412 (set_raw_breakpoint_at): Reimplement.
3413 (set_breakpoint): New, based on set_breakpoint_at.
3414 (set_breakpoint_at): Reimplement.
3415 (delete_raw_breakpoint): Go through the_target->remove_point
3416 instead of assuming memory breakpoints.
3417 (find_gdb_breakpoint_at): Delete.
3418 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3419 (find_gdb_breakpoint): New function.
3420 (set_gdb_breakpoint_at): Delete.
3421 (z_type_supported): New function.
3422 (set_gdb_breakpoint_1): New function, loosely based off
3423 set_gdb_breakpoint_at.
3424 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3425 (delete_gdb_breakpoint_at): Delete.
3426 (delete_gdb_breakpoint_1): New function, loosely based off
3427 delete_gdb_breakpoint_at.
3428 (delete_gdb_breakpoint): New function.
3429 (clear_gdb_breakpoint_conditions): Rename to ...
3430 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3432 (add_condition_to_breakpoint): Make static.
3433 (add_breakpoint_condition): Take a struct breakpoint pointer
3434 instead of an address. Adjust.
3435 (gdb_condition_true_at_breakpoint): Rename to ...
3436 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3438 (gdb_condition_true_at_breakpoint): Reimplement.
3439 (add_breakpoint_commands): Take a struct breakpoint pointer
3440 instead of an address. Adjust.
3441 (gdb_no_commands_at_breakpoint): Rename to ...
3442 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3443 parameter. Return true if no breakpoint was found. Change debug
3445 (gdb_no_commands_at_breakpoint): Reimplement.
3446 (run_breakpoint_commands): Rename to ...
3447 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3448 and change return type to boolean.
3449 (run_breakpoint_commands): New function.
3450 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3451 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3452 breakpoint. Go through the_target->remove_point instead of
3453 assuming memory breakpoint.
3454 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3455 software and hardware breakpoints.
3456 (reinsert_raw_breakpoint): Go through the_target->insert_point
3457 instead of assuming memory breakpoint.
3458 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3459 software and hardware breakpoints.
3460 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3461 Check both software and hardware breakpoints.
3462 (validate_inserted_breakpoint): Assert the breakpoint is a
3463 software breakpoint. Set the inserted flag to -1 instead of
3464 setting shlib_disabled.
3465 (delete_disabled_breakpoints): Adjust.
3466 (validate_breakpoints): Only validate software breakpoints.
3467 Adjust to inserted flag change.
3468 (check_mem_read, check_mem_write): Skip breakpoint types other
3469 than software breakpoints. Adjust to inserted flag change.
3470 * mem-break.h (enum raw_bkpt_type): New enum.
3471 (raw_breakpoint, struct process_info): Forward declare.
3472 (Z_packet_to_target_hw_bp_type): Delete declaration.
3473 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3474 (set_gdb_breakpoint, delete_gdb_breakpoint)
3475 (clear_breakpoint_conditions): New declarations.
3476 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3477 (breakpoint_inserted_here): Update comment.
3478 (add_breakpoint_condition, add_breakpoint_commands): Replace
3479 address parameter with a breakpoint pointer parameter.
3480 (gdb_breakpoint_here): Update comment.
3481 (delete_gdb_breakpoint_at): Delete.
3482 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3483 * server.c (process_point_options): Take a struct breakpoint
3484 pointer instead of an address. Adjust.
3485 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3486 delete_gdb_breakpoint.
3487 * spu-low.c (spu_target_ops): Install NULL as
3488 supports_z_point_type method.
3489 * target.h: Include mem-break.h.
3490 (struct target_ops) <prepare_to_access_memory>: Update comment.
3491 <supports_z_point_type>: New field.
3492 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3493 instead of a char. Also take a raw breakpoint pointer.
3494 * win32-arm-low.c (the_low_target): Install NULL as
3495 supports_z_point_type.
3496 * win32-i386-low.c (i386_supports_z_point_type): New function.
3497 (i386_insert_point, i386_remove_point): Adjust to new interface.
3498 (the_low_target): Install i386_supports_z_point_type.
3499 * win32-low.c (win32_supports_z_point_type): New function.
3500 (win32_insert_point, win32_remove_point): Adjust to new interface.
3501 (win32_target_ops): Install win32_supports_z_point_type.
3502 * win32-low.h (struct win32_target_ops):
3503 <supports_z_point_type>: New method.
3504 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3505 instead of a char. Also take a raw breakpoint pointer.
3507 2014-05-20 Pedro Alves <palves@redhat.com>
3509 * mem-break.h: Include break-common.h.
3510 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3511 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3512 (Z_packet_to_target_hw_bp_type): New declaration.
3513 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3514 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3515 (Z_PACKET_ACCESS_WP): Delete macros.
3516 (Z_packet_to_hw_type): Delete function.
3517 * i386-low.h: Don't include break-common.h here.
3518 (Z_packet_to_hw_type): Delete declaration.
3519 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3520 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3521 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3522 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3523 * linux-aarch64-low.c: Don't include break-common.h here.
3524 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3525 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3526 (Z_packet_to_target_hw_bp_type): Delete function.
3527 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3529 (mips_insert_point, mips_remove_point): Use
3530 Z_packet_to_target_hw_bp_type.
3532 2014-05-20 Pedro Alves <palves@redhat.com>
3534 * linux-aarch64-low.c: Include break-common.h.
3535 (enum target_point_type): Delete.
3536 (Z_packet_to_point_type): Rename to ...
3537 (Z_packet_to_target_hw_bp_type): ... this, and return a
3538 target_hw_bp_type instead.
3539 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3540 instead of an enum target_point_type.
3541 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3543 (aarch64_dr_state_insert_one_point)
3544 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3545 (aarch64_handle_aligned_watchpoint)
3546 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3547 Take an enum target_hw_bp_type instead of an enum
3549 (aarch64_supports_z_point_type): New function.
3550 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3551 use Z_packet_to_target_hw_bp_type.
3553 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3555 * configure.ac: Only use -Werror by default when DEVELOPMENT
3557 * configure: Regenerate.
3559 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3561 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3562 * linux-x86-low.c (X86_64_USER_REGS): New.
3563 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3565 2014-04-28 Yao Qi <yao@codesourcery.com>
3567 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3570 2014-04-25 Pedro Alves <palves@redhat.com>
3573 * linux-low.c (linux_attach_fail_reason_string): New function.
3574 (linux_attach_lwp): Delete.
3575 (linux_attach_lwp_1): Rename to ...
3576 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3577 argument. Remove "initial" parameter. Return int instead of
3578 void. Don't error or warn here.
3579 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3580 failure to attach to the tgid. Call warning when failing to
3582 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3583 argument. Remove "initial" parameter. Return int instead of
3584 void. Don't error or warn here.
3585 (linux_attach_fail_reason_string): New declaration.
3586 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3587 interface change. Use linux_attach_fail_reason_string.
3589 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3590 Walfred Tedeschi <walfred.tedeschi@intel.com>
3592 * Makefile.in: Added rules to handle new files
3593 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3594 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3595 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3596 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3597 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3598 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3600 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3601 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3602 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3603 i386/x32-avx512.xml.
3604 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3605 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3606 i386/x32-avx512-linux.xml.
3607 * i387-fp.c (num_avx512_k_registers): New constant for number
3609 (num_avx512_zmmh_low_registers): New constant for number of
3610 lower ZMM registers (0-15).
3611 (num_avx512_zmmh_high_registers): New constant for number of
3612 higher ZMM registers (16-31).
3613 (num_avx512_ymmh_registers): New contant for number of higher
3614 YMM registers (ymm16-31 added by avx521 on x86_64).
3615 (num_avx512_xmm_registers): New constant for number of higher
3616 XMM registers (xmm16-31 added by AVX512 on x86_64).
3617 (struct i387_xsave): Add space for AVX512 registers.
3618 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3619 Add code to handle AVX512 registers.
3620 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3621 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3622 prototypei from generated file.
3623 (tdesc_amd64_avx512_linux): Likewise.
3624 (init_registers_x32_avx512_linux): Likewise.
3625 (tdesc_x32_avx512_linux): Likewise.
3626 (init_registers_i386_avx512_linux): Likewise.
3627 (tdesc_i386_avx512_linux): Likewise.
3628 (x86_64_regmap): Add AVX512 registers.
3629 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3631 (initialize_low_arch): Add code to initialize AVX512 registers.
3633 2014-04-23 Pedro Alves <palves@redhat.com>
3635 * mem-break.c (find_gdb_breakpoint_at): Make static.
3636 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3638 2014-04-23 Pedro Alves <palves@redhat.com>
3640 * i386-low.c: Don't include break-common.h here.
3641 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3642 prototype to take target_hw_bp_type as argument instead of a Z
3644 * i386-low.h: Include break-common.h here.
3645 (Z_packet_to_hw_type): Declare.
3646 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3648 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3649 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3650 (x86_remove_point): Convert the packet number to a
3651 target_hw_bp_type before calling i386_low_remove_watchpoint.
3652 * win32-i386-low.c (i386_insert_point): Convert the packet number
3653 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3654 (i386_remove_point): Convert the packet number to a
3655 target_hw_bp_type before calling i386_low_remove_watchpoint.
3657 2014-04-23 Pedro Alves <palves@redhat.com>
3659 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3661 2014-04-10 Pedro Alves <palves@redhat.com>
3663 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3664 Check if the condition or command is NULL before checking if the
3665 breakpoint is known. On success, return true.
3666 * mem-break.h (add_breakpoint_condition): Document return.
3667 (add_breakpoint_commands): Add describing comment.
3668 * server.c (skip_to_semicolon): New function.
3669 (process_point_options): Use it.
3671 2014-04-09 Pedro Alves <palves@redhat.com>
3673 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3676 2014-02-27 Pedro Alves <palves@redhat.com>
3679 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3681 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3683 (last_thread_of_process_p): Take a PID argument instead of a
3685 (linux_wait_for_lwp): Delete.
3686 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3688 (linux_low_filter_event): New function, party factored out from
3689 linux_wait_for_event.
3690 (linux_wait_for_event): Rename to ...
3691 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3692 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3693 sigsuspend. Check for zombie leaders.
3694 (linux_wait_for_event): Reimplement as wrapper around
3695 linux_wait_for_event_filtered.
3696 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3697 a normal or signal exit is seen, it's the whole process exiting.
3698 (wait_for_sigstop): No longer a for_each_inferior callback.
3699 Rewrite on top of linux_wait_for_event_filtered.
3700 (stop_all_lwps): Call wait_for_sigstop directly.
3701 * server.c (resume, handle_target_event): Handle
3702 TARGET_WAITKIND_NO_RESUMED.
3704 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3706 * win32-low.c (psapi_get_dll_name,
3707 * win32_CreateToolhelp32Snapshot): Delete.
3708 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3709 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3711 (handle_load_dll): Add function description.
3712 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3714 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3716 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3718 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3719 base address when calling win32_add_one_solib.
3720 (handle_load_dll): Delete local variable load_addr.
3721 Remove 0x1000 offset applied to DLL base address when calling
3722 win32_add_one_solib.
3723 (handle_unload_dll): Add comment.
3725 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3727 * win32-low.c (win32_add_all_dlls): Renames
3728 win32_ensure_ntdll_loaded. Rewrite function documentation.
3729 Adjust implementation to always load all DLLs.
3730 Add 0x1000 offset to DLL base address when calling
3731 win32_add_one_solib.
3732 (child_initialization_done): New static global.
3733 (do_initial_child_stuff): Set child_initialization_done to
3734 zero during child initialization, and 1 after. Replace call
3735 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3737 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3738 (handle_unload_dll): Add function documentation.
3739 (get_child_debug_event): Ignore load and unload DLL events
3740 during child initialization.
3742 2014-02-20 Doug Evans <dje@google.com>
3744 Remove global all_lwps.
3745 * inferiors.h (ptid_of): Move here from linux-low.h.
3746 (pid_of, lwpid_of): Ditto.
3747 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3748 parameter is a struct thread_info * now.
3749 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3750 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3751 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3753 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3754 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3755 * linux-arm-low.c (update_registers_callback): Update, "entry"
3756 parameter is a struct thread_info * now.
3757 Fetch lwpid from current_inferior directly.
3758 (arm_insert_point): Pass &all_threads to find_inferior instead of
3760 (arm_remove_point): Ditto.
3761 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3762 (arm_prepare_to_resume): Fetch pid from thread.
3763 (arm_read_description): Fetch lwpid from current_inferior directly.
3764 * linux-low.c (all_lwps): Delete.
3765 (delete_lwp): Delete call to remove_inferior.
3766 (handle_extended_wait): Fetch lwpid from thread.
3767 (add_lwp): Don't set lwp->entry.id. Remove call to
3768 add_inferior_to_list.
3769 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3770 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3771 (kill_one_lwp_callback): Ditto.
3772 (linux_kill): Don't dereference NULL pointer.
3773 Fetch ptid,lwpid from thread.
3774 (get_detach_signal): Fetch ptid from thread.
3775 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3776 Simplify call to regcache_invalidate_thread.
3777 (delete_lwp_callback): Update, "entry" parameter is a
3778 struct thread_info * now. Fetch pid from thread.
3779 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3780 (status_pending_p_callback): Update, "entry" parameter is a
3781 struct thread_info * now. Fetch ptid from thread.
3782 (find_lwp_pid): Update, "entry" parameter is a
3783 struct thread_info * now.
3784 (linux_wait_for_lwp): Fetch pid from thread.
3785 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3786 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3787 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3788 (dequeue_one_deferred_signal): Ditto.
3789 (cancel_breakpoint): Fetch ptid from current_inferior.
3790 (linux_wait_for_event): Pass &all_threads to find_inferior,
3791 not &all_lwps. Fetch ptid, lwpid from thread.
3792 (count_events_callback): Update, "entry" parameter is a
3793 struct thread_info * now.
3794 (select_singlestep_lwp_callback): Ditto.
3795 (select_event_lwp_callback): Ditto.
3796 (cancel_breakpoints_callback): Ditto.
3797 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3799 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3800 (unsuspend_one_lwp): Update, "entry" parameter is a
3801 struct thread_info * now.
3802 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3804 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3805 Fetch lwpid from thread, not lwp.
3806 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3807 Pass &all_threads to find_inferior, not &all_lwps.
3808 (send_sigstop): Fetch lwpid from thread, not lwp.
3809 (send_sigstop_callback): Update, "entry" parameter is a
3810 struct thread_info * now.
3811 (suspend_and_send_sigstop_callback): Ditto.
3812 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3813 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3814 struct thread_info * now.
3815 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3817 (lwp_running): Update, "entry" parameter is a
3818 struct thread_info * now.
3819 (stop_all_lwps): Fetch ptid from thread.
3820 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3821 (linux_resume_one_lwp): Fetch lwpid from thread.
3822 (linux_set_resume_request): Update, "entry" parameter is a
3823 struct thread_info * now. Fetch pid, lwpid from thread.
3824 (resume_status_pending_p): Update, "entry" parameter is a
3825 struct thread_info * now.
3826 (need_step_over_p): Ditto. Fetch lwpid from thread.
3827 (start_step_over): Fetch lwpid from thread.
3828 (linux_resume_one_thread): Update, "entry" parameter is a
3829 struct thread_info * now. Fetch lwpid from thread.
3830 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3831 (proceed_one_lwp): Update, "entry" parameter is a
3832 struct thread_info * now. Fetch lwpid from thread.
3833 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3834 struct thread_info * now.
3835 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3836 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3837 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3839 (regsets_store_inferior_registers): Ditto.
3840 (fetch_register, store_register): Ditto.
3841 (linux_read_memory, linux_write_memory): Ditto.
3842 (linux_request_interrupt): Ditto.
3843 (linux_read_auxv): Ditto.
3844 (linux_xfer_siginfo): Ditto.
3845 (linux_qxfer_spu): Ditto.
3846 (linux_qxfer_libraries_svr4): Ditto.
3847 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3848 moved to inferiors.h.
3850 (get_thread_lwp): Update.
3851 (struct lwp_info): Delete member "entry". Simplify comment for
3854 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3855 current_inferior directly.
3856 (update_watch_registers_callback): Update, "entry" parameter is a
3857 struct thread_info * now. Fetch pid from thread.
3858 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3859 (mips_insert_point): Fetch lwpid from current_inferior.
3860 Pass &all_threads to find_inferior, not &all_lwps.
3861 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3862 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3864 (mips_stopped_data_address): Ditto.
3865 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3867 * linux-tile-low.c (tile_arch_setup): Ditto.
3868 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3869 (update_debug_registers_callback): Update, "entry" parameter is a
3870 struct thread_info * now. Fetch pid from thread.
3871 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3872 Pass &all_threads to find_inferior, not &all_lwps.
3873 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3874 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3875 Pass &all_threads to find_inferior, not &all_lwps.
3876 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3877 (i386_dr_low_get_status): Ditto.
3878 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3879 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3880 (x86_linux_read_description): Ditto.
3881 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3883 2014-02-20 Doug Evans <dje@google.com>
3885 * inferiors.c (get_first_inferior): Fix buglet.
3887 2014-02-19 Doug Evans <dje@google.com>
3889 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3890 * inferiors.c (add_thread): Change result type to struct thread_info *.
3891 All callers updated.
3892 (add_lwp): Call add_thread here instead of in callers.
3893 All callers updated.
3894 * linux-low.h (get_lwp_thread): Rewrite.
3895 (struct lwp_info): New member "thread".
3897 2014-02-19 Doug Evans <dje@google.com>
3899 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3900 All callers updated.
3902 2014-02-19 Doug Evans <dje@google.com>
3904 * inferiors.c (add_thread): Fix whitespace.
3906 2014-02-19 Doug Evans <dje@google.com>
3908 * dll.c (clear_dlls): Replace accessing list implemention details
3910 * gdbthread.h (get_first_thread): Declare.
3911 * inferiors.c (for_each_inferior_with_data): New function.
3912 (get_first_thread): New function.
3913 (find_thread_ptid): Simplify.
3914 (get_first_inferior): New function.
3915 (clear_list): Delete.
3916 (one_inferior_p): New function.
3917 (clear_inferior_list): New function.
3918 (clear_inferiors): Update.
3919 * inferiors.h (for_each_inferior_with_data): Declare.
3920 (clear_inferior_list): Declare.
3921 (one_inferior_p): Declare.
3922 (get_first_inferior): Declare.
3923 * linux-low.c (linux_wait_for_event): Replace accessing list
3924 implemention details with API function.
3925 * server.c (target_running): Ditto.
3926 (accumulate_file_name_length): New function.
3927 (emit_dll_description): New function.
3928 (handle_qxfer_libraries): Replace accessing list implemention
3929 details with API function.
3930 (handle_qxfer_threads_worker): New function.
3931 (handle_qxfer_threads_proper): Replace accessing list implemention
3932 details with API function.
3933 (handle_query): Ditto.
3934 (visit_actioned_threads_callback_ftype): New typedef.
3935 (visit_actioned_threads_data): New struct.
3936 (visit_actioned_threads): Rewrite to be find_inferior callback.
3937 (resume): Call find_inferior.
3938 (handle_status): Replace accessing list implemention
3939 details with API function.
3940 (process_serial_event): Replace accessing list implemention details
3942 * target.c (set_desired_inferior): Replace accessing list implemention
3943 details with API function.
3944 * tracepoint.c (same_process_p): New function.
3945 (gdb_agent_about_to_close): Replace accessing list implemention
3946 details with API function.
3947 * win32-low.c (child_delete_thread): Replace accessing list
3948 implemention details with API function.
3949 (match_dll_by_basename): New function.
3950 (dll_is_loaded_by_basename): New function.
3951 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3952 details call to dll_is_loaded_by_basename.
3954 2014-02-19 Doug Evans <dje@google.com>
3956 * dll.h (struct dll_info): Add comment.
3957 * gdbthread.h (struct thread_info): Add comment.
3958 (current_ptid): Simplify.
3959 * inferiors.c (add_process): Update.
3960 (remove_process): Update.
3961 * inferiors.h (struct process_info): Rename member "head" to "entry".
3962 * linux-low.c (delete_lwp): Update.
3964 (last_thread_of_process_p): Update.
3965 (kill_one_lwp_callback, linux_kill): Update.
3966 (status_pending_p_callback): Update.
3967 (wait_for_sigstop): Update. Simplify read of ptid.
3968 (start_step_over): Update.
3969 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3970 (get_lwp_thread): Update.
3971 (struct lwp_info): Rename member "head" to "entry".
3972 * regcache.h (inferior_list_entry): Delete.
3973 * server.c (kill_inferior_callback): Update.
3974 (detach_or_kill_inferior_callback): Update.
3975 (print_started_pid): Update.
3976 (print_attached_pid): Update.
3977 (process_serial_event): Simplify read of ptid.
3978 * thread-db.c (thread_db_create_event): Update.
3979 (thread_db_get_tls_address): Update.
3980 * win32-low.c (current_inferior_ptid): Simplify.
3982 2014-02-19 Tom Tromey <tromey@redhat.com>
3984 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3986 (target_supports_btrace): Update.
3988 2014-02-14 Yao Qi <yao@codesourcery.com>
3990 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3991 (rsp-low-ipa.o): New target.
3993 2014-02-12 Tom Tromey <tromey@redhat.com>
3995 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3996 convert_ascii_to_int.
3997 * regcache.c (registers_to_string): Likewise.
3998 * remote-utils.c (decode_M_packet): Likewise.
3999 * server.c (process_serial_event): Likewise.
4001 2014-02-12 Tom Tromey <tromey@redhat.com>
4003 * server.c (handle_query, handle_v_run): Use hex2bin, not
4005 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4007 2014-02-12 Tom Tromey <tromey@redhat.com>
4009 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4010 convert_int_to_ascii.
4011 * regcache.c (registers_to_string, collect_register_as_string):
4013 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4015 * server.c (process_serial_event): Likewise.
4016 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4017 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4019 2014-02-12 Tom Tromey <tromey@redhat.com>
4021 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4022 bin2hex, not hexify.
4023 * tracepoint.c (cmd_qtstatus): Likewise.
4025 2014-02-12 Tom Tromey <tromey@redhat.com>
4027 * remote-utils.c (monitor_output): Pass explicit length to
4030 2014-02-12 Tom Tromey <tromey@redhat.com>
4032 * tracepoint.c: Include rsp-low.h.
4033 * server.c: Include rsp-low.h.
4034 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4035 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4037 * remote-utils.c: Include rsp-low.h.
4038 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4039 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4040 (convert_int_to_ascii, convert_ascii_to_int): Move to
4042 * regcache.c: Include rsp-low.h.
4043 * ax.c: Include rsp-low.h.
4044 * Makefile.in (SFILES): Add common/rsp-low.c.
4045 (OBS): Add rsp-low.o.
4046 (rsp-low.o): New target.
4048 2014-02-12 Tom Tromey <tromey@redhat.com>
4050 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4051 Include print-utils.h.
4052 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4053 (plongest, thirty_two, phex_nz): Remove.
4054 * Makefile.in (SFILES): Add common/print-utils.c.
4055 (OBS): Add print-utils.o.
4056 (print-utils-ipa.o): New target.
4057 (print-utils.o): New target.
4058 (IPA_OBJS): Add print-utils-ipa.o.
4060 2014-02-06 Tom Tromey <tromey@redhat.com>
4062 * Makefile.in (SFILES): Fix indentation.
4064 2014-02-05 Doug Evans <dje@google.com>
4066 * linux-low.c (linux_wait_for_event): Improve comment.
4067 (linux_wait_1): Keep current_inferior in sync with event_child.
4069 2014-01-22 Doug Evans <dje@google.com>
4071 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4073 2014-01-22 Doug Evans <dje@google.com>
4075 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4076 * configure: Regenerate.
4077 * config.in: Regenerate.
4078 * Makefile.in (SFILES): Add debug.c.
4080 * debug.c: New file.
4081 * debug.h: New file.
4082 * linux-aarch64-low.c (*): Update all debugging printfs to use
4083 debug_printf instead of fprintf.
4084 * linux-arm-low.c (*): Ditto.
4085 * linux-cris-low.c (*): Ditto.
4086 * linux-crisv32-low.c (*): Ditto.
4087 * linux-m32r-low.c (*): Ditto.
4088 * linux-sparc-low.c (*): Ditto.
4089 * linux-x86.c (*): Ditto.
4090 * linux-low.c (*): Ditto.
4091 (linux_wait_1): Add calls to debug_enter, debug_exit.
4092 (linux_wait): Remove redundant debugging printf.
4093 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4094 (linux_resume, unstop_all_lwps): Ditto.
4095 * mem-break.c (*): Update all debugging printfs to use
4096 debug_printf instead of fprintf.
4097 * remote-utils.c (*): Ditto.
4098 * thread-db.c (*): Ditto.
4099 * server.c #include <ctype.h>, "gdb_vecs.h".
4100 (debug_threads): Moved to debug.c.
4101 (*): Update all debugging printfs to use debug_printf instead of
4103 (start_inferior): Replace call to fflush with call to debug_flush.
4104 (monitor_show_help): Mention set debug-format.
4105 (parse_debug_format_options): New function.
4106 (handle_monitor_command): Handle "monitor set debug-format".
4107 (gdbserver_usage): Mention --debug-format.
4108 (main): Parse --debug-format.
4109 * server.h (debug_threads): Declaration moved to debug.h.
4111 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4112 trace_debug_1 that uses debug_printf.
4113 (tracepoint_look_up_symbols): Update all debugging printfs to use
4114 debug_printf instead of fprintf.
4116 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4118 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4121 2014-01-17 Pedro Alves <palves@redhat.com>
4124 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4125 defined after including gdb_proc_service.h.
4127 2014-01-16 Doug Evans <dje@google.com>
4129 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4130 (match_dll): Use it.
4132 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4134 * target.h (target_ops) <read_btrace>: Change parameters and
4135 return type to allow error reporting.
4136 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4137 trace reading errors on.
4138 * linux-low.c (linux_low_read_btrace): Pass trace reading
4140 (linux_low_disable_btrace): New.
4142 2014-01-15 Doug Evans <dje@google.com>
4144 * inferiors.c (thread_id_to_gdb_id): Delete.
4145 * inferiors.h (thread_id_to_gdb_id): Delete.
4147 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4149 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4150 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4153 2014-01-08 Pedro Alves <palves@redhat.com>
4155 * server.c (handle_status): Don't discard previous queued stop
4156 replies or thread's pending status here.
4157 (main) <disconnection>: Do it here instead.
4159 2014-01-08 Pedro Alves <palves@redhat.com>
4161 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4162 * server.c (visit_actioned_threads, handle_pending_status): New
4164 (handle_v_cont): Factor out parts to ...
4165 (resume): ... this new function. If in all-stop, and a thread
4166 being resumed has a pending status, report it without actually
4168 (myresume): Adjust to use the new 'resume' function.
4169 (clear_pending_status_callback, set_pending_status_callback)
4170 (find_status_pending_thread_callback): New functions.
4171 (handle_status): Handle the case of multiple threads having
4172 interesting statuses to report. Report threads' real last signal
4173 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4174 with an interesting thread to report the status for, instead of
4175 always reporting the status of the first thread.
4177 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4179 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4180 * gdbreplay.c (gdbreplay_version): Likewise.
4182 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4184 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4185 iov.iov_len with the real length in use.
4187 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4189 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4190 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4191 for all targets that use win32-low.c.
4192 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4193 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4195 2013-12-13 Pedro Alves <palves@redhat.com>
4197 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4198 if equal to TARGET_WAITKIND_LOADED.
4199 * win32-low.c (cached_status): New static global.
4200 (win32_wait): Add declaration.
4201 (do_initial_child_stuff): Flush all initial pending debug events
4202 up to the initial breakpoint.
4203 (win32_wait): If CACHED_STATUS was set, return that instead
4204 of doing a real wait. Remove the code resuming the execution
4205 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4206 during the initial phase. Also remove the code changing
4207 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4208 TARGET_WAITKIND_STOPPED.
4210 2013-12-11 Yao Qi <yao@codesourcery.com>
4212 * notif.c (handle_notif_ack): Return 0 if no notification
4215 2013-11-20 Doug Evans <dje@google.com>
4217 * linux-low.c (linux_set_resume_request): Fix comment.
4219 2013-11-20 Doug Evans <dje@google.com>
4221 * linux-low.c (resume_status_pending_p): Tweak comment.
4223 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4225 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4226 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4227 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4228 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4229 (srv_amd64_regobj): Add amd64-mpx.o.
4230 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4231 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4232 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4233 * i387-fp.c (num_pl_bnd_register) Added constant.
4234 (num_pl_bnd_cfg_registers) Added constant.
4235 (struct i387_xsave) Added reserved area and MPX fields.
4236 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4237 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4239 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4240 (init_registers_amd64_mpx_linux): Declare new function.
4241 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4242 (x86_64_regmap): Add MPX registers.
4243 (x86_linux_read_description): Add MPX case.
4244 (initialize_low_arch): Initialize MPX targets.
4246 2013-11-18 Tom Tromey <tromey@redhat.com>
4248 * configure: Rebuild.
4249 * configure.ac: Don't check for stdlib.h.
4250 * gdbreplay.c: Unconditionally include stdlib.h.
4252 2013-11-18 Tom Tromey <tromey@redhat.com>
4254 * config.in: Rebuild.
4255 * configure: Rebuild.
4256 * configure.ac: Don't use AC_HEADER_DIRENT.
4258 2013-11-18 Tom Tromey <tromey@redhat.com>
4260 * server.h: Don't check HAVE_STRING_H.
4261 * gdbreplay.c: Don't check HAVE_STRING_H.
4262 * configure: Rebuild.
4264 2013-11-18 Tom Tromey <tromey@redhat.com>
4266 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4269 2013-11-08 Tom Tromey <tromey@redhat.com>
4271 * configure, config.in: Rebuild.
4272 * configure.ac: Remove unused configury.
4274 2013-11-08 Tom Tromey <tromey@redhat.com>
4276 * acinclude.m4: Include common.m4, codeset.m4.
4277 * configure, config.in: Rebuild.
4278 * configure.ac: Use GDB_AC_COMMON.
4280 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4282 * linux-s390-low.c (HWCAP_S390_TE): New define.
4283 (s390_arch_setup): Consider the TE field in the HWCAP for
4284 determining 'have_regset_tdb'.
4286 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4289 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4292 2013-10-02 Pedro Alves <palves@redhat.com>
4294 * server.c (process_serial_event): Don't output "GDBserver
4295 exiting" if GDB is connected through stdio.
4296 * target.c (mywait): Likewise, be silent if GDB is connected
4299 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4301 * lynx-low.c (lynx_add_threads_after_attach): New function.
4302 (lynx_attach): Remove call to add_thread. Add call to
4303 lynx_add_threads_after_attach instead.
4305 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4307 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4308 * config.in, configure: Regenerated.
4310 2013-09-18 Yao Qi <yao@codesourcery.com>
4313 * server.c (start_inferior): Clear 'resume_info'.
4315 2013-09-16 Jiong Wang <jiwang@tilera.com>
4317 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4320 2013-09-16 Jiong Wang <jiwang@tilera.com>
4322 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4323 linux-tile-low.o to srv_tgtobj.
4325 2013-09-16 Will Newton <will.newton@linaro.org>
4327 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4330 2013-09-06 Pedro Alves <palves@redhat.com>
4332 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4333 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4334 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4335 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4336 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4337 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4339 2013-09-06 Pedro Alves <palves@redhat.com>
4341 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4342 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4344 2013-09-06 Pedro Alves <palves@redhat.com>
4346 * linux-amd64-ipa.c: Include tracepoint.h.
4347 * linux-i386-ipa.c: Include tracepoint.h.
4349 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4351 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4352 (ps_get_thread_area): New function.
4354 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4356 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4357 (initialize_low_arch): Call init_registers_crisv32 rather than
4358 init_register_crisv32.
4360 2013-09-05 Pedro Alves <palves@redhat.com>
4362 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4364 * hostio.h: ... this new file.
4365 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4366 win32-low.c: Include hostio.h.
4368 2013-09-05 Pedro Alves <palves@redhat.com>
4370 * server.h (gdb_client_data, handler_func, callback_handler_func)
4371 (delete_file_handler, add_file_handler, append_callback_event)
4372 (delete_callback_event, start_event_loop, initialize_event_loop):
4373 Move to event-loop.h and include it.
4374 * event-loop.h: New file.
4376 2013-09-05 Pedro Alves <palves@redhat.com>
4378 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4379 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4380 (loaded_dll, unloaded_dll): Move to ...
4381 * dll.h: ... this new file.
4382 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4384 2013-09-05 Pedro Alves <palves@redhat.com>
4386 * server.h (current_process, get_thread_process, all_processes)
4387 (add_inferior_to_list, for_each_inferior, current_inferior)
4388 (remove_inferior, add_process, remove_process, find_process_pid)
4389 (have_started_inferiors_p, have_attached_inferiors_p)
4390 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4391 (clear_inferiors, find_inferior, find_inferior_id)
4392 (inferior_target_data, set_inferior_target_data)
4393 (inferior_regcache_data, set_inferior_regcache_data): Move to
4394 inferiors.h, and include it.
4395 * inferiors.h: New file.
4397 2013-09-05 Pedro Alves <palves@redhat.com>
4399 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4403 2013-09-05 Pedro Alves <palves@redhat.com>
4405 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4407 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4408 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4409 (handle_tracepoint_general_set, handle_tracepoint_query)
4410 (tracepoint_finished_step, tracepoint_was_hit)
4411 (release_while_stepping_state_list, current_traceframe)
4412 (in_readonly_region, traceframe_read_mem)
4413 (fetch_traceframe_registers, traceframe_read_sdata)
4414 (traceframe_read_info, struct fast_tpoint_collect_status)
4415 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4416 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4417 (supply_fast_tracepoint_registers)
4418 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4419 (ipa_tdesc, claim_trampoline_space)
4420 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4421 (agent_mem_read, agent_get_trace_state_variable_value)
4422 (agent_set_trace_state_variable_value, agent_tsv_read)
4423 (agent_mem_read_string, get_raw_reg_func_addr)
4424 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4425 * tracepoint.h: ... this new file.
4427 2013-09-05 Pedro Alves <palves@redhat.com>
4429 * server.h (perror_with_name, error, fatal, warning, paddress)
4430 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4432 * utils.h: New file.
4434 2013-09-05 Pedro Alves <palves@redhat.com>
4436 * server.h (remote_debug, noack_mode, transport_is_reliable)
4437 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4438 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4439 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4440 (write_enn, initialize_async_io, enable_async_io)
4441 (disable_async_io, check_remote_input_interrupt_request)
4442 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4443 (dead_thread_notify, prepare_resume_reply)
4444 (decode_address_to_semicolon, decode_address, decode_m_packet)
4445 (decode_M_packet, decode_X_packet, decode_xfer_write)
4446 (decode_search_memory_packet, unhexify, hexify)
4447 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4448 (look_up_one_symbol, relocate_instruction)
4449 (monitor_output): Move to remote-utils.h, and include it.
4450 * remote-utils.h: New file.
4452 2013-09-05 Pedro Alves <palves@redhat.com>
4454 * server.h (_): Delete.
4456 2013-09-02 Pedro Alves <palves@redhat.com>
4458 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4459 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4461 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4463 2013-09-02 Pierre Muller <muller@sourceware.org>
4465 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4466 or WriteProcessMemory complete successfully and handle
4467 ERROR_PARTIAL_COPY error.
4469 2013-09-02 Pedro Alves <palves@redhat.com>
4471 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4472 error instead of EIO.
4474 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4477 * linux-low.c: Include filestuff.h.
4478 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4479 * lynx-low.c: Include filestuff.h.
4480 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4481 * server.c: Include filestuff.h.
4482 (main): Call notice_open_fds.
4483 * spu-low.c: Include filestuff.h.
4484 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4486 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4488 * Makefile.in: Explain why ../target and ../nat are not
4489 listed as include file search paths.
4490 (linux-waitpid.o): New object file rule.
4491 * configure.srv (srv_native_linux_obj): New variable.
4492 Replace all occurrences of linux native object files with
4493 $srv_native_linux_obj.
4494 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4495 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4496 (linux_enable_event_reporting): Remove declaration.
4497 (my_waitpid): Moved to common/linux-waitpid.c.
4498 (linux_wait_for_event): Pass ptid when calling
4499 linux_enable_event_reporting.
4500 (linux_supports_tracefork_flag): Remove.
4501 (linux_enable_event_reporting): Likewise.
4502 (linux_tracefork_grandchild): Remove.
4503 (STACK_SIZE): Moved to common/linux-ptrace.c.
4504 (linux_tracefork_child): Remove.
4505 (linux_test_for_tracefork): Remove.
4506 (linux_look_up_symbols): Call linux_supports_traceclone.
4507 (initialize_low): Remove call to linux_test_for_tracefork.
4508 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4509 common/linux-ptrace.h.
4510 (PTRACE_TYPE_ARG4): Likewise.
4511 Include linux-ptrace.h.
4513 2013-08-21 Pedro Alves <palves@redhat.com>
4515 * config.in: Renegerate.
4517 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4519 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4520 (SFILES): Remove $(srcdir)/common/target-common.c and
4521 add $(srcdir)/target/waitstatus.c.
4522 (OBS): Remove target-common.o and add waitstatus.o.
4523 (server_h): Remove $(srcdir)/../common/target-common.h and
4524 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4525 and $(srcdir)/../target/waitstatus.h.
4526 (target-common.o): Remove.
4527 (waitstatus.o): New target object file.
4528 * target.h: Do not include target-common.h and
4529 include target/resume.h, target/wait.h and
4530 target/waitstatus.h.
4532 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4534 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4535 to PTRACE_TYPE_ARG3.
4536 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4537 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4539 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4540 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4542 2013-07-27 Jie Zhang <jie@codesourcery.com>
4543 Daniel Jacobowitz <dan@codesourcery.com>
4544 Yao Qi <yao@codesourcery.com>
4546 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4547 (mips-linux-watch.o): New rule.
4548 (mips_linux_watch_h): New variable.
4549 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4551 * linux-mips-low.c: Include mips-linux-watch.h.
4552 (struct arch_process_info, struct arch_lwp_info): New.
4553 (update_watch_registers_callback): New function.
4554 (mips_linux_new_process, mips_linux_new_thread) New functions.
4555 (mips_linux_prepare_to_resume, mips_insert_point): New
4557 (mips_remove_point, mips_stopped_by_watchpoint): New
4559 (rsp_bp_type_to_target_hw_bp_type): New function.
4560 (mips_stopped_data_address): New function.
4561 (the_low_target): Add watchpoint support functions.
4563 2013-07-27 Yao Qi <yao@codesourcery.com>
4565 * i386-low.c: Include break-common.h.
4566 (enum target_hw_bp_type): Remove.
4568 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4570 * Makefile.in (SFILES): /common/target-common.c.
4571 (OBS): Add target-common.o.
4572 (server_h): Add $(srcdir)/../common/target-common.h.
4573 (target-common.o): New target.
4574 * server.c (queue_stop_reply_callback): Free
4575 status string after use.
4576 * target.c (target_waitstatus_to_string): Remove.
4577 * target.h: Include target-common.h.
4578 (resume_kind): Likewise.
4579 (target_waitkind): Likewise.
4580 (target_waitstatus): Likewise.
4581 (TARGET_WNOHANG): Likewise.
4583 2013-07-04 Yao Qi <yao@codesourcery.com>
4585 * Makefile.in (host_alias): Use @host_noncanonical@.
4586 (target_alias): Use @target_noncanonical@.
4587 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4588 ACX_NONCANONICAL_HOST.
4589 * configure: Regenerated.
4592 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4594 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4595 * configure: Rebuild.
4596 * Makefile.in (version_host, version_target): Get from configure.
4597 (version.c): Use $(version_host) and $(version_target).
4599 2013-07-03 Pedro Alves <palves@redhat.com>
4601 * Makefile.in (config.status): Depend on development.sh.
4602 * acinclude.m4: Include libmcheck.m4.
4603 * configure: Regenerate.
4605 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4607 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4608 attribute inside the parentheses.
4609 (winapi_DebugSetProcessKillOnExit): Ditto.
4610 (winapi_DebugBreakProcess): Ditto.
4611 (winapi_GenerateConsoleCtrlEvent): Ditto.
4613 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4615 * notif.h (notif_event): Add a dummy member to avoid compiler
4618 2013-07-01 Pedro Alves <palves@redhat.com>
4620 * hostio.c (HOSTIO_PATH_MAX): Define.
4621 (require_filename, handle_open, handle_unlink, handle_readlink):
4624 2013-07-01 Pedro Alves <palves@redhat.com>
4626 * server.h: Include "pathmax.h".
4627 * linux-low.c: Don't include sys/param.h.
4628 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4630 * win32-low.c: Don't include sys/param.h.
4631 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4633 2013-07-01 Pedro Alves <palves@redhat.com>
4635 * event-loop.c: Don't check HAVE_UNISTD_H before including
4637 * gdbreplay.c: Likewise.
4638 * remote-utils.c: Likewise.
4639 * server.c: Likewise.
4640 * configure.ac: Don't check for unistd.h.
4641 * configure: Regenerate.
4643 2013-06-28 Tom Tromey <tromey@redhat.com>
4645 * Makefile.in (version.c): Use version.in, not
4648 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4650 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4651 * configure: Rebuild.
4652 * Makefile.in (version_host, version_target): Get from configure.
4653 (version.c): Use $(version_host) and $(version_target).
4655 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4657 Fix trace-status to output user name without trailing colon.
4658 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4660 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4662 Fix trace-status to output proper start-time and stop-time.
4663 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4664 output start time and stop time in hex as gdb expects.
4666 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4668 * tracepoint.c (build_traceframe_info_xml): Output trace state
4669 variables present in the trace buffer.
4671 2013-06-24 Tom Tromey <tromey@redhat.com>
4673 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4675 (version.o): Remove.
4676 * gdbreplay.c: Include version.h.
4677 (version, host_name): Don't declare.
4678 * server.h: Include version.h.
4679 (version, host_name): Don't declare.
4681 2013-06-12 Pedro Alves <palves@redhat.com>
4683 * linux-x86-low.c (linux_is_elf64): Delete global.
4684 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4685 with local linux_pid_exe_is_elf_64_file use.
4687 2013-06-11 Pedro Alves <palves@redhat.com>
4689 * linux-low.c (regset_disabled, disable_regset): New functions.
4690 (regsets_fetch_inferior_registers)
4691 (regsets_store_inferior_registers): Use them.
4692 (initialize_regsets_info); Don't allocate the disabled_regsets
4694 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4697 2013-06-11 Pedro Alves <palves@redhat.com>
4699 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4702 2013-06-11 Pedro Alves <palves@redhat.com>
4704 * linux-x86-low.c (initialize_low_arch): Call
4705 init_registers_x32_avx_linux.
4707 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4709 Fix compatibility with Android Bionic.
4710 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4713 2013-06-07 Pedro Alves <palves@redhat.com>
4716 * Makefile.in (OBS): Add tdesc.o.
4717 (IPA_OBJS): Add tdesc-ipa.o.
4718 (tdesc-ipa.o): New rule.
4719 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4721 * linux-low.c (new_inferior): Delete.
4722 (disabled_regsets, num_regsets): Delete.
4723 (linux_add_process): Adjust to set the new per-process
4725 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4726 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4727 was a stop. When calling arch_setup, switch the current inferior
4728 to the thread that got an event.
4729 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4730 (regsets_fetch_inferior_registers)
4731 (regsets_store_inferior_registers): New regsets_info parameter.
4733 (linux_register_in_regsets): New regs_info parameter. Adjust to
4735 (register_addr, fetch_register, store_register): New usrregs_info
4736 parameter. Adjust to use it.
4737 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4738 parameter regs_info. Adjust to use it.
4739 (linux_fetch_registers): Get the current inferior's regs_info, and
4741 (linux_store_registers): Ditto.
4742 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4743 (initialize_low): Don't initialize the target_regsets here. Call
4744 initialize_low_arch.
4745 * linux-low.h (target_regsets): Delete declaration.
4746 (struct regsets_info): New.
4747 (struct usrregs_info): New.
4748 (struct regs_info): New.
4749 (struct process_info_private) <new_inferior>: New field.
4750 (struct linux_target_ops): Delete the num_regs, regmap, and
4751 regset_bitmap fields. New field regs_info.
4752 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4753 * i387-fp.c (num_xmm_registers): Delete.
4754 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4755 calls to new interface.
4756 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4757 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4758 Infer the number of xmm registers from the regcache's target
4760 * i387-fp.h (num_xmm_registers): Delete.
4761 * inferiors.c (add_thread): Don't install the thread's regcache
4763 * proc-service.c (gregset_info): Fetch the current inferior's
4764 regs_info. Adjust to use it.
4765 * regcache.c: Include tdesc.h.
4766 (register_bytes, reg_defs, num_registers)
4767 (gdbserver_expedite_regs): Delete.
4768 (get_thread_regcache): If the thread doesn't have a regcache yet,
4769 create one, instead of aborting gdbserver.
4770 (regcache_invalidate_one): Rename to ...
4771 (regcache_invalidate_thread): ... this.
4772 (regcache_invalidate_one): New.
4773 (regcache_invalidate): Only invalidate registers of the current
4775 (init_register_cache): Add target_desc parameter, and use it.
4776 (new_register_cache): Ditto. Assert the target description has a
4777 non zero registers_size.
4778 (regcache_cpy): Add assertions. Adjust.
4779 (realloc_register_cache, set_register_cache): Delete.
4780 (registers_to_string, registers_from_string): Adjust.
4781 (find_register_by_name, find_regno, find_register_by_number)
4782 (register_cache_size): Add target_desc parameter, and use it.
4783 (free_register_cache_thread, free_register_cache_thread_one)
4784 (regcache_release, register_cache_size): New.
4785 (register_size): Add target_desc parameter, and use it.
4786 (register_data, supply_register, supply_register_zeroed)
4787 (supply_regblock, supply_register_by_name, collect_register)
4788 (collect_register_as_string, collect_register_by_name): Adjust.
4789 * regcache.h (struct target_desc): Forward declare.
4790 (struct regcache) <tdesc>: New field.
4791 (init_register_cache, new_register_cache): Add target_desc
4793 (regcache_invalidate_thread): Declare.
4794 (regcache_invalidate_one): Delete declaration.
4795 (regcache_release): Declare.
4796 (find_register_by_number, register_cache_size, register_size)
4797 (find_regno): Add target_desc parameter.
4798 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4800 * remote-utils.c: Include tdesc.h.
4801 (outreg, prepare_resume_reply): Adjust.
4802 * server.c: Include tdesc.h.
4803 (gdbserver_xmltarget): Delete declaration.
4804 (get_features_xml, process_serial_event): Adjust.
4805 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4807 (struct process_info) <tdesc>: New field.
4808 (ipa_tdesc): Declare.
4809 * tdesc.c: New file.
4810 * tdesc.h: New file.
4811 * tracepoint.c: Include tdesc.h.
4812 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4813 (get_context_regcache): Adjust to pass ipa_tdesc down.
4814 (do_action_at_tracepoint): Adjust to get the register cache size
4815 from the context regcache's description.
4816 (traceframe_walk_blocks): Adjust to get the register cache size
4817 from the current trace frame's description.
4818 (traceframe_get_pc): Adjust to get current trace frame's
4819 description and pass it down.
4820 (gdb_collect): Adjust to get the register cache size from the
4822 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4823 (gdbserver_xmltarget): Delete.
4824 (initialize_low_tracepoint): Set the ipa's target description.
4825 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4826 (initialize_low_tracepoint): Set the ipa's target description.
4827 * linux-x86-low.c: Include tdesc.h.
4828 [__x86_64__] (is_64bit_tdesc): New.
4829 (ps_get_thread_area, x86_get_thread_area): Use it.
4830 (i386_cannot_store_register): Rename to ...
4831 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4832 (i386_cannot_fetch_register): Rename to ...
4833 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4834 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4836 (target_regsets): Rename to ...
4837 (x86_regsets): ... this.
4838 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4840 (x86_siginfo_fixup): Use is_64bit_tdesc.
4841 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4842 (tdesc_x32_avx_linux, tdesc_x32_linux)
4843 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4845 (x86_linux_update_xmltarget): Delete.
4846 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4847 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4848 (AMD64_LINUX_USER64_CS): New.
4849 (x86_linux_read_description): New, based on
4850 x86_linux_update_xmltarget.
4851 (same_process_callback): New.
4852 (x86_arch_setup_process_callback): New.
4853 (x86_linux_update_xmltarget): New.
4854 (x86_regsets_info): New.
4855 (amd64_linux_regs_info): New.
4856 (i386_linux_usrregs_info): New.
4857 (i386_linux_regs_info): New.
4858 (x86_linux_regs_info): New.
4859 (x86_arch_setup): Reimplement.
4860 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4861 (x86_emit_ops): Ditto.
4862 (the_low_target): Adjust. Install x86_linux_regs_info,
4863 x86_cannot_fetch_register, and x86_cannot_store_register.
4864 (initialize_low_arch): New.
4865 * linux-ia64-low.c (tdesc_ia64): Declare.
4866 (ia64_fetch_register): Adjust.
4867 (ia64_usrregs_info, regs_info): New globals.
4868 (ia64_regs_info): New function.
4869 (the_low_target): Adjust.
4870 (initialize_low_arch): New function.
4871 * linux-sparc-low.c (tdesc_sparc64): Declare.
4872 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4874 (sparc_arch_setup): New function.
4875 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4876 (the_low_target): Adjust.
4877 (initialize_low_arch): New function.
4878 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4879 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4880 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4881 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4882 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4883 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4884 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4885 (tdesc_powerpc_isa205_vsx64l): Declare.
4886 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4887 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4888 (ppc_set_pc, ppc_get_hwcap): Adjust.
4889 (ppc_usrregs_info): Forward declare.
4890 (!__powerpc64__) ppc_regmap_adjusted: New global.
4891 (ppc_arch_setup): Adjust to the current process'es target
4893 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4894 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4895 (ppc_store_evrregset): Adjust.
4896 (target_regsets): Rename to ...
4897 (ppc_regsets): ... this, and make static.
4898 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4899 (ppc_regs_info): New function.
4900 (the_low_target): Adjust.
4901 (initialize_low_arch): New function.
4902 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4903 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4904 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4905 (tdesc_s390x_linux64v2): Declare.
4906 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4907 (s390_fill_gregset, s390_store_last_break): Adjust.
4908 (target_regsets): Rename to ...
4909 (s390_regsets): ... this, and make static.
4910 (s390_get_pc, s390_set_pc): Adjust.
4911 (s390_get_hwcap): New target_desc parameter, and use it.
4912 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4913 (s390_arch_setup): Adjust to set the current process'es target
4914 description. Don't adjust the regmap.
4915 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4916 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4917 (regs_info_3264): New globals.
4918 (s390_regs_info): New function.
4919 (the_low_target): Adjust.
4920 (initialize_low_arch): New function.
4921 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4922 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4923 [__mips64] (init_registers_mips_linux)
4924 (init_registers_mips_dsp_linux): Delete defines.
4925 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4926 (have_dsp): New global.
4927 (mips_read_description): New, based on mips_arch_setup.
4928 (mips_arch_setup): Reimplement.
4929 (get_usrregs_info): New function.
4930 (mips_cannot_fetch_register, mips_cannot_store_register)
4931 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4932 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4933 (target_regsets): Rename to ...
4934 (mips_regsets): ... this, and make static.
4935 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4936 (dsp_regs_info, regs_info): New globals.
4937 (mips_regs_info): New function.
4938 (the_low_target): Adjust.
4939 (initialize_low_arch): New function.
4940 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4941 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4943 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4944 (arm_read_description): New, with bits factored from
4946 (arm_arch_setup): Reimplement.
4947 (target_regsets): Rename to ...
4948 (arm_regsets): ... this, and make static.
4949 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4950 (arm_regs_info): New function.
4951 (the_low_target): Adjust.
4952 (initialize_low_arch): New function.
4953 * linux-m68k-low.c (tdesc_m68k): Declare.
4954 (target_regsets): Rename to ...
4955 (m68k_regsets): ... this, and make static.
4956 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4957 (m68k_regs_info): New function.
4958 (m68k_arch_setup): New function.
4959 (the_low_target): Adjust.
4960 (initialize_low_arch): New function.
4961 * linux-sh-low.c (tdesc_sharch): Declare.
4962 (target_regsets): Rename to ...
4963 (sh_regsets): ... this, and make static.
4964 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4965 (sh_regs_info, sh_arch_setup): New functions.
4966 (the_low_target): Adjust.
4967 (initialize_low_arch): New function.
4968 * linux-bfin-low.c (tdesc_bfin): Declare.
4969 (bfin_arch_setup): New function.
4970 (bfin_usrregs_info, regs_info): New globals.
4971 (bfin_regs_info): New function.
4972 (the_low_target): Adjust.
4973 (initialize_low_arch): New function.
4974 * linux-cris-low.c (tdesc_cris): Declare.
4975 (cris_arch_setup): New function.
4976 (cris_usrregs_info, regs_info): New globals.
4977 (cris_regs_info): New function.
4978 (the_low_target): Adjust.
4979 (initialize_low_arch): New function.
4980 * linux-cris-low.c (tdesc_crisv32): Declare.
4981 (cris_arch_setup): New function.
4982 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4983 (cris_regs_info): New function.
4984 (the_low_target): Adjust.
4985 (initialize_low_arch): New function.
4986 * linux-m32r-low.c (tdesc_m32r): Declare.
4987 (m32r_arch_setup): New function.
4988 (m32r_usrregs_info, regs_info): New globals.
4989 (m32r_regs_info): Adjust.
4990 (initialize_low_arch): New function.
4991 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4992 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4993 (tic6x_usrregs_info): Forward declare.
4994 (tic6x_read_description): New function, based on ...
4995 (tic6x_arch_setup): ... this. Reimplement.
4996 (target_regsets): Rename to ...
4997 (tic6x_regsets): ... this, and make static.
4998 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4999 (tic6x_regs_info): New function.
5000 (the_low_target): Adjust.
5001 (initialize_low_arch): New function.
5002 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5003 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5004 (target_regsets): Rename to ...
5005 (xtensa_regsets): ... this, and make static.
5006 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5008 (xtensa_arch_setup, xtensa_regs_info): New functions.
5009 (the_low_target): Adjust.
5010 (initialize_low_arch): New function.
5011 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5012 (nios2_arch_setup): Set the current process'es tdesc.
5013 (target_regsets): Rename to ...
5014 (nios2_regsets): ... this.
5015 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5016 (nios2_regs_info): New function.
5017 (the_low_target): Adjust.
5018 (initialize_low_arch): New function.
5019 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5020 (aarch64_arch_setup): Set the current process'es tdesc.
5021 (target_regsets): Rename to ...
5022 (aarch64_regsets): ... this.
5023 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5024 (aarch64_regs_info): New function.
5025 (the_low_target): Adjust.
5026 (initialize_low_arch): New function.
5027 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5029 (target_regsets): Rename to ...
5030 (tile_regsets): ... this.
5031 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5032 (tile_regs_info): New function.
5033 (tile_arch_setup): Set the current process'es tdesc.
5034 (the_low_target): Adjust.
5035 (initialize_low_arch): New function.
5036 * spu-low.c (tdesc_spu): Declare.
5037 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5038 * win32-arm-low.c (tdesc_arm): Declare.
5039 (arm_arch_setup): New function.
5040 (the_low_target): Install arm_arch_setup instead of
5042 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5043 (init_windows_x86): Rename to ...
5044 (i386_arch_setup): ... this. Set `win32_tdesc'.
5045 (the_low_target): Adjust.
5046 * win32-low.c (win32_tdesc): New global.
5047 (child_add_thread): Don't create the thread cache here.
5048 (do_initial_child_stuff): Set the new process'es tdesc.
5049 * win32-low.h (struct target_desc): Forward declare.
5050 (win32_tdesc): Declare.
5051 * lynx-i386-low.c (tdesc_i386): Declare global.
5052 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5053 * lynx-low.c (lynx_tdesc): New global.
5054 (lynx_add_process): Set the new process'es tdesc.
5055 * lynx-low.h (struct target_desc): Forward declare.
5056 (lynx_tdesc): Declare global.
5057 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5058 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5059 * nto-low.c (nto_tdesc): New global.
5060 (do_attach): Set the new process'es tdesc.
5061 * nto-low.h (struct target_desc): Forward declare.
5062 (nto_tdesc): Declare.
5063 * nto-x86-low.c (tdesc_i386): Declare.
5064 (nto_x86_arch_setup): Set `nto_tdesc'.
5066 2013-06-04 Gary Benson <gbenson@redhat.com>
5068 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5069 to qSupported response when appropriate.
5070 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5071 with nonzero-length annex.
5072 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5073 arguments supplied in annex.
5075 2013-05-31 Doug Evans <dje@google.com>
5078 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5079 64 bits in 64-cross-32 environment.
5081 2013-05-28 Pedro Alves <palves@redhat.com>
5083 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5084 (aarch64-without-fpu.c): Delete rule.
5085 * configure.srv (aarch64*-*-linux*): Remove references to
5086 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5087 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5090 2013-05-24 Pedro Alves <palves@redhat.com>
5092 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5093 instead of strchr/decode_address. Error if the range isn't split
5094 with a ','. Don't assume there's be a ':' in the action.
5096 2013-05-23 Yao Qi <yao@codesourcery.com>
5097 Pedro Alves <palves@redhat.com>
5099 * linux-low.c (lwp_in_step_range): New function.
5100 (linux_wait_1): If the thread was range stepping and stopped
5101 outside the stepping range, report the stop to GDB. Otherwise,
5102 continue stepping. Add range stepping debug output.
5103 (linux_set_resume_request): Copy the step range from the resume
5105 (linux_supports_range_stepping): New.
5106 (linux_target_ops) <supports_range_stepping>: Set to
5107 linux_supports_range_stepping.
5108 * linux-low.h (struct linux_target_ops)
5109 <supports_range_stepping>: New field.
5110 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5111 * linux-x86-low.c (x86_supports_range_stepping): New.
5112 (the_low_target) <supports_range_stepping>: Set to
5113 x86_supports_range_stepping.
5114 * server.c (handle_v_cont): Handle 'r' action.
5115 (handle_v_requests): Append ";r" if the target supports range
5117 * target.h (struct thread_resume) <step_range_start,
5118 step_range_end>: New fields.
5119 (struct target_ops) <supports_range_stepping>:
5121 (target_supports_range_stepping): New macro.
5123 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5125 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5126 confusion in comment.
5128 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5130 * lynx-low.c (struct process_info_private): New type.
5131 (lynx_add_process): New function.
5132 (lynx_create_inferior, lynx_attach): Replace calls to
5133 add_process by calls to lynx_add_process.
5134 (lynx_resume): If PTID is null, then try using
5135 current_process()->private->last_wait_event_ptid.
5137 (lynx_clear_inferiors): Delete. The contents of that function
5138 has been inlined in lynx_mourn;
5139 (lynx_wait_1): Save the ptid in the process's private data.
5140 (lynx_mourn): Free the process' private data. Replace call
5141 to lynx_clear_inferiors by call to clear_inferiors.
5143 2013-05-17 Yao Qi <yao@codesourcery.com>
5145 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5148 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5150 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5151 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5152 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5153 PT_TEXT_END_ADDR guards. Update comments.
5154 (linux_target_op) <read_offsets>: Conditionally define to
5155 linux_read_offsets if the target is UCLIBC and if it defines
5156 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5158 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5159 Andrew Jenner <andrew@codesourcery.com>
5161 * Makefile.in (SFILES): Add linux-nios2-low.c.
5162 (clean): Add action to delete nios2-linux.c.
5163 (nios2-linux.c): New rule.
5164 * configure.srv: Add nios2*-*-linux*.
5165 * linux-nios2-low.c: New.
5167 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5169 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5171 2013-04-25 Hui Zhu <hui@codesourcery.com>
5174 * ax.c (ax_printf): Add fflush.
5176 2013-04-22 Tom Tromey <tromey@redhat.com>
5178 * Makefile.in (SFILES): Add filestuff.c.
5179 (OBS): Add filestuff.o.
5180 (filestuff.o): New target.
5181 * config.in, configure: Rebuild.
5182 * configure.ac: Check for fdwalk, pipe2.
5184 2013-04-17 Pedro Alves <palves@redhat.com>
5186 * configure.ac (USE_THREAD_DB): Delete variable.
5187 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5188 Don't AC_SUBST USE_THREAD_DB.
5189 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5190 * config.in, configure: Regenerate.
5192 2013-04-16 Pedro Alves <palves@redhat.com>
5194 * linux-low.h (struct lwp_info) <thread_known>: Move under
5195 the USE_THREAD_DB #ifdef.
5197 2013-04-16 Pedro Alves <palves@redhat.com>
5199 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5200 (linux-low.o): Delete rule.
5201 * linux-low.h: Always include "gdb_thread_db.h" instead of
5202 conditionally including thread_db.h.
5203 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5206 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5208 * Makefile.in (install-only): Fix make install regression.
5210 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5212 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5213 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5215 * gdbserver.1: Remove.
5217 2013-03-22 Pedro Alves <palves@redhat.com>
5219 * linux-low.c (handle_extended_wait): Don't call
5220 linux_enable_event_reporting.
5222 2013-03-15 Tony Theodore <tonyt@logyst.com>
5225 * Makefile.in (SHELL): Use @SHELL@.
5227 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5229 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5232 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5234 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5235 Remove extraneous NULL element.
5237 2013-03-13 Yao Qi <yao@codesourcery.com>
5239 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5240 'V' block in trace frame.
5242 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5244 * target.h (struct target_ops): Add btrace ops.
5245 (target_supports_btrace): New macro.
5246 (target_enable_btrace): New macro.
5247 (target_disable_btrace): New macro.
5248 (target_read_btrace): New macro.
5249 * gdbthread.h (struct thread_info): Add btrace field.
5250 * server.c: Include btrace-common.h.
5251 (handle_btrace_general_set): New function.
5252 (handle_btrace_enable): New function.
5253 (handle_btrace_disable): New function.
5254 (handle_general_set): Call handle_btrace_general_set.
5255 (handle_qxfer_btrace): New function.
5256 (struct qxfer qxfer_packets[]): Add btrace entry.
5257 * inferiors.c (remove_thread): Disable btrace.
5258 * linux-low: Include linux-btrace.h.
5259 (linux_low_enable_btrace): New function.
5260 (linux_low_read_btrace): New function.
5261 (linux_target_ops): Add btrace ops.
5262 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5263 Add srv_linux_btrace=yes.
5264 (x86_64-*-linux*): Add linux-btrace.o.
5265 Add srv_linux_btrace=yes.
5266 * configure.ac: Define HAVE_LINUX_BTRACE.
5267 * config.in: Regenerated.
5268 * configure: Regenerated.
5270 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5272 * server.c (handle_qxfer): Preserve error message if -3 is
5274 (qxfer): Document the -3 return value.
5276 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5278 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5279 (linux_btrace_h): New variable.
5280 (linux-btrace.o): New rule.
5282 2013-03-08 Stan Shebs <stan@codesourcery.com>
5283 Hafiz Abid Qadeer <abidh@codesourcery.com>
5285 * tracepoint.c (trace_buffer_size): New global.
5286 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5287 (init_trace_buffer): Change to one-argument function. Allocate
5288 trace buffer memory.
5289 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5290 handle QTBuffer:size packet.
5291 (cmd_bigqtbuffer_size): New function.
5292 (initialize_tracepoint): Call init_trace_buffer with
5293 DEFAULT_TRACE_BUFFER_SIZE.
5294 * server.c (handle_query): Add QTBuffer:size in the
5297 2013-03-07 Yao Qi <yao@codesourcery.com>
5299 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5300 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5302 (cmd_qtsp): Adjust condition. Do post increment.
5303 Set cur_action and cur_step_action back to 0.
5305 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5308 * linux-low.c (linux_write_memory): Return early success if LEN is
5311 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5313 * configure.srv: Add x86_64-*-cygwin* as target.
5315 2013-02-28 Tom Tromey <tromey@redhat.com>
5317 * configure.ac: Invoke AC_SYS_LARGEFILE.
5318 * configure, config.in: Rebuild.
5320 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5322 * win32-low.c: Throughout, fix format strings and casts of
5323 printf-like functions to avoid type related warnings on all
5325 (get_child_debug_event): Print dwDebugEventCode as hex since
5326 that's how it's usually documented.
5328 2013-02-28 Yao Qi <yao@codesourcery.com>
5330 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5333 2013-02-27 Jiong Wang <jiwang@tilera.com>
5335 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5336 (reg-tilegx32.c): New rule.
5337 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5338 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5339 different register info initializer according to elf class.
5340 (init_registers_tilgx32): New function. The tilegx32 register info
5342 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5343 (tile_store_gregset): Likewise.
5345 2013-02-27 Yao Qi <yao@codesourcery.com>
5347 * server.c (process_point_options): Print debug message when
5348 debug_threads is true.
5350 2013-02-26 Yao Qi <yao@codesourcery.com>
5352 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5354 2013-02-19 Pedro Alves <palves@redhat.com>
5355 Kai Tietz <ktietz@redhat.com>
5359 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5360 instead of strtoul to extract address from packet.
5361 (process_serial_event) <'z'>: Likewise.
5363 2013-02-18 Yao Qi <yao@codesourcery.com>
5365 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5367 2013-02-14 Pedro Alves <palves@redhat.com>
5371 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5372 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5374 2013-02-14 Pedro Alves <palves@redhat.com>
5376 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5378 2013-02-14 Pedro Alves <palves@redhat.com>
5380 * tracepoint.c (save_string): Delete.
5381 (add_tracepoint_action): Use savestring instead of save_string.
5383 2013-02-12 Pedro Alves <palves@redhat.com>
5385 * linux-xtensa-low.c: Ditto.
5386 * xtensa-xtregs.c: Ditto.
5388 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5390 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5393 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5395 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5396 aarch64_num_wp_regs and aarch64_num_bp_regs to
5397 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5399 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5401 * linux-aarch64-low.c (ps_get_thread_area): Replace
5402 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5404 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5405 Marcus Shawcroft <marcus.shawcroft@arm.com>
5406 Nigel Stephens <nigel.stephens@arm.com>
5407 Yufeng Zhang <yufeng.zhang@arm.com>
5409 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5410 (aarch64.c, aarch64-without-fpu.c): New targets.
5411 * configure.srv (aarch64*-*-linux*): New.
5412 * linux-aarch64-low.c: New file.
5414 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5416 * linux-low.c (handle_extended_wait, linux_create_inferior)
5417 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5418 (dequeue_one_deferred_signal, linux_resume_one_thread)
5419 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5420 (linux_tracefork_grandchild, linux_test_for_tracefork)
5421 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5422 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5423 where the argument is 0.
5425 2013-01-25 Yao Qi <yao@codesourcery.com>
5427 * event-loop.c: Include "queue.h".
5428 (gdb_event_p): New typedef.
5429 (struct gdb_event) <next_event>: Remove.
5430 (event_queue): Change to QUEUE(gdb_event_p).
5431 (async_queue_event): Remove.
5432 (gdb_event_xfree): New.
5433 (initialize_event_loop): New.
5434 (process_event): Use API from QUEUE.
5435 (wait_for_event): Likewise.
5436 * server.c (main): Call initialize_event_loop.
5437 * server.h (initialize_event_loop): Declare.
5439 2013-01-18 Yao Qi <yao@codesourcery.com>
5441 * ax.h (struct eval_agent_expr_context): New.
5442 (gdb_eval_agent_expr): Update declaration.
5443 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5444 TFRAME. Add new argument CTX.
5445 * server.h (struct eval_agent_expr_context): Declare.
5446 (agent_mem_read, agent_tsv_read): Update declaration.
5447 (agent_mem_read_string): Likewise.
5448 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5449 (add_traceframe_block): Add new argument TPOINT.
5450 Increase TPOINT->traceframe_usage.
5451 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5452 eval_tracepoint_agent_expr.
5453 (condition_true_at_tracepoint): Likewise.
5454 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5455 (agent_mem_read_string, agent_tsv_read): Likewise.
5457 2013-01-16 Yao Qi <yao@codesourcery.com>
5459 * linux-low.c (linux_resume_one_lwp): Don't check
5460 'lwp->bp_reinsert != 0'.
5462 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5463 Pedro Alves <palves@redhat.com>
5465 * lynx-low.c (ptrace_request_to_str): Define a temporary
5466 macro and use it to simplify this function's implementation.
5468 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5470 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5473 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5475 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5477 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5479 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5481 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5483 * lynx-low.c (lynx_resume): Use the resume_info parameter
5484 to determine the ptid for the lynx_ptrace call, unless
5485 it is equal to minus_one_ptid, in which case we use the
5486 ptid of the current_inferior.
5487 (lynx_wait_1): After having received a thread create/exit
5488 event, resume the inferior's execution using the signaling
5489 thread's ptid, rather than the old ptid.
5491 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5493 * lynx-low.c (lynx_resume): Delete variable ret.
5495 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5497 * gdbreplay.c (gdbreplay_version): Update copyright year.
5498 * server.c (gdbserver_version): Likewise.
5500 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5502 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5505 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5507 * lynx-low.c (ptrace_request_to_str): Add handling for
5510 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5512 * lynx-low.c (lynx_attach): Delete variable new_process.
5514 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5516 * lynx-low.c (lynx_create_inferior): Delete variable
5519 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5521 * lynx-low.c (ptrace_request_to_str): Do not handle
5522 PTRACE_GETTHREADLIST if this macro does not exist.
5524 2012-12-15 Yao Qi <yao@codesourcery.com>
5526 * Makefile.in (OBS): Add notif.o.
5527 * notif.c, notif.h: New.
5528 * server.c: Include "notif.h".
5529 (struct vstop_notif) <next>: Remove.
5531 (queue_stop_reply): Update.
5532 (push_event, send_next_stop_reply): Remove.
5533 (discard_queued_stop_replies): Update.
5534 (notif_stop): New variable.
5535 (handle_v_stopped): Remove.
5536 (handle_v_requests): Don't call handle_v_stopped. Call
5537 handle_ack_notif instead.
5538 (queue_stop_reply_callback): Call notif_event_enque instead
5539 of queue_stop_reply.
5540 (handle_status): Don't call send_next_stop_reply, call
5541 notif_write_event instead.
5542 (kill_inferior_callback): Likewise.
5543 (detach_or_kill_inferior_callback): Likewise.
5544 (main): Call initialize_notif.
5545 (process_serial_event): Call QUEUE_is_empty.
5546 (handle_target_event): Call notif_push instead of push event.
5547 * server.h (push_event): Remove declaration.
5549 2012-12-10 Tom Tromey <tromey@redhat.com>
5551 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5552 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5555 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5556 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5557 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5558 (amd64-linux-ipa.o, ax.o): Rewrite.
5559 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5560 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5561 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5562 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5563 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5564 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5565 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5566 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5567 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5568 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5569 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5570 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5571 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5572 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5573 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5574 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5575 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5576 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5577 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5578 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5579 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5580 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5581 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5582 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5583 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5584 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5585 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5586 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5587 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5588 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5589 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5590 (reg-tilegx.o): Remove.
5591 (all_object_files): New macro.
5592 Include .deps files.
5593 * aclocal.m4, configure: Rebuild.
5594 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5595 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5596 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5598 2012-12-05 Tom Tromey <tromey@redhat.com>
5601 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5603 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5605 * configure.ac: Check for linux/perf_event.h.
5606 * config.in: Regenerated.
5607 * configure: Regenerated.
5609 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5611 * hostio.c (handle_readlink): Decrease buffer size
5612 parameter passed to readlink by one byte.
5614 2012-11-26 Yao Qi <yao@codesourcery.com>
5616 * configure.ac (build_warnings): Append '-Wempty-body'.
5617 * configure: Regenerated.
5618 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5621 2012-11-15 Pierre Muller <muller@sourceware.org>
5623 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5624 * config.in: Regenerate.
5625 * configure: Regenerate.
5626 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5627 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5628 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5629 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5631 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5632 instead of <sys/wait.h> header.
5633 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5635 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5637 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5638 (various make rules): Remove -DGDBSERVER
5640 2012-11-09 Yao Qi <yao@codesourcery.com>
5642 * spu-low.c (current_ptid): Move it to ..
5643 * gdbthread.h: ... here. New.
5644 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5645 * server.c (myresume, process_serial_event): Likewise.
5646 * thread-db.c (thread_db_find_new_threads): Likewise.
5647 * tracepoint.c (run_inferior_command): Likewise.
5649 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5651 * server.c (handle_search_memory_1): Include access length in
5654 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5656 * linux-crisv32-low.c: Fix compile errors.
5658 2012-09-04 Yao Qi <yao@codesourcery.com>
5660 * tracepoint.c (cmd_qtsv): Adjust debug message.
5661 Don't check CUR_TPOINT.
5663 2012-08-28 Yao Qi <yao@codesourcery.com>
5665 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5666 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5667 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5668 Remove declarations of xmalloc, xreallloc, xstrdup and
5670 * Makefile.in (libiberty_h): New.
5671 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5672 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5674 2012-08-23 Yao Qi <yao@codesourcery.com>
5676 * server.h: Remove declaration of 'xsnprintf'.
5678 2012-08-22 Keith Seitz <keiths@redhat.com>
5680 * server.h: Include build-gnulib-gbserver/config.h.
5681 * gdbreplay.c: Likewise.
5683 2012-08-08 Doug Evans <dje@google.com>
5685 * Makefile.in (SFILES): Add gdb_vecs.c.
5686 (OBS): Add gdb_vecs.o.
5687 (gdb_vecs_h, host_defs_h): New variables.
5688 (thread-db.o): Add $(gdb_vecs_h) dependency.
5689 (gdb_vecs.o): New rule.
5690 * thread-db.c: #include "gdb_vecs.h".
5691 (thread_db_load_search): Use a vector to iterate over path elements.
5692 Handle text appearing after "$pdir".
5694 * configure.ac: Add check for strstr.
5695 * config.in: Regenerate.
5696 * configure: Regenerate.
5698 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5700 * hostio.c (handle_pread): If pread fails, fall back to attempting
5702 (handle_pwrite): Likewise for pwrite.
5704 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5706 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5707 between unsupported TYPE and unimplementable ADDR/LEN combination.
5708 (arm_insert_point): Act on new return value.
5710 2012-07-31 Pedro Alves <palves@redhat.com>
5712 * server.c (process_point_options): Only skip tokens if we find
5713 one that is unrecognized. Don't treat 'X' specially while
5714 skipping unrecognized tokens.
5716 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5718 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5719 to 4-byte-align HW breakpoint addresses for Thumb.
5721 2012-07-27 Yao Qi <yao@codesourcery.com>
5725 * server.h: Declare gdb_agent_about_to_close.
5726 * target.c (kill_inferior): Include "agent.h".
5727 New. Send command 'kill'.
5728 * target.h (kill_inferior): Removed macro.
5729 * tracepoint.c (gdb_agent_about_to_close): New.
5730 (gdb_agent_helper_thread): Handle command 'close'.
5731 Wait endlessly until the inferior stops.
5732 Install gdb_agent_remove_socket to atexit hook.
5733 (agent_socket_name): New static variable.
5734 (gdb_agent_socket_init): Replace local variable 'name' with
5735 'agent_socket_name'.
5736 (gdb_agent_remove_socket): New.
5738 2012-07-27 Yao Qi <yao@codesourcery.com>
5740 * server.c (process_point_options): Stop at 'X' when parsing.
5742 2012-07-19 Michael Eager <eager@eagercon.com>
5744 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5746 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5747 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5748 hardware breakpoint.
5750 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5752 * gdbserver/linux-low.c (initialize_low): Call
5753 linux_ptrace_init_warnings.
5755 2012-07-02 Doug Evans <dje@google.com>
5757 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5760 2012-07-02 Stan Shebs <stan@codesourcery.com>
5762 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5763 (ax.o): Add it to build rule.
5765 (OBS): Add format.o.
5766 (IPA_OBS): Add format.o.
5767 * server.c (handle_query): Claim support for breakpoint commands.
5768 (process_point_options): Add command case.
5769 (process_serial_event): Leave running if there are printfs in
5771 * mem-break.h (any_persistent_commands): Declare.
5772 (add_breakpoint_commands): Declare.
5773 (gdb_no_commands_at_breakpoint): Declare.
5774 (run_breakpoint_commands): Declare.
5775 * mem-break.c (struct point_command_list): New struct.
5776 (struct breakpoint): New field command_list.
5777 (any_persistent_commands): New function.
5778 (add_commands_to_breakpoint): New function.
5779 (add_breakpoint_commands): New function.
5780 (gdb_no_commands_at_breakpoint): New function.
5781 (run_breakpoint_commands): New function.
5782 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5784 * ax.c: Include format.h.
5785 (ax_printf): New function.
5786 (gdb_eval_agent_expr): Add printf opcode.
5788 2012-06-13 Yao Qi <yao@codesourcery.com>
5790 * server.c (start_inferior): Remove duplicated writes to fields
5791 'last_resume_kind' and 'last_status' of 'current_inferior'.
5793 2012-06-12 Yao Qi <yao@codesourcery.com>
5794 Pedro Alves <palves@redhat.com>
5796 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5798 * server.c (handle_v_cont): Extend comment.
5800 2012-06-11 Yao Qi <yao@codesourcery.com>
5802 * linux-low.c (linux_attach): Add 'static'.
5804 2012-06-06 Yao Qi <yao@codesourcery.com>
5806 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5808 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5810 Fix gcc -flto compilation warning.
5811 * server.c (main): Make variable multi_mode and attach volatile.
5813 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5815 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5816 if the platform doesn't know about it.
5818 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5820 * Makefile.in (SFILES): Add linux-tile-low.c.
5821 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5822 * configure.srv: Handle tilegx-*-linux*.
5823 * linux-tile-low.c: New file.
5825 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5827 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5829 2012-05-24 Pedro Alves <palves@redhat.com>
5833 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5835 2012-05-24 Pedro Alves <palves@redhat.com>
5839 Replace target_signal with gdb_signal throughout.
5841 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5843 * linux-low.c (linux_store_registers): Avoid the copying sequence
5844 when no data has been retrieved by ptrace.
5846 2012-05-22 Will Deacon <will.deacon@arm.com>
5848 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5849 Include asm/ptrace.h.
5850 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5853 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5855 * linux-low.c (linux_store_registers): Don't re-retrieve data
5856 with ptrace that has already been obtained from /proc. Always
5857 copy any data retrieved with ptrace to the buffer supplied.
5859 2012-05-11 Yao Qi <yao@codesourcery.com>
5860 Pedro Alves <palves@redhat.com>
5862 * linux-low.c (enum stopping_threads_kind): New.
5863 (stopping_threads): Change type to `enum stopping_threads_kind'.
5864 (handle_extended_wait): If stopping and suspending threads, leave
5865 the new_lwp suspended too.
5866 (linux_wait_for_event): Adjust.
5867 (stop_all_lwps): Set `stopping_threads' to
5868 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5869 whether we're suspending threads or just stopping them. Assert no
5872 2012-04-29 Yao Qi <yao@codesourcery.com>
5874 * server.h: Move some code to ...
5875 * gdbthread.h: ... here. New.
5876 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5877 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5878 (nto-low.o, win32-low.o): Likewise.
5879 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5880 * regcache.c, remote-utils.c, server.c: Likewise.
5881 * target.c, tracepoint.c, win32-low.c: Likewise.
5883 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5885 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5886 (PTRACE_ARG4_TYPE): Likewise.
5887 (PTRACE_XFER_TYPE): Likewise.
5888 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5889 ptrace to PTRACE_ARG3_TYPE.
5890 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5891 (PTRACE_ARG4_TYPE): Likewise.
5892 (PTRACE_XFER_TYPE): Likewise.
5893 (linux_detach_one_lwp): Cast fourth argument of
5894 ptrace to long then PTRACE_ARG4_TYPE.
5895 (regsets_fetch_inferior_registers): Cast third argument of
5896 ptrace to long then PTRACE_ARG3_TYPE.
5897 (regsets_store_inferior_registers): Likewise.
5899 2012-04-20 Pedro Alves <palves@redhat.com>
5901 * configure: Regenerate.
5903 2012-04-19 Pedro Alves <palves@redhat.com>
5905 * Makefile.in (GNULIB_BUILDDIR): New.
5906 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5907 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5908 (all, install-only, uninstall, clean-info, all-lib, clean): No
5909 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5910 (maintainer-clean realclean distclean): Use subdir_do.
5912 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5913 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5914 * acinclude.m4: Include acx_configure_dir.m4.
5915 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5916 calls. Call AC_PROG_RANLIB. Configure gnulib using
5919 (GNULIB_STDINT_H): Adjust.
5920 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5921 * gdbreplay.c: Include build-gnulib/config.h.
5922 * server.h: Likewise.
5923 * aclocal.m4: Regenerate.
5924 * config.in: Regenerate.
5925 * configure: Regenerate.
5927 2012-04-19 Pedro Alves <palves@redhat.com>
5929 * Makefile.in (LIBGNU, INCGNU): Adjust.
5930 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5931 (all, install-only, uninstall, clean-info, all-lib, clean)
5932 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5933 * configure.ac: Adjust AC_OUTPUT output.
5934 * aclocal.m4: Regenerate.
5935 * configure: Regenerate.
5937 2012-04-19 Pedro Alves <palves@redhat.com>
5939 * Makefile.in (generated_files): New.
5940 (server_h): Remove the explicit dependency on config.h, and depend
5941 on $generated_files.
5943 2012-04-19 Pedro Alves <palves@redhat.com>
5945 * Makefile.in (INCGNU): Add -Ignulib.
5947 2012-04-19 Pedro Alves <palves@redhat.com>
5949 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5950 (INCGNU): ... this, and spell out -I here.
5951 (GNULIB_LIB): Rename to ...
5953 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5955 2012-04-19 Pedro Alves <palves@redhat.com>
5957 * config.in: Regenerate.
5959 2012-04-19 Pedro Alves <palves@redhat.com>
5961 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5962 * server.h (memmem): Remove declaration.
5963 * config.in: Regenerate.
5964 * configure: Regenerate.
5966 2012-04-19 Yao Qi <yao@codesourcery.com>
5968 * Makefile.in (SFILES): Add common/vec.c.
5972 2012-04-19 Yao Qi <yao@codesourcery.com>
5974 * remote-utils.c (prepare_resume_reply): Replace with macro
5975 target_core_of_thread.
5976 * server.c (handle_qxfer_threads_proper): Likewise.
5977 * target.h (traget_core_of_thread): New macro.
5979 2012-04-18 Pedro Alves <palves@redhat.com>
5981 * aclocal.m4: Regenerate.
5982 * configure: Regenerate.
5984 2012-04-16 Yao Qi <yao@codesourcery.com>
5986 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5987 duplicated on address.
5989 2012-04-16 Yao Qi <yao@codesourcery.com>
5991 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5992 (struct tracepoint_action_ops) <send>: New field.
5993 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5994 (agent_expr_send, x_tracepoint_action_send): New.
5995 (l_tracepoint_action_send): New.
5996 (cmd_qtdp): Download and install tracepoint
5997 according to `use_agent'.
5998 (run_inferior_command): Add one more parameter `len'.
6000 (tracepoint_send_agent): New.
6001 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6003 2012-04-16 Yao Qi <yao@codesourcery.com>
6005 * tracepoint.c (download_tracepoints): Moved to ...
6006 (cmd_qtstart): ... here.
6008 2012-04-14 Yao Qi <yao@codesourcery.com>
6010 * tracepoint.c: Include inttypes.h.
6011 (struct collect_memory_action): Use sized types.
6012 (struct tracepoint): Likewise.
6013 (cmd_qtdp, stop_tracing): Update print specifiers.
6014 (cmd_qtp, response_tracepoint): Likewise.
6015 (collect_data_at_tracepoint): Likewise.
6016 (collect_data_at_step): Likewise.
6018 2012-04-14 Yao Qi <yao@codesourcery.com>
6020 Import gnulib module inttypes.
6021 * aclocal.m4, config.in, configure: Regenerated.
6023 2012-04-14 Yao Qi <yao@codesourcery.com>
6025 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6026 Makefile and config.status at last.
6028 2012-04-13 Yao Qi <yao@codesourcery.com>
6030 * tracepoint.c: Include stdint.h unconditionally.
6032 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6034 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6035 on BFD_HAVE_SYS_PROCFS_TYPE.
6036 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6037 * configure: Regenerate.
6038 * config.in: Likewise.
6040 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6042 * Makefile.in (clean): Also remove x32.c x32-linux.c
6043 x32-avx.c x32-avx-linux.c.
6044 (x32.o): New target.
6046 (x32-linux.o): Likewise.
6047 (x32-linux.c): Likewise.
6048 (x32-avx.o): Likewise.
6049 (x32-avx.c): Likewise.
6050 (x32-avx-linux.o): Likewise.
6051 (x32-avx-linux.c): Likewise.
6053 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6054 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6055 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6056 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6057 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6058 i386/x32-avx-linux.xml.
6060 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6061 (init_registers_x32_avx_linux): Likwise.
6062 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6063 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6065 2012-04-13 Pedro Alves <palves@redhat.com>
6067 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6068 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6069 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6070 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6073 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6075 * linux-x86-low.c (compat_x32_clock_t): New.
6076 (compat_x32_siginfo_t): Likewise.
6077 (compat_x32_siginfo_from_siginfo): Likewise.
6078 (siginfo_from_compat_x32_siginfo): Likewise.
6079 (linux_is_elf64): Likewise.
6080 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6081 and siginfo_from_compat_x32_siginfo for x32.
6082 (x86_arch_setup): Set linux_is_elf64.
6084 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6087 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6089 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6090 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6091 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6092 compatible with process.
6094 2012-04-12 Yao Qi <yao@codesourcery.com>
6096 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6097 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6098 (install-only, install-info, clean): Handle sub dir gnulib.
6099 (all-lib, am--refresh): New targets.
6100 (memmem.o): Remove target.
6101 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6102 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6103 (AC_REPLACE_FUNCS): Remove memmem.
6104 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6105 (AC_OUTPUT): Generate Makefile in gnulib/.
6106 * aclocal.m4, config.in, configure: Regenerated.
6108 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6110 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6112 2012-04-05 Pedro Alves <palves@redhat.com>
6114 -Werror=strict-aliasing
6116 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6119 2012-04-04 Pedro Alves <palves@redhat.com>
6121 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6122 (sparc_store_gregset_from_stack, sparc_store_gregset)
6123 (sparc_breakpoint_at): Fix formatting.
6125 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6127 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6129 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6130 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6131 * config.in: Regenerate.
6132 * configure: Likewise.
6134 2012-03-29 Pedro Alves <palves@redhat.com>
6136 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6137 Correct ptrace arguments.
6139 2012-03-28 Pedro Alves <palves@redhat.com>
6141 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6142 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6143 (IA64_FR1_REGNUM): New defines.
6144 (ia64_fetch_register): New.
6145 (the_low_target): Install it.
6146 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6148 * linux-low.c (linux_fetch_registers): Try the
6149 the_low_target.fetch_register hook first.
6151 * linux-arm-low.c (the_low_target): Adjust.
6152 * linux-bfin-low.c (the_low_target): Adjust.
6153 * linux-cris-low.c (the_low_target): Adjust.
6154 * linux-crisv32-low.c (the_low_target): Adjust.
6155 * linux-m32r-low.c (the_low_target): Adjust.
6156 * linux-m68k-low.c (the_low_target): Adjust.
6157 * linux-mips-low.c (the_low_target): Adjust.
6158 * linux-ppc-low.c (the_low_target): Adjust.
6159 * linux-s390-low.c (the_low_target): Adjust.
6160 * linux-sh-low.c (the_low_target): Adjust.
6161 * linux-sparc-low.c (the_low_target): Adjust.
6162 * linux-tic6x-low.c (the_low_target): Adjust.
6163 * linux-x86-low.c (the_low_target): Adjust.
6164 * linux-xtensa-low.c (the_low_target): Adjust.
6166 2012-03-26 Pedro Alves <palves@redhat.com>
6168 * server.c (handle_qxfer_libraries): Don't bail early if
6169 the_target->qxfer_libraries_svr4 is not NULL.
6171 2012-03-26 Pedro Alves <palves@redhat.com>
6173 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6175 2012-03-23 Pedro Alves <palves@redhat.com>
6177 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6178 "library-list-svr4" element's start tag when the the DSO list is
6181 2012-03-23 Pedro Alves <palves@redhat.com>
6183 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6184 a variable whose type size is the same as the inferior's pointer
6187 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6189 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6191 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6192 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6193 * linux-low.h: Include <signal.h>.
6194 (struct siginfo): Remove forward declaration.
6195 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6198 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6200 * .gitignore: Ignore more files.
6202 2012-03-19 Pedro Alves <palves@redhat.com>
6203 Jan Kratochvil <jan.kratochvil@redhat.com>
6205 * server.c (cont_thread, general_thread): Add describing comments.
6206 (start_inferior): Clear `cont_thread'.
6207 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6210 2012-03-15 Yao Qi <yao@codesourcery.com>
6212 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6214 (cmd_qtdp): ... here.
6216 2012-03-15 Yao Qi <yao@codesourcery.com>
6218 * tracepoint.c (struct tracepoint_action_ops): New.
6219 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6220 (m_tracepoint_action_download): New.
6221 (r_tracepoint_action_download): New.
6222 (x_tracepoint_action_download): New.
6223 (l_tracepoint_action_download): New.
6224 (add_tracepoint_action): Install `action->ops' according type.
6225 (download_tracepoint_1): Move code `download' function pointer
6226 of various tracepoint_action_ops.
6228 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6230 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6231 linux_ptrace_attach_warnings.
6233 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6235 * Makefile.in (linux-ptrace.o): New.
6236 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6237 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6238 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6239 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6240 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6242 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6244 2012-03-08 Yao Qi <yao@codesourcery.com>
6245 Pedro Alves <palves@redhat.com>
6247 Fix PR server/13392.
6248 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6250 * tracepoint.c (remove_tracepoint): New.
6251 (cmd_qtdp): Call remove_tracepoint when failed to install.
6253 2012-03-07 Pedro Alves <palves@redhat.com>
6255 * linux-low.c (get_detach_signal): New.
6256 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6257 Pass on pending signals to PTRACE_DETACH. Check the result of the
6259 * server.c (program_signals, program_signals_p): New.
6260 (handle_general_set): Handle QProgramSignals.
6261 * server.h (program_signals, program_signals_p): Declare.
6263 2012-03-05 Pedro Alves <palves@redhat.com>
6264 Jan Kratochvil <jan.kratochvil@redhat.com>
6266 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6269 2012-03-03 Yao Qi <yao@codesourcery.com>
6271 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6272 agent_look_up_symbols.
6274 2012-03-03 Yao Qi <yao@codesourcery.com>
6276 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6277 (linux-x86-low.o): Likewise.
6278 * server.h: Remove in_process_agent_loaded.
6279 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6283 2012-03-03 Yao Qi <yao@codesourcery.com>
6285 * tracepoint.c (gdb_agent_capability): New global.
6286 (in_process_agent_loaded_ust): Renamed to
6287 `in_process_agent_supports_ust'.
6289 (in_process_agent_supports_ust): Call agent_capability_check.
6290 (clear_installed_tracepoints): Assert that agent supports
6293 2012-03-03 Yao Qi <yao@codesourcery.com>
6295 * linux-low.c (linux_supports_agent): New.
6296 (linux_target_ops): Initialize field `supports_agent' with
6297 linux_supports_agent.
6298 * target.h (struct target_ops) <supports_agent>: New.
6299 (target_supports_agent): New macro.
6300 * server.c (handle_general_set): Handle packet 'QAgent'.
6301 (handle_query): Send `QAgent+'.
6302 * Makefile.in (server.o): Depends on agent.h.
6304 2012-03-03 Yao Qi <yao@codesourcery.com>
6306 * Makefile.in (OBS): Add agent.o.
6307 Add new rule for agent.o.
6308 Track dependence of tracepoint.c on agent.h.
6309 * tracepoint.c (run_inferior_command_1):
6310 (run_inferior_command): Call agent_run_command.
6311 (gdb_ust_connect_sync_socket): Deleted. Move it to
6313 (resume_thread, stop_thread): Likewise.
6314 (gdb_ust_socket_init): Renamed to ...
6315 (gdb_agent_socket_init): ... New.
6316 (gdb_ust_thread): Renamed to ...
6317 (gdb_agent_helper_thread): ... New.
6318 (gdb_ust_init): Move some code to ...
6319 (gdb_agent_init): ... here. New.
6320 [HAVE_UST]: Call gdb_ust_init.
6321 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6322 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6323 * config.in, configure: Regenerated.
6325 2012-03-02 Pedro Alves <palves@redhat.com>
6327 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6328 * linux-low.c (struct simple_pid_list): New.
6329 (stopped_pids): New a struct simple_pid_list pointer.
6330 (add_to_pid_list, pull_pid_from_list): New.
6331 (handle_extended_wait): Don't assume the first signal new children
6332 report is SIGSTOP. Adjust call to pull_pid_from_list.
6333 (linux_wait_for_lwp): Adjust.
6335 2012-03-02 Yao Qi <yao@codesourcery.com>
6337 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6340 2012-03-02 Yao Qi <yao@codesourcery.com>
6342 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6343 `stop_pc' and `tpoint'. Update caller.
6345 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6347 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6348 * linux-low.c (use_linux_regsets): New macro.
6349 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6350 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6351 (linux_register_in_regsets): New function.
6352 (usr_fetch_inferior_registers): Skip registers covered by
6354 (usr_store_inferior_registers): Likewise.
6355 (usr_fetch_inferior_registers): New macro.
6356 (usr_store_inferior_registers): Likewise.
6357 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6358 (linux_store_registers): Likewise.
6359 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6361 (init_registers_mips64_dsp_linux): Likewise.
6362 (init_registers_mips_linux): New macro.
6363 (init_registers_mips_dsp_linux): Likewise.
6364 (mips_dsp_num_regs): Likewise.
6365 (DSP_BASE, DSP_CONTROL): New fallback macros.
6366 (mips_base_regs): New macro.
6367 (mips_regmap): Use it. Fix the size.
6368 (mips_dsp_regmap): New variable.
6369 (mips_dsp_regset_bitmap): Likewise.
6370 (mips_arch_setup): New function.
6371 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6373 (mips_cannot_store_register): Likewise.
6374 (the_low_target): Update .arch_setup, .num_regs and .regmap
6375 initializers. Add .regset_bitmap initializer.
6376 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6378 * linux-bfin-low.c (the_low_target): Likewise.
6379 * linux-cris-low.c (the_low_target): Likewise.
6380 * linux-crisv32-low.c (the_low_target): Likewise.
6381 * linux-ia64-low.c (the_low_target): Likewise.
6382 * linux-m32r-low.c (the_low_target): Likewise.
6383 * linux-m68k-low.c (the_low_target): Likewise.
6384 * linux-ppc-low.c (the_low_target): Likewise.
6385 * linux-s390-low.c (the_low_target): Likewise.
6386 * linux-sh-low.c (the_low_target): Likewise.
6387 * linux-sparc-low.c (the_low_target): Likewise.
6388 * linux-tic6x-low.c (the_low_target): Likewise.
6389 * linux-x86-low.c (the_low_target): Likewise.
6390 * linux-xtensa-low.c (the_low_target): Likewise.
6391 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6392 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6393 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6395 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6396 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6398 2012-02-29 Yao Qi <yao@codesourcery.com>
6399 Pedro Alves <palves@redhat.com>
6401 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6402 `step_over_finished' is true.
6404 2012-02-27 Pedro Alves <palves@redhat.com>
6406 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6407 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6409 2012-02-27 Pedro Alves <palves@redhat.com>
6412 * linux-low.c (pid_is_stopped): New.
6413 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6415 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6417 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6420 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6422 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6424 2012-02-24 Luis Machado <lgustavo@codesourcery>
6426 * server.c (handle_query): Advertise support for target-side
6427 breakpoint condition evaluation.
6428 (process_point_options): New function.
6429 (process_serial_event): When inserting a breakpoint, check for
6430 a target-side condition that should be evaluated.
6432 * mem-break.c: Include regcache.h and ax.h.
6433 (point_cond_list_t): New data structure.
6434 (breakpoint) <cond_list>: New field.
6435 (find_gdb_breakpoint_at): Make non-static.
6436 (delete_gdb_breakpoint_at): Clear any target-side
6438 (clear_gdb_breakpoint_conditions): New function.
6439 (add_condition_to_breakpoint): Likewise.
6440 (add_breakpoint_condition): Likewise.
6441 (gdb_condition_true_at_breakpoint): Likewise.
6442 (gdb_breakpoint_here): Return result directly instead
6443 of going through a local variable.
6445 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6446 (clear_gdb_breakpoint_conditions): Likewise.
6447 (add_breakpoint_condition): Likewise.
6448 (gdb_condition_true_at_breakpoint): Likewise.
6450 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6451 (need_step_over_p): Take target-side breakpoint condition into
6454 2012-02-24 Luis Machado <lgustavo@codesourcery>
6456 * server.h: Include tracepoint.h.
6457 (agent_mem_read, agent_get_trace_state_variable_value,
6458 agent_set_trace_state_variable_value,
6459 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6460 get_set_tsv_func_addr): New prototypes.
6462 * ax.h: New include file.
6463 * ax.c: New source file.
6465 * tracepoint.c: Include ax.h.
6466 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6467 agent_expr, eval_result_type): Move to ax.h.
6468 (parse_agent_expr): Rename to ...
6469 (gdb_parse_agent_expr): ... this, make it non-static and move
6471 (unparse_agent_expr) Rename to ...
6472 (gdb_unparse_agent_expr): ... this, make it non-static and move
6474 (eval_agent_expr): Rename to ...
6475 (eval_tracepoint_agent_expr): ... this.
6476 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6477 forward declarations.
6478 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6479 (agent_get_trace_state_variable_value): New function.
6480 (agent_set_trace_state_variable_value): New function.
6481 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6482 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6483 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6484 (condition_true_at_tracepoint): Likewise.
6485 (parse_agent_expr): Rename to ...
6486 (gdb_parse_agent_expr): ... this and move to ax.c.
6487 (unparse_agent_expr): Rename to ...
6488 (gdb_unparse_agent_expr): ... this and move to ax.c.
6489 (gdb_agent_op_name): Move to ax.c.
6490 (eval_agent_expr): Rename to ...
6491 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6493 (eval_tracepoint_agent_expr): New function.
6494 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6496 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6498 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6499 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6500 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6501 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6502 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6503 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6504 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6505 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6506 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6507 (compile_bytecodes): Remove forward declaration.
6508 (is_goto_target): Move to ax.c.
6509 (compile_bytecodes): Move to ax.c and call
6510 agent_get_trace_state_variable_value (...) and
6511 agent_set_trace_state_variable_value (...).
6513 * Makefile.in: Update ax.c and IPA dependencies.
6515 2012-02-24 Pedro Alves <palves@redhat.com>
6517 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6518 (cmd_bigqtbuffer_circular): ... this. Only handle
6519 'QTBuffer:circular:'.
6520 (handle_tracepoint_general_set): Adjust.
6522 2012-02-16 Yao Qi <yao@codesourcery.com>
6524 * inferiors.c: Move code to ...
6525 * dll.c: .... here. New.
6526 * server.h: Declare clear_dlls.
6527 * Makefile.in (SFILES): Add dll.c.
6531 2012-02-11 Yao Qi <yao@codesourcery.com>
6533 * server.c: (handle_monitor_command): Add a new parameter
6535 (handle_query): Update caller.
6537 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6539 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6540 * configure, config.in: Regenerate.
6541 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6544 2012-02-02 Pedro Alves <palves@redhat.com>
6546 Try SIGKILL first, then PTRACE_KILL.
6547 * linux-low.c (linux_kill_one_lwp): New.
6548 (linux_kill_one_lwp): Rename to ...
6549 (kill_one_lwp_callback): ... this. Use the new
6552 2012-02-02 Pedro Alves <palves@redhat.com>
6554 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6557 2012-01-27 Pedro Alves <palves@redhat.com>
6559 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6560 (elf_64_file_p): Make static.
6561 (linux_pid_exe_is_elf_64_file): New.
6562 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6563 Delete declarations.
6564 (linux_pid_exe_is_elf_64_file): Declare.
6565 * linux-x86-low.c (x86_arch_setup): Use
6566 linux_pid_exe_is_elf_64_file.
6568 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6570 * linux-low.c (linux_wait_for_event_1): Rename to ...
6571 (linux_wait_for_event): ... here and merge it with former
6572 linux_wait_for_event - new variable wait_ptid, use it.
6573 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6575 2012-01-23 Pedro Alves <palves@redhat.com>
6577 * server.c (main): Avoid yet another case of infinite loop while
6578 detaching/killing after a longjmp.
6580 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6583 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6585 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6587 * hostio.c (handle_readlink): New function.
6588 (handle_vFile): Call it to handle "vFile:readlink" packets.
6590 2012-01-20 Pedro Alves <palves@redhat.com>
6591 Ulrich Weigand <ulrich.weigand@linaro.org>
6593 * server.c (handle_v_requests): Only support vAttach and vRun to
6594 start multiple processes when in extended protocol mode.
6596 2012-01-17 Pedro Alves <palves@redhat.com>
6598 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6599 memalign plus mprotect to allocate the scratch buffer.
6601 2012-01-13 Pedro Alves <palves@redhat.com>
6603 * server.c (attach_inferior): Clear `cont_thread'.
6605 2012-01-13 Pedro Alves <palves@redhat.com>
6607 * server.c (main): Avoid infinite loop while detaching/killing
6610 2012-01-09 Doug Evans <dje@google.com>
6612 * server.c (start_inferior): Set last_ptid in --wrapper case.
6614 2012-01-06 Yao Qi <yao@codesourcery.com>
6616 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6618 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6620 2012-01-04 Yao Qi <yao@codesourcery.com>
6622 * tracepoint.c (cmd_qtdp): Print debug message
6623 for static tracepoint.
6625 2012-01-04 Yao Qi <yao@codesourcery.com>
6627 * tracepoint.c (trace_vdebug): Differentiate debug message
6628 between gdbserver and IPA.
6630 2012-01-03 Yao Qi <yao@codesourcery.com>
6632 * tracepoint.c (tracepoint_was_hit): Don't collect for
6635 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6637 * terminal.h: Reformat copyright header.
6639 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6641 * server.c (gdbserver_version): Update copyright year.
6642 * gdbreplay.c (gdbreplay_version): Likewise.
6644 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6646 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6649 2011-12-18 Hui Zhu <teawater@gmail.com>
6650 * linux-low.c (linux_create_inferior): Save return value to ret.
6652 2011-12-18 Hui Zhu <teawater@gmail.com>
6654 * linux-low.c (linux_create_inferior): Save return value to ret.
6656 2011-12-16 Doug Evans <dje@google.com>
6658 * linux-low.c (linux_create_inferior): If stdio connection,
6659 redirect stdin from /dev/null, stdout to stderr.
6660 * remote-utils.c (remote_is_stdio): New static global.
6661 (remote_connection_is_stdio): New function.
6662 (remote_prepare): Handle stdio connection.
6663 (remote_open): Ditto.
6664 (remote_close): Don't close stdin for stdio connections.
6665 (read_prim,write_prim): New functions. Replace all calls to
6666 read/write to these.
6667 * server.c (main): Watch for "-" argument. Move call to
6668 remote_prepare before start_inferior.
6669 * server.h (STDIO_CONNECTION_NAME): New macro.
6670 (remote_connection_is_stdio): Declare.
6672 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6673 in debugging output.
6675 2011-12-15 Yao Qi <yao@codesourcery.com>
6677 * tracepoint.c: Include sys/syscall.h.
6678 (gdb_ust_thread): Remove preprocessor conditional.
6680 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6682 * linux-low.c (linux_detach_one_lwp): Call
6683 the_low_target.prepare_to_resume before detaching.
6685 2011-12-14 Yao Qi <yao@codesourcery.com>
6687 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6690 2011-12-14 Yao Qi <yao@codesourcery.com>
6692 * i386-low.c (i386_low_stopped_data_address): Initialize local
6695 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6699 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6700 DR_CONTROL unless necessary. Extend comments.
6701 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6702 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6704 2011-12-13 Yao Qi <yao@codesourcery.com>
6706 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6708 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6710 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6712 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6713 Print new debug message for such case.
6715 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6717 Fix overlapping memcpy.
6718 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6719 the read_inferior_memory transfer.
6720 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6721 write_inferior_memory transfer.
6722 (set_fast_tracepoint_jump): New variable buf. Use it for the
6723 read_inferior_memory and write_inferior_memory transfers.
6724 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6725 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6726 Use it for the write_inferior_memory transfer.
6727 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6730 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6732 * linux-low.c (fetch_register, store_register): Make code
6733 consistent, fix formatting.
6735 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6737 * linux-low.c (usr_store_inferior_registers): Factor out code
6738 to handle individual registers into...
6739 (store_register): ... this new function.
6741 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6743 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6744 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6745 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6746 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6747 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6748 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6749 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6750 (srv_xmlfiles): Add new XML files.
6752 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6754 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6755 (init_registers_s390_linux32v1): Add prototype.
6756 (init_registers_s390_linux32v2): Likewise.
6757 (init_registers_s390_linux64v1): Likewise.
6758 (init_registers_s390_linux64v2): Likewise.
6759 (init_registers_s390x_linux64v1): Likewise.
6760 (init_registers_s390x_linux64v2): Likewise.
6761 (s390_num_regs): Increment to 52.
6762 (s390_regmap): Add orig_r2 register.
6763 (s390_num_regs_3264): Increment to 68.
6764 (s390_regmap_3264): Add orig_r2 register.
6765 (s390_collect_ptrace_register): Handle orig_r2 register.
6766 (s390_supply_ptrace_register): Likewise.
6767 (s390_fill_last_break): New function.
6768 (s390_store_last_break): Likewise.
6769 (s390_fill_system_call): New function.
6770 (s390_store_system_call): Likewise.
6771 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6773 (s390_check_regset): New function.
6774 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6775 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6776 Update target_regsets for available register sets.
6778 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6779 Jan Kratochvil <jan.kratochvil@redhat.com>
6781 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6782 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6784 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6785 * linux-low.h (struct process_info_private): New member r_debug.
6786 * server.c (handle_qxfer_libraries): Call
6787 the_target->qxfer_libraries_svr4.
6788 (handle_qxfer_libraries_svr4): New function.
6789 (qxfer_packets): New entry "libraries-svr4".
6790 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6791 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6792 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6793 PACKET_qXfer_libraries_svr4.
6795 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6797 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6798 PSW address/mask between 8-byte and 16-byte formats.
6799 (s390_supply_ptrace_register): Likewise.
6800 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6801 basic addressing mode bit.
6803 2011-11-24 Stan Shebs <stan@codesourcery.com>
6805 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6807 2011-11-17 Stan Shebs <stan@codesourcery.com>
6809 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6810 (tracing_start_time): New global.
6811 (tracing_stop_time): New global.
6812 (tracing_user_name): New global.
6813 (tracing_notes): New global.
6814 (tracing_stop_note): New global.
6815 (cmd_qtstart): Set traceframe_usage, start_time.
6816 (stop_tracing): Set stop_time.
6817 (cmd_qtstatus): Report additional status.
6818 (cmd_qtp): New function.
6819 (handle_tracepoint_query): Call it.
6820 (cmd_qtnotes): New function.
6821 (handle_tracepoint_general_set): Call it.
6822 (get_timestamp): Rename from tsv_get_timestamp.
6824 2011-11-14 Stan Shebs <stan@codesourcery.com>
6825 Kwok Cheung Yeung <kcy@codesourcery.com>
6827 * linux-x86-low.c (small_jump_insn): New.
6828 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6829 trampoline and error message, build a trampoline and issue a small
6830 jump instruction to it.
6831 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6832 trampoline and error message.
6833 (x86_get_min_fast_tracepoint_insn_len): New.
6834 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6835 * linux-low.h (struct linux_target_ops): Add arguments to
6836 install_fast_tracepoint_jump_pad operation, add new operation.
6837 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6839 (linux_get_min_fast_tracepoint_insn_len): New function.
6840 (linux_target_op): Add new operation.
6841 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6842 (gdb_trampoline_buffer_end): Ditto.
6843 (gdb_trampoline_buffer_error): Ditto.
6844 (struct ipa_sym_addresses): Add fields for new IPA variables.
6845 (symbol_list): Add entries for new IPA variables.
6846 (struct tracepoint): Add fields to hold the address range of the
6847 trampoline used by the tracepoint.
6848 (trampoline_buffer_head): New static variable.
6849 (trampoline_buffer_tail): Ditto.
6850 (claim_trampoline_space): New function.
6851 (have_fast_tracepoint_trampoline_buffer): New function.
6852 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6854 (install_fast_tracepoint): Ditto, also add error buffer argument.
6855 (cmd_qtminftpilen): New function.
6856 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6857 (fast_tracepoint_from_trampoline_address): New function.
6858 (fast_tracepoint_collecting): Handle trampoline as part of jump
6860 (set_trampoline_buffer_space): New function.
6861 (initialize_tracepoint): Initialize new IPA variables.
6862 * target.h (struct target_ops): Add arguments to
6863 install_fast_tracepoint_jump_pad operation, add new
6864 get_min_fast_tracepoint_insn_len operation.
6865 (target_get_min_fast_tracepoint_insn_len): New.
6866 (install_fast_tracepoint_jump_pad): Add arguments.
6867 * server.h (IPA_BUFSIZ): Define.
6868 * linux-i386-ipa.c: Include extra header files.
6869 (initialize_fast_tracepoint_trampoline_buffer): New function.
6870 (initialize_low_tracepoint): Call it.
6871 * server.h (set_trampoline_buffer_space): Declare.
6872 (claim_trampoline_space): Ditto.
6873 (have_fast_tracepoint_trampoline_buffer): Ditto.
6875 2011-11-14 Yao Qi <yao@codesourcery.com>
6877 * server.c (handle_query): Handle InstallInTrace for qSupported.
6878 * tracepoint.c (add_tracepoint): Sort list.
6879 (install_tracepoint, download_tracepoint): New.
6880 (cmd_qtdp): Call them to install and download tracepoints.
6881 (sort_tracepoints): Removed.
6882 (cmd_qtstart): Update.
6884 2011-11-14 Yao Qi <yao@codesourcery.com>
6886 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6887 * mem-break.h: Declare.
6888 * tracepoint.c (cmd_qtstart): Move some code to ...
6889 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6891 (download_tracepoints): Move some code to ...
6892 (download_tracepoint_1): ... here. New.
6894 2011-11-08 Yao Qi <yao@codesourcery.com>
6896 * remote-utils.c (relocate_instruction): A comment fix.
6898 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6900 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6901 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6902 dr_status_mirror and dr_control_mirror from debug_reg_state.
6903 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6904 (i386_initial_stuff): Remove use of deleted globals.
6905 (i386_get_thread_context, i386_set_thread_context,
6906 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6907 from debug_reg_state.
6909 2011-11-05 Yao Qi <yao@codesourcery.com>
6911 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6912 address as TPOINT's.
6914 2011-11-02 Stan Shebs <stan@codesourcery.com>
6916 * tracepoint.c (agent_mem_read_string): New function.
6917 (eval_agent_expr): Call it for tracenz.
6918 * server.c (handle_query): Report support for tracenz.
6920 2011-11-02 Yao Qi <yao@codesourcery.com>
6922 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6924 2011-11-02 Yao Qi <yao@codesourcery.com>
6926 * target.h: Fix a typo in comment.
6928 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6930 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6931 clobber the breakpoints' shadows with fast tracepoint jumps.
6932 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6933 * target.c (write_inferior_memory): Also pass MYADDR down to
6936 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6938 * configure.ac: Check support for personality routine.
6939 * configure: Regenerate.
6940 * config.in: Likewise.
6941 * linux-low.c: Include <sys/personality.h>.
6942 Define ADDR_NO_RANDOMIZE if necessary.
6943 (linux_create_inferior): Disable address space randomization when
6944 forking inferior, if requested.
6945 (linux_supports_disable_randomization): New function.
6946 (linux_target_ops): Install it.
6947 * server.h (disable_randomization): Declare.
6948 * server.c (disable_randomization): New global variable.
6949 (handle_general_set): Handle QDisableRandomization.
6950 (handle_query): Likewise for qSupported.
6951 (main): Support --disable-randomization and --no-disable-randomization
6952 command line arguments.
6953 * target.h (struct target_ops): Add supports_disable_randomization.
6954 (target_supports_disable_randomization): New macro.
6956 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6958 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6960 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6961 [!PT_GETDSBT] (target_loadmap): New definition.
6962 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6963 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6964 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6965 and PT_GETDSBT to LINUX_LOADMAP.
6966 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6967 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6969 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6971 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6972 (arm_linux_hwbp_cap): New static variable.
6973 (arm_linux_get_hwbp_cap): Replace by ...
6974 (arm_linux_init_hwbp_cap): ... this new function.
6975 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6976 (arm_linux_get_hw_watchpoint_count): Likewise.
6977 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6978 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6979 (arm_prepare_to_resume): Use perror_with_name instead of error.
6981 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6983 * linux-arm-low.c: Include <signal.h>.
6984 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6985 (struct arm_linux_hwbp_cap): New data type.
6986 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6987 (struct arm_linux_hw_breakpoint): New data type.
6988 (MAX_BPTS, MAX_WPTS): Define.
6989 (struct arch_process_info, struct arch_lwp_info): New data types.
6990 (arm_linux_get_hwbp_cap): New function.
6991 (arm_linux_get_hw_breakpoint_count): Likewise.
6992 (arm_linux_get_hw_watchpoint_count): Likewise.
6993 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6994 (arm_hwbp_control_initialize): Likewise.
6995 (arm_hwbp_control_is_enabled): Likewise.
6996 (arm_hwbp_control_is_initialized): Likewise.
6997 (arm_hwbp_control_disable): Likewise.
6998 (arm_linux_hw_breakpoint_equal): Likewise.
6999 (arm_linux_hw_point_initialize): Likewise.
7000 (struct update_registers_data): New data structure.
7001 (update_registers_callback: New function.
7002 (arm_insert_point): Likewise.
7003 (arm_remove_point): Likewise.
7004 (arm_stopped_by_watchpoint): Likewise.
7005 (arm_stopped_data_address): Likewise.
7006 (arm_new_process): Likewise.
7007 (arm_new_thread): Likewise.
7008 (arm_prepare_to_resume): Likewise.
7009 (the_low_target): Register arm_insert_point, arm_remove_point,
7010 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7011 arm_new_thread, and arm_prepare_to_resume.
7013 2011-09-15 Stan Shebs <stan@codesourcery.com>
7015 * server.h (struct emit_ops): Add compare-goto fields.
7016 * tracepoint.c (gdb_agent_op_sizes): New table.
7017 (emit_eq_goto): New function.
7018 (emit_ne_goto): New function.
7019 (emit_lt_goto): New function.
7020 (emit_le_goto): New function.
7021 (emit_gt_goto): New function.
7022 (emit_ge_goto): New function.
7023 (is_goto_target): New function.
7024 (compile_bytecodes): Recognize special cases of compare-goto
7025 combinations and call specialized emitters for them.
7026 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7027 (amd64_emit_ne_goto): New function.
7028 (amd64_emit_lt_goto): New function.
7029 (amd64_emit_le_goto): New function.
7030 (amd64_emit_gt_goto): New function.
7031 (amd64_emit_ge_goto): New function.
7032 (amd64_emit_ops): Add the new functions.
7033 (i386_emit_eq_goto): New function.
7034 (i386_emit_ne_goto): New function.
7035 (i386_emit_lt_goto): New function.
7036 (i386_emit_le_goto): New function.
7037 (i386_emit_gt_goto): New function.
7038 (i386_emit_ge_goto): New function.
7039 (i386_emit_ops): Add the new functions.
7041 2011-09-08 Stan Shebs <stan@codesourcery.com>
7043 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7044 (i386_emit_epilogue): Restore %ebx.
7046 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7048 * server.c (step_thread): Remove definition.
7049 (process_serial_event): Don't handle Hs.
7050 * server.h (step_thread): Remove declaration.
7051 * target.c (set_desired_inferior): Remove use of step_thread.
7053 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7055 * linux-low.c: Include linux-procfs.h.
7056 (linux_attach_lwp_1): Update comments.
7057 (linux_attach): Scan for existing threads when attaching to a
7058 process that is the tgid.
7059 * Makefile.in: Update dependencies.
7061 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7063 * configure.srv: Add linux-procfs.o dependencies.
7065 2011-08-14 Yao Qi <yao@codesourcery.com>
7067 * target.h (struct target_ops): Fix indent.
7068 * win32-low.c (win32_target_ops): Fix comment.
7070 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7071 Yao Qi <yao@codesourcery.com>
7073 * Makefile.in (clean): Remove tic6x-*.c files.
7074 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7075 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7076 (tic6x-c64xp-linux.c): Likewise.
7077 * configure.srv: Add support for tic6x-*-uclinux.
7078 * linux-tic6x-low.c: New.
7079 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7081 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7082 Yao Qi <yao@codesourcery.com>
7084 * target.h (struct target_ops): Add read_loadmap.
7085 * linux-low.c (struct target_loadseg): New type.
7086 (struct target_loadmap): New type.
7087 (linux_read_loadmap): New function.
7088 (linux_target_ops): Add linux_read_loadmap.
7089 * server.c (handle_query): Support qXfer:fdpic:read packet.
7090 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7093 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7095 * win32-low.c: Include <stdint.h>.
7097 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7099 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7100 to the inferior here.
7101 (i386_remove_aligned_watchpoint): Ditto.
7102 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7103 fit part of the watchpoint in the debug registers.
7104 (i386_update_inferior_debug_regs): New.
7105 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7106 registers, and only update the inferior on success.
7107 (i386_low_remove_watchpoint): Ditto.
7109 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7111 * linux-low.c (compare_ints, unique, list_threads, show_process,
7112 linux_core_of_thread): Delete.
7113 (linux_target_ops): Change linux_core_of_thread to
7114 linux_common_core_of_thread.
7115 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7116 * utils.c (malloc_failure): Change type of argument.
7117 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7118 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7119 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7120 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7121 (IPA_OBJS): Add common-utils-ipa.o.
7122 (ptid_h, linux_osdata_h): New macros.
7123 (server_h): Add common/common-utils.h, common/xml-utils.h,
7124 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7126 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7127 ptid.o, buffer.o): New rules.
7128 (linux-low.o): Add common/linux-osdata.h as a dependency.
7129 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7130 * configure.ac: Add AC_HEADER_DIRENT check.
7131 * config.in: Regenerate.
7132 * configure: Regenerate.
7133 * remote-utils.c (xml_escape_text): Delete.
7134 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7135 buffer_xml_printf): Move to common/buffer.c.
7136 * server.c (main): Remove call to initialize_inferiors.
7137 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7138 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7139 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7140 internal_error, gdb_assert, gdb_assert_fail): Delete.
7141 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7142 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7144 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7145 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7146 initialize_inferiors): Delete.
7148 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7150 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7153 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7155 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7157 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7159 2011-05-26 Yao Qi <yao@codesourcery.com>
7161 * Makefile.in (thread-db.o): Track dependence to
7162 common/gdb_thread_db.h.
7163 * thread-db.c: include gdb_thread_db.h from right place.
7165 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7167 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7168 __FILE__ and __LINE__ to internal_error.
7170 2011-05-13 Doug Evans <dje@google.com>
7172 * thread-db.c (try_thread_db_load_from_sdir): New function.
7173 (try_thread_db_load_from_dir): New function.
7174 (thread_db_load_search): Handle $sdir, ignore $pdir.
7175 Remove trying of system directories if search of
7176 libthread-db-search-path fails, that is now done via $sdir.
7178 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7180 * server.c (handle_query): Add EnableDisableTracepoints to the list
7181 of supported features.
7182 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7184 (cmd_qtenable_disable): New.
7185 (cmd_qtstart): Install tracepoints even if disabled.
7186 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7187 receiving a QTEnable or QTDisable packet.
7188 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7189 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7191 (gdb_probe): Skip data collection if static tracepoint is disabled.
7193 2011-05-10 Doug Evans <dje@google.com>
7195 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7197 2011-05-04 Doug Evans <dje@google.com>
7199 * linux-low.c (linux_join): Skip process lookup.
7200 * spu-low.c (spu_join): Ditto.
7201 * server.c (join_inferiors_callback): Delete.
7202 (process_serial_event): For 'D' packet (detach) call join_inferior
7205 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7207 * README: Don't mention xscale*-*-linux*.
7208 * configure.srv (xscale*-*-linux*): Don't handle target.
7210 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7212 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7214 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7215 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7216 (i386_emit_void_call_2): Likewise.
7218 2011-04-26 Yao Qi <yao@codesourcery.com>
7220 * linux-low.c: Move common macros to linux-ptrace.h.
7221 Include linux-ptrace.h.
7222 * Makefile.in (linux_ptrace_h): New.
7223 (linux-low.o): Depends on linux-ptrace.h.
7225 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7227 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7228 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7229 (remote_prepare): New function with most of the TCP code from ...
7230 (remote_open): ... here. Detect PORT here unconditionally. Move also
7231 setting transport_is_reliable.
7232 * server.c (run_once): New variable.
7233 (gdbserver_usage): Document it.
7234 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7235 the first run if RUN_ONCE.
7236 * server.h (run_once, remote_prepare): New declarations.
7238 2011-04-19 Tom Tromey <tromey@redhat.com>
7240 * win32-low.c (handle_load_dll): Remove duplicate "the".
7242 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7244 Remove support for old Cygwin 1.5 versions.
7245 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7246 function to avoid warning.
7247 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7250 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7252 * gdbserver/server.h (Macro _): Define it if not available.
7254 2011-03-14 Michael Snyder <msnyder@vmware.com>
7256 * hostio.c (handle_close): Remove unnecessary null test.
7258 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7260 * Makefile.in (maintainer-clean realclean distclean): Remove
7261 "make ... subdir_do" command.
7263 2011-03-10 Michael Snyder <msnyder@vmware.com>
7265 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7267 * server.c (handle_v_run): Free alloced buffer on early return.
7269 2011-03-09 Yao Qi <yao@codesourcery.com>
7272 2011-03-04 Yao Qi <yao@codesourcery.com>
7274 * Makefile.in: Remove GNU make feature --directory.
7276 2011-03-05 Yao Qi <yao@codesourcery.com>
7278 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7279 (subdir_do): New make target. Copied from gdb/Makefile.
7280 (maintainer-clean, realclean, distclean, clean): Call corresponding
7281 make targets in common/Makefile.
7283 2011-02-11 Yao Qi <yao@codesourcery.com>
7285 * configure.ac: Call AC_PROG_RANLIB.
7286 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7287 * configure: Regenerate.
7289 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7291 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7293 2011-03-06 Yao Qi <yao@codesourcery.com>
7295 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7297 2011-03-05 Yao Qi <yao@codesourcery.com>
7299 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7300 (subdir_do): New make target. Copied from gdb/Makefile.
7301 (maintainer-clean, realclean, distclean, clean): Call corresponding
7302 make targets in common/Makefile.
7304 2011-03-04 Yao Qi <yao@codesourcery.com>
7306 * Makefile.in: Remove GNU make feature --directory.
7308 2011-03-04 Michael Snyder <msnyder@vmware.com>
7310 * server.c (queue_stop_reply): Call xmalloc not malloc.
7312 2011-03-02 Michael Snyder <msnyder@vmware.com>
7314 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7316 2011-02-28 Michael Snyder <msnyder@vmware.com>
7318 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7319 (cmd_qtframe): Ditto.
7320 (cmd_qtbuffer): Ditto.
7321 (cmd_bigqtbuffer): Ditto.
7323 * utils.c (decimal2str): Initialize 'width' to nine, then
7326 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7328 * hostio.c (require_data): Free *data, not data.
7330 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7332 * hostio.c (require_data): Use free, not xfree.
7334 2011-02-27 Michael Snyder <msnyder@vmware.com>
7336 * server.c (handle_query): Discard unused value.
7338 * hostio.c (require_data): Free malloc memory before returning
7341 2011-02-26 Michael Snyder <msnyder@vmware.com>
7343 * linux-low.c (list_threads): Call closedir for dirent.
7345 2011-02-27 Michael Snyder <msnyder@vmware.com>
7347 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7348 a case statement falls through.
7350 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7352 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7355 2011-02-26 Michael Snyder <msnyder@vmware.com>
7357 * utils.c (decimal2str): Eliminate dead code and dead param.
7358 (pulongest): Drop dead param from call to decimal2str.
7361 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7363 Revert the following patch (not approved yet):
7364 2011-02-21 Hui Zhu <teawater@gmail.com>
7365 * tracepoint.c (tp_printf): New function.
7366 (eval_agent_expr): Handle gdb_agent_op_printf.
7368 2011-02-21 Hui Zhu <teawater@gmail.com>
7370 * tracepoint.c (tp_printf): New function.
7371 (eval_agent_expr): Handle gdb_agent_op_printf.
7373 2011-02-18 Tom Tromey <tromey@redhat.com>
7375 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7376 (tracepoint.o): Likewise.
7377 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7378 (gdb_agent_op_names): Likewise.
7380 2011-02-18 Tom Tromey <tromey@redhat.com>
7382 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7383 gdb_agent_op_rot>: New constants.
7384 (gdb_agent_op_names): Add pick and roll.
7385 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7388 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7390 * aclocal.m4: Regenerated with aclocal-1.11.1.
7392 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7394 * server.c (handle_qxfer_traceframe_info): New.
7395 (qxfer_packets): Register "traceframe-info".
7396 (handle_query): Report support for qXfer:traceframe-info:read+.
7397 * tracepoint.c (match_blocktype): New.
7398 (traceframe_find_block_type): Rename to ...
7399 (traceframe_walk_blocks): ... this. Add callback filter argument,
7401 (traceframe_find_block_type): New, reimplemented on top of
7402 traceframe_walk_blocks.
7403 (build_traceframe_info_xml): New.
7404 (traceframe_read_info): New.
7405 * server.h (traceframe_read_info): Declare.
7407 2011-02-11 Yao Qi <yao@codesourcery.com>
7409 * configure.ac: Call AC_PROG_RANLIB.
7410 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7411 * configure: Regenerate.
7413 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7415 * server.c (gdb_read_memory): Change return semantics to allow
7417 (handle_search_memory_1): Adjust.
7418 (process_serial_event) <'m' packet>: Handle partial transfers.
7419 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7421 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7423 * regcache.c (init_register_cache): Initialize
7424 regcache->register_status.
7425 (free_register_cache): Release regcache->register_status.
7426 (regcache_cpy): Copy register_status.
7427 (registers_to_string): Print 'x's for unavailable registers.
7428 (supply_register): Mark the register's status valid or
7429 unavailable, depending on whether a buffer was passed in or not.
7430 (supply_register_zeroed): New.
7431 (supply_regblock): Mark the registers' status valid or
7432 unavailable, depending on whether a buffer was passed in or not.
7433 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7434 (struct regcache): New `register_status' field.
7435 (supply_register_zeroed): Declare.
7436 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7437 supply_register_zeroed, rather than passing a NULL buffer to
7439 * tracepoint.c (fetch_traceframe_registers): Update comment.
7441 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7443 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7446 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7448 * server.h (decode_xfer_write): Change prototype.
7449 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7450 and don't extract the annex here.
7451 * server.c (decode_xfer_read): Remove `annex' parameter,
7452 and don't extract the annex here.
7454 (struct qxfer): New.
7455 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7456 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7457 (handle_qxfer_statictrace): New functions, abstracted out from
7458 handle_query, and made to use the struct qxfer interface.
7459 (handle_threads_qxfer_proper): Rename to ...
7460 (handle_qxfer_threads_proper): ... this.
7461 (handle_threads_qxfer): Rename to ...
7462 (handle_qxfer_threads): ... this. Adjust.
7463 (qxfer_packets): New array.
7464 (handle_qxfer): New function.
7465 (handle_query): Use handle_qxfer.
7467 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7469 * gdbreplay.c: Shorten lines of >= 80 columns.
7470 * linux-low.c: Ditto.
7471 * linux-ppc-low.c: Ditto.
7472 * linux-s390-low.c: Ditto.
7473 * linux-sparc-low.c: Ditto.
7474 * linux-x86-low.c: Ditto.
7475 * linux-xtensa-low.c: Ditto.
7476 * mem-break.c: Ditto.
7478 * regcache.h: Ditto.
7479 * remote-utils.c: Ditto.
7482 * thread-db.c: Ditto.
7483 * tracepoint.c: Ditto.
7485 * win32-low.h: Ditto.
7487 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7489 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7492 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7494 * server.c (gdbserver_version): Update copyright year in version
7496 * gdbreplay.c (gdbreplay_version): Ditto.
7498 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7500 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7501 * linux-bfin-low.c: New file.
7502 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7503 PT_DATA_ADDR for BFIN targets.
7504 * Makefile.in (SFILES): Add linux-bfin-low.c.
7505 (clean): Remove reg-bfin.c.
7506 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7507 * README: Mention supported Blackfin targets.
7509 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7511 * .gitignore: New file.
7513 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7515 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7517 2010-10-22 Jie Zhang <jie@codesourcery.com>
7519 * Makefile.in: Add FLAGS_TO_PASS variable.
7520 (install): Remove dependency of install-only and recursively
7521 invoke make for install-only.
7523 2010-10-04 Doug Evans <dje@google.com>
7525 * Makefile.in (uninstall): Use $(DESTDIR).
7527 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7531 * linux-x86-low.c (compat_siginfo_from_siginfo)
7532 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7533 si_code is < 0. Check for si_code == SI_TIMER before checking for
7536 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7538 * lynx-i386-low.c: New file.
7539 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7541 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7543 * lynx-low.c (ptrace_request_to_str): Remove handling for
7544 request values that have been removed in LynxOS 5.x.
7546 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7548 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7551 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7553 * configure.ac: Add --enable-inprocess-agent option.
7554 * configure: Rebuilt.
7556 2010-09-06 Yao Qi <yao@codesourcery.com>
7558 * linux-low.c (linux_kill): Remove unused variable.
7559 (linux_stabilize_threads): Likewise.
7560 * server.c (start_inferior): Likewise.
7561 (queue_stop_reply_callback): Likewise.
7562 * tracepoint.c (do_action_at_tracepoint): Likewise.
7564 2010-09-06 Yao Qi <yao@codesourcery.com>
7566 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7569 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7571 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7573 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7575 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7578 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7580 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7581 gdbserver/lynx-ppc-low.c: New files.
7582 * Makefile.in (lynx_low_h): New variable.
7583 (lynx-low.o, lynx-ppc-low.o): New rules.
7584 * configure.ac: On LynxOS, link with -lnetinet.
7585 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7586 * configure: regenerate.
7588 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7590 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7591 * configure.ac: Add check for vasprintf and vsnprintf.
7592 * configure, config.in: Regenerate.
7593 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7595 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7597 * gdbreplay.c: Move include of alloca.h up, next to include of
7599 * server.h: Add include of malloc.h.
7600 * mem-break.c: Remove include of malloc.h.
7601 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7603 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7605 * Makefile.in (memmem.o): Build with -Wno-error.
7607 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7609 * utils.c (xsnprintf): Make non-static.
7610 * server.h: Add xsnprintf declaration.
7611 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7612 replace calls to snprintf by calls to xsnprintf throughout.
7614 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7616 * configure.ac: Add configure check for alloca.
7617 * configure, config.in: Regenerate.
7618 * server.h: Include alloca.h if it exists.
7619 * gdbreplay.c: Include alloca.h if it exists.
7621 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7623 * linux-low.c (__SIGRTMIN): Define if not already defined.
7624 (linux_create_inferior): Check for __ANDROID__ rather than
7626 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7627 are already deferred.
7628 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7629 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7630 stopped and already has a pending signal to report.
7631 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7632 a pending signal to report or is moving out of a jump pad.
7633 (linux_init_signals): Check for __ANDROID__ rather than
7636 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7638 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7639 debug_threads check. Avoid a linear search when not doing debug
7642 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7644 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7645 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7646 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7647 (process_event): Change local fd's type to gdb_fildes_t.
7648 (create_file_handler): Adjust prototype.
7649 (delete_file_handler): Adjust prototype.
7650 (handle_file_event): Adjust prototype. Use pfildes.
7651 (create_file_event): Adjsut prototype.
7652 * remote-utils.c (remote_desc, listen_desc): Change type to
7654 * server.h: New gdb_fildes_t typedef.
7655 [USE_WIN32API]: Include winsock2.h.
7656 (delete_file_handler, add_file_handler): Adjust prototypes.
7658 * utils.c (pfildes): New.
7660 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7662 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7663 * configure: Regenerate.
7665 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7667 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7668 (linux_done_accessing_memory): ... this.
7669 (linux_target_ops): Adjust.
7670 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7671 * nto-low.c (nto_target_ops): Adjust comment.
7672 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7673 * spu-low.c (spu_target_ops): Adjust comment.
7674 * target.h (target_ops): Rename unprepare_to_access_memory field
7675 to done_accessing_memory.
7676 (unprepare_to_access_memory): Rename to ...
7677 (done_accessing_memory): ... this.
7679 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7681 * linux-low.c (linux_prepare_to_access_memory): New.
7682 (linux_unprepare_to_access_memory): New.
7683 (linux_target_ops): Install them.
7684 * server.c (read_memory): Rename to ...
7685 (gdb_read_memory): ... this. Use
7686 prepare_to_access_memory/prepare_to_access_memory.
7687 (write_memory): Rename to ...
7688 (gdb_write_memory): ... this. Use
7689 prepare_to_access_memory/prepare_to_access_memory.
7690 (handle_search_memory_1): Adjust.
7691 (process_serial_event): Adjust.
7692 * target.h (struct target_ops): New fields
7693 prepare_to_access_memory and unprepare_to_access_memory.
7694 (prepare_to_access_memory, unprepare_to_access_memory): New.
7695 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7696 prepare_to_access_memory/prepare_to_access_memory.
7697 * nto-low.c (nto_target_ops): Adjust.
7698 * spu-low.c (spu_target_ops): Adjust.
7699 * win32-low.c (win32_target_ops): Adjust.
7701 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7703 * Makefile.in (WARN_CFLAGS): Get it from configure.
7704 (WERROR_CFLAGS): New.
7705 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7706 * configure.ac: Introduce --enable-werror, which adds -Werror to
7707 the compiler command line. Enabled by default. Disable with
7708 --disable-werror. Add -Wdeclaration-after-statement
7709 Wpointer-arith and -Wformat-nonliteral to warning flags.
7710 * configure: Regenerate.
7712 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7714 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7716 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7718 * gdbreplay.c (remote_error): New.
7720 (expect): Use gdbchar. Check for error reading from GDB.
7721 Clarify sync error output.
7722 (play): Check for errors writing to GDB.
7723 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7724 * remote-utils.c (getpkt): Check for errors writing to the remote
7727 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7729 * linux-low.c (linux_wait_1): Move non-debugging code out of
7730 `debug_threads' control.
7732 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7734 * linux-low.c (linux_wait_1): Don't set last_status here.
7735 * server.c (push_event, queue_stop_reply_callback): Assert we're
7736 not pushing a TARGET_WAITKIND_IGNORE event.
7737 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7738 (myresume, handle_target_event): Set the thread's last_resume_kind
7739 and last_status from the target returned status.
7741 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7745 * linux-x86-low.c (update_debug_registers_callback): New.
7746 (i386_dr_low_set_addr): Use it.
7747 (i386_dr_low_get_addr): New.
7748 (i386_dr_low_set_control): Use update_debug_registers_callback.
7749 (i386_dr_low_get_control): New.
7750 (i386_dr_low_get_status): Adjust.
7751 * linux-low.c (linux_stop_lwp): New.
7752 * linux-low.h (linux_stop_lwp): Declare.
7754 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7755 argument instead of a i386_debug_reg_state.
7756 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7757 a i386_debug_reg_state.
7758 (i386_insert_aligned_watchpoint): Adjust.
7759 (i386_remove_aligned_watchpoint): Adjust.
7760 (i386_low_stopped_data_address): Read the debug registers from the
7761 inferior instead of from the mirrors.
7762 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7763 (i386_dr_low_get_addr): Declare.
7764 (i386_dr_low_get_control): Declare.
7765 (i386_dr_low_get_status): Change prototype.
7767 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7768 (i386_dr_low_get_addr): New.
7769 (i386_dr_low_get_control): New.
7770 (i386_dr_low_get_status): Adjust prototype. Return
7772 (i386_initial_stuff): Clear dr_status_mirror and
7774 (i386_get_thread_context): Adjust.
7775 (i386_set_thread_context): Adjust.
7776 (i386_thread_added): Adjust.
7778 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7780 * linux-low.h (linux_thread_area): Delete declaration.
7782 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7784 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7785 after its termination.
7787 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7789 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7790 (gdb_wants_all_stopped): Delete.
7791 (linux_wait_1): Don't call them.
7792 * server.c (handle_v_cont): Tag all threads as want-stopped.
7793 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7794 stopped as "client-wants-stopped".
7796 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7798 * Makefile.in (signals_h): New.
7799 (server_h): Depend on it.
7800 (server.o): Don't depend on $(signals_def).
7801 (signals.o): Depend on $(signals_def).
7803 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7805 * Makefile.in (signals_def): New.
7806 (server_h): Append include/gdb/signals.h and signals_def.
7807 (server.o): Append signals_def.
7809 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7811 * server.c (handle_target_event): Use target_signal_to_host for
7812 resume_info.sig initialization.
7813 * target.h (struct thread_resume) <sig>: New comment.
7815 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7817 * server.c (handle_query): strcpy() the returned string from paddress()
7818 instead of sprintf().
7819 * utils.c (paddress): Return phex_nz().
7821 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7823 * server.c (handle_v_cont): Call mourn_inferior if process
7825 (myresume): Likewise.
7827 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7829 Static tracepoints, and integration with UST.
7831 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7832 * mem-break.c (uninsert_all_breakpoints)
7833 (reinsert_all_breakpoints): New.
7834 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7835 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7836 (gdb_agent_ust_loaded, helper_thread_id)
7837 (gdb_agent_helper_thread_id): New macros.
7838 (struct ipa_sym_addresses): Add addr_ust_loaded,
7839 addr_helper_thread_id, addr_cmd_buf.
7840 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7841 (in_process_agent_loaded_ust): New.
7842 (write_e_ust_not_loaded): New.
7843 (maybe_write_ipa_ust_not_loaded): New.
7844 (struct collect_static_trace_data_action): New.
7845 (enum tracepoint_type) <static_tracepoint>: New.
7846 (struct tracepoint) <handle>: Mention static tracepoints.
7847 (struct static_tracepoint_ctx): New.
7848 (CMD_BUF_SIZE): New.
7849 (add_tracepoint_action): Handle static tracepoint actions.
7850 (unprobe_marker_at): New.
7851 (clear_installed_tracepoints): Handle static tracepoints.
7852 (cmd_qtdp): Handle static tracepoints.
7853 (probe_marker_at): New.
7854 (cmd_qtstart): Handle static tracepoints.
7855 (response_tracepoint): Handle static tracepoints.
7856 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7857 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7858 (get_context_regcache): Handle static tracepoints.
7859 (do_action_at_tracepoint): Handle static tracepoint actions.
7860 (traceframe_find_block_type): Handle static trace data blocks.
7861 (traceframe_read_sdata): New.
7862 (download_tracepoints): Download static tracepoint actions.
7863 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7864 (GDB_PROBE_NAME): New.
7869 (ust_marker_to_static_tracepoint): New.
7871 (collect_ust_data_at_tracepoint): New.
7872 (gdb_ust_probe): New.
7873 (UNIX_PATH_MAX, SOCK_DIR): New.
7874 (gdb_ust_connect_sync_socket): New.
7875 (resume_thread, stop_thread): New.
7876 (run_inferior_command): New.
7877 (init_named_socket): New.
7878 (gdb_ust_socket_init): New.
7879 (cstr_to_hexstr): New.
7881 (first_marker, next_marker): New.
7882 (response_ust_marker): New.
7883 (cmd_qtfstm, cmd_qtsstm): New.
7884 (unprobe_marker_at, probe_marker_at): New.
7885 (cmd_qtstmat, gdb_ust_thread): New.
7886 (gdb_ust_init): New.
7887 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7888 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7890 (x86_64_st_collect_regmap): New.
7891 (X86_64_NUM_ST_COLLECT_GREGS): New.
7892 (AMD64_RIP_REGNUM): New.
7893 (supply_static_tracepoint_registers): New.
7894 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7896 (i386_st_collect_regmap): New.
7897 (i386_NUM_ST_COLLECT_GREGS): New.
7898 (supply_static_tracepoint_registers): New.
7899 * server.c (handle_query): Handle qXfer:statictrace:read.
7900 <qSupported>: Report support for StaticTracepoints, and
7901 qXfer:statictrace:read features.
7902 * server.h (traceframe_read_sdata)
7903 (supply_static_tracepoint_registers): Declare.
7904 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7905 (unpack_varlen_hex): Include in IPA build.
7906 * Makefile.in (ustlibs, ustinc): New.
7907 (IPA_OBJS): Add remote-utils-ipa.o.
7908 ($(IPA_LIB)): Link -ldl and -lpthread.
7910 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7911 * config.in, configure: Regenerate.
7913 2010-06-20 Ian Lance Taylor <iant@google.com>
7914 Pedro Alves <pedro@codesourcery.com>
7916 * linux-x86-low.c (always_true): Delete.
7917 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7918 trying to fool the compiler with always_true.
7920 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7922 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7923 conditions in gdbserver.
7925 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7927 * spu-low.c (spu_read_memory): Wrap around local store limit.
7928 (spu_write_memory): Likewise.
7930 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7932 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7933 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7935 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7937 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7938 uses with LONGEST uses.
7940 2010-06-14 Stan Shebs <stan@codesourcery.com>
7941 Pedro Alves <pedro@codesourcery.com>
7945 * linux-x86-low.c: Include limits.h.
7950 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7951 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7952 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7953 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7954 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7955 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7956 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7957 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7958 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7959 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7960 (amd64_emit_void_call_2): New.
7961 (amd64_emit_ops): New.
7962 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7963 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7964 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7965 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7966 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7967 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7968 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7969 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7970 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7971 (i386_emit_stack_adjust, i386_emit_int_call_1)
7972 (i386_emit_void_call_2): New.
7973 (i386_emit_ops): New.
7974 (x86_emit_ops): New.
7975 (the_low_target): Install x86_emit_ops.
7976 * server.h (struct emit_ops): New.
7977 (get_raw_reg_func_addr): Declare.
7978 (current_insn_ptr, emit_error): Declare.
7979 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7980 (set_trace_state_variable_value): New defines.
7981 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7982 addr_get_trace_state_variable_value and
7983 addr_set_trace_state_variable_value.
7984 (symbol_list): New fields for get_raw_reg,
7985 get_trace_state_variable_value and set_trace_state_variable_value.
7986 (condfn): New typedef.
7987 (struct tracepoint): New field `compiled_cond'.
7988 (do_action_at_tracepoint): Clear compiled_cond.
7989 (get_trace_state_variable_value, set_trace_state_variable_value):
7991 (condition_true_at_tracepoint): If there's a compiled condition,
7993 (current_insn_ptr, emit_error): New globals.
7994 (struct bytecode_address): New.
7995 (get_raw_reg_func_addr): New.
7996 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7997 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7998 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7999 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8000 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8001 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8002 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8003 (compile_tracepoint_condition, compile_bytecodes): New.
8004 * target.h (emit_ops): Forward declare.
8005 (struct target_ops): New field emit_ops.
8006 (target_emit_ops): New.
8007 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8008 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8009 * linux-low.c (linux_emit_ops): New.
8010 (linux_target_ops): Install it.
8011 * linux-low.h (struct linux_target_ops): New field emit_ops.
8013 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8015 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8016 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8018 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8019 Stan Shebs <stan@codesourcery.com>
8021 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8022 (all): Depend on $(extra_libraries).
8023 (install-only): Install the IPA.
8024 (IPA_OBJS, IPA_LIB): New.
8025 (clean): Remove the IPA lib.
8026 (IPAGENT_CFLAGS): New.
8027 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8028 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8029 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8030 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8031 * configure.ac: Check for atomic builtins support in the compiler.
8032 (IPA_DEPFILES, extra_libraries): Define.
8033 * configure.srv (ipa_obj): Add description.
8034 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8035 (i[34567]86-*-linux*): Set ipa_obj.
8036 (x86_64-*-linux*): Set ipa_obj.
8037 * linux-low.c (stabilizing_threads): New.
8038 (supports_fast_tracepoints): New.
8039 (linux_detach): Stabilize threads before detaching.
8040 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8041 the lwp is either not stabilizing, or is moving out of a jump pad.
8042 (linux_fast_tracepoint_collecting): New.
8043 (maybe_move_out_of_jump_pad): New.
8044 (enqueue_one_deferred_signal): New.
8045 (dequeue_one_deferred_signal): New.
8046 (linux_wait_for_event_1): If moving out of a jump pad, defer
8047 pending signals to later.
8048 (linux_stabilize_threads): New.
8049 (linux_wait_1): Check if threads need moving out of jump pads, and
8051 (stuck_in_jump_pad_callback): New.
8052 (move_out_of_jump_pad_callback): New.
8054 (linux_resume_one_lwp): Handle moving out of jump pads.
8055 (linux_set_resume_request): Dequeue deferred signals.
8056 (need_step_over_p): Also step over fast tracepoint jumps.
8057 (start_step_over): Also uninsert fast tracepoint jumps.
8058 (finish_step_over): Also reinsert fast tracepoint jumps.
8059 (linux_install_fast_tracepoint_jump): New.
8060 (linux_target_ops): Install linux_stabilize_threads and
8061 linux_install_fast_tracepoint_jump_pad.
8062 * linux-low.h (linux_target_ops) <get_thread_area,
8063 install_fast_tracepoint_jump_pad>: New fields.
8064 (struct lwp_info) <collecting_fast_tracepoint,
8065 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8066 (linux_get_thread_area): Declare.
8067 * linux-x86-low.c (jump_insn): New.
8068 (x86_get_thread_area): New.
8069 (append_insns): New.
8071 (amd64_install_fast_tracepoint_jump_pad): New.
8072 (i386_install_fast_tracepoint_jump_pad): New.
8073 (x86_install_fast_tracepoint_jump_pad): New.
8074 (the_low_target): Install x86_get_thread_area and
8075 x86_install_fast_tracepoint_jump_pad.
8076 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8077 (struct fast_tracepoint_jump): New.
8078 (fast_tracepoint_jump_insn): New.
8079 (fast_tracepoint_jump_shadow): New.
8080 (find_fast_tracepoint_jump_at): New.
8081 (fast_tracepoint_jump_here): New.
8082 (delete_fast_tracepoint_jump): New.
8083 (set_fast_tracepoint_jump): New.
8084 (uninsert_fast_tracepoint_jumps_at): New.
8085 (reinsert_fast_tracepoint_jumps_at): New.
8086 (set_breakpoint_at): Use write_inferior_memory.
8087 (uninsert_raw_breakpoint): Use write_inferior_memory.
8088 (check_mem_read): Mask out fast tracepoint jumps.
8089 (check_mem_write): Mask out fast tracepoint jumps.
8090 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8091 (set_fast_tracepoint_jump): Declare.
8092 (delete_fast_tracepoint_jump)
8093 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8094 (reinsert_fast_tracepoint_jumps_at): Declare.
8095 * regcache.c: Don't compile many functions when building the
8096 in-process agent library.
8097 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8098 the register buffer in the heap.
8099 (free_register_cache): If the register buffer isn't owned by the
8100 regcache, don't free it.
8101 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8102 pre-existing register caches.
8103 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8105 (convert_ascii_to_int): : Constify `from' parameter type.
8106 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8107 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8108 the needed buffer in-place.
8109 (relocate_instruction): New.
8110 * server.c (handle_query) <qSymbols>: If the target supports
8111 tracepoints, give it a chance of looking up symbols. Report
8112 support for fast tracepoints.
8113 (handle_status): Stabilize threads.
8114 (process_serial_event): Adjust.
8115 * server.h (struct fast_tracepoint_jump): Forward declare.
8116 (struct process_info) <fast_tracepoint_jumps>: New field.
8117 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8118 (decode_X_packet, decode_M_packet): Adjust.
8119 (relocate_instruction): Declare.
8120 (in_process_agent_loaded): Declare.
8121 (tracepoint_look_up_symbols): Declare.
8122 (struct fast_tpoint_collect_status): Declare.
8123 (fast_tracepoint_collecting): Declare.
8124 (force_unlock_trace_buffer): Declare.
8125 (handle_tracepoint_bkpts): Declare.
8126 (initialize_low_tracepoint)
8127 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8128 * target.h (struct target_ops) <stabilize_threads,
8129 install_fast_tracepoint_jump_pad>: New fields.
8130 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8131 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8132 [HAVE_STDINT_H]: Include stdint.h.
8133 (trace_debug_1): Rename to ...
8134 (trace_vdebug): ... this.
8135 (trace_debug): Rename to ...
8136 (trace_debug_1): ... this. Add `level' parameter.
8138 (ATTR_USED, ATTR_NOINLINE): New.
8139 (IP_AGENT_EXPORT): New.
8140 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8141 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8142 (about_to_request_buffer_space, trace_buffer_is_full)
8143 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8144 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8145 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8146 (traceframe_write_count, traceframes_created)
8147 (trace_state_variables)
8148 New renaming defines.
8149 (struct ipa_sym_addresses): New.
8150 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8152 (ipa_sym_addrs): New.
8153 (all_tracepoint_symbols_looked_up): New.
8154 (in_process_agent_loaded): New.
8155 (write_e_ipa_not_loaded): New.
8156 (maybe_write_ipa_not_loaded): New.
8157 (tracepoint_look_up_symbols): New.
8158 (debug_threads) [IN_PROCESS_AGENT]: New.
8159 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8160 (UNKNOWN_SIDE_EFFECTS): New.
8161 (stop_tracing): New.
8162 (flush_trace_buffer): New.
8163 (stop_tracing_bkpt): New.
8164 (flush_trace_buffer_bkpt): New.
8165 (read_inferior_integer): New.
8166 (read_inferior_uinteger): New.
8167 (read_inferior_data_pointer): New.
8168 (write_inferior_data_pointer): New.
8169 (write_inferior_integer): New.
8170 (write_inferior_uinteger): New.
8171 (struct collect_static_trace_data_action): Delete.
8172 (enum tracepoint_type): New.
8173 (struct tracepoint) <type>: New field `type'.
8174 <actions_str, step_actions, step_actions_str>: Only include in
8176 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8177 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8178 (tracepoints): Use IP_AGENT_EXPORT.
8179 (last_tracepoint): Don't include in the IPA.
8180 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8181 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8182 (alloced_trace_state_variables): New.
8183 (trace_state_variables): Use IP_AGENT_EXPORT.
8184 (traceframe_t): Delete unused variable.
8185 (circular_trace_buffer): Don't include in the IPA.
8186 (trace_buffer_start): Delete.
8187 (struct trace_buffer_control): New.
8188 (trace_buffer_free): Delete.
8189 (struct ipa_trace_buffer_control): New.
8190 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8191 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8193 (trace_buffer_ctrl): New.
8194 (TRACE_BUFFER_CTRL_CURR): New.
8195 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8196 Reimplement as macros.
8197 (trace_buffer_wrap): Delete.
8198 (traceframe_write_count, traceframe_read_count)
8199 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8200 (struct tracepoint_hit_ctx) <type>: New field.
8201 (struct fast_tracepoint_ctx): New.
8202 (memory_barrier): New.
8204 (record_tracepoint_error): Update atomically in the IPA.
8205 (clear_inferior_trace_buffer): New.
8206 (about_to_request_buffer_space): New.
8207 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8208 updating the same buffer.
8209 (add_tracepoint): Default the tracepoint's type to trap
8210 tracepoint, and orig_size to -1.
8211 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8213 (create_trace_state_variable): New parameter `gdb'. Handle it.
8214 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8215 (cmd_qtdp): Handle fast tracepoints.
8217 (max_jump_pad_size): New.
8218 (gdb_jump_pad_head): New.
8219 (get_jump_space_head): New.
8220 (claim_jump_space): New.
8221 (sort_tracepoints): New.
8222 (MAX_JUMP_SIZE): New.
8223 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8225 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8226 support. Upload fast traceframes, and delete internal IPA
8228 (stop_tracing_handler): New.
8229 (flush_trace_buffer_handler): New.
8230 (cmd_qtstop): Upload fast tracepoints.
8231 (response_tracepoint): Handle fast tracepoints.
8232 (tracepoint_finished_step): Upload fast traceframes. Set the
8233 tracepoint hit context's tracepoint type.
8234 (handle_tracepoint_bkpts): New.
8235 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8236 type. Add comment about fast tracepoints.
8237 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8238 non-existing action_str field.
8239 (get_context_regcache): Handle fast tracepoints.
8240 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8242 (fast_tracepoint_from_jump_pad_address): New.
8243 (fast_tracepoint_from_ipa_tpoint_address): New.
8244 (collecting_t): New.
8245 (force_unlock_trace_buffer): New.
8246 (fast_tracepoint_collecting): New.
8249 (write_inferior_data_ptr): New.
8250 (target_tp_heap): New.
8251 (target_malloc): New.
8252 (download_agent_expr): New.
8254 (download_tracepoints): New.
8255 (download_trace_state_variables): New.
8256 (upload_fast_traceframes): New.
8257 (IPA_FIRST_TRACEFRAME): New.
8258 (IPA_NEXT_TRACEFRAME_1): New.
8259 (IPA_NEXT_TRACEFRAME): New.
8260 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8261 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8262 (gdb_jump_pad_buffer_end): New.
8263 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8264 (initialize_tracepoint): Adjust.
8265 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8266 buffer. Initialize the low module.
8267 * utils.c (PREFIX, TOOLNAME): New.
8268 (malloc_failure): Use PREFIX.
8269 (error): In the IPA, an error causes an exit.
8270 (fatal, warning): Use PREFIX.
8271 (internal_error): Use TOOLNAME.
8272 (NUMCELLS): Increase to 10.
8273 * configure, config.in: Regenerate.
8275 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8277 * server.c (handle_query) <qSupported>: Do two passes over the
8278 qSupported string to avoid nesting strtok.
8280 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8282 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8284 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8286 * configure: Regenerate.
8287 * proc-service.list: New.
8289 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8291 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8294 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8296 * gdbreplay.c (remote_open): Check error return from socket() call by
8297 its equality to -1 not by it being negative.
8298 * remote-utils.c (remote_open): Likewise.
8300 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8302 * config.h: Regenerate.
8304 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8306 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8307 doesn't provide PTRACE_GET_THREAD_AREA.
8309 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8311 * linux-m68k-low.c: Include <asm/ptrace.h>
8312 (ps_get_thread_area): Implement.
8314 2010-05-03 Doug Evans <dje@google.com>
8316 * event-loop.c (struct callback_event): New struct.
8317 (callback_list): New global.
8318 (append_callback_event, delete_callback_event): New functions.
8319 (process_callback): New function.
8320 (start_event_loop): Call it.
8321 * remote-utils.c (NOT_SCHEDULED): Define.
8322 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8323 moved out of readchar.
8324 (readchar): Rewrite. Call reschedule before returning.
8325 (reset_readchar): New function.
8326 (remote_close): Call it.
8327 (process_remaining, reschedule): New functions.
8328 * server.h (callback_handler_func): New typedef.
8329 (append_callback_event, delete_callback_event): Declare.
8331 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8333 * proc-service.c (ps_pglobal_lookup): Use
8334 thread_db_look_up_one_symbol.
8335 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8336 parameter. Use it instead of all_symbols_looked_up.
8337 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8339 (all_symbols_looked_up): Don't declare.
8340 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8341 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8343 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8344 Set all_symbols_looked_up here.
8345 (thread_db_look_up_one_symbol): New.
8346 (thread_db_get_tls_address): Adjust.
8347 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8348 thread_db object on the heap, and tentatively set it in the
8350 (thread_db_init): Don't set all_symbols_looked_up here.
8351 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8353 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8355 * linux-low.c (linux_kill, linux_detach): Adjust.
8356 (status_pending_p_callback): Remove redundant statement. Check
8357 for !TARGET_WAITIKIND_IGNORE, instead of
8358 TARGET_WAITKIND_STOPPED.
8359 (handle_tracepoints): Make sure LWP is locked. Adjust.
8360 (linux_wait_for_event_1): Adjust.
8361 (linux_cancel_breakpoints): New.
8362 (unsuspend_one_lwp): New.
8363 (unsuspend_all_lwps): New.
8364 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8365 (send_sigstop_callback): Change return type to int, add new
8366 `except' parameter and handle it.
8367 (suspend_and_send_sigstop_callback): New.
8368 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8369 pass them down. If SUSPEND, also increment the lwp's suspend
8371 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8372 (need_step_over_p): Don't consider suspended LWPs.
8373 (start_step_over): Adjust.
8374 (proceed_one_lwp): Change return type to int, add new `except'
8375 parameter and handle it.
8376 (unsuspend_and_proceed_one_lwp): New.
8377 (proceed_all_lwps): Use find_inferior instead of
8379 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8380 also decrement the suspend count of LWPs. Pass `except' down,
8381 instead of hacking its suspend count.
8382 (linux_pause_all): Add `freeze' parameter. Adjust.
8383 (linux_unpause_all): New.
8384 (linux_target_ops): Install linux_unpause_all.
8385 * server.c (handle_status): Adjust.
8386 * target.h (struct target_ops): New fields `unpause_all' and
8387 `cancel_breakpoints'. Add new parameter to `pause_all'.
8388 (pause_all): Add new `freeze' parameter.
8390 (cancel_breakpoints): New.
8391 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8393 (cmd_qtstart): Pause threads.
8394 (stop_tracing): Pause threads, and cancel breakpoints.
8395 * win32-low.c (win32_target_ops): Adjust.
8397 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8399 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8400 the inferior right away from here...
8401 (linux_wait_1): ... to here, and adjust to check the thread's
8402 last_resume_kind instead of the lwp's step or stop_expected flags.
8404 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8406 * README: Use consistent `GDB' and `GDBserver' spellings.
8408 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8410 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8411 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8412 (linux_detach_one_lwp): Assume the lwp is stopped.
8413 (any_thread_of): Delete.
8414 (linux_detach): Stop all lwps here. Don't blindly delete all
8416 (delete_lwp_callback): New.
8417 (linux_mourn): Delete all lwps of the process that is gone.
8418 (linux_wait_1): Don't delete the last lwp of the process here.
8419 * mem-break.h (mark_breakpoints_out): Declare.
8420 * mem-break.c (mark_breakpoints_out): New.
8421 (free_all_breakpoints): Use it.
8422 * server.c (handle_target_event): If the process is gone, mark
8424 * thread-db.c (struct thread_db) <create_bp>: New field.
8425 (thread_db_enable_reporting): Fix prototype. Store a thread event
8426 breakpoint reference in the thread_db struct.
8427 (thread_db_load_search): Clear the thread_db object.
8428 (try_thread_db_load_1): Ditto.
8429 (switch_to_process): New.
8430 (disable_thread_event_reporting): Use it.
8431 (remove_thread_event_breakpoints): New.
8432 (thread_db_detach, thread_db_mourn): Use it.
8434 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8436 * linux-low.c (linux_enable_event_reporting): New.
8437 (linux_wait_for_event_1, handle_extended_wait): Use it.
8439 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8441 * linux-low.c (linux_kill_one_lwp, linux_kill)
8442 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8443 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8444 SIGSTOP even if the LWP is stopped.
8445 (send_sigstop_callback): New.
8446 (stop_all_lwps): Use send_sigstop_callback instead.
8447 (linux_resume_one_thread): Adjust.
8448 (proceed_one_lwp): Still proceed an LWP that the client has
8449 requested to stop, if we haven't reported it as stopped yet. Make
8450 sure that LWPs the client want stopped, have a pending SIGSTOP.
8452 2010-04-26 Doug Evans <dje@google.com>
8454 * server.c (handle_general_set): Make static.
8456 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8457 Print received char after testing for error/eof instead of before.
8458 (input_interrupt): Tweak comment.
8460 2010-04-23 Doug Evans <dje@google.com>
8462 * server.c (start_inferior): Print inferior argv if --debug.
8464 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8466 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8467 * nto-x86-low.c: Include server.h
8469 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8471 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8472 be consistent with other sources of this directory.
8473 (init_registers_amd64): Correct name of source file of this function
8476 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8478 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8481 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8483 * win32-i386-low.c: Add 64-bit support.
8484 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8485 (init_registers_amd64): Declare.
8486 (mappings): Add 64-bit version of array.
8487 (init_windows_x86): New function.
8488 (the_low_target): Change init_arch field to init_windows_x86.
8490 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8492 * win32-low.c: Adapt to support also 64-bit architecture.
8493 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8494 (get_image_name): Use SIZE_T type for local variable `done'.
8495 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8496 (toolhelp_get_dll_name): Idem.
8497 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8498 Use uintptr_t typecast to avoid warning.
8499 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8500 (handle_exception): Use phex_nz to avoid warning.
8501 (win32_wait): Remove unused local variable `process'.
8503 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8505 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8508 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8510 * configure.ac: Use `ws2_32' library for srv_mingw.
8511 * configure: Regenerate.
8512 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8513 * remote-utils.c: Likewise.
8515 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8517 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8518 if __x86_64__ is defined.
8520 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8522 * configure: Regenerate.
8524 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8526 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8527 * target.h (target_ops): New get_tib_address field.
8528 * win32-low.h (win32_thread_info): Add thread_local_base field.
8529 * win32-low.c (child_add_thread): Add tlb argument.
8530 Set thread_local_base field to TLB.
8531 (get_child_debug_event): Adapt to child_add_thread change.
8532 (win32_get_tib_address): New function.
8533 (win32_target_ops): Set get_tib_address field to
8534 win32_get_tib_address.
8535 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8537 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8539 * linux-low.c (linux_mourn): Also remove the process.
8540 * server.c (handle_target_event): Don't remove the process here.
8541 * nto-low.c (nto_mourn): New.
8542 (nto_target_ops): Install it.
8543 * spu-low.c (spu_mourn): New.
8544 (spu_target_ops): Install it.
8545 * win32-low.c (win32_mourn): New.
8546 (win32_target_ops): Install it.
8548 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8550 * server.h (buffer_xml_printf): Remove redundant `;'.
8552 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8554 * regcache.c (set_register_cache): Invalidate regcaches before
8555 changing the register cache layout.
8556 (regcache_invalidate_one): Allow a NULL regcache.
8557 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8558 regcaches before changing the register cache layout or the target
8561 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8563 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8564 variable warning on Linux/x86-64.
8566 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8568 GDBserver disconnected tracing support.
8570 * linux-low.c (linux_remove_process): Delete.
8571 (add_lwp): Don't set last_resume_kind here.
8572 (linux_kill): Use `mourn'.
8573 (linux_detach): Use `thread_db_detach', and `mourn'.
8575 (linux_attach_lwp_1): Adjust comment.
8576 (linux_attach): last_resume_kind moved the thread_info; adjust.
8577 (status_pending_p_callback): Adjust.
8578 (linux_wait_for_event_1): Adjust.
8579 (count_events_callback, select_singlestep_lwp_callback)
8580 (select_event_lwp_callback, cancel_breakpoints_callback)
8581 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8582 (proceed_one_lwp): Adjust.
8583 (linux_async): Add debug output.
8584 (linux_thread_stopped): New.
8585 (linux_pause_all): New.
8586 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8588 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8589 (thread_db_free): Delete declaration.
8590 (thread_db_detach, thread_db_mourn): Declare.
8591 * thread-db.c (thread_db_init): Use thread_db_mourn.
8592 (thread_db_free): Delete, split in two.
8593 (disable_thread_event_reporting): New.
8594 (thread_db_detach): New.
8595 (thread_db_mourn): New.
8597 * server.h (struct thread_info) <last_resume_kind>: New field.
8598 <attached>: Add comment.
8599 <gdb_detached>: New field.
8600 (handler_func): Change return type to int.
8601 (handle_serial_event, handle_target_event): Ditto.
8602 (gdb_connected): Declare.
8604 (disconnected_tracing): Declare.
8605 (stop_tracing): Declare.
8607 * server.c (handle_query) <qSupported>: Report support for
8608 disconnected tracing.
8609 (queue_stop_reply_callback): Account for running threads.
8610 (gdb_wants_thread_stopped): New.
8611 (gdb_wants_all_threads_stopped): New.
8612 (gdb_reattached_process): New.
8613 (handle_status): Clear the `gdb_detached' flag of all processes.
8614 In all-stop, stop all threads.
8615 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8616 (process_serial_event): If the remote connection breaks, or if an
8617 exit was forced with "monitor exit", force an event loop exit.
8618 Handle disconnected tracing on detach.
8619 (handle_serial_event): Adjust.
8620 (handle_target_event): If GDB isn't connected, forward events back
8621 to the inferior, unless the last process exited, in which case,
8622 exit gdbserver. Adjust interface.
8624 * remote-utils.c (remote_open): Don't block in accept. Instead
8625 register an event loop source on the listen socket file
8626 descriptor. Refactor bits into ...
8627 (listen_desc): ... this new global.
8628 (gdb_connected): ... this new function.
8629 (enable_async_notification): ... this new function.
8630 (handle_accept_event): ... this new function.
8631 (remote_close): Clear remote_desc.
8633 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8635 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8637 (mourn_inferior): Define.
8638 (target_process_qsupported): Avoid the dangling else problem.
8639 (thread_stopped): Define.
8640 (pause_all): Define.
8641 (target_waitstatus_to_string): Declare.
8642 * target.c (target_waitstatus_to_string): New.
8644 * tracepoint.c (tracing): Make extern.
8645 (disconnected_tracing): New.
8646 (stop_tracing): Make extern. Handle tracing stops due to GDB
8648 (cmd_qtdisconnected): New.
8649 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8650 (handle_tracepoint_general_set): Handle QTDisconnected.
8652 * event-loop.c (event_handler_func): Change return type to int.
8653 (process_event): Bail out if the event handler wants the event
8655 (handle_file_event): Ditto.
8656 (start_event_loop): Bail out if the event handler wants the event
8659 * nto-low.c (nto_target_ops): Adjust.
8660 * spu-low.c (spu_wait): Don't remove the process here.
8661 (spu_target_ops): Adjust.
8662 * win32-low.c (win32_wait): Don't remove the process here.
8663 (win32_target_ops): Adjust.
8665 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8667 * regcache.c (realloc_register_cache): Invalidate inferior's
8668 regcache before recreating it.
8670 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8672 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8674 2010-04-09 Stan Shebs <stan@codesourcery.com>
8675 Pedro Alves <pedro@codesourcery.com>
8677 * server.h (LONGEST): New.
8678 (struct thread_info) <while_stepping>: New field.
8679 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8681 (initialize_tracepoint, handle_tracepoint_general_set)
8682 (handle_tracepoint_query, tracepoint_finished_step)
8683 (tracepoint_was_hit, release_while_stepping_state_list):
8684 (current_traceframe): Declare.
8685 * server.c (handle_general_set): Handle tracepoint packets.
8687 (write_memory): New.
8688 (handle_search_memory_1): Use read_memory.
8689 (handle_query): Report support for conditional tracepoints, trace
8690 state variables, and tracepoint sources. Handle tracepoint
8692 (main): Initialize the tracepoints module.
8693 (process_serial_event): Handle traceframe reads/writes.
8695 * linux-low.c (handle_tracepoints): New.
8696 (linux_wait_1): Call it.
8697 (linux_resume_one_lwp): Handle while-stepping.
8698 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8699 (linux_target_ops): Install them.
8700 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8702 * linux-x86-low.c (x86_supports_tracepoints): New.
8703 (the_low_target). Install it.
8705 * mem-break.h (delete_breakpoint): Declare.
8706 * mem-break.c (delete_breakpoint): Make external.
8708 * target.h (struct target_ops): Add `supports_tracepoints',
8709 `read_pc', and `write_pc' fields.
8710 (target_supports_tracepoints): Define.
8711 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8714 * regcache.h (struct regcache) <registers_owned>: New field.
8715 (init_register_cache, regcache_cpy): Declare.
8716 (regcache_read_pc, regcache_write_pc): Declare.
8717 (register_cache_size): Declare.
8718 (supply_regblock): Declare.
8719 * regcache.c (init_register_cache): New.
8720 (new_register_cache): Use it.
8721 (regcache_cpy): New.
8722 (register_cache_size): New.
8723 (supply_regblock): New.
8724 (regcache_read_pc, regcache_write_pc): New.
8726 * tracepoint.c: New.
8728 * Makefile.in (OBS): Add tracepoint.o.
8729 (tracepoint.o): New rule.
8731 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8733 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8735 (i386-mmx.c): Likewise.
8736 (i386-mmx-linux.o): Likewise.
8737 (i386-mmx-linux.c): Likewise.
8739 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8740 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8741 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8742 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8744 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8745 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8746 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8748 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8750 * Makefile.in (clean): Updated.
8752 (i386-avx.c): Likewise.
8753 (i386-avx-linux.o): Likewise.
8754 (i386-avx-linux.c): Likewise.
8755 (amd64-avx.o): Likewise.
8756 (amd64-avx.c): Likewise.
8757 (amd64-avx-linux.o): Likewise.
8758 (amd64-avx-linux.c): Likewise.
8760 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8761 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8762 (srv_amd64_regobj): Add amd64-avx.o.
8763 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8764 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8765 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8766 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8767 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8768 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8769 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8771 * i387-fp.c: Include "i386-xstate.h".
8773 (i387_cache_to_xsave): Likewise.
8774 (i387_xsave_to_cache): Likewise.
8775 (x86_xcr0): Likewise.
8777 * i387-fp.h (i387_cache_to_xsave): Likewise.
8778 (i387_xsave_to_cache): Likewise.
8779 (x86_xcr0): Likewise.
8781 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8782 * linux-crisv32-low.c (target_regsets): Likewise.
8783 * linux-m68k-low.c (target_regsets): Likewise.
8784 * linux-mips-low.c (target_regsets): Likewise.
8785 * linux-ppc-low.c (target_regsets): Likewise.
8786 * linux-s390-low.c (target_regsets): Likewise.
8787 * linux-sh-low.c (target_regsets): Likewise.
8788 * linux-sparc-low.c (target_regsets): Likewise.
8789 * linux-xtensa-low.c (target_regsets): Likewise.
8791 * linux-low.c: Include <sys/uio.h>.
8792 (regsets_fetch_inferior_registers): Support nt_type.
8793 (regsets_store_inferior_registers): Likewise.
8794 (linux_process_qsupported): New.
8795 (linux_target_ops): Add linux_process_qsupported.
8797 * linux-low.h (regset_info): Add nt_type.
8798 (linux_target_ops): Add process_qsupported.
8800 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8802 (init_registers_i386_avx_linux): New.
8803 (init_registers_amd64_avx_linux): Likewise.
8804 (xmltarget_i386_linux_no_xml): Likewise.
8805 (xmltarget_amd64_linux_no_xml): Likewise.
8806 (PTRACE_GETREGSET): Likewise.
8807 (PTRACE_SETREGSET): Likewise.
8808 (x86_fill_xstateregset): Likewise.
8809 (x86_store_xstateregset): Likewise.
8810 (use_xml): Likewise.
8811 (x86_linux_update_xmltarget): Likewise.
8812 (x86_linux_process_qsupported): Likewise.
8813 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8814 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8815 init_registers_i386_linux here. Call
8816 x86_linux_update_xmltarget.
8817 (the_low_target): Add x86_linux_process_qsupported.
8819 * server.c (handle_query): Call target_process_qsupported.
8821 * target.h (target_ops): Add process_qsupported.
8822 (target_process_qsupported): New.
8824 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8826 * inferiors.c (add_thread): Set last_status kind to
8827 TARGET_WAITKIND_IGNORE.
8828 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8829 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8830 (linux_wait_1): Move `thread' local definition to block that uses
8831 it. Don't NULL initialize `event_child'.
8832 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8833 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8834 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8836 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8838 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8839 an extended waitstatus, or by a watchpoint.
8840 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8841 thread was stepping or has been stopped by a watchpoint.
8843 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8845 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8846 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8847 of another, then delete the previous, and validate all
8849 (validate_inserted_breakpoint): New.
8850 (delete_disabled_breakpoints): New.
8851 (validate_breakpoints): New.
8852 (check_mem_read): Validate breakpoints before trusting their
8853 shadow. Delete disabled breakpoints.
8854 (check_mem_write): Validate breakpoints before trusting they
8855 should be inserted. Delete disabled breakpoints.
8856 * mem-break.h (validate_breakpoints):
8857 * server.c (handle_query): Validate breakpoints when we see a
8860 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8862 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8863 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8864 if we could tell there's a GDB breakpoint at stop_pc.
8865 (need_step_over_p): Don't do a step over if we find a GDB
8866 breakpoint at the resume PC.
8868 * mem-break.c (struct raw_breakpoint): New.
8869 (enum bkpt_type): New type `gdb_breakpoint'.
8870 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8871 fields. New field `raw'.
8872 (find_raw_breakpoint_at): New.
8873 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8875 (set_breakpoint_at): Adjust.
8876 (delete_raw_breakpoint): New.
8877 (release_breakpoint): New.
8878 (delete_breakpoint): Rename to...
8879 (delete_breakpoint_1): ... this. Add proc parameter. Use
8880 release_breakpoint. Return ENOENT.
8881 (delete_breakpoint): Reimplement.
8882 (find_breakpoint_at): Delete.
8883 (find_gdb_breakpoint_at): New.
8884 (delete_breakpoint_at): Delete.
8885 (set_gdb_breakpoint_at): New.
8886 (delete_gdb_breakpoint_at): New.
8887 (gdb_breakpoint_here): New.
8888 (set_reinsert_breakpoint): Use release_breakpoint.
8889 (uninsert_breakpoint): Rename to ...
8890 (uninsert_raw_breakpoint): ... this.
8891 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8892 (reinsert_raw_breakpoint): Change parameter type to
8894 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8896 (check_breakpoints): Adjust. Use release_breakpoint.
8897 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8898 (breakpoint_inserted_here): Ditto.
8899 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8900 Don't trust the breakpoint's shadow if it is not inserted.
8901 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8902 (delete_all_breakpoints): Adjust.
8903 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8904 use delete_breakpoint_1.
8906 * mem-break.h (breakpoints_supported): Delete declaration.
8907 (set_gdb_breakpoint_at): Declare.
8908 (gdb_breakpoint_here): Declare.
8909 (delete_breakpoint_at): Delete.
8910 (delete_gdb_breakpoint_at): Declare.
8912 * server.h (struct raw_breakpoint): Forward declare.
8913 (struct process_info): New field `raw_breakpoints'.
8915 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8918 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8920 * linux-low.c (status_pending_p_callback): Fix comment.
8921 (linux_wait_for_event_1): Move most of the internal breakpoint
8922 handling from here...
8923 (linux_wait_1): ... to here.
8924 (count_events_callback): New.
8925 (select_singlestep_lwp_callback): New.
8926 (select_event_lwp_callback): New.
8927 (cancel_breakpoints_callback): New.
8928 (select_event_lwp): New.
8929 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8930 priority to all LWPs that have had events that should be reported
8931 to the client. Cancel breakpoints when about to reporting the
8932 event to the client, not while stopping lwps. No longer cancel
8933 finished single-steps here.
8934 (cancel_finished_single_step): Delete.
8935 (cancel_finished_single_steps): Delete.
8937 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8939 * mem-break.c (enum bkpt_type): New.
8940 (struct breakpoint): New field `type'.
8941 (set_breakpoint_at): Change return type to struct breakpoint
8942 pointer. Set type to `other_breakpoint' by default.
8943 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8944 in the breakpoint list.
8945 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8946 (reinsert_breakpoint): Rename to ...
8947 (reinsert_raw_breakpoint): ... this.
8948 (reinsert_breakpoints_at): Adjust.
8949 * mem-break.h (struct breakpoint): Declare.
8950 (set_breakpoint_at): Change return type to struct breakpoint
8953 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8955 * server.c (handle_query): Assign, not compare.
8957 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8959 Teach linux gdbserver to step-over-breakpoints.
8961 * linux-low.c (can_hardware_single_step): New.
8962 (supports_breakpoints): New.
8963 (handle_extended_wait): If stopping threads, read the stop pc of
8966 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8967 low target doesn't support retrieving the PC.
8968 (add_lwp): Set last_resume_kind to resume_continue.
8969 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8970 (linux_attach): Don't clear stop_expected. Set the lwp's
8971 last_resume_kind to resume_stop.
8972 (linux_detach_one_lwp): Don't check for removed breakpoints.
8973 (check_removed_breakpoint): Delete.
8974 (status_pending_p): Rename to ...
8975 (status_pending_p_callback): ... this. Don't check for removed
8976 breakpoints. Don't consider threads that are stopped from GDB's
8978 (linux_wait_for_lwp): Always read the stop_pc here.
8979 (cancel_breakpoint): New.
8980 (step_over_bkpt): New global.
8981 (linux_wait_for_event_1): Implement stepping over breakpoints.
8982 (gdb_wants_lwp_stopped): New.
8983 (gdb_wants_all_stopped): New.
8984 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8985 single-step traps here. Store the thread's last reported target
8987 (send_sigstop): Don't clear stop_expected. Always set it,
8989 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8990 (cancel_finished_single_step): New.
8991 (cancel_finished_single_steps): New.
8992 (wait_for_sigstop): Don't cancel finished single-step traps here.
8993 (linux_resume_one_lwp): Don't check for removed breakpoints.
8994 Don't set `step' on non-hardware step archs.
8995 (linux_set_resume_request): Ignore resume_stop requests if already
8996 stopping or stopped. Set the lwp's last_resume_kind.
8997 (resume_status_pending_p): Don't check for removed breakpoints.
8998 (need_step_over_p): New.
8999 (start_step_over): New.
9000 (finish_step_over): New.
9001 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9002 requests. Clear the thread's last reported target waitstatus.
9003 Don't use the `suspended' flag. Don't consider pending breakpoints.
9004 (linux_resume): Start a step-over if necessary.
9005 (proceed_one_lwp): New.
9006 (proceed_all_lwps): New.
9007 (unstop_all_lwps): New.
9008 * linux-low.h (struct lwp_info): Rewrite comment for the
9009 `suspended' flag. Add the `stop_pc' field. Delete the
9010 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9011 Add `'last_resume_kind' and `need_step_over' fields.
9012 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9013 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9014 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9015 (set_raw_breakpoint_at): New.
9016 (set_breakpoint_at): Rewrite to use it.
9017 (reinsert_breakpoint_handler): Delete.
9018 (set_reinsert_breakpoint): New.
9019 (reinsert_breakpoint_by_bp): Delete.
9020 (delete_reinsert_breakpoints): New.
9021 (uninsert_breakpoint): Rewrite.
9022 (uninsert_breakpoints_at): New.
9023 (reinsert_breakpoint): Rewrite.
9024 (reinsert_breakpoints_at): New.
9025 (check_breakpoints): Rewrite.
9026 (breakpoint_here): New.
9027 (breakpoint_inserted_here): New.
9028 (check_mem_read): Adjust.
9029 * mem-break.h (breakpoints_supported, breakpoint_here)
9030 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9031 (reinsert_breakpoint_by_bp): Delete declaration.
9032 (delete_reinsert_breakpoints): Declare.
9033 (reinsert_breakpoint): Delete declaration.
9034 (reinsert_breakpoints_at): Declare.
9035 (uninsert_breakpoint): Delete declaration.
9036 (uninsert_breakpoints_at): Declare.
9037 (check_breakpoints): Adjust prototype.
9038 * server.h: Adjust include order.
9039 (struct thread_info): Declare here. Add a `last_status' field.
9041 2010-03-23 Michael Snyder <msnyder@vmware.com>
9043 * server.c (crc32): New function.
9044 (handle_query): Add handling for 'qCRC:' request.
9046 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9048 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9049 lwp had been stopped by a watchpoint.
9051 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9053 * server.h (internal_error): Declare.
9054 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9055 * utils.c (internal_error): New function.
9057 2010-03-15 Andreas Schwab <schwab@redhat.com>
9059 * configure.srv: Fix typo setting srv_regobj.
9061 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9063 * linux-low.c (fetch_register): Avoid passing a non string literal
9065 (usr_store_inferior_registers): Ditto.
9067 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9069 * linux-low.c (linux_write_memory): Bail out early if peeking
9072 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9074 * linux-low.h (struct lwp_info): New fields
9075 `stopped_by_watchpoint' and `stopped_data_address'.
9076 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9077 here, and cache them in the lwp object.
9078 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9080 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9082 (linux_stopped_by_watchpoint): Rewrite.
9083 (linux_stopped_data_address): Rewrite.
9085 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9087 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9088 switching the current inferior, not before.
9090 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9092 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9093 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9094 i386-linux.c and amd64-linux.c.
9095 (reg-i386.o): Removed.
9096 (reg-i386.c): Likewise.
9097 (reg-i386-linux.o): Likewise.
9098 (reg-i386-linux.c): Likewise.
9099 (reg-x86-64.o): Likewise.
9100 (reg-x86-64.c): Likewise.
9101 (reg-x86-64-linux.o): Likewise.
9102 (reg-x86-64-linux.c): Likewise.
9105 (i386-linux.o): Likewise.
9106 (i386-linux.c): Likewise.
9107 (amd64.o): Likewise.
9108 (amd64.c): Likewise.
9109 (amd64-linux.o): Likewise.
9110 (amd64-linux.c): Likewise.
9112 * configure.srv (srv_i386_regobj): New.
9113 (srv_i386_linux_regobj): Likewise.
9114 (srv_amd64_regobj): Likewise.
9115 (srv_amd64_linux_regobj): Likewise.
9116 (srv_i386_32bit_xmlfiles): Likewise.
9117 (srv_i386_64bit_xmlfiles): Likewise.
9118 (srv_i386_xmlfiles): Likewise.
9119 (srv_amd64_xmlfiles): Likewise.
9120 (srv_i386_linux_xmlfiles): Likewise.
9121 (srv_amd64_linux_xmlfiles): Likewise.
9122 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9123 srv_xmlfiles to $srv_i386_xmlfiles.
9124 (i[34567]86-*-mingw32ce*): Likewise.
9125 (i[34567]86-*-mingw*): Likewise.
9126 (i[34567]86-*-nto*): Likewise.
9127 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9128 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9129 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9130 (x86_64-*-linux*): Likewise.
9132 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9133 (init_registers_amd64_linux): New.
9134 (x86_arch_setup): Replace init_registers_x86_64_linux with
9135 init_registers_amd64_linux.
9137 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9139 * configure.ac: Check for libdl. If it is not available link against
9140 static libthread_db.
9141 * configure: Regenerate.
9143 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9147 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9148 handing a read watchpoint.
9149 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9151 2010-02-12 Doug Evans <dje@google.com>
9153 * linux-low.c (linux_supports_tracefork_flag): Document.
9154 (linux_look_up_symbols): Add comment.
9156 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9158 * regcache.c (supply_register): Clear regcache if buf is NULL.
9160 2010-02-02 Nicolas Roche <roche@sourceware.org>
9161 Joel Brobecker <brobecker@adacore.com>
9163 * inferiors.c (find_inferior): Add function documentation.
9164 (unloaded_dll): Handle the case where the unloaded dll has not
9165 been previously registered in the dll list.
9167 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9169 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9170 (thumb2_breakpoint): New.
9171 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9173 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9175 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9176 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9179 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9181 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9183 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9185 * linux-s390-low.c (s390_collect_ptrace_register)
9186 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9188 2010-01-21 Doug Evans <dje@google.com>
9190 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9191 (PTRACE_ARG4_TYPE): New macro.
9192 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9193 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9194 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9195 (usr_store_inferior_registers): Ditto.
9196 (linux_read_memory, linux_write_memory): Ditto.
9197 (linux_test_for_tracefork): Ditto.
9199 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9200 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9202 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9204 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9207 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9209 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9210 prototype to take a regcache. Adjust.
9212 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9214 * regcache.h (struct thread_info): Forward declare.
9215 (struct regcache): New.
9216 (new_register_cache): Adjust prototype.
9217 (get_thread_regcache): Declare.
9218 (free_register_cache): Adjust prototype.
9219 (registers_to_string, registers_from_string): Ditto.
9220 (supply_register, supply_register_by_name, collect_register)
9221 (collect_register_as_string, collect_register_by_name): Ditto.
9222 * regcache.c (struct inferior_regcache_data): Delete.
9223 (get_regcache): Rename to ...
9224 (get_thread_regcache): ... this. Adjust. Switch inferior before
9226 (regcache_invalidate_one): Adjust.
9227 (regcache_invalidate): Fix prototype.
9228 (new_register_cache): Return the new register cache.
9229 (free_register_cache): Change prototype.
9230 (realloc_register_cache): Adjust.
9231 (registers_to_string): Change prototype to take a regcache. Adjust.
9232 (registers_from_string): Ditto.
9233 (register_data): Ditto.
9234 (supply_register): Ditto.
9235 (supply_register_by_name): Ditto.
9236 (collect_register): Ditto.
9237 (collect_register_as_string): Ditto.
9238 (collect_register_by_name): Ditto.
9239 * server.c (process_serial_event): Adjust.
9240 * linux-low.h (regset_fill_func, regset_store_func): Change
9242 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9244 * linux-low.c (get_stop_pc): Adjust.
9245 (check_removed_breakpoint): Adjust.
9246 (linux_wait_for_event): Adjust.
9247 (linux_resume_one_lwp): Adjust.
9248 (fetch_register): Add regcache parameter. Adjust.
9249 (usr_store_inferior_registers): Ditto.
9250 (regsets_fetch_inferior_registers): Ditto.
9251 (regsets_store_inferior_registers): Ditto.
9252 (linux_fetch_registers, linux_store_registers): Ditto.
9253 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9255 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9257 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9258 prototype to take a regcache.
9259 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9260 * remote-utils.c (convert_ascii_to_int, outreg)
9261 (prepare_resume_reply): Change prototype to take a regcache.
9263 * target.h (struct target_ops) <fetch_registers, store_registers>:
9264 Change prototype to take a regcache.
9265 (fetch_inferior_registers, store_inferior_registers): Change
9266 prototype to take a regcache. Adjust.
9267 * proc-service.c (ps_lgetregs): Adjust.
9268 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9269 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9270 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9271 take a regcache. Adjust.
9272 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9273 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9274 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9275 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9276 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9277 (cris_cannot_fetch_register):
9278 (cris_breakpoint_at): Change prototype to take a regcache.
9280 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9281 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9282 to take a regcache. Adjust.
9283 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9285 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9286 take a regcache. Adjust.
9287 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9288 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9289 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9290 * linux-mips-low.c (mips_get_pc):
9291 (mips_set_pc): Change prototype to take a regcache. Adjust.
9292 (mips_reinsert_addr): Adjust.
9293 (mips_collect_register): Change prototype to take a regcache.
9295 (mips_supply_register):
9296 (mips_collect_register_32bit, mips_supply_register_32bit)
9297 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9298 (mips_store_fpregset): Ditto.
9299 * linux-ppc-low.c (ppc_supply_ptrace_register)
9300 (ppc_supply_ptrace_register): Ditto.
9301 (parse_spufs_run): Adjust.
9302 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9303 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9304 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9305 take a regcache. Adjust.
9306 * linux-s390-low.c (s390_collect_ptrace_register)
9307 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9308 (s390_set_pc): Change prototype to take a regcache. Adjust.
9309 (s390_arch_setup): Adjust.
9310 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9311 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9312 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9313 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9314 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9316 (sparc_breakpoint_at): Adjust.
9317 * linux-xtensa-low.c (xtensa_fill_gregset):
9318 (xtensa_store_gregset):
9319 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9320 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9321 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9322 prototype to take a regcache. Adjust.
9323 * win32-arm-low.c (arm_fetch_inferior_register)
9324 (arm_store_inferior_register): Change prototype to take a
9326 * win32-i386-low.c (i386_fetch_inferior_register)
9327 (i386_store_inferior_register): Change prototype to take a
9329 * win32-low.c (child_fetch_inferior_registers)
9330 (child_store_inferior_registers): Change prototype to take a
9332 (win32_wait): Adjust.
9333 (win32_fetch_inferior_registers): Change prototype to take a
9335 (win32_store_inferior_registers): Adjust.
9336 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9337 store_inferior_register>: Change prototype to take a regcache.
9339 2010-01-20 Doug Evans <dje@google.com>
9341 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9343 (linux_wait_for_event1, linux_init_signals): Ditto.
9344 (W_STOPCODE): Provide definition if missing.
9346 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9348 * linux-low.c (linux_core_of_thread): New.
9349 (compare_ints, show_process, list_threads): New.
9350 (linux_qxfer_osdata): Report threads and cores.
9351 (linux_target_op): Register linux_core_of_thread.
9352 * remote-utils.c (prepare_resume_reply): Report the core.
9353 (buffer_xml_printf): Support %d specifier.
9354 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9356 (handle_query): Handle qXfer:threads. Announce availability
9358 * target.h (struct target_ops): New field core_of_thread.
9360 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9362 * Makefile.in (clean): Remove new generated files.
9363 (reg-s390.o, reg-s390.c): Remove rules.
9364 (reg-s390x.o, reg-s390x.c): Likewise.
9365 (s390-linux32.o, s390-linux32.c): Add rules.
9366 (s390-linux64.o, s390-linux64.c): Likewise.
9367 (s390x-linux64.o, s390x-linux64.c): Likewise.
9368 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9369 * linux-s390-low.c: Include <elf.h>.
9370 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9371 (init_registers_s390): Remove prototype.
9372 (init_registers_s390x): Likewise.
9373 (init_registers_s390_linux32): Add prototype.
9374 (init_registers_s390_linux64): Likewise.
9375 (init_registers_s390x_linux64): Likewise.
9376 (s390_num_regs_3264): New define.
9377 (s390_regmap_3264): New global variable.
9378 (s390_cannot_fetch_register): Remove obsolete check.
9379 (s390_cannot_store_register): Likewise.
9380 (s390_collect_ptrace_register): Handle upper/lower register halves.
9381 (s390_supply_ptrace_register): Likewise.
9382 (s390_fill_gregset): Update to register number changes.
9383 (s390_get_hwcap): New routine.
9384 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9385 Install appropriate regmap and register set.
9387 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9389 * server.c (gdbserver_version): Update copyright year to 2010.
9390 * gdbreplay.c (gdbreplay_version): Likewise.
9392 2009-12-28 Doug Evans <dje@google.com>
9394 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9395 elf/external.h. Include <elf.h> instead but only if necessary.
9397 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9399 * linux-low.c (linux_remove_process): Remove `detaching'
9400 parameter. Don't release/detach from thread_db here.
9401 (linux_kill): Release/detach from thread_db here, ...
9402 (linux_detach): ... and here, before actually detaching.
9403 (linux_wait_1): ... and here, when a process exits.
9404 * thread-db.c (any_thread_of): New.
9405 (thread_db_free): Switch the current inferior to a thread of the
9408 2009-12-21 Doug Evans <dje@google.com>
9410 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9412 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9413 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9414 warning ifndef __NR_tkill. Move setting of errno there too.
9415 Delete unnecessary resetting of errno after syscall.
9416 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9418 * configure.ac: Check for dladdr.
9419 * config.in: Regenerate.
9420 * configure: Regenerate.
9421 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9422 (try_thread_db_load): Update.
9424 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9426 2009-12-18 Doug Evans <dje@google.com>
9428 * event-loop.c: Include unistd.h if it exists.
9430 * linux-low.c (my_waitpid): Move definition away from being in
9431 between linux_tracefork_child/linux_test_for_tracefork.
9433 * gdb_proc_service.h (psaddr_t): Fix type.
9434 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9435 signature to match glibc.
9437 2009-12-16 Doug Evans <dje@google.com>
9439 * linux-low.c (linux_read_memory): Fix argument to read.
9441 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9443 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9444 events, don't leave current_inferior pointing at null.
9446 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9448 * win32-low.c (LOG): Delete.
9449 (OUTMSG): Output to stderr.
9450 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9451 on compile time LOG macro.
9452 (win32_wait): Fix debug output.
9454 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9456 * win32-low.c (win32_add_one_solib): If the dll name is
9457 "ntdll.dll", prepend the system directory to the dll path.
9459 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9461 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9463 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9464 Vladimir Prus <vladimir@codesourcery.com>
9466 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9467 * configure.ac: Check for __mcoldfire__ and set
9468 gdb_cv_m68k_is_coldfire.
9469 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9470 reg-cf.o and reg-m68k.o.
9471 * configure: Regenerated.
9473 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9475 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9476 Pass it to thread_db_free.
9477 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9478 proper `detaching' argument to linux_remove_process.
9479 * linux-low.h (thread_db_free): Add `detaching' parameter.
9480 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9482 (thread_db_free): Add `detaching' parameter. Only
9483 call td_ta_clear_event if detaching from process.
9485 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9487 * thread-db.c (thread_db_free): Fix typo.
9489 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9492 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9494 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9496 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9497 with an i686 compiler.
9498 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9500 * configure: Rebuilt.
9502 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9506 * server.c (handle_search_memory_1): Correct read_addr initialization
9507 in loop for searching subsequent chunks.
9509 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9511 * configure.ac: New --with-libthread-db option.
9512 * thread-db.c: Allow direct dependence on libthread_db.
9513 (thread_db_free): Adjust.
9514 * config.in: Regenerate.
9515 * configure: Likewise.
9517 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9520 * thread-db.c (attach_thread): New function.
9521 (maybe_attach_thread): Return success/failure.
9522 (find_new_threads_callback): Adjust.
9523 (thread_db_find_new_threads): Loop until no new threads.
9525 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9527 * proc-service.c (ps_lgetregs): Formatting.
9529 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9531 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9532 * configure.ac: Adjust.
9533 * linux-low.h (struct process_info_private): Move members to struct
9535 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9536 * linux-low.c (linux_remove_process): Adjust.
9537 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9538 * server.c (handle_query): Move code ...
9539 (handle_monitor_command): ... here. New function.
9540 * target.h (struct target_ops): New member.
9541 * thread-db.c (struct thread_db): New.
9542 (libthread_db_search_path): New variable.
9543 (thread_db_create_event, thread_db_enable_reporting)
9544 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9545 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9546 (try_thread_db_load_1, dladdr_to_soname): New functions.
9547 (try_thread_db_load, thread_db_load_search): New functions.
9548 (thread_db_init): Search for libthread_db.
9549 (thread_db_free): New function.
9550 (thread_db_handle_monitor_command): Likewise.
9551 * config.in: Regenerate.
9552 * configure: Regenerate.
9554 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9556 * spu-low.c (spu_kill): Wait for inferior to terminate.
9557 Call clear_inferiors.
9558 (spu_detach): Call clear_inferiors.
9560 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9562 * aclocal.m4: Regenerate.
9563 * config.in: Likewise.
9564 * configure: Likewise.
9566 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9568 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9569 (parse_spufs_run): New function.
9570 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9571 (ppc_breakpoint_at): Handle SPU breakpoints.
9573 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9575 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9576 (SPUFS_MAGIC): Define.
9577 (spu_enumerate_spu_ids): New function.
9578 (linux_qxfer_spu): New function.
9579 (linux_target_ops): Install linux_qxfer_spu.
9581 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9583 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9584 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9585 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9586 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9587 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9588 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9589 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9590 (init_registers_powerpc_cell32l): Add prototype.
9591 (init_registers_powerpc_cell64l): Likewise.
9592 (ppc_arch_setup): Detect Cell/B.E. architecture.
9594 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9596 * Makefile.in (datarootdir): New variable.
9598 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9600 * linux-low.c (linux_write_memory): Update debugging output.
9601 * Makefile.in (clean): Add new descriptions.
9602 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9603 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9604 * configure.srv: Add new files for arm*-*-linux*.
9605 * linux-arm-low.c: Add new declarations.
9606 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9607 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9608 (HWCAP_VFPv3D16): New.
9609 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9610 instead of __IWMMXT__.
9611 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9612 (arm_arch_setup): New.
9613 (target_regsets): Remove #ifdef. Add VFP regset.
9614 (the_low_target): Use arm_arch_setup.
9616 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9618 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9619 the main thread again.
9621 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9623 Adding Neutrino gdbserver.
9624 * configure: Regenerated.
9625 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9626 * configure.srv (i[34567]86-*-nto*): New target.
9627 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9628 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9629 (nto_comctrl) [__QNX__]: New function.
9630 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9632 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9634 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9637 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9638 Pedro Alves <pedro@codesourcery.com>
9640 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9641 don't support CONTEXT_EXTENDED_REGISTERS.
9642 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9643 (the_low_target): Install them.
9644 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9645 failing with ERROR_PIPE_NOT_CONNECTED.
9647 2009-06-30 Doug Evans <dje@google.com>
9648 Pierre Muller <muller@ics.u-strasbg.fr>
9650 Add h/w watchpoint support to x86-linux, win32-i386.
9651 * Makefile.in (SFILES): Add i386-low.c
9652 (i386_low_h): Define.
9653 (i386-low.o): Add dependencies.
9654 (linux-x86-low.o): Add i386-low.h dependency.
9655 (win32-i386-low.o): Ditto.
9656 * i386-low.c: New file.
9657 * i386-low.h: New file.
9658 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9659 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9660 * linux-low.c (linux_add_process): Initialize arch_private.
9661 (linux_remove_process): Free arch_private.
9662 (add_lwp): Initialize arch_private.
9663 (delete_lwp): Free arch_private.
9664 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9666 * linux-low.h (process_info_private): New member arch_private.
9667 (lwp_info): New member arch_private.
9668 (linux_target_ops): New members new_process, new_thread,
9670 (ptid_of): New macro.
9671 * linux-x86-low.c: Include stddef.h, i386-low.h.
9672 (arch_process_info): New struct.
9673 (arch_lwp_info): New struct.
9674 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9675 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9676 (i386_dr_low_get_status): New function.
9677 (x86_insert_point, x86_remove_point): New functions.
9678 (x86_stopped_by_watchpoint): New function.
9679 (x86_stopped_data_address): New function.
9680 (x86_linux_new_process, x86_linux_new_thread): New functions.
9681 (x86_linux_prepare_to_resume): New function.
9682 (the_low_target): Add entries for insert_point, remove_point,
9683 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9685 * server.c (debug_hw_points): New global.
9686 (monitor_show_help): Document set debug-hw-points.
9687 (handle_query): Process "set debug-hw-points".
9688 * server.h (debug_hw_points): Declare.
9689 (paddress): Declare.
9690 * utils.c (NUMCELLS, CELLSIZE): New macros.
9691 (get_sell, xsnprintf, paddress): New functions.
9692 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9693 remove_point, stopped_by_watchpoint, stopped_data_address.
9694 * win32-i386-low.c: Include i386-low.h.
9695 (debug_reg_state): Replaces dr.
9696 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9697 (i386_dr_low_get_status): New function.
9698 (i386_insert_point, i386_remove_point): New functions.
9699 (i386_stopped_by_watchpoint): New function.
9700 (i386_stopped_data_address): New function.
9701 (i386_initial_stuff): Update.
9702 (get_thread_context,set_thread_context,i386_thread_added): Update.
9703 (the_low_target): Add entries for insert_point,
9704 remove_point, stopped_by_watchpoint, stopped_data_address.
9705 * win32-low.c (win32_insert_watchpoint): New function.
9706 (win32_remove_watchpoint): New function.
9707 (win32_stopped_by_watchpoint): New function.
9708 (win32_stopped_data_address): New function.
9709 (win32_target_ops): Add entries for insert_watchpoint,
9710 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9711 * win32-low.h (win32_target_ops): New members insert_point,
9712 remove_point, stopped_by_watchpoint, stopped_data_address.
9714 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9716 * server.c (process_serial_event): Re-return unsupported, not
9717 error, if the type isn't recognized. Re-allow supporting only
9718 insert or remove packets. Also call require_running for
9719 breakpoints. Add missing break statement to default case. Tidy.
9720 * target.h (struct target_ops): Rename insert_watchpoint to
9721 insert_point, and remove_watchpoint to remove_point.
9723 * linux-low.h (struct linux_target_ops): Likewise.
9724 * linux-low.c (linux_insert_watchpoint): Rename to ...
9725 (linux_insert_point): ... this. Adjust.
9726 (linux_remove_watchpoint): Rename to ...
9727 (linux_remove_point): ... this. Adjust.
9728 (linux_target_ops): Adjust.
9729 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9730 (cris_insert_point): ... this.
9731 (cris_remove_watchpoint): Rename to ...
9732 (cris_remove_point): ... this.
9733 (the_low_target): Adjust.
9735 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9737 * server.c (handle_v_kill): Pass signal_pid to
9738 kill_inferior if multi_process is zero.
9740 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9742 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9743 * target.h (target_ops): Comment for *_watchpoint to make it clear
9744 the functions can get types '0' and '1'.
9746 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9748 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9749 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9750 * regcache.c (get_regcache): Likewise.
9751 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9752 * win32-low.c (child_fetch_inferior_registers): Remove check for
9755 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9756 Pedro Alves <pedro@codesourcery.com>
9758 * target.h (struct target_ops) <supports_multi_process>: New
9760 (target_supports_multi_process): New.
9761 * server.c (handle_query): Even if GDB reports support, only
9762 enable multi-process if the target also supports it. Report
9763 multi-process support only if the target backend supports it.
9764 * linux-low.c (linux_supports_multi_process): New function.
9765 (linux_target_ops): Install it as target_supports_multi_process
9768 2009-05-24 Doug Evans <dje@google.com>
9770 Global renaming of find_thread_pid to find_thread_ptid.
9771 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9772 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9773 All callers updated.
9775 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9776 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9779 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9780 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9781 (linux_resume_one_lwp): Ditto.
9783 2009-05-23 Doug Evans <dje@google.com>
9785 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9786 from struct inferior_list_entry * to struct lwp_info *.
9787 All callers updated.
9789 2009-05-13 Doug Evans <dje@google.com>
9791 * linux-x86-low.c: Don't include assert.h.
9792 (x86_siginfo_fixup): Use fatal, not assert.
9793 (x86_arch_setup): Fix comment.
9795 2009-05-12 Doug Evans <dje@google.com>
9797 Biarch support for i386/amd64 gdbserver.
9798 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9799 Add linux-x86-low.c.
9800 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9801 (linux-x86-low.o): Add.
9802 * linux-x86-64-low.c: Delete.
9803 * linux-i386-low.c: Delete.
9804 * linux-x86-low.c: New file.
9805 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9807 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9809 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9810 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9811 (linux_child_pid_to_exec_file): New function.
9812 (elf_64_header_p, elf_64_file_p): New functions.
9813 (siginfo_fixup): New function.
9814 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9815 give target a chance to convert layout.
9816 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9817 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9819 2009-05-07 Doug Evans <dje@google.com>
9821 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9822 (regsets_store_inferior_registers): Ditto.
9824 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9828 * linux-low.c (must_set_ptrace_flags): Delete.
9829 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9831 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9832 `lwp->must_set_ptrace_flags' instead.
9833 (linux_wait_for_event_1): Set ptrace options here.
9834 (linux_wait_1): ... not here.
9836 2009-04-30 Doug Evans <dje@google.com>
9838 * inferiors.c (started_inferior_callback): New function.
9839 (attached_inferior_callback): New function.
9840 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9841 * server.c (print_started_pid, print_attached_pid): New functions.
9842 (detach_or_kill_for_exit): New function.
9843 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9844 * server.h (have_started_inferiors_p): Declare.
9845 (have_attached_inferiors_p): Declare.
9847 * inferiors.c (remove_process): Fix memory leak, free process.
9848 * linux-low.c (linux_remove_process): New function.
9849 (linux_kill): Call it instead of remove_process.
9850 (linux_detach, linux_wait_1): Ditto.
9852 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9854 * configure.srv: Add x86 Windows CE target.
9856 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9858 * inferiors.c (get_thread_process): Make global.
9859 * server.h (get_thread_process): Add prototype.
9860 * thread-db.c (find_one_thread): Use get_thread_process
9861 instead of current_process.
9862 (thread_db_get_tls_address): Do not crash if called when
9863 thread layer is not yet initialized.
9865 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9867 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9868 * spu-low.c (current_tid): Rename to ...
9869 (current_ptid): ... this.
9870 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9871 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9872 ptid_get_lwp (current_ptid) instead of current_tid.
9873 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9874 instead of current_tid. Use find_process_pid to verify pid
9875 argument is valid. Pass proper argument to remove_process.
9876 (spu_thread_alive): Compare current_ptid instead of current_tid.
9877 (spu_resume): Likewise.
9879 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9881 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9884 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9886 Implement the multiprocess extensions, and add linux multiprocess
9889 * server.h (ULONGEST): Declare.
9890 (struct ptid, ptid_t): New.
9891 (minus_one_ptid, null_ptid): Declare.
9892 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9893 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9894 (struct inferior_list_entry): Change `id' type from unsigned from
9896 (struct sym_cache, struct breakpoint, struct
9897 process_info_private): Forward declare.
9898 (struct process_info): Declare.
9899 (current_process): Declare.
9900 (all_processes): Declare.
9901 (initialize_inferiors): Declare.
9902 (add_thread): Adjust to use ptid_t.
9903 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9904 (add_process, remove_process, find_thread_pid): Declare.
9905 (find_inferior_id): Adjust to use ptid_t.
9906 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9907 (multi_process): Declare.
9908 (push_event): Adjust to use ptid_t.
9909 (read_ptid, write_ptid): Declare.
9910 (prepare_resume_reply): Adjust to use ptid_t.
9911 (clear_symbol_cache): Declare.
9912 * inferiors.c (all_processes): New.
9913 (null_ptid, minus_one_ptid): New.
9914 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9915 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9916 (add_thread): Change unsigned long to ptid. Remove gdb_id
9918 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9919 (gdb_id_to_thread): Rename to ...
9920 (find_thread_pid): ... this. Change unsigned long to ptid.
9921 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9922 (loaded_dll, pull_pid_from_list): Adjust.
9923 (add_process, remove_process, find_process_pid)
9924 (get_thread_process, current_process, initialize_inferiors): New.
9925 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9926 (struct target_waitstatus) <related_pid>: Ditto.
9927 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9929 (struct target_ops) <join>: Add `pid' argument.
9930 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9931 (struct target_ops) <wait>: Add `ptid' field. Change return type
9933 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9934 (mywait): Add `ptid' argument. Change return type to ptid_t.
9935 (target_pid_to_str): Declare.
9936 * target.c (set_desired_inferior): Adjust to use ptids.
9937 (mywait): Add new `ptid' argument. Adjust.
9938 (target_pid_to_str): New.
9939 * mem-break.h (free_all_breakpoints): Declare.
9940 * mem-break.c (breakpoints): Delelete.
9941 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9942 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9943 to use per-process breakpoint list.
9944 (free_all_breakpoints): New.
9945 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9946 (symbol_cache, all_symbols_looked_up): Delete.
9948 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9950 (prepare_resume_reply): Change ptid argument's type from unsigned
9951 long to ptid_t. Adjust. Implement W;process and X;process.
9952 (free_sym_cache, clear_symbol_cache): New.
9953 (look_up_one_symbol): Adjust to per-process symbol cache. *
9954 * server.c (cont_thread, general_thread, step_thread): Change type
9957 (multi_process): New.
9958 (last_ptid): Change type to ptid_t.
9959 (struct vstop_notif) <ptid>: Change type to ptid_t.
9960 (queue_stop_reply, push_event): Change `ptid' argument's type to
9962 (discard_queued_stop_replies): Add `pid' argument.
9963 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9964 changes. Don't reference the `attached' global.
9965 (attach_inferior): Adjust to mywait interface changes.
9966 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9967 features. Handle and report "multiprocess+". Handle
9969 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9971 (handle_v_kill): New.
9972 (handle_v_stopped): Adjust to use target_pid_to_str.
9973 (handle_v_requests): Allow multiple attaches and runs when
9974 multiprocess extensions are in effect. Handle "vKill".
9975 (myresume): Adjust to use ptids.
9976 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9977 (handle_status): Adjust to discard_queued_stop_replies interface
9979 (first_thread_of, kill_inferior_callback)
9980 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9981 (main): Call initialize_inferiors. Adjust to use ptids, killing
9982 and detaching from all inferiors. Handle multiprocess packet
9984 * linux-low.h: Include gdb_proc_service.h.
9985 (struct process_info_private): New.
9986 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9987 <lwpid_of>: Use ptid_get_lwp.
9988 (get_lwp_thread): Adjust.
9989 (struct lwp_info): Add `dead' member.
9990 (find_lwp_pid): Declare.
9991 * linux-low.c (thread_db_active): Delete.
9992 (new_inferior): Adjust comment.
9993 (inferior_pid): Delete.
9994 (linux_add_process): New.
9995 (handle_extended_wait): Adjust.
9996 (add_lwp): Change unsigned long to ptid.
9997 (linux_create_inferior): Add process to processes table. Adjust
9998 to use ptids. Don't set new_inferior here.
9999 (linux_attach_lwp): Rename to ...
10000 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10001 it. Adjust to use ptids.
10002 (linux_attach_lwp): New.
10003 (linux_attach): Add process to processes table. Don't set
10005 (struct counter): New.
10006 (second_thread_of_pid_p, last_thread_of_process_p): New.
10007 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10008 multiple processes.
10009 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10010 processes. Remove process from process table.
10011 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10012 to multiple processes.
10013 (any_thread_of): New.
10014 (linux_detach): Add `pid' argument, and handle it. Remove process
10015 from processes table.
10016 (linux_join): Add `pid' argument. Handle it.
10017 (linux_thread_alive): Change unsighed long argument to ptid_t.
10018 Consider dead lwps as not being alive.
10019 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10020 threads we're not interested in.
10021 (same_lwp, find_lwp_pid): New.
10022 (linux_wait_for_lwp): Change `pid' argument's type from int to
10024 (linux_wait_for_event): Rename to ...
10025 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10026 from int to ptid_t. Adjust.
10027 (linux_wait_for_event): New.
10028 (linux_wait_1): Add `ptid' argument. Change return type to
10029 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10030 that exit from the process table.
10031 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10033 (mark_lwp_dead): New.
10034 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10035 stopping all threads, mark its main lwp as dead.
10036 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10038 (fetch_register, usr_store_inferior_registers)
10039 (regsets_fetch_inferior_registers)
10040 (regsets_store_inferior_registers, linux_read_memory)
10041 (linux_write_memory): Inline `inferior_pid'.
10042 (linux_look_up_symbols): Adjust to use per-process
10043 `thread_db_active'.
10044 (linux_request_interrupt): Adjust to use ptids.
10045 (linux_read_auxv): Inline `inferior_pid'.
10046 (initialize_low): Don't reference thread_db_active.
10047 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10048 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10049 (ps_getpid): Return the pid of the current inferior.
10050 * thread-db.c (proc_handle, thread_agent): Delete.
10051 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10053 (find_one_thread): Change argument type to ptid_t. Adjust to
10055 (maybe_attach_thread): Adjust to per-process data and ptids.
10056 (thread_db_find_new_threads): Ditto.
10057 (thread_db_init): Ditto.
10058 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10059 processes table. Adjust to use ptids.
10060 (spu_kill, spu_detach): Adjust interface. Remove process from
10062 (spu_join, spu_thread_alive): Adjust interface.
10063 (spu_wait): Adjust interface. Remove process from processes
10064 table. Adjust to use ptids.
10065 * win32-low.c (current_inferior_tid): Delete.
10066 (current_inferior_ptid): New.
10067 (debug_event_ptid): New.
10068 (thread_rec): Take a ptid. Adjust.
10069 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10070 (child_delete_thread): Ditto.
10071 (do_initial_child_stuff): Add `attached' argument. Add process to
10073 (child_fetch_inferior_registers, child_store_inferior_registers):
10075 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10076 (win32_attach): Pass 1 to do_initial_child_stuff.
10077 (win32_kill): Adjust interface. Remove process from processes
10079 (win32_detach): Ditto.
10080 (win32_join): Adjust interface.
10081 (win32_thread_alive): Take a ptid.
10082 (win32_resume): Adjust to use ptids.
10083 (get_child_debug_event): Ditto.
10084 (win32_wait): Adjust interface. Remove exiting process from
10087 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10089 Non-stop mode support.
10091 * server.h (non_stop): Declare.
10092 (gdb_client_data, handler_func): Declare.
10093 (delete_file_handler, add_file_handler, start_event_loop):
10095 (handle_serial_event, handle_target_event, push_event)
10096 (putpkt_notif): Declare.
10097 * target.h (enum resume_kind): New.
10098 (struct thread_resume): Replace `step' field by `kind' field.
10099 (TARGET_WNOHANG): Define.
10100 (struct target_ops) <wait>: Add `options' argument.
10101 <supports_non_stop, async, start_non_stop>: New fields.
10102 (target_supports_non_stop, target_async): New.
10103 (start_non_stop): Declare.
10104 (mywait): Add `options' argument.
10105 * target.c (mywait): Add `options' argument. Print child exit
10106 notifications here.
10107 (start_non_stop): New.
10108 * server.c (non_stop, own_buf, mem_buf): New globals.
10109 (struct vstop_notif): New.
10110 (notif_queue): New global.
10111 (queue_stop_reply, push_event, discard_queued_stop_replies)
10112 (send_next_stop_reply): New.
10113 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10115 (attach_inferior): In non-stop mode, don't wait for the target
10117 (handle_general_set): Handle QNonStop.
10118 (handle_query): When handling qC, return the current general
10119 thread, instead of the first thread of the list.
10120 (handle_query): If the backend supports non-stop mode, include
10121 QNonStop+ in the qSupported query response.
10122 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10124 (handle_v_attach, handle_v_run): Handle non-stop mode.
10125 (handle_v_stopped): New.
10126 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10127 (myresume): Adjust to use resume_kind. Handle non-stop.
10128 (queue_stop_reply_callback): New.
10129 (handle_status): Handle non-stop mode.
10130 (main): Clear non_stop flag on reconnection. Use the event-loop.
10131 Refactor serial protocol handling from here ...
10132 (process_serial_event): ... to this new function. When GDB
10133 selects any thread, select one here. In non-stop mode, wait until
10134 GDB acks all pending events before exiting.
10135 (handle_serial_event, handle_target_event): New.
10136 * remote-utils.c (remote_open): Install remote_desc in the event
10138 (remote_close): Remove remote_desc from the event loop.
10139 (putpkt_binary): Rename to...
10140 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10141 (putpkt_binary): New as wrapper around putpkt_binary_1.
10142 (putpkt_notif): New.
10143 (prepare_resume_reply): In non-stop mode, don't change the
10145 * event-loop.c: New.
10146 * Makefile.in (OBJ): Add event-loop.o.
10147 (event-loop.o): New rule.
10149 * linux-low.h (pid_of): Moved here.
10151 (get_lwp_thread): Use lwpid_of.
10152 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10153 * linux-low.c (pid_of): Delete.
10154 (inferior_pid): Use lwpid_of.
10155 (linux_event_pipe): New.
10156 (target_is_async_p): New.
10158 (handle_extended_wait): Use lwpid_of.
10159 (add_lwp): Don't set lwpid field.
10160 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10161 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10162 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10163 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10164 first. Adjust to linux_wait_for_event interface changes. Use
10166 (linux_detach): Don't delete the main lwp here.
10167 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10168 (status_pending_p): Don't consider explicitly suspended lwps.
10169 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10170 pointer. Add OPTIONS argument. Change return type to int. Use
10171 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10172 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10173 pointer. Add status pointer argument. Return a pid instead of a
10174 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10175 changes. In non-stop mode, don't switch to a random thread.
10176 (linux_wait): Rename to...
10177 (linux_wait_1): ... this. Add target_options argument, and handle
10178 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10179 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10180 clean exit and signal exit code. Don't stop all threads in
10181 non-stop mode. In all-stop mode, only stop all threads when
10182 reporting a stop to GDB. Handle explicit thread stop requests.
10183 (async_file_flush, async_file_mark): New.
10185 (send_sigstop): Use lwpid_of.
10186 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10187 interface changes. In non-stop mode, don't switch to a random
10189 (linux_resume_one_lwp): Use lwpid_of.
10190 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10191 (linux_resume_one_thread): ... this. Handle resume_stop. In
10192 non-stop mode, don't look for pending flag in all threads.
10193 (resume_status_pending_p): Don't consider explicitly suspended
10195 (my_waitpid): Reimplement. Emulate __WALL.
10196 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10198 (sigchld_handler, linux_supports_non_stop, linux_async)
10199 (linux_start_non_stop): New.
10200 (linux_target_ops): Register linux_supports_non_stop, linux_async
10201 and linux_start_non_stop.
10202 (initialize_low): Install SIGCHLD handler.
10203 * thread-db.c (thread_db_create_event, find_one_thread)
10204 (thread_db_get_tls_address): Use lwpid_of.
10205 * win32-low.c (win32_detach): Adjust to use resume_kind.
10206 (win32_wait): Add `options' argument.
10207 * spu-low.c (spu_resume): Adjust to use resume_kind.
10208 (spu_wait): Add `options' argument.
10210 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10212 Decouple target code from remote protocol.
10214 * target.h (enum target_waitkind): New.
10215 (struct target_waitstatus): New.
10216 (struct target_ops) <wait>: Return an unsigned long. Take a
10217 target_waitstatus pointer instead of a char pointer.
10218 (mywait): Likewise.
10219 * target.c (mywait): Change prototype to return an unsigned long.
10220 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10221 * server.h (thread_from_wait, old_thread_from_wait): Delete
10223 (prepare_resume_reply): Change prototype to take a
10225 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10226 (last_status, last_ptid): New.
10227 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10228 pid instead of a signal.
10229 (attach_inferior): Remove "status" and "signal" parameters.
10231 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10233 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10234 (handle_v_requests, myresume): Remove "status" and "signal"
10235 parameters. Adjust.
10236 (handle_status): New.
10237 (main): Delete local `status'. Adjust.
10238 * remote-utils.c: Include target.h.
10239 (prepare_resume_reply): Change prototype to take a
10240 target_waitstatus. Adjust.
10242 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10244 * spu-low.c (spu_wait): Adjust.
10245 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10247 (win32_wait): Adjust.
10249 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10251 * target.h (struct thread_resume): Delete leave_stopped member.
10252 (struct target_ops): Add a `n' argument to the `resume' callback.
10253 * server.c (start_inferior): Adjust.
10254 (handle_v_cont, myresume): Adjust.
10255 * linux-low.c (check_removed_breakpoint): Adjust to resume
10256 interface change, and to removed leave_stopped field.
10257 (resume_ptr): Delete.
10258 (struct thread_resume_array): New.
10259 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10260 resume interface change.
10261 (linux_continue_one_thread, linux_queue_one_thread)
10262 (resume_status_pending_p): Check if the resume field is NULL
10263 instead of checking the leave_stopped member.
10264 (linux_resume): Adjust to the target resume interface change.
10265 * spu-low.c (spu_resume): Adjust to the target resume interface
10267 * win32-low.c (win32_detach, win32_resume): Ditto.
10269 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10271 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10273 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10275 (linux_continue_one_thread): Only preserve the stepping flag if
10276 there's a pending breakpoint.
10278 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10280 * server.c (main): After the inferior having exited, call
10281 remote_close before exiting gdbserver.
10283 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10285 Fix size of FPSCR in Power 7 processors.
10286 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10287 (PPC_FEATURE_HAS_DFP): New #define.
10288 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10291 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10293 * server.c (handle_query) Whitespace and formatting.
10295 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10297 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10298 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10299 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10300 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10301 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10302 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10303 Makefile.in, configure.ac: Fix whitespace throughout.
10304 * configure: Regenerate.
10306 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10308 * inferiors.c (find_inferior): Make it safe for the callback
10309 function to delete the currently iterated inferior.
10311 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10313 * Makefile.in (linuw_low_h): Move higher.
10314 (thread-db.o): Depend on $(linux_low_h).
10316 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10318 Rename "process" to "lwp" throughout.
10320 * linux-low.c (all_processes): Rename to...
10321 (all_lwps): ... this.
10322 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10323 (add_process): Rename to ...
10324 (add_lwp): ... this. Adjust.
10325 (linux_create_inferior): Adjust.
10326 (linux_attach_lwp): Adjust.
10327 (linux_attach): Adjust.
10328 (linux_kill_one_process): Rename to ...
10329 (linux_kill_one_lwp): ... this. Adjust.
10330 (linux_kill): Adjust.
10331 (linux_detach_one_process): Rename to ...
10332 (linux_detach_one_lwp): ... this. Adjust.
10333 (linux_detach): Adjust.
10334 (check_removed_breakpoint): Adjust.
10335 (status_pending_p): Adjust.
10336 (linux_wait_for_process): Rename to ...
10337 (linux_wait_for_lwp): ... this. Adjust.
10338 (linux_wait_for_event): Adjust.
10339 (send_sigstop): Adjust.
10340 (wait_for_sigstop): Adjust.
10341 (stop_all_processes): Rename to ...
10342 (stop_all_lwps): ... this.
10343 (linux_resume_one_process): Rename to ...
10344 (linux_resume_one_lwp): ... this. Adjust.
10345 (linux_set_resume_request, linux_continue_one_thread)
10346 (linux_queue_one_thread, resume_status_pending_p)
10347 (usr_store_inferior_registers, regsets_store_inferior_registers)
10348 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10350 * linux-low.h (get_process): Rename to ...
10351 (get_lwp): ... this. Adjust.
10352 (get_thread_process): Rename to ...
10353 (get_thread_lwp): ... this. Adjust.
10354 (get_process_thread): Rename to ...
10355 (get_lwp_thread): ... this. Adjust.
10356 (struct process_info): Rename to ...
10357 (struct lwp_info): ... this.
10358 (all_processes): Rename to ...
10359 (all_lwps): ... this.
10360 * proc-service.c (ps_lgetregs): Adjust.
10361 * thread-db.c (thread_db_create_event, find_one_thread)
10362 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10364 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10366 * server.c (handle_query): Handle "qAttached".
10368 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10370 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10371 GPLv3, update license URL.
10373 2009-03-01 Doug Evans <dje@google.com>
10375 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10376 (server_h): Add gdb_signals.h.
10377 (signals.o): Update.
10378 * server.h (target_signal_from_host,target_signal_to_host_p)
10379 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10381 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10383 * remote-utils.c (getpkt): Also generate remote-debug
10384 information if noack_mode is set.
10386 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10388 * server.c (handle_query): Report qXfer:siginfo:read and
10389 qXfer:siginfo:write as supported and handle them.
10390 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10391 * linux-low.c (linux_xfer_siginfo): New.
10392 (linux_target_ops): Set it.
10394 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10396 * server.c (gdbserver_usage): Mention --remote-debug.
10397 (main): Accept '--remote-debug' switch.
10399 2009-01-18 Doug Evans <dje@google.com>
10401 * regcache.c (new_register_cache): No need to check result of xcalloc.
10402 * server.c (handle_search_memory): Back out calls to xmalloc,
10403 result is checked and error is returned to user upon failure.
10404 (handle_query): Ditto. Add more checks for result of malloc.
10405 (handle_v_cont): Check result of malloc, report error back to
10407 (handle_v_run): Ditto. Call freeargv.
10408 * server.h (freeargv): Declare.
10409 * utils.c (freeargv): New fn.
10411 2009-01-15 Doug Evans <dje@google.com>
10413 * gdbreplay.c (perror_with_name): Make arg const char *.
10414 * server.h (target_signal_to_name): Make return type const char *.
10415 * thread-db.c (thread_db_err_str): Make return type const char *.
10416 * utils.c (perror_with_name): Make arg const char *.
10418 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10420 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10421 when handling a EXIT_PROCESS_DEBUG_EVENT.
10423 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10425 * gdbreplay.c (gdbreplay_version): Update copyright year.
10426 * server.c (gdbserver_version): Likewise.
10428 2009-01-05 Doug Evans <dje@google.com>
10430 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10431 (handle_extended_wait): Improve comment.
10433 2008-12-13 Doug Evans <dje@google.com>
10435 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10436 * server.h (ATTR_MALLOC): New macro.
10437 (xmalloc,xcalloc,xstrdup): Declare.
10438 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10439 * inferiors.c: Ditto.
10440 * linux-low.c: Ditto.
10441 * mem-break.c: Ditto.
10442 * regcache.c: Ditto.
10443 * remote-utils.c: Ditto.
10446 * win32-low.c: Ditto.
10448 2008-12-12 Doug Evans <dje@google.com>
10450 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10451 in debugging printf.
10453 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10455 2008-12-09 Doug Evans <dje@google.com>
10457 * linux-low.h (struct process_info): Delete member tid, unused.
10458 * thread-db.c (find_one_thread): Update.
10459 (maybe_attach_thread): Update.
10461 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10463 * target.h (struct target_ops): Add qxfer_osdata member.
10464 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10466 (linux_qxfer_osdata): New functions.
10467 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10469 * server.c (handle_query): Handle "qXfer:osdata:read:".
10470 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10471 (buffer_xml_printf): New functions.
10472 * server.h (struct buffer): New.
10473 (buffer_grow_str, buffer_grow_str0): New macros.
10474 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10475 (buffer_xml_printf): Declare.
10477 2008-11-24 Doug Evans <dje@google.com>
10479 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10481 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10483 * server.c (handle_v_run): Always use the supplied argument list.
10485 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10487 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10488 (xtensa_regmap_table): Add entry for scompare1.
10490 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10492 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10493 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10494 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10495 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10496 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10497 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10498 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10499 XML target descriptions.
10500 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10501 when inferior is running on an ISA 2.05 or later processor. Add
10502 special case to return offset for full 64-bit slot of FPSCR when
10505 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10507 * Makefile.in (SFILES, clean): Added sparc64 files.
10508 (reg-sparc64.o, reg-sparc64.c): New.
10509 * configure.srv (sparc*-*-linux*): New configuration.
10510 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10511 syscall arguments for SPARC.
10512 (regsets_store_inferior_registers): Likewise.
10513 * linux-sparc-low.c: New file.
10515 2008-10-21 Doug Evans <dje@google.com>
10517 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10518 (READLINE_DIR,READLINE_DEP): Delete.
10519 (INTERNAL_CFLAGS): Update.
10520 (LINTFLAGS): Update.
10522 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10524 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10525 whole argv from the last run, not just argv[0].
10527 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10529 * regcache.c (new_register_cache): Return NULL if the register
10530 cache size isn't known yet.
10531 (free_register_cache): Avoid dereferencing a NULL regcache.
10533 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10535 * configure.srv: Merge MIPS and MIPS64.
10537 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10539 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10541 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10543 * Makefile.in: Add required vsx dependencies.
10545 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10546 Declare init_registers_powerpc_vsx32l.
10547 Declare init_registers_powerpc_vsx64l.
10548 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10549 (ppc_arch_setup): Check for VSX in hwcap.
10550 (ppc_fill_vsxregset): New function.
10551 (ppc_store_vsxregset): New function.
10552 Add new VSX entry in regset_info target_regsets.
10554 * configure.srv: Add new VSX dependencies.
10556 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10558 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10559 (remote_open): Set or clear transport_is_reliable.
10560 (putpkt_binary): Don't expect acks in noack mode.
10561 (getpkt): Don't send ack/nac in noack mode.
10562 * server.c (handle_general_set): Handle QStartNoAckMode.
10563 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10565 (main): Reset noack_mode on every connection.
10566 * server.h (noack_mode): Declare.
10568 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10570 * Makefile.in (GDBREPLAY_OBS): New variable.
10571 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10573 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10574 Daniel Jacobowitz <dan@codesourcery.com>
10576 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10577 (usr_store_inferior_registers): Likewise.
10578 (regsets_store_inferior_registers): Likewise.
10580 2008-07-31 Rolf Jansen <rj@surtec.com>
10581 Pedro Alves <pedro@codesourcery.com>
10583 * configure.ac: Check for memmem declaration.
10584 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10585 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10586 (disable_packet_qfThreadInfo): Unconditionally compile.
10587 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10588 * configure, config.in: Regenerate.
10590 2008-07-28 Doug Kwan <dougkwan@google.com>
10592 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10593 (linux_write_memory): Remove declaration of errno.
10595 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10597 * linux-low.c (handle_extended_wait): Do not use "status"
10598 variable uninitialized.
10600 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10602 * server.c (handle_v_attach): Inhibit reporting dll changes.
10604 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10606 * remote-utils.c (prepare_resume_reply): If requested, don't
10607 output "thread:TID" in the T stop reply.
10609 * server.c (disable_packet_vCont, disable_packet_Tthread)
10610 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10611 (handle_query): If requested, disable support for qC, qfThreadInfo
10613 (handle_v_requests): If requested, disable support for vCont.
10614 (gdbserver_show_disableable): New.
10615 (main): Handle --disable-packet and --disable-packet=LIST.
10617 * server.h (disable_packet_vCont, disable_packet_Tthread)
10618 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10620 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10622 * server.c (gdbserver_usage): Mention --version.
10624 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10626 * Makefile.in (gdbreplay.o): New rule.
10628 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10630 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10631 message, not gdbserver.
10633 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10634 Nathan Sidwell <nathan@codesourcery.com>
10635 Joseph Myers <joseph@codesourcery.com>
10637 * acinclude.m4: Include ../../config/acx.m4.
10638 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10639 * configure, config.in: Regenerate.
10640 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10641 * server.c (gdbserver_version): Print PKGVERSION.
10642 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10643 (main): Adjust gdbserver_usage calls.
10644 * gdbreplay.c (version, host_name): Add declarations.
10645 (gdbreplay_version, gdbreplay_usage): New.
10646 (main): Accept --version and --help options.
10648 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10650 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10651 (arm_breakpoint_at): Handle Thumb.
10652 (the_low_target): Add comment.
10654 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10656 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10658 2008-05-09 Doug Evans <dje@google.com>
10660 * server.h (decode_search_memory_packet): Declare.
10661 * remote-utils.c (decode_search_memory_packet): New fn.
10662 * server.c (handle_search_memory_1): New fn.
10663 (handle_search_memory): New fn.
10664 (handle_query): Process qSearch:memory packets.
10666 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10668 * regcache.c (registers_length): Remove.
10669 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10670 full register packet.
10671 * regcache.h (registers_length): Remove prototype.
10672 * server.h (PBUFSIZ): Define to 16384.
10674 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10676 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10677 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10678 powerpc-64l.o, and powerpc-altivec64l.o.
10679 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10680 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10681 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10682 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10683 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10686 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10687 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10688 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10689 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10690 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10691 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10692 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10693 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10694 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10695 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10698 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10699 (init_registers_powerpc_32l): ... this new prototype.
10700 (init_registers_powerpc_32): Remove, replace by ...
10701 (init_registers_powerpc_altivec32l): ... this new prototype.
10702 (init_registers_powerpc_e500): Remove, replace by ...
10703 (init_registers_powerpc_e500l): ... this new prototype.
10704 (init_registers_ppc64): Remove, replace by ...
10705 (init_registers_powerpc_64l): ... this new prototype.
10706 (init_registers_powerpc_64): Remove, replace by ...
10707 (init_registers_powerpc_altivec64l): ... this new prototype.
10708 (ppc_num_regs): Set to 73.
10709 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10710 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10711 (ppc_cannot_store_register): Handle orig_r3 and trap.
10712 (ppc_arch_setup): Update init_registers_... calls.
10713 (ppc_fill_gregset): Handle orig_r3 and trap.
10715 * inferiors.c (clear_inferiors): Reset current_inferior.
10717 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10719 * acinclude.m4: Add override.m4.
10720 * configure: Regenerate.
10722 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10724 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10725 initial call to init_register_ppc64.
10727 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10729 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10730 single powerpc*-*-linux* case.
10731 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10733 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10735 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10736 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10738 * linux-ppc-low.c: Include <elf.h>.
10739 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10740 (ppc_hwcap): New global variable.
10741 (ppc_regmap): Remove __SPE__ #ifdef sections.
10742 (ppc_regmap_e500): New global variable.
10743 (ppc_cannot_store_register): Update __SPE__ special case.
10744 (ppc_get_hwcap): New function.
10745 (ppc_arch_setup): Use it to determine whether inferior supports
10746 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10747 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10748 Do not access registers if target does not support AltiVec.
10749 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10750 Do not access registers if target does not support SPE.
10751 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10753 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10755 * linux-low.c (disabled_regsets, num_regsets): New.
10756 (use_regsets_p): Delete.
10757 (linux_wait_for_process): Clear disabled_regsets.
10758 (regsets_fetch_inferior_registers): Check and set it.
10759 (regsets_store_inferior_registers): Likewise.
10760 (linux_fetch_registers, linux_store_registers): Do not use
10762 (initialize_low): Allocate disabled_regsets.
10764 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10766 * Makefile.in (LIBOBJS): New.
10767 (OBS): Use LIBOBJS.
10768 (memmem.o): New rule.
10769 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10770 * configure: Regenerated.
10772 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10774 * server.c (handle_query): Never return "unsupported" for
10775 qXfer:features:read queries.
10777 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10779 * server.c (get_features_xml): Fix inverted condition.
10780 (handle_query): Always support qXfer:feature:read.
10782 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10784 * server.c (wrapper_argv): New.
10785 (start_inferior): Handle wrapper_argv. If set, expect an extra
10787 (gdbserver_usage): Document --wrapper.
10788 (main): Parse --wrapper.
10790 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10792 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10793 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10794 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10795 (ppc_set_pc): Likewise.
10796 (ppc_arch_setup): New function.
10797 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10798 of collect_register.
10799 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10801 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10803 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10804 instead of linux-ppc64-low.o.
10805 * linux-ppc64-low.c: Remove file.
10806 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10807 (linux-ppc64-low.o): Remove rule.
10809 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10810 (init_registers_powerpc_64): Likewise.
10811 (ppc_regmap): Conditionally define depending on __powerpc64__.
10812 (ppc_cannot_store_register): Do not special-case "fpscr" when
10813 compiled on __powerpc64__.
10814 (ppc_collect_ptrace_register): New function.
10815 (ppc_supply_ptrace_register): New function.
10816 (ppc_breakpoint): Change type to "unsigned int".
10817 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10818 (the_low_target): Conditionally provide initializers for the
10819 arch_setup member depending on __powerpc64__. Install
10820 collect_ptrace_register and supply_ptrace_register members.
10822 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10824 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10825 * server.c (gdbserver_xmltarget): Define.
10826 (get_features_xml): Use it to replace "target.xml" and arch_string.
10828 * configure.srv: Remove srv_xmltarget. Add XML files that were
10829 mentioned there to srv_xmlfiles instead. Remove conditional tests
10830 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10831 srv_xmlfiles and srv_regobj to include all possible choices.
10832 * configure.ac (srv_xmltarget): Remove.
10833 (srv_xmlfiles): Do not add "target.xml".
10834 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10835 checks for supplementary target information.
10836 * configure: Regenerate.
10837 * Makefile.in (XML_TARGET): Remove.
10838 (target.xml): Remove rule.
10839 (clean): Do not clean up target.xml.
10840 (.PRECIOUS): Do not mention target.xml.
10842 * target.h (struct target_ops): Remove arch_string member.
10843 * linux-low.c (linux_arch_string): Remove.
10844 (linux_target_ops): Remove arch_string initializer.
10845 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10846 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10847 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10848 * spu-low.c (spu_arch_string): Remove.
10849 (spu_target_ops): Remove arch_string initializer.
10850 * win32-low.c (win32_arch_string): Remove.
10851 (win32_target_ops): Remove arch_string initializer.
10852 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10853 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10854 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10856 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10858 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10859 by collect_ptrace_register and supply_ptrace_register hooks.
10860 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10861 instead of checking for the_low_target.left_pad_xfer.
10862 (usr_store_inferior_registers): Use collect_ptrace_register callback
10863 instead of checking for the_low_target.left_pad_xfer.
10865 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10866 (s390_supply_ptrace_register): Likewise.
10867 (s390_fill_gregset): Call s390_collect_ptrace_register.
10868 (the_low_target): Update.
10870 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10871 (ppc_supply_ptrace_register): Likewise.
10872 (the_low_target): Update.
10874 * linux-i386-low.c (the_low_target): Update.
10875 * linux-x86-64-low.c (the_low_target): Update.
10877 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10879 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10880 reg-s390.o and reg-s390x.o.
10882 * linux-low.c (new_inferior): New global variable.
10883 (linux_create_inferior, linux_attach): Set it.
10884 (linux_wait_for_process): Call the_low_target.arch_setup after the
10885 target has stopped for the first time.
10886 (initialize_low): Do not call the_low_target.arch_setup.
10888 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10889 (s390_set_pc): Likewise.
10890 (s390_arch_setup): New function.
10891 (the_low_target): Use s390_arch_setup as arch_setup routine.
10893 * regcache.c (realloc_register_cache): New function.
10894 (set_register_cache): Call it for each existing regcache.
10896 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10898 * server.h (init_registers): Remove prototype.
10900 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10901 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10902 instead of init_registers ().
10903 * linux-arm-low.c (init_registers_arm): Add prototype.
10904 (init_registers_arm_with_iwmmxt): Likewise.
10905 (the_low_target): Add initializer for arch_setup field.
10906 * linux-cris-low.c (init_registers_cris): Add prototype.
10907 (the_low_target): Add initializer for arch_setup field.
10908 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10909 (the_low_target): Add initializer for arch_setup field.
10910 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10911 (the_low_target): Add initializer for arch_setup field.
10912 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10913 (the_low_target): Add initializer for arch_setup field.
10914 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10915 (the_low_target): Add initializer for arch_setup field.
10916 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10917 (the_low_target): Add initializer for arch_setup field.
10918 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10919 (init_registers_mips64_linux): Likewise.
10920 (the_low_target): Add initializer for arch_setup field.
10921 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10922 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10923 (the_low_target): Add initializer for arch_setup field.
10924 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10925 (init_registers_powerpc_64): Likewise.
10926 (the_low_target): Add initializer for arch_setup field.
10927 * linux-s390-low.c (init_registers_s390): Add prototype.
10928 (init_registers_s390x): Likewise.
10929 (the_low_target): Add initializer for arch_setup field.
10930 * linux-sh-low.c (init_registers_sh): Add prototype.
10931 (the_low_target): Add initializer for arch_setup field.
10932 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10933 (the_low_target): Add initializer for arch_setup field.
10934 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10935 (the_low_target): Add initializer for arch_setup field.
10937 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10938 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10939 instead of init_registers ().
10940 * win32-arm-low.c (init_registers_arm): Add prototype.
10941 (the_low_target): Add initializer for arch_setup field.
10942 * win32-i386-low.c (init_registers_i386): Add prototype.
10943 (the_low_target): Add initializer for arch_setup field.
10945 * spu-low.c (init_registers_spu): Add prototype.
10946 (initialize_low): Call initialie_registers_spu () instead of
10947 initialize_registers ().
10949 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10951 * server.c (handle_v_requests): When handling the vRun and vAttach
10952 packets, if already debugging a process, don't kill it. Return an
10955 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10957 * server.c (handle_query): Correct length check.
10959 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10961 * win32-low.c (do_initial_child_stuff): Add process handle
10962 parameter. Set current_process_handle and current_process_id from the
10963 parameters. Clear globals.
10964 (win32_create_inferior): Don't set current_process_handle and
10965 current_process_id here. Instead pass them on the call to
10966 do_initial_child_stuff.
10967 (win32_attach): Likewise.
10968 (win32_clear_inferiors): New.
10969 (win32_kill): Don't close the current process handle or the
10970 current thread handle here. Instead call win32_clear_inferiors.
10971 (win32_detach): Don't open a new handle to the process. Call
10972 win32_clear_inferiors.
10973 (win32_join): Don't rely on current_process_handle; open a new
10974 handle using the process id.
10975 (win32_wait): Call win32_clear_inferiors when the inferior process
10978 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10980 * server.c (monitor_show_help): Add "exit".
10982 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10984 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10985 (clean): Add reg-xtensa.c.
10986 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10987 * configure.srv (xtensa*-*-linux*) New target.
10988 * linux-xtensa-low.c: New.
10989 * xtensa-xtregs.c: New.
10991 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10993 * hostio.c: Don't include errno.h.
10994 (errno_to_fileio_errno): Move to hostio-errno.
10995 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10996 error number outputting to the target->hostio_last_error callback.
10997 (hostio_packet_error): Use FILEIO_EINVAL directly.
10998 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10999 calls to hostio_error.
11000 * hostio-errno.c: New.
11001 * server.h (hostio_last_error_from_errno): Declare.
11002 * target.h (target_ops): Add hostio_last_error member.
11003 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11004 as hostio_last_error handler.
11005 * spu-low.c (spu_target_ops): Likewise.
11006 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11007 (wince_hostio_last_error): New functions.
11008 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11009 as hostio_last_error handler.
11010 (win32_target_ops) [!_WIN32_WCE]: Register
11011 hostio_last_error_from_errno as hostio_last_error handler.
11012 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11013 (hostio-errno.o): New rule.
11014 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11015 * configure.srv (srv_hostio_err_objs): New variable. Default to
11017 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11018 * configure: Regenerate.
11020 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11022 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11023 (linux_kill, linux_detach): Clean up the process list.
11024 * remote-utils.c (remote_open): Improve port number parsing.
11025 (putpkt_binary, input_interrupt): Only send interrupts if the target
11027 * server.c (extended_protocol): Make static.
11028 (attached): Define earlier.
11029 (exit_requested, response_needed, program_argv): New variables.
11030 (target_running): New.
11031 (start_inferior): Clear attached here.
11032 (attach_inferior): Set attached here.
11033 (require_running): Define.
11034 (handle_query): Use require_running and target_running. Implement
11036 (handle_v_attach, handle_v_run): New.
11037 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11038 (gdbserver_usage): Update.
11039 (main): Redo argument parsing. Handle --debug and --multi. Handle
11040 --attach along with other options or after the port. Save
11041 program_argv. Support no initial program. Resynchronize
11042 communication with GDB after an error. Handle "monitor exit".
11043 Use require_running and target_running. Always allow the extended
11044 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11045 restart in extended mode.
11046 * README: Refer to the GDB manual. Update --attach usage.
11048 2007-12-20 Andreas Schwab <schwab@suse.de>
11050 * linux-low.c (STACK_SIZE): Define.
11051 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11052 (linux_test_for_tracefork): Likewise.
11054 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11056 * linux-low.c (linux_wait_for_event): Update messages. Do not
11057 reinsert auto-delete breakpoints.
11058 * mem-break.c (struct breakpoint): Change return type of handler to
11060 (set_breakpoint_at): Update handler type.
11061 (reinsert_breakpoint_handler): Return 1 instead of calling
11063 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11065 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11066 * mem-break.h (set_breakpoint_at): Update handler type.
11067 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11068 * win32-low.c (auto_delete_breakpoint): New.
11069 (get_child_debug_event): Use it.
11071 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11073 * configure.ac: Check for pread and pwrite.
11074 * hostio.c (handle_pread): Fall back to lseek and read.
11075 (handle_pwrite): Fall back to lseek and write.
11076 * config.in, configure: Regenerated.
11078 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11080 * server.c (myresume): Add own_buf argument.
11081 (main): Update calls.
11083 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11085 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11086 * remote-utils.c (remote_open): Do not call disable_async_io.
11087 (block_async_io): Delete.
11088 (unblock_async_io): Make static.
11089 (initialize_async_io): New.
11090 * server.c (handle_v_cont): Handle async I/O here.
11091 (myresume): Likewise. Move other common resume tasks here...
11092 (main): ... from here. Call initialize_async_io. Disable async
11093 I/O before the main loop.
11094 * server.h (initialize_async_io): Declare.
11095 (block_async_io, unblock_async_io): Delete prototypes.
11096 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11098 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11100 * remote-utils.c (readchar): Allow binary data in received messages.
11102 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11104 * win32-low.c (attaching): New global.
11105 (win32_create_inferior): Clear the `attaching' global.
11106 (win32_attach): Set the `attaching' global.
11107 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11108 attaching. Only set a breakpoint at the entry point if not
11111 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11113 * server.c (main): Don't report dll events on the initial
11114 connection on attaches.
11116 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11118 * server.c (main): Relax numerical bases supported for the pid of
11119 the --attach command line argument.
11121 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11123 * win32-low.c (win32_attach): Call OpenProcess before
11124 DebugActiveProcess, not after. Add last error output to error
11127 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11129 * win32-low.c (win32_get_thread_context)
11130 (win32_set_thread_context): New functions.
11131 (thread_rec): Use win32_get_thread_context.
11132 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11133 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11136 2007-12-03 Leo Zayas
11137 Pedro Alves <pedro_alves@portugalmail.pt>
11139 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11141 (child_add_thread): Minor cleanup.
11142 (child_continue): Resume artificially suspended threads before
11143 calling ContinueDebugEvent.
11144 (suspend_one_thread): New.
11145 (fake_breakpoint_event): New.
11146 (get_child_debug_event): Change return type to int. Check here if
11147 gdb sent an interrupt request. If a soft interrupt was requested,
11148 fake a breakpoint event. Return 0 if there is no event to handle,
11150 (win32_wait): Don't check here if gdb sent an interrupt request.
11151 Ensure there is a valid event to handle.
11152 (win32_request_interrupt): Add soft interruption method as last
11155 2007-12-03 Leo Zayas
11156 Pedro Alves <pedro_alves@portugalmail.pt>
11158 * win32-low.h (win32_thread_info): Add descriptions to the
11159 structure members. Replace `suspend_count' counter by a
11161 * win32-low.c (thread_rec): Update condition of when to get the
11162 context from the inferior. Rely on ContextFlags being set if it
11163 has already been retrieved. Only suspend the inferior thread if
11164 we haven't already. Warn if that fails.
11165 (continue_one_thread): s/suspend_count/suspended/. Only call
11166 ResumeThread once. Warn if that fails.
11168 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11170 * win32-low.c (win32_wait): Don't read from the inferior when it
11171 has already exited.
11173 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11175 * Makefile.in (win32_low_h): New variable.
11176 (win32-low.o): Add dependency on $(win32_low_h).
11177 (win32-arm-low.o, win32-i386-low.o): New rules.
11179 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11181 * hostio.c: Correct copyright year.
11183 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11185 * Makefile.in (OBS): Add hostio.o.
11186 (hostio.o): New rule.
11187 * server.h (handle_vFile): Declare.
11188 * hostio.c: New file.
11189 * server.c (handle_v_requests): Take packet_len and new_packet_len
11190 for binary packets. Call handle_vFile.
11191 (main): Update call to handle_v_requests.
11193 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11195 * linux-low.c: Include <sched.h>.
11197 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11199 * linux-low.c (linux_tracefork_grandchild): New.
11200 (linux_tracefork_child): Use clone.
11201 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11203 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11205 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11207 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11209 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11211 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11213 * inferiors.c (change_inferior_id): Delete.
11214 (add_pid_to_list, pull_pid_from_list): New.
11215 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11216 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11217 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11218 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11219 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11220 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11221 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11222 (using_threads): Always set to 1.
11223 (handle_extended_wait): New.
11224 (add_process): Do not set TID.
11225 (linux_create_inferior): Set must_set_ptrace_flags.
11226 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11227 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11228 (linux_thread_alive): Rename TID argument to LWPID.
11229 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11230 (linux_wait_for_event): Do not use TID or check using_threads. Update
11231 call to dead_thread_notify. Call handle_extended_wait.
11232 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11233 (send_sigstop): Delete sigstop_sent.
11234 (wait_for_sigstop): Avoid TID.
11235 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11236 (linux_test_for_tracefork): New.
11237 (linux_lookup_signals): Use thread_db_active and
11238 linux_supports_tracefork_flag.
11239 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11240 * linux-low.h (get_process_thread): Avoid TID.
11241 (struct process_ifo): Move thread_known and tid to the end. Remove
11243 (linux_attach_lwp, thread_db_init): Update prototypes.
11244 * server.h (change_inferior_id): Delete prototype.
11245 (add_pid_to_list, pull_pid_from_list): New prototypes.
11246 * thread-db.c (thread_db_use_events): New.
11247 (find_first_thread): Rename to...
11248 (find_one_thread): ...this. Update callers and messages. Do not
11249 call fatal. Check thread_db_use_events. Do not call
11250 change_inferior_id or new_thread_notify.
11251 (maybe_attach_thread): Update. Do not call new_thread_notify.
11252 (thread_db_init): Set thread_db_use_events. Check use_events.
11253 * utils.c (fatal, warning): Correct message prefix.
11255 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11257 * Makefile.in (clean): Remove new files.
11258 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11259 (powerpc-64.o, powerpc-64.c): New rules.
11260 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11261 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11263 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11265 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11266 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11267 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11268 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11269 (target_regsets): Add AltiVec and SPE register sets.
11270 * configure.ac: Check for AltiVec and SPE.
11271 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11272 (ppc_fill_vrregset, ppc_store_vrregset): New.
11273 (target_regsets): Add AltiVec register set.
11274 * configure: Regenerated.
11276 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11278 * linux-low.c (O_LARGEFILE): Define.
11279 (linux_read_memory): Use /proc/PID/mem.
11280 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11281 * configure, config.in: Regenerated.
11283 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11285 * linux-low.c (linux_wait_for_event): Do not pass signals while
11288 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11290 * win32-low.c (create_process): New.
11291 (win32_create_inferior): Use create_process instead of
11292 CreateProcess. If create_process failed retry appending an ".exe"
11293 suffix. Store the GetLastError result immediatelly after
11294 create_process calls and use it on the call to error.
11296 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11298 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11300 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11302 * configure.ac: Switch license to GPLv3.
11304 2007-08-01 Michael Snyder <msnyder@access-company.com>
11306 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11308 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11310 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11312 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11313 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11314 CloseToolhelp32Snapshot.
11315 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11316 CloseToolhelp32Snapshot.
11318 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11320 * server.c (main): Check for inferior exit before main loop.
11322 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11324 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11325 instead of on tmp_desc.
11327 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11328 Daniel Jacobowitz <dan@codesourcery.com>
11330 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11331 (add_thread): Minor cleanups.
11332 (clear_inferiors): Move lower in the file. Clear the DLL
11334 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11335 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11336 (xml_escape_text): New.
11337 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11339 (handle_v_cont): Report errors.
11340 (gdbserver_version): Update.
11341 (main): Correct size of own_buf. Do not report initial DLL events.
11342 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11343 (unloaded_dll, xml_escape_text): New.
11344 * win32-low.c (enum target_waitkind): Update comments.
11345 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11346 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11347 (win32_EnumProcessModules, win32_GetModuleInformation)
11348 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11349 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11350 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11351 (win32_Module32First, win32_Module32Next, load_toolhelp)
11352 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11353 (get_child_debug_event): Handle DLL events.
11354 (win32_wait): Likewise.
11356 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11358 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11359 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11361 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11363 * win32-low.c (handle_output_debug_string): Ignore event if not
11366 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11368 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11370 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11372 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11374 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11376 * inferiors.c (change_inferior_id): Add comment.
11377 * linux-low.c (check_removed_breakpoint): Add an early
11378 prototype. Improve debug output.
11379 (linux_attach): Doc update.
11380 (linux_detach_one_process, linux_detach): Clean up before releasing
11382 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11383 * linux-low.h (struct process_info): Doc improvement.
11384 * mem-break.c (delete_all_breakpoints): New.
11385 * mem-break.h (delete_all_breakpoints): New prototype.
11386 * thread-db.c (find_first_thread): New.
11387 (thread_db_create_event): Call it instead of
11388 thread_db_find_new_threads. Clean up unused variables.
11389 (maybe_attach_thread): Remove first thread handling.
11390 (thread_db_find_new_threads): Use find_first_thread.
11391 (thread_db_get_tls_address): Likewise.
11393 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11395 * thread-db.c (thread_db_find_new_threads): Add prototype.
11396 (thread_db_create_event): Check for the main thread before adding
11398 (maybe_attach_thread): Only enable event reporting if TID == 0.
11399 (thread_db_get_tls_address): Check for new threads.
11401 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11403 * linux-low.c (linux_create_inferior): Try execv before execvp.
11404 * spu-low.c (spu_create_inferior): Likewise.
11406 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11408 * linux-low.c (linux_create_inferior): Change execv to execvp.
11409 * spu-low.c (spu_create_inferior): Likewies.
11411 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11413 * Makefile.in (clean): Clean new files instead of deleted ones.
11414 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11415 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11417 * configure.srv: Specify XML files and new regformats for MIPS and
11419 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11420 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11421 an entry for the restart register.
11422 (mips_cannot_fetch_register, mips_cannot_store_register)
11423 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11424 register names to match the XML descriptions.
11425 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11426 restart register instead of $0.
11428 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11429 Markus Deuling <deuling@de.ibm.com>
11431 * remote-utils.c (decode_xfer_write): New function.
11432 * server.h (decode_xfer_write): Add prototype.
11433 * server.c (handle_query): Add PACKET_LEN argument. Support
11434 qXfer:spu:read and qXfer:spu:write packets.
11435 (main): Pass packet_len to handle_query.
11436 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11437 * target.h (target_ops): Add qxfer_spu.
11439 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11441 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11442 accessing non-seekable spufs files.
11444 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11446 * server.c (handle_query): Add reply for qC packet.
11448 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11449 Leo Zayas <lerele@champenstudios@com>
11451 * server.h (check_remote_input_interrupt_request): New function.
11452 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11453 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11454 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11455 (check_remote_input_interrupt_request): New function.
11456 * server.h (check_remote_input_interrupt_request): Declare.
11457 * win32-low.c (winapi_DebugBreakProcess,
11458 winapi_GenerateConsoleCtrlEvent): New typedefs.
11459 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11461 (win32_wait): Check for remote interrupt request
11462 with check_remote_input_interrupt_request.
11463 (win32_request_interrupt): New function.
11464 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11466 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11468 * win32-low.c (debug_registers_changed,
11469 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11470 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11471 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11472 (thread_rec): Get context using the low target.
11473 (child_add_thread): Call thread_added on the low target,
11474 which does the same thing.
11476 (do_initial_child_stuff): Remove debug registers references.
11477 Set context using the low target. Resume threads after
11478 setting the contexts.
11479 (child_continue): Remove dead variable. Remove debug
11480 registers references.
11481 (child_fetch_inferior_registers): Go through the low target.
11482 (do_child_store_inferior_registers): Remove.
11483 (child_store_inferior_registers): Go through the low target.
11484 (win32_resume): Remove debug registers references.
11485 Set context using the low target.
11486 (handle_exception): Change return type to void. Don't record
11487 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11488 first chance exception.
11489 (get_child_debug_event): Change return type to void. Remove
11490 goto loop. Always return after waiting for debug event.
11491 (win32_wait): Convert to switch statement. Handle spurious
11494 * win32-i386-low.c (debug_registers_changed,
11495 debug_registers_used): New.
11496 (initial_stuff): Rename to ...
11497 (i386_initial_stuff): ... this. Clear debug registers
11499 (store_debug_registers): Delete.
11500 (i386_get_thread_context): New.
11501 (load_debug_registers): Delete.
11502 (i386_set_thread_context): New.
11503 (i386_thread_added): New.
11504 (single_step): Rename to ...
11505 (i386_single_step): ... this.
11506 (do_fetch_inferior_registers): Rename to ...
11507 (i386_fetch_inferior_register): ... this.
11508 (i386_store_inferior_register): New.
11509 (the_low_target): Adapt to new interface.
11511 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11512 (arm_get_thread_context): New.
11513 (arm_set_thread_context): New.
11515 (do_fetch_inferior_registers): Rename to ...
11516 (arm_fetch_inferior_register): ... this.
11517 (arm_store_inferior_register): New.
11518 (arm_wince_breakpoint): Reimplement as unsigned long.
11519 (arm_wince_breakpoint_len): Define.
11520 (the_low_target): Adapt to new interface.
11522 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11523 load_debug_registers. Add get_thread_context, set_thread_context,
11524 thread_added and store_inferior_register. Rename
11525 fetch_inferior_registers to fetch_inferior_register.
11526 (regptr): Remove declaration.
11528 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11530 * linux-low.c (linux_detach): Change return type to int. Return 0.
11531 * spu-low.c (spu_detach): Likewise.
11533 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11535 * target.h (target_ops): Change return type of detach to int.
11537 (join_inferior): New.
11538 * server.c (main): Don't skip detach support on mingw32.
11539 If the inferior doesn't support detaching return error.
11540 Call join_inferior instead of using waitpid.
11541 * linux-low.c (linux_join): New.
11542 (linux_target_op): Add linux_join.
11543 * spu-low.c (spu_join): New.
11544 (spu_target_ops): Add spu_join.
11545 * win32-low.c (win32_detach): Adapt to new interface.
11546 Reopen current_process_handle before detaching. Issue a child
11547 resume before detaching.
11549 (win32_target_op): Add win32_join.
11551 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11553 * win32-low.c (win32-attach): Fix return value.
11554 * target.h (target_ops): Describe ATTACH return values.
11556 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11558 * win32-low.c (GETPROCADDRESS): Define.
11559 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11560 (winapi_DebugSetProcessKillOnExit): Likewise.
11561 (win32_create_inferior): Force usage of ansi CreateProcessA.
11562 (win32_attach): Use GETPROCADDRESS.
11563 (win32_detach): Likewise.
11565 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11567 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11569 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11571 * win32-low.c: Commit leftover changes from 2007-03-29.
11573 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11575 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11576 fields short instead of int. Add explicit padding.
11577 (i387_cache_to_fsave): Remove unnecessary casts.
11578 (i387_fsave_to_cache): Doc fix.
11579 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11581 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11583 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11584 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11586 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11588 * configure.srv (arm*-*-mingw32ce*): Move near the other
11591 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11593 * configure.ac: Add errno checking.
11594 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11595 sys/file.h and malloc.h.
11596 (AC_CHECK_DECLS): Add perror.
11597 (srv_mingwce): Handle.
11598 * configure.srv (i[34567]86-*-cygwin*): Add
11599 win32-i386-low.o to srv_tgtobj.
11600 (i[34567]86-*-mingw*): Likewise.
11601 (arm*-*-mingw32ce*): Add case.
11602 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11603 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11604 [__MINGW32CE__] (strerror): New function.
11605 [__MINGW32CE__] (errno): Define to GetLastError.
11606 [__MINGW32CE__] (COUNTOF): New macro.
11607 (remote_open): Remove extra close call.
11608 * mem-break.c (delete_breakpoint_at): New function.
11609 * mem-break.h (delete_breakpoint_at): Declare.
11610 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11611 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11612 [USE_WIN32API] (read, write): Add char* casts.
11613 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11614 * server.h: Include wincecompat.h on Windows CE.
11615 [HAVE_ERRNO_H]: Check.
11616 (perror): Declare if not declared.
11617 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11618 (perror_with_name): Remove errno declaration.
11619 * wincecompat.h: New.
11620 * wincecompat.c: New.
11621 * win32-low.h: New.
11622 * win32-arm-low.c: New.
11623 * win32-i386-low.c: New.
11624 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11625 (OUTMSG2): Make it safe.
11627 (COUNTOF): New macro.
11628 (NUM_REGS): Get it from the low target.
11629 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11630 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11631 (thread_rec): Let low target handle debug registers.
11632 (child_add_thread): Likewise.
11633 (child_init_thread_list): Likewise.
11634 (continue_one_thread): Likewise.
11636 (do_child_fetch_inferior_registers): Move to ...
11637 * win32-i386-low.c: ... here, and rename to ...
11638 (do_fetch_inferior_registers): ... this.
11639 * win32-low.c (child_fetch_inferior_registers):
11640 Go through the low target.
11641 (do_child_store_inferior_registers): Use regptr.
11642 (strwinerror): New function.
11643 (win32_create_inferior): Handle Windows CE.
11644 Use strwinerror instead of strerror on Windows error
11645 codes. Add program to the error output.
11646 Don't close the main thread handle on Windows CE.
11647 (win32_attach): Use coredll.dll on Windows CE.
11648 (win32_kill): Close current process and current
11650 (win32_detach): Use coredll.dll on Windows CE.
11651 (win32_resume): Let low target handle debug registers, and
11653 (handle_exception): Add/Remove initial breakpoint. Avoid
11654 non-existant WSTOPSIG on Windows CE.
11655 (win32_read_inferior_memory): Cast to remove warning.
11656 (win32_arch_string): Go through the low target.
11657 (initialize_low): Call set_breakpoint_data with the low
11658 target's breakpoint.
11659 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11660 FOP_REGNUM, mappings): Move to ...
11661 * win32-i386-low.c: ... here.
11662 * win32-low.c (win32_thread_info): Move to ...
11663 * win32-low.h: ... here.
11664 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11665 win32-arm-low.c and wincecompat.c.
11666 (all:): Add $EXEEXT.
11667 (install-only:): Likewise.
11668 (gdbserver:): Likewise.
11669 (gdbreplay:): Likewise.
11670 * config.in: Regenerate.
11671 * configure: Regenerate.
11673 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11675 * win32-low.c: Rename typedef thread_info to
11676 win32_thread_info throughout.
11678 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11680 * win32-i386-low.c: Rename to ...
11681 * win32-low.c: ... this.
11682 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11683 * Makefile.in: Likewise.
11685 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11687 * remote-utils.c (monitor_output): Constify msg parameter.
11688 * server.h (monitor_output): Likewise.
11689 * win32-i386-low.c (handle_output_debug_string): New.
11690 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11691 handle_output_debug_string.
11692 (get_child_debug_event): Likewise.
11694 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11696 * server.c (main): Correct strtoul check.
11698 2007-03-27 Jon Ringle <jon@ringle.org>
11700 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11702 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11704 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11706 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11708 * terminal.h: Check HAVE_SGTTY_H.
11710 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11712 * remote-utils.c (remote_open): Print out the assigned port number.
11714 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11716 * remote-utils.c (monitor_output): New function.
11717 * server.c (debug_threads): Define here.
11718 (monitor_show_help): New function.
11719 (handle_query): Handle qRcmd.
11720 (main): Do not handle 'd' packet.
11721 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11722 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11725 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11727 * Makefile.in (EXEEXT): New.
11728 (clean): Use $(EXEEXT).
11730 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11732 * target.h (target_ops): Rename send_signal to request_interrupt,
11733 and remove enum target_signal parameter.
11734 * linux-low.c (linux_request_interrupt): Rename from
11735 linux_send_signal, and always send SIGINT.
11736 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11737 and always send SIGINT.
11738 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11740 (input_interrupt): Likewise.
11742 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11744 * server.c (get_features_xml): Check if target implemented
11746 * win32-i386-low.c (win32_arch_string): New.
11747 (win32_target_ops): Add win32_arch_string as arch_string member.
11749 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11751 * spu-low.c (spu_arch_string): New.
11752 (spu_target_ops): Add spu_arch_string.
11754 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11756 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11757 * configure.ac: Do not check for terminal.h.
11758 * configure, config.in: Regenerated.
11760 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11762 * Makefile.in (OBS): Add $(XML_BUILTIN).
11763 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11765 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11766 (arm-with-iwmmxt.c): New.
11767 * config.in, configure: Regenerate.
11768 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11769 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11770 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11771 (arm*-*-linux*): Add iWMMXt and regset support.
11772 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11773 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11774 (arm_store_wmmxregset, target_regsets): New.
11775 * server.c (get_features_xml): Take annex argument. Check builtin
11777 (handle_query): Handle multiple annexes.
11779 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11781 * remote-utils.c [USE_WIN32API] (read, write): Define.
11782 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11785 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11787 * linux-i386-low.c (the_low_target): Set arch_string.
11788 * linux-x86-64-low.c (the_low_target): Likewise.
11789 * linux-low.c (linux_arch_string): New.
11790 (linux_target_ops): Add it.
11791 * linux-low.h (struct linux_target_ops): Add arch_string.
11792 * server.c (write_qxfer_response): Use const void * for DATA.
11793 (get_features_xml): New.
11794 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11795 * target.h (struct target_ops): Add arch_string method.
11797 2007-01-03 Denis Pilat <denis.pilat@st.com>
11798 Daniel Jacobowitz <dan@codesourcery.com>
11800 * linux-low.c (linux_kill): Handle being called with no threads.
11801 * win32-i386-low.c (win32_kill): Likewise.
11802 (get_child_debug_event): Clear current_process_handle.
11804 2006-12-30 Denis PILAT <denis.pilat@st.com>
11805 Daniel Jacobowitz <dan@codesourcery.com>
11807 * remote-utils.c (remote_open): Check the type of specified
11808 serial port devices before opening them.
11809 * server.c (main): Kill the inferior if an error occurs during
11810 the first remote_open.
11812 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11814 * README: Update supported targets.
11816 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11818 * Makefile.in (clean): Remove reg-mips64.c.
11819 (reg-mips64.c, reg-mips64.o): New rules.
11820 * configure.srv: Handle mips64. Include regset support for mips.
11821 * linux-mips-low.c (union mips_register): New.
11822 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11823 (mips_breakpoint, mips_breakpoint_at): Use int.
11824 (mips_collect_register, mips_supply_register)
11825 (mips_collect_register_32bit, mips_supply_register_32bit)
11826 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11827 (mips_store_fpregset, target_regsets): New.
11828 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11830 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11832 * configure.srv: Add target "spu*-*-*".
11833 * Makefile.in (clean): Remove reg-spu.c.
11834 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11835 * spu-low.c: New file.
11837 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11839 * configure.ac: Correct td_thr_tls_get_addr test.
11840 * configure: Regenerated.
11842 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11844 * linux-low.c (linux_wait_for_event): Reformat. Use the
11845 pass_signals array.
11846 * remote-utils.c (decode_address_to_semicolon): New.
11847 * server.c (pass_signals, handle_general_set): New.
11848 (handle_query): Mention QPassSignals for qSupported.
11849 (main): Call handle_general_set.
11850 * server.h (pass_signals, decode_address_to_semicolon): New.
11852 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11854 * server.c (handle_query): Correct error handling for read_auxv.
11856 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11858 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11859 and srv_linux_thread_db to yes.
11860 * linux-s390-low.c (s390_fill_gregset): New function.
11861 (target_regsets): Define data structure.
11863 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11865 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11866 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11867 * config.in, configure: Regenerated.
11868 * inferiors.c (gdb_id_to_thread): New function.
11869 (gdb_id_to_thread_id): Use it.
11870 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11871 * linux-low.h (struct process_info): Add th member.
11872 (thread_db_get_tls_address): New prototype.
11873 * remote-utils.c (decode_address): Make non-static.
11874 * server.c (handle_query): Handle qGetTLSAddr.
11875 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11876 * target.h (struct target_ops): Add get_tls_address.
11877 * thread-db.c (maybe_attach_thread): Save the thread handle.
11878 (thread_db_get_tls_address): New.
11880 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11882 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11883 (linux_resume_one_process): Take a siginfo_t *. Update all
11884 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11885 (struct pending_signals): Add a siginfo_t.
11886 (linux_wait_for_process): Always set last_status.
11887 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11888 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11889 * linux-low.h (struct process_info): Add last_status.
11891 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11893 * remote-utils.c (try_rle): New function.
11894 (putpkt_binary): Use it.
11896 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11898 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11899 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11900 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11901 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11902 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11905 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11907 * server.c (terminal_fd): New variable.
11908 (old_foreground_pgrp): Likewise.
11909 (restore_old_foreground_pgrp): New function.
11910 (start_inferior): Record the terminal file descriptor in terminal_fd
11911 and its original foreground group in old_foreground_pgrp. Register
11912 restore_old_foreground_pgrp with atexit().
11914 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11916 * server.c (handle_query): Correct qPart to qXfer.
11918 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11920 * configure.ac: Check for more headers which are missing on
11921 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11922 * configure.srv: Add Cygwin and mingw32.
11923 * remote-utils.c: Don't include headers unconditionally which
11924 are missing on mingw32. Include <winsock.h> for mingw32.
11925 (remote_open): Adjust for mingw32 support. Flush
11926 standard error after writing to it.
11927 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11928 (unblock_async_io, enable_async_io, disable_async_io)
11929 (readchar, getpkt): Update for Winsock support.
11930 (prepare_resume_reply): Expect a protocol signal number.
11931 * server.c: Disable <sys/wait.h> on mingw32.
11932 (start_inferior): Adjust for mingw32 support. Flush
11933 standard error after writing to it.
11934 (attach_inferior): Likewise. Use protocol signal
11936 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11938 * win32-i386-low.c: New file.
11939 * Makefile.in (XM_CLIBS): Set.
11940 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11941 (win32-i386-low.o): New dependency rule.
11942 * linux-low.c (linux_wait): Use target signal numbers.
11943 * target.h (struct target_ops): Doc fix.
11944 * server.h (target_signal_to_name): New prototype.
11945 * gdbreplay.c: Don't include headers unconditionally which
11946 are missing on mingw32. Include <winsock.h> for mingw32.
11947 (remote_close, remote_open): Adjust for Winsock support.
11948 * configure, config.in: Regenerated.
11950 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11952 * server.c (decode_xfer_read, write_qxfer_response): New.
11953 (handle_query): Take a packet length argument. Handle
11954 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11955 the qSupported response.
11956 (main): Update call to handle_query.
11958 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11960 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11961 (putpkt_binary): Renamed from putpkt and adjusted for binary
11963 (putpkt): New wrapper for putpkt_binary.
11964 (readchar): Don't mask off the high bit.
11965 (decode_X_packet): New function.
11966 * server.c (main): Call putpkt_binary if a handler sets the packet
11967 length. Save the length of the incoming packet. Handle 'X'.
11968 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11970 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11972 * server.c (handle_query): Handle qSupported.
11974 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11976 * remote-utils.c (all_symbols_looked_up): New variable.
11977 (look_up_one_symbol): Check it.
11978 * server.h (look_up_one_symbol): New declaration.
11979 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11981 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11983 * Makefile.in (linux-arm-low.o): Update dependencies.
11984 * linux-arm-low.c: Include "gdb_proc_service.h".
11985 (PTRACE_GET_THREAD_AREA): Define.
11986 (ps_get_thread_area): New function.
11988 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11990 * configure.srv (m68k*-*-uclinux*): New target.
11991 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11992 (linux_resume_one_process): Remove extraneous cast.
11993 (linux_read_offsets): New.
11994 (linux_target_op): Add linux_read_offsets on mmuless systems.
11995 * server.c (handle_query): Add qOffsets logic.
11996 * target.h (struct target_ops): Add read_offsets.
11998 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12000 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12001 (PTRACE_GET_THREAD_AREA): Define.
12002 (ps_get_thread_area): New function.
12003 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12004 (linux-x86-64-low.o): Update.
12006 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12008 * configure.ac: Remove checks for prfpregset_t.
12009 * gdb_proc_service.h: New file.
12010 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12011 new "gdb_proc_service.h".
12012 * proc-service.c: Likewise.
12013 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12014 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12015 * Makefile.in (gdb_proc_service_h): Updated.
12016 * configure, config.in: Regenerated.
12018 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12020 * remote-utils.c (prepare_resume_reply): Move declaration
12021 of gdb_id_from_wait to the top of the block.
12023 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12025 * linux-low.c (regsets_store_inferior_registers): Read the regset
12026 from the target before filling it.
12028 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12030 * server.c (attach_inferior): Return SIGTRAP for a successful
12033 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12035 * Makefile.in (OBS): Add version.o.
12036 (STAGESTUFF): Delete.
12037 (version.o): Add dependencies.
12038 (version.c): Replace rule.
12039 (clean): Remove version.c.
12040 * server.c (gdbserver_version): New.
12041 (gdbserver_usage): Use printf.
12042 (main): Handle --version and --help.
12043 * server.h (version, host_name): Add declarations.
12045 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12057 * linux-x86-64-low.c:
12059 * linux-s390-low.c:
12060 * linux-ppc64-low.c:
12062 * linux-mips-low.c:
12063 * linux-m68k-low.c:
12064 * linux-m32r-low.c:
12067 * linux-ia64-low.c:
12068 * linux-i386-low.c:
12069 * linux-crisv32-low.c:
12081 * gdbserver.1: Add (C) after Copyright. Update the FSF
12084 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12086 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12087 (arm_breakpoint_at): Recognize both breakpoints.
12088 (the_low_target): Use the correct breakpoint instruction.
12090 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12092 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12093 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12094 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12095 (the_low_target): Update.
12097 2005-10-25 Andreas Schwab <schwab@suse.de>
12099 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12101 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12102 (ia64_num_regs): Reduce to 462.
12104 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12106 * acinclude.m4: Correct quoting.
12107 * aclocal.m4: Regenerated.
12109 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12110 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12111 (thread_db_init): Call thread_db_err_str.
12112 * configure.ac: Check for TD_VERSION.
12113 * config.in, configure: Regenerated.
12115 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12117 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12119 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12121 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12122 is not available. Define HAVE_PTRACE_GETREGS if it is.
12123 * config.in, configure: Regenerated.
12124 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12125 * linux-i386-low.c, linux-m68k-low.c: Update to use
12126 HAVE_PTRACE_GETREGS.
12127 * linux-low.c (regsets_fetch_inferior_registers)
12128 (regsets_store_inferior_registers): Only return 0 if we processed
12130 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12131 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12133 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12135 * inferiors.c (struct thread_info): Add gdb_id.
12136 (add_thread): Add gdb_id argument.
12137 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12138 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12139 calls to add_thread.
12140 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12141 * server.c (handle_query): Use thread_to_gdb_id.
12142 (handle_v_cont, main): Use gdb_id_to_thread_id.
12143 * server.h (add_thread): Update prototype.
12144 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12147 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12149 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12150 left-padded registers.
12151 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12152 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12154 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12156 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12157 * configure: Regenerate.
12158 * config.in: Regenerate.
12159 * server.h (NEED_DECLARATION_STRERROR):
12160 Replace with !HAVE_DECL_STRERROR.
12162 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12164 * linux-low.c (linux_wait, linux_send_signal): Don't test
12165 an unsigned long variable for > 0 if it could be MAX_ULONG.
12166 * server.c (myresume): Likewise.
12167 * target.c (set_desired_inferior): Likewise.
12169 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12171 * configure.ac: Simplify and improve check for socklen_t.
12172 * configure, config.in: Regenerate.
12174 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12176 * acconfig.h: Remove.
12177 * configure.ac: Add a test for socklen_t. Use three-argument
12178 AC_DEFINE throughout.
12179 * config.in: Regenerated using autoheader 2.59.
12180 * configure: Regenerated.
12182 * gdbreplay.c (socklen_t): Provide a default.
12183 (remote_open): Use socklen_t.
12184 * remote-utils.c (socklen_t): Provide a default.
12185 (remote_open): Use socklen_t.
12186 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12189 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12191 * linux-low.c (linux_read_memory, linux_write_memory)
12192 (linux_read_auxv): Likewise.
12193 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12194 (check_mem_write): Likewise.
12195 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12197 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12198 (registers_from_string, register_data): Likewise.
12199 * server.c (handle_query, main): Likewise.
12200 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12201 (decode_M_packet): Likewise.
12202 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12203 * target.h (struct target_ops): Update read_memory, write_memory,
12205 (read_inferior_memory, write_inferior_memory): Update.
12206 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12207 to unsigned char *.
12208 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12209 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12210 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12211 linux-s390-low.c, linux-sh-low.c: Update for changes in
12212 read_inferior_memory and the_low_target->breakpoint.
12214 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12216 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12217 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12218 * configure.srv: Add powerpc64-*-linux*.
12219 * linux-ppc64-low.c: New file.
12221 2005-05-23 Orjan Friberg <orjanf@axis.com>
12223 * linux-cris-low.c: New file with support for CRIS.
12224 * linux-crisv32-low.c: Ditto for CRISv32.
12225 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12226 (clean): Add reg-cris.c and reg-crisv32.c.
12227 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12228 reg-crisv32.o, and reg-crisv32.c to make rules.
12229 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12230 recognized targets.
12232 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12234 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12235 of sizeof (PTRACE_XFER_TYPE).
12236 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12238 2005-05-12 Orjan Friberg <orjanf@axis.com>
12240 * target.h (struct target_ops): Add insert_watchpoint,
12241 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12242 pointers for hardware watchpoint support.
12243 * linux-low.h (struct linux_target_ops): Ditto.
12244 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12245 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12246 to linux_target_ops.
12247 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12249 * server.c (main): Recognize 'Z' and 'z' packets.
12251 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12253 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12254 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12255 (the_low_target): Add new members.
12257 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12259 * proc-service.c (ps_lgetregs): Search all_processes instead of
12262 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12264 * server.c (start_inferior): Change return type to int.
12265 (attach_inferior): Change sigptr to int *.
12266 (handle_v_cont, handle_v_requests): Change signal to int *.
12267 (main): Change signal to int.
12269 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12271 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12272 * configure.srv: Add m32r*-*-linux*.
12273 * linux-m32r-low.c: New file.
12275 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12277 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12279 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12281 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12282 Take unsigned long arguments for PIDs.
12283 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12284 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12285 (wait_for_sigstop, linux_resume_one_process)
12286 (regsets_fetch_inferior_registers, linux_send_signal)
12287 (linux_read_auxv): Likewise. Update the types of variables holding
12288 PIDs. Update format string specifiers.
12289 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12290 * remote-utils.c (prepare_resume_reply): Likewise.
12291 * server.c (cont_thread, general_thread, step_thread)
12292 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12294 (handle_query): Update format specifiers.
12295 (handle_v_cont, main): Use strtoul for thread IDs.
12296 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12297 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12298 (general_thread, step_thread, thread_from_wait)
12299 (old_thread_from_wait): Update.
12300 * target.h (struct thread_resume): Use unsigned long for THREAD.
12301 (struct target_ops): Use unsigned long for arguments to attach and
12304 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12306 * acinclude.m4: Include bfd/bfd.m4 directly.
12307 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12308 <agriffis@toolchain.org>.
12309 * aclocal.m4, configure: Regenerated.
12311 2005-01-07 Andrew Cagney <cagney@gnu.org>
12313 * configure.ac: Rename configure.in, require autoconf 2.59.
12314 * configure: Re-generate.
12316 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12318 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12319 LIBS when finished.
12320 * aclocal.m4: Regenerated.
12321 * configure: Regenerated.
12323 2004-11-21 Andreas Schwab <schwab@suse.de>
12325 * linux-m68k-low.c (m68k_num_gregs): Define.
12326 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12327 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12328 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12329 (m68k_breakpoint_at): New. Add to the_low_target.
12331 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12332 srv_linux_thread_db to yes.
12334 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12336 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12337 (ARCH_SET_FS): Likewise.
12338 (ARCH_GET_FS): Likewise.
12339 (ARCH_GET_GS): Likewise.
12341 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12343 * linux-i386-low.c (ps_get_thread_area): New.
12344 * linux-x86-64-low.c (ps_get_thread_area): New.
12345 * linux-low.c: Include <sys/syscall.h>.
12346 (linux_kill_one_process): Don't kill the first thread here.
12347 (linux_kill): Kill the first thread here.
12348 (kill_lwp): New function.
12349 (send_sigstop, linux_send_signal): Use it.
12350 * proc-service.c: Clean up #ifdefs.
12351 (fpregset_info): Delete.
12352 (ps_lgetregs): Update and enable implementation.
12353 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12355 * remote-utils.c (struct sym_cache, symbol_cache): New.
12356 (input_interrupt): Print a clearer message.
12357 (async_io_enabled): New variable.
12358 (enable_async_io, disable_async_io): Use it. Update comments.
12359 (look_up_one_symbol): Use the symbol cache.
12360 * thread-db.c (thread_db_look_up_symbols): New function.
12361 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12363 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12365 * configure.in: Test for -rdynamic.
12366 * configure: Regenerated.
12367 * Makefile (INTERNAL_LDFLAGS): New.
12368 (gdbserver, gdbreplay): Use it.
12370 2004-09-02 Andrew Cagney <cagney@gnu.org>
12372 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12374 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12376 * linux-low.c (linux_wait): Clear all_processes list also.
12378 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12380 * linux-low.c: Include <errno.h>. Remove extern declaration of
12383 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12385 * gdbreplay.c, server.h, utils.c: Update copyright years.
12387 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12389 * server.c (main): Print child status or termination signal from
12390 variable 'signal', not 'sig'.
12392 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12394 * linux-low.c (linux_read_memory): Change return type to
12395 int. Check for and return error from ptrace().
12396 * target.c (read_inferior_memory): Change return type to int. Pass
12397 back return status from the_target->read_memory().
12398 * target.h (struct target_ops): Adapt *read_memory() prototype.
12400 (read_inferior_memory): Adapt prototype.
12401 * server.c (main): Return an error packet if
12402 read_inferior_memory() returns an error.
12404 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12406 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12407 Unify with other clean targets.
12409 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12411 * server.c (handle_v_cont): Call set_desired_inferior.
12413 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12415 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12417 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12419 * linux-low.c (linux_wait): Unblock async I/O.
12420 (linux_resume): Block and enable async I/O.
12421 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12422 * server.h (block_async_io, unblock_async_io): Add prototypes.
12424 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12426 * remote-utils.c (remote_open): Print a status notice after
12427 opening a TCP port.
12428 * server.c (attach_inferior): Print a status notice after
12431 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12433 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12435 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12437 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12439 * server.c, target.h: Update copyright years.
12441 2004-02-25 Roland McGrath <roland@redhat.com>
12443 * target.h (struct target_ops): New member `read_auxv'.
12444 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12445 * linux-low.c (linux_read_auxv): New function.
12446 (linux_target_ops): Initialize `read_auxv' member to that.
12448 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12450 Committed by Jim Blandy <jimb@redhat.com>.
12452 * linux-s390-low.c (s390_num_regs): Update.
12453 (s390_regmap): Remove control registers. Use __s390x__ predefine
12454 instead of GPR_SIZE to distiguish s390 and s390x targets.
12456 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12458 * linux-low.c: Update copyright year.
12459 (check_removed_breakpoint): Clear pending_is_breakpoint.
12460 (linux_set_resume_request, linux_queue_one_thread)
12461 (resume_status_pending_p): New functions.
12462 (linux_continue_one_thread): Use process->resume.
12463 (linux_resume): Only resume threads if there are no pending events.
12464 * linux-low.h (struct process_info): Add resume request
12467 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12469 * regcache.c (new_register_cache): Clear the allocated register
12470 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12472 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12474 * linux-low.c (linux_resume): Take a struct thread_resume *
12476 (linux_wait): Update call.
12477 (resume_ptr): New static variable.
12478 (linux_continue_one_thread): Renamed from
12479 linux_continue_one_process. Use resume_ptr.
12480 (linux_resume): Use linux_continue_one_thread.
12481 * server.c (handle_v_cont, handle_v_requests): New functions.
12482 (myresume): New function.
12483 (main): Handle 'v' case.
12484 * target.h (struct thread_resume): New type.
12485 (struct target_ops): Change argument of "resume" to struct
12487 (myresume): Delete macro.
12489 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12491 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12492 (uninstall): Support DESTDIR.
12494 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12496 * configure.srv: Add xscale*linux copy of arm*linux entry.
12498 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12500 * linux-arm-low.c (arm_reinsert_addr): New function.
12501 (the_low_target): Add arm_reinsert_addr.
12503 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12505 * mem-break.c: Remove whitespace at end of file.
12507 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12509 * configure.in: Check whether we need to prototype strerror.
12510 * server.h: Optionally prototype strerror.
12511 * gdbreplay.c (perror_with_name): Use strerror.
12512 * linux-low.c (linux_attach_lwp): Use strerror.
12513 * utils.c (perror_with_name): Use strerror.
12514 * config.in, configure: Regenerated.
12516 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12518 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12519 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12521 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12523 * Makefile.in (SFILES): Update.
12524 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12525 low-sun3.c: Remove files.
12527 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12529 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12530 (linux_detach_one_process, linux_detach): New functions.
12531 (linux_target_ops): Add linux_detach.
12532 * server.c (main): Handle 'D' packet.
12533 * target.h (struct target_ops): Add "detach" member.
12534 (detach_inferior): Define.
12536 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12538 From Kelley Cook <kelleycook@wideopenwest.com>:
12539 * configure.srv: Accept i[34567]86 variants.
12541 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12543 * linux-low.c (linux_wait_for_event): Correct comment typos.
12544 (linux_resume_one_process): Call check_removed_breakpoint.
12545 (linux_send_signal): New function.
12546 (linux_target_ops): Add linux_send_signal.
12547 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12549 * target.h (struct target_ops): Add send_signal.
12551 2003-05-29 Jim Blandy <jimb@redhat.com>
12553 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12554 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12555 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12556 away part of the register's value.
12558 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12560 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12561 (linux_wait_for_event, linux_init_signals): Likewise.
12563 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12565 * configure.in: Check for stdlib.h.
12566 * configure: Regenerated.
12567 * config.in: Regenerated.
12569 2003-01-04 Andreas Schwab <schwab@suse.de>
12571 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12573 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12575 * Makefile.in: Remove obsolete code.
12577 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12579 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12580 defined(PT_FPR0_HI).
12582 2002-11-17 Stuart Hughes <seh@zee2.com>
12584 * linux-arm-low.c (arm_num_regs): Increase.
12585 (arm_regmap): Include status register.
12587 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12589 * linux-low.c (register_addr): Remove incorrect -1 check.
12591 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12593 * linux-low.c (linux_create_inferior): Call setpgid. Return
12595 (unstopped_p, linux_signal_pid): Remove.
12596 (linux_target_ops): Remove linux_signal_pid.
12597 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12598 global instead of target method.
12599 * target.h (struct target_ops): Remove signal_pid. Update comment
12600 for create_inferior.
12601 * server.c (signal_pid): New variable.
12602 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12603 gdbserver. Set the child to be the foreground process group.
12604 (attach_inferior): Set signal_pid.
12606 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12608 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12610 2002-08-20 Jim Blandy <jimb@redhat.com>
12612 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12615 2002-08-01 Andrew Cagney <cagney@redhat.com>
12617 * Makefile.in: Make chill references obsolete.
12619 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12621 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12622 * configure: Regenerate.
12623 * config.in: Regenerate.
12625 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12627 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12628 (perror_with_name, remote_close, remote_open, expect, play): Static.
12630 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12632 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12633 byte offsets instead of an array of indexes.
12634 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12636 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12638 * regcache.c: Add comment.
12640 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12642 * thread-db.c: New file.
12643 * proc-service.c: New file.
12644 * acinclude.m4: New file.
12645 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12646 proc-service.o, and thread-db.o.
12647 (linux-low.o): Add USE_THREAD_DB.
12648 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12649 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12650 * aclocal.m4: Regenerated.
12651 * config.in: Regenerated.
12652 * configure: Regenerated.
12653 * configure.in: Check for proc_service.h, sys/procfs.h,
12654 thread_db.h, and linux/elf.h headrs.
12655 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12656 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12657 Check for -lthread_db and thread support.
12658 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12659 PowerPC, and SuperH.
12660 * i387-fp.c: Constify arguments.
12661 * i387-fp.h: Likewise.
12662 * inferiors.c: (struct thread_info): Renamed from
12663 `struct inferior_info'. Remove PID member. Use generic inferior
12664 list header. All uses updated.
12665 (inferiors, signal_pid): Removed.
12666 (all_threads): New variable.
12667 (get_thread): Define.
12668 (add_inferior_to_list): New function.
12669 (for_each_inferior): New function.
12670 (change_inferior_id): New function.
12671 (add_inferior): Removed.
12672 (remove_inferior): New function.
12673 (add_thread): New function.
12674 (free_one_thread): New function.
12675 (remove_thread): New function.
12676 (clear_inferiors): Use for_each_inferior and free_one_thread.
12677 (find_inferior): New function.
12678 (find_inferior_id): New function.
12679 (inferior_target_data): Update argument type.
12680 (set_inferior_target_data): Likewise.
12681 (inferior_regcache_data): Likewise.
12682 (set_inferior_regcache_data): Likewise.
12683 * linux-low.c (linux_bp_reinsert): Remove.
12684 (all_processes, stopping_threads, using_thrads)
12685 (struct pending_signals, debug_threads, pid_of): New.
12686 (inferior_pid): Replace with macro.
12687 (struct inferior_linux_data): Remove.
12688 (get_stop_pc, add_process): New functions.
12689 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12690 Use add_process and add_thread.
12691 (linux_attach_lwp): New function, based on old linux_attach. Use
12692 add_process and add_thread. Set stop_expected for new threads.
12693 (linux_attach): New function.
12694 (linux_kill_one_process): New function.
12695 (linux_kill): Kill all LWPs.
12696 (linux_thread_alive): Use find_inferior_id.
12697 (check_removed_breakpoints, status_pending_p): New functions.
12698 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12699 Update. Use WNOHANG. Wait for cloned processes also. Update process
12700 struct for the found process.
12701 (linux_wait_for_event): New function.
12702 (linux_wait): Use it. Support LWPs.
12703 (send_sigstop, wait_for_sigstop, stop_all_processes)
12704 (linux_resume_one_process, linux_continue_one_process): New functions.
12705 (linux_resume): Support LWPs.
12706 (REGISTER_RAW_SIZE): Remove.
12707 (fetch_register): Use register_size instead. Call supply_register.
12708 (usr_store_inferior_registers): Likewise. Call collect_register.
12709 Fix recursive case.
12710 (regsets_fetch_inferior_registers): Improve error message.
12711 (regsets_store_inferior_registers): Add debugging.
12712 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12713 (unstopped_p, linux_signal_pid): New functions.
12714 (linux_target_ops): Add linux_signal_pid.
12715 (linux_init_signals): New function.
12716 (initialize_low): Call it. Initialize using_threads.
12717 * regcache.c (inferior_regcache_data): Add valid
12719 (get_regcache): Fetch registers lazily. Add fetch argument
12720 and update all callers.
12721 (regcache_invalidate_one, regcache_invalidate): New
12723 (new_register_cache): Renamed from create_register_cache.
12724 Return the new regcache.
12725 (free_register_cache): Change argument to a void *.
12726 (registers_to_string, registers_from_string): Call get_regcache
12727 with fetch flag set.
12728 (register_data): Make static. Pass fetch flag to get_regcache.
12729 (supply_register): Call get_regcache with fetch flag clear.
12730 (collect_register): Call get_regcache with fetch flag set.
12731 (collect_register_as_string): New function.
12732 * regcache.h: Update.
12733 * remote-utils.c (putpkt): Flush after debug output and use
12735 Handle input interrupts while waiting for an ACK.
12736 (input_interrupt): Use signal_pid method.
12737 (getpkt): Flush after debug output and use stderr.
12738 (outreg): Use collect_register_as_string.
12739 (new_thread_notify, dead_thread_notify): New functions.
12740 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12741 and general_thread.
12742 (look_up_one_symbol): Flush after debug output.
12743 * server.c (step_thread, server_waiting): New variables.
12744 (start_inferior): Don't use signal_pid. Update call to mywait.
12745 (attach_inferior): Update call to mywait.
12746 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12747 (main): Don't fetch/store registers explicitly. Use
12748 set_desired_inferior. Support proposed ``Hs'' packet. Update
12750 * server.h: Update.
12751 (struct inferior_list, struct_inferior_list_entry): New.
12752 * target.c (set_desired_inferior): New.
12753 (write_inferior_memory): Constify.
12754 (mywait): New function.
12755 * target.h: Update.
12756 (struct target_ops): New signal_pid method.
12757 (mywait): Removed macro, added prototype.
12759 * linux-low.h (regset_func): Removed.
12760 (regset_fill_func, regset_store_func): New.
12761 (enum regset_type): New.
12762 (struct regset_info): Add type field. Use new operation types.
12763 (struct linux_target_ops): stop_pc renamed to get_pc.
12764 Add decr_pc_after_break and breakpoint_at.
12765 (get_process, get_thread_proess, get_process_thread)
12766 (strut process_info, all_processes, linux_attach_lwp)
12767 (thread_db_init): New.
12769 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12770 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12771 (the_low_target): Add new members.
12772 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12773 (i386_store_fpxregset): Constify.
12774 (target_regsets): Add new kind identifier.
12775 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12776 (i386_set_pc): Add debugging.
12777 (i386_breakpoint_at): New function.
12778 (the_low_target): Add new members.
12779 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12780 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12781 (mips_breakpoint_at): New.
12782 (the_low_target): Add new members.
12783 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12784 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12785 (the_low_target): Add new members.
12786 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12787 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12788 (the_low_target): Add new members.
12789 * linux-x86-64-low.c (target_regsets): Add new kind
12792 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12794 From Martin Pool <mbp@samba.org>:
12795 * server.c (gdbserver_usage): New function.
12798 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12800 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12801 stop_at -> stop_pc.
12803 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12805 * Makefile.in: Remove obsolete code.
12807 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12809 * linux-low.c (regsets_fetch_inferior_registers),
12810 (regsets_store_inferior_registers): Removed cast to int from
12812 * regcache.h: Added declaration of struct inferior_info.
12814 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12816 * inferiors.c (struct inferior_info): Add regcache_data.
12817 (add_inferior): Call create_register_cache.
12818 (clear_inferiors): Call free_register_cache.
12819 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12820 * regcache.c (struct inferior_regcache_data): New.
12821 (registers): Remove.
12822 (get_regcache): New function.
12823 (create_register_cache, free_register_cache): New functions.
12824 (set_register_cache): Don't initialize the register cache here.
12825 (registers_to_string, registers_from_string, register_data): Call
12827 * regcache.h: Add prototypes.
12828 * server.h: Likewise.
12830 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12832 * mem-break.c: New file.
12833 * mem-break.h: New file.
12834 * Makefile.in: Add mem-break.o rule; update server.h
12836 * inferiors.c (struct inferior_info): Add target_data
12838 (clear_inferiors): Free target_data member if set.
12839 (inferior_target_data, set_inferior_target_data): New functions.
12840 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12841 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12842 * linux-low.c (linux_bp_reinsert): New variable.
12843 (struct inferior_linux_data): New.
12844 (linux_create_inferior): Use set_inferior_target_data.
12845 (linux_attach): Likewise. Call add_inferior.
12846 (linux_wait_for_one_inferior): New function.
12847 (linux_wait): Call it.
12848 (linux_write_memory): Add const.
12849 (initialize_low): Call set_breakpoint_data.
12850 * linux-low.h (struct linux_target_ops): Add breakpoint
12852 * server.c (attach_inferior): Remove extra add_inferior
12854 * server.h: Include mem-break.h. Update inferior.c
12856 * target.c (read_inferior_memory)
12857 (write_inferior_memory): New functions.
12858 * target.h (read_inferior_memory)
12859 (write_inferior_memory): Change macros to prototypes.
12860 (struct target_ops): Update comments. Add const to write_memory
12863 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12865 * linux-low.c (usr_store_inferior_registers): Support
12866 registers which are allowed to fail to store.
12867 * linux-low.h (linux_target_ops): Likewise.
12868 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12869 (ppc_cannot_store_register): FPSCR may not be storable.
12871 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12873 * server.h: Include <string.h> if HAVE_STRING_H.
12874 * ChangeLog: Correct paths in last ChangeLog entry.
12876 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12878 * linux-low.h: Remove obsolete prototypes.
12879 (struct linux_target_ops): New.
12880 (extern the_low_target): New.
12881 * linux-low.c (num_regs, regmap): Remove declarations.
12882 (register_addr): Use the_low_target explicitly.
12883 (fetch_register): Likewise.
12884 (usr_fetch_inferior_registers): Likewise.
12885 (usr_store_inferior_registers): Likewise.
12886 * linux-arm-low.c (num_regs): Remove.
12887 (arm_num_regs): Define.
12888 (arm_regmap): Renamed from regmap, made static.
12889 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12891 (arm_cannot_store_register): Renamed from cannot_store_register,
12893 (the_low_target): New.
12894 * linux-i386-low.c (num_regs): Remove.
12895 (i386_num_regs): Define.
12896 (i386_regmap): Renamed from regmap, made static.
12897 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12899 (i386_cannot_store_register): Renamed from cannot_store_register,
12901 (the_low_target): New.
12902 * linux-ia64-low.c (num_regs): Remove.
12903 (ia64_num_regs): Define.
12904 (ia64_regmap): Renamed from regmap, made static.
12905 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12907 (ia64_cannot_store_register): Renamed from cannot_store_register,
12909 (the_low_target): New.
12910 * linux-m68k-low.c (num_regs): Remove.
12911 (m68k_num_regs): Define.
12912 (m68k_regmap): Renamed from regmap, made static.
12913 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12915 (m68k_cannot_store_register): Renamed from cannot_store_register,
12917 (the_low_target): New.
12918 * linux-mips-low.c (num_regs): Remove.
12919 (mips_num_regs): Define.
12920 (mips_regmap): Renamed from regmap, made static.
12921 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12923 (mips_cannot_store_register): Renamed from cannot_store_register,
12925 (the_low_target): New.
12926 * linux-ppc-low.c (num_regs): Remove.
12927 (ppc_num_regs): Define.
12928 (ppc_regmap): Renamed from regmap, made static.
12929 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12931 (ppc_cannot_store_register): Renamed from cannot_store_register,
12933 (the_low_target): New.
12934 * linux-s390-low.c (num_regs): Remove.
12935 (s390_num_regs): Define.
12936 (s390_regmap): Renamed from regmap, made static.
12937 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12939 (s390_cannot_store_register): Renamed from cannot_store_register,
12941 (the_low_target): New.
12942 * linux-sh-low.c (num_regs): Remove.
12943 (sh_num_regs): Define.
12944 (sh_regmap): Renamed from regmap, made static.
12945 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12947 (sh_cannot_store_register): Renamed from cannot_store_register,
12949 (the_low_target): New.
12950 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12951 (the_low_target): New.
12953 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12955 * Makefile.in: Add stamp-h target.
12956 * configure.in: Create stamp-h.
12957 * configure: Regenerated.
12959 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12961 * inferiors.c: New file.
12962 * target.c: New file.
12963 * target.h: New file.
12964 * Makefile.in: Add target.o and inferiors.o. Update
12966 * linux-low.c (inferior_pid): New static variable,
12967 moved from server.c.
12968 (linux_create_inferior): Renamed from create_inferior.
12969 Call add_inferior. Return 0 on success instead of a PID.
12970 (linux_attach): Renamed from myattach.
12971 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12972 (linux_thread_alive): Renamed from mythread_alive.
12973 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12975 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12976 (regsets_store_inferior_registers): Correct error message.
12977 Add missing ``return 0''.
12978 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12979 (linux_store_registers): Renamed from store_inferior_registers.
12980 (linux_read_memory): Renamed from read_inferior_memory.
12981 (linux_write_memory): Renamed from write_inferior_memory.
12982 (linux_target_ops): New structure.
12983 (initialize_low): Call set_target_ops ().
12984 * remote-utils.c (unhexify): New function.
12985 (hexify): New function.
12986 (input_interrupt): Send signals to ``signal_pid''.
12987 * server.c (inferior_pid): Remove.
12988 (start_inferior): Update create_inferior call.
12989 (attach_inferior): Call add_inferior.
12990 (handle_query): New function.
12991 (main): Call handle_query for `q' packets.
12992 * server.h: Include "target.h". Remove obsolete prototypes.
12993 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12995 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12997 * Makefile.in: Add WARN_CFLAGS. Update configury
12999 * configure.in: Check for <string.h>
13000 * configure: Regenerate.
13001 * config.in: Regenerate.
13002 * gdbreplay.c: Include needed system headers.
13003 (remote_open): Remove strchr prototype.
13004 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13005 * regcache.c (supply_register): Change buf argument to const void *.
13006 (supply_register_by_name): Likewise.
13007 (collect_register): Change buf argument to void *.
13008 (collect_register_by_name): Likewise.
13009 * regcache.h: Add missing prototypes.
13010 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13011 * server.c (handle_query): New function.
13012 (attached): New static variable, moved out of main.
13013 (main): Quiet longjmp clobber warnings.
13014 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13015 * utils.c (error): Remove NORETURN.