1 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3 * target.c (thread_search_callback): Add check that
4 the thread_stopped target callback is not NULL before
7 2015-12-21 Yao Qi <yao.qi@linaro.org>
9 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
12 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
14 * server.c (handle_query): Call target_supports_software_single_step.
16 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
18 * linux-low.c (single_step): New function.
19 (linux_resume_one_lwp_throw): Call single_step.
20 (start_step_over): Likewise.
22 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
24 * Makefile.in (SFILES): Append arch/arm-linux.c,
25 arch/arm-get-next-pcs.c.
26 (arm-linux.o): New rule.
27 (arm-get-next-pcs.o): New rule.
28 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
30 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
31 to linux-aarch32-low.c.
32 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
33 (arm_breakpoint_len, thumb_breakpoint): Likewise.
34 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
35 (thumb2_breakpoint_len): Likewise.
36 (arm_is_thumb_mode): Make non-static.
37 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
38 from linux-aarch32-low.c.
39 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
40 (arm_breakpoint_len, thumb_breakpoint): Likewise.
41 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
42 (thumb2_breakpoint_len): Likewise.
43 (arm_is_thumb_mode): New declaration.
44 * linux-arm-low.c: Include arch/arm-linux.h
45 aarch/arm-get-next-pcs.h, sys/syscall.h.
46 (get_next_pcs_ops): New struct.
47 (get_next_pcs_addr_bits_remove): New function.
48 (get_next_pcs_is_thumb): New function.
49 (get_next_pcs_read_memory_unsigned_integer): Likewise.
50 (arm_sigreturn_next_pc): Likewise.
51 (get_next_pcs_syscall_next_pc): Likewise.
52 (arm_gdbserver_get_next_pcs): Likewise.
53 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
55 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
56 * server.h: Include gdb_vecs.h.
58 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
60 * Makefile.in (SFILES): Append common/common-regcache.c.
61 (OBS): Append common-regcache.o.
62 (common-regcache.o): New rule.
63 * regcache.c (init_register_cache): Initialize cache to
65 (regcache_raw_read_unsigned): New function.
66 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
69 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
71 * linux-aarch64-low.c (the_low_targets): Rename
72 breakpoint_reinsert_addr to get_next_pcs.
73 * linux-arm-low.c (the_low_targets): Likewise.
74 * linux-bfin-low.c (the_low_targets): Likewise.
75 * linux-cris-low.c (the_low_targets): Likewise.
76 * linux-crisv32-low.c (the_low_targets): Likewise.
77 * linux-low.c (can_software_single_step): Likewise.
78 (install_software_single_step_breakpoints): New function.
79 (start_step_over): Use install_software_single_step_breakpoints.
80 * linux-low.h: New CORE_ADDR vector.
81 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
83 * linux-mips-low.c (the_low_targets): Likewise.
84 * linux-nios2-low.c (the_low_targets): Likewise.
85 * linux-sparc-low.c (the_low_targets): Likewise.
87 2015-12-17 Pedro Alves <palves@redhat.com>
89 * linux-low.c (linux_kill_one_lwp): Remove references to
91 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
93 (linux_init_signals): Delete.
94 (initialize_low): Adjust.
95 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
97 2015-12-16 Pedro Alves <palves@redhat.com>
99 * configure.ac (compiler warning flags): When testing a
100 -Wno-foo option, check whether -Wfoo works instead.
101 * configure: Regenerate.
103 2015-12-11 Don Breazeal <donb@codesourcery.com>
105 * server.c (process_serial_event): Don't exit from gdbserver
106 in remote mode if there are still active inferiors.
108 2015-12-11 Yao Qi <yao.qi@linaro.org>
110 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
111 arm_breakpoint_at if the process is 32-bit.
113 2015-12-11 Yao Qi <yao.qi@linaro.org>
115 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
118 2015-12-07 Yao Qi <yao.qi@linaro.org>
120 * configure.srv: Append arm.o to srv_tgtobj for
121 aarch64*-*-linux* target.
122 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
123 from linux-arm-low.c.
124 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
125 (arm_breakpoint_len, thumb_breakpoint): Likewise.
126 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
127 (thumb2_breakpoint_len): Likewise.
128 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
129 (arm_breakpoint_kinds): Likewise.
130 (arm_breakpoint_kind_from_pc): Likewise.
131 (arm_sw_breakpoint_from_kind): Likewise.
132 (arm_breakpoint_kind_from_current_state): Likewise.
133 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
134 (arm_sw_breakpoint_from_kind): Declare.
135 (arm_breakpoint_kind_from_current_state): Declare.
136 (arm_breakpoint_at): Declare.
137 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
138 arm_sw_breakpoint_from_kind if process is 32-bit.
139 (aarch64_breakpoint_kind_from_pc): New function.
140 (aarch64_breakpoint_kind_from_current_state): New function.
141 (the_low_target): Initialize fields breakpoint_kind_from_pc
142 and breakpoint_kind_from_current_state.
143 * linux-arm-low.c (arm_breakpoint_kinds): Move to
145 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
146 (arm_breakpoint, arm_breakpoint_len): Likewise.
147 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
148 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
149 (arm_is_thumb_mode): Likewise.
150 (arm_breakpoint_at): Likewise.
151 (arm_breakpoint_kind_from_pc): Likewise.
152 (arm_sw_breakpoint_from_kind): Likewise.
153 (arm_breakpoint_kind_from_current_state): Likewise.
156 2015-08-04 Yao Qi <yao.qi@linaro.org>
158 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
159 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
160 * server.c (extended_protocol): Remove "static".
161 * server.h (extended_protocol): Declare it.
163 2015-12-04 Josh Stone <jistone@redhat.com>
165 * target.h (struct target_ops) <arch_setup>: Rename to ...
166 (struct target_ops) <post_create_inferior>: ... this.
167 (target_arch_setup): Rename to ...
168 (target_post_create_inferior): ... this, calling post_create_inferior.
169 * server.c (start_inferior): Update target_arch_setup calls to
170 target_post_create_inferior.
171 * linux-low.c (linux_low_ptrace_options): Forward declare.
172 (linux_arch_setup): Update its comment for general use.
173 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
174 (struct linux_target_ops): Use linux_post_create_inferior.
175 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
176 to post_create_inferior.
177 * nto-low.c (struct nto_target_ops): Likewise.
178 * spu-low.c (struct spu_target_ops): Likewise.
179 * win32-low.c (struct win32_target_ops): Likewise.
181 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
183 * linux-arm-low.c: Remove duplicate arch/arm.h include.
185 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
187 * linux-arm-low.c (arm_reinsert_addr): Remove function.
188 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
189 * linux-cris-low.c (cris_reinsert_addr> Remove function.
190 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
191 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
192 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
193 * linux-mips-low.c (mips_reinsert_addr): Remove function.
194 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
195 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
196 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
197 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
198 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
200 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
202 * linux-low.c (linux_look_up_symbols): Don't call
203 linux_supports_traceclone.
204 * linux-low.h (thread_db_init): Remove use_events argument.
205 * thread-db.c (thread_db_use_event): Remove global variable.
206 (struct thread_db) <td_thr_event_enable_p>: Remove field.
207 (struct thread_db) <td_create_bp>: Remove field.
208 (thread_db_create_event): Remove function.
209 (thread_db_enable_reporting): Likewise.
210 (find_one_thread): Don't check for thread_db_use_events.
211 (attach_thread): Likewise.
212 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
213 (try_thread_db_load_1): Don't check for thread_db_use_events.
214 (thread_db_init): Remove use_events argument and thread events
216 (remove_thread_event_breakpoints): Remove function.
217 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
219 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
221 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
223 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
224 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
225 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
226 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
227 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
229 * linux-crisv32-low.c (cris_supports_hardware_single_step):
231 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
232 * linux-low.c (can_hardware_single_step): Use
233 supports_hardware_single_step.
234 (can_software_single_step): New function.
235 (start_step_over): Call can_software_single_step.
236 (linux_supports_hardware_single_step): New function.
237 (struct target_ops) <supports_software_single_step>: Initialize.
238 * linux-low.h (struct linux_target_ops)
239 <supports_hardware_single_step>: Initialize.
240 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
241 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
242 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
243 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
244 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
245 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
246 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
247 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
248 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
249 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
251 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
252 (struct linux_target_ops) <tile_supports_hardware_single_step>:
254 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
255 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
256 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
258 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
259 * target.h (struct target_ops): <supports_software_single_step>:
261 (target_supports_software_single_step): New macro.
263 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
265 * linux-low.c (linux_wait_1): Fix pc advance condition.
266 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
267 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
269 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
271 * linux-arm-low.c (arm_is_thumb_mode): New function.
272 (arm_breakpoint_at): Use arm_is_thumb_mode.
273 (arm_breakpoint_kind_from_current_state): New function.
274 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
276 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
277 (linux_breakpoint_kind_from_current_state): New function.
278 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
279 * linux-low.h (struct linux_target_ops)
280 <breakpoint_kind_from_current_state>: New field.
281 * target.h (struct target_ops): Likewise.
282 (target_breakpoint_kind_from_current_state): New macro.
284 2015-11-30 Pedro Alves <palves@redhat.com>
286 * linux-low.c (linux_resume): Wake up the event loop before
289 2015-11-30 Pedro Alves <palves@redhat.com>
291 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
293 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
295 * target.c (struct thread_search): New structure.
296 (thread_search_callback): New function.
297 (prev_general_thread): New global.
298 (prepare_to_access_memory, done_accessing_memory): New functions.
299 * target.h (prepare_to_access_memory, done_accessing_memory):
300 Replace macros with function declarations.
302 2015-11-30 Pedro Alves <palves@redhat.com>
305 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
306 report TARGET_WAITKIND_NO_RESUMED.
307 * remote-utils.c (prepare_resume_reply): Handle
308 TARGET_WAITKIND_NO_RESUMED.
309 * server.c (report_no_resumed): New global.
310 (handle_query) <qSupported>: Handle "no-resumed+". Report
311 "no-resumed+" support.
312 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
313 return error if the client doesn't support no-resumed events.
314 (push_stop_notification): New function.
315 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
316 events if the client supports them.
318 2015-11-30 Pedro Alves <palves@redhat.com>
320 * linux-low.c (thread_still_has_status_pending_p): Don't check
322 (lwp_resumed): New function.
323 (status_pending_p_callback): Return early if the LWP is not
324 supposed to be resumed.
326 2015-11-30 Pedro Alves <palves@redhat.com>
328 * linux-low.c (handle_extended_wait): Assert that the LWP's
329 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
330 thread create events, leave the new child's status pending.
331 (linux_low_filter_event): If GDB wants to hear about thread exit
332 events, leave the LWP marked dead and don't delete it.
333 (linux_wait_for_event_filtered): Don't check for thread exit.
334 (filter_exit_event): New function.
335 (linux_wait_1): Use it, when returning an exit event.
336 (linux_resume_one_lwp_throw): Assert that the LWP's
337 waitstatus is TARGET_WAITKIND_IGNORE.
338 * remote-utils.c (prepare_resume_reply): Handle
339 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
340 * server.c (report_thread_events): New global.
341 (handle_general_set): Handle QThreadEvents.
342 (handle_query) <qSupported>: Handle and report QThreadEvents+;
343 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
344 TARGET_WAITKIND_THREAD_EXITED.
345 * server.h (report_thread_events): Declare.
347 2015-11-30 Pedro Alves <palves@redhat.com>
349 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
350 the thread's last_resume_kind was resume_stop.
352 2015-11-30 Pedro Alves <palves@redhat.com>
354 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
357 2015-11-30 Pedro Alves <palves@redhat.com>
359 * server.c (handle_v_requests): Handle vCtrlC.
361 2015-11-30 Pedro Alves <palves@redhat.com>
363 * gdbthread.h (find_any_thread_of_pid): Declare.
364 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
366 * server.c (handle_query): If current_thread is NULL, look for
367 another thread of the selected process.
369 2015-11-26 Daniel Colascione <dancol@dancol.org>
370 Simon Marchi <simon.marchi@ericsson.com>
372 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
373 * server.c (handle_qxfer_threads_worker): Refactor to include thread
375 * target.h (struct target_ops) <thread_name>: New field.
376 (target_thread_name): New macro.
378 2015-11-23 Joel Brobecker <brobecker@adacore.com>
380 * regcache.h (regcache_invalidate_pid): Add declaration.
381 * regcache.c (regcache_invalidate_pid): New function, extracted
382 from regcache_invalidate.
383 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
384 Add trivial documentation comment.
385 * lynx-low.c: Use regcache_invalidate_pid instead of
388 2015-11-23 Joel Brobecker <brobecker@adacore.com>
390 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
391 and Elf64_auxv_t if the target is Android.
393 2015-11-22 Doug Evans <xdje42@gmail.com>
395 * target.h: #include <sys/types.h>.
397 2015-11-19 Pedro Alves <palves@redhat.com>
399 * linux-low.c (linux_process_qsupported): Change prototype.
401 * linux-low.h (struct linux_target_ops) <process_qsupported>:
403 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
404 and adjust to loop over all features.
405 * server.c (handle_query) <qSupported>: Adjust to call
406 target_process_qsupported once, passing it a vector of unprocessed
408 * target.h (struct target_ops) <process_qsupported>: Change
410 (target_process_qsupported): Adjust.
412 2015-11-19 Pedro Alves <palves@redhat.com>
414 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
416 * configure: Regenerate.
418 2015-11-19 Pedro Alves <palves@redhat.com>
420 * configure: Regenerate.
422 2015-11-19 Yao Qi <yao.qi@linaro.org>
424 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
427 2015-11-19 Yao Qi <yao.qi@linaro.org>
429 * linux-aarch64-low.c (enum aarch64_operand_type): New.
430 (struct aarch64_operand): Move enum out.
432 2015-11-19 Yao Qi <yao.qi@linaro.org>
434 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
435 struct user_fpsimd_state *.
436 (aarch64_store_fpregset): Likewise.
438 2015-11-19 Yao Qi <yao.qi@linaro.org>
440 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
441 struct user_pt_regs *.
442 (aarch64_store_gregset): Likewise.
444 2015-11-18 Pedro Alves <palves@redhat.com>
446 * Makefile.in (all_object_files): Add $IPA_OBJS.
448 2015-11-17 Pedro Alves <palves@redhat.com>
450 * win32-low.c (win32_resume): Use gdb_signal_from_host,
451 GDB_SIGNAL_0 and gdb_signal_to_string.
453 2015-11-17 Pedro Alves <palves@redhat.com>
455 * win32-low.c (handle_output_debug_string): Remove parameter.
456 (win32_kill): Remove our_status local and adjust call to
457 handle_output_debug_string.
458 (get_child_debug_event): Adjust call to
459 handle_output_debug_string.
461 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
463 * linux-mips-low.c (mips_fill_gregset): Add cast.
464 (mips_store_gregset): Likewise.
465 (mips_fill_fpregset): Likewise.
466 (mips_store_fpregset): Likewise.
468 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
470 * linux-mips-low.c (mips_add_watchpoint): Rename private to
473 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
475 * linux-mips-low.c (mips_linux_new_thread): Change type of
476 watch_type to enum target_hw_bp_type.
478 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
480 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
481 Change return type to arm_hwbp_type.
483 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
485 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
486 (arm_store_gregset): Likewise.
487 * linux-arm-low.c (arm_get_hwcap): Likewise.
488 (arm_read_description): Likewise.
490 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
492 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
494 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
496 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
497 (ppc_fill_vsxregset): Likewise.
498 (ppc_store_vsxregset): Likewise.
499 (ppc_fill_vrregset): Likewise.
500 (ppc_store_vrregset): Likewise.
501 (ppc_fill_evrregset): Likewise.
502 (ppc_store_evrregset): Likewise.
504 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
506 * linux-ppc-low.c (ppc_usrregs_info): Remove
508 (ppc_arch_setup): Move lower in file.
510 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
512 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
513 (ps_pdwrite): Likewise.
515 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
517 * linux-arm-low.c (arm_new_thread): Move pointer dereference
518 to after assert checks.
520 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
522 * proc-service.c (ps_pdread): Add/adjust casts.
523 (ps_pdwrite): Add/adjust casts.
525 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
527 * server.c (handle_search_memory_1): Cast return value of
530 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
532 * server.c (write_qxfer_response): Change type of data to
535 2015-10-29 Pedro Alves <palves@redhat.com>
537 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
539 2015-10-29 Pedro Alves <palves@redhat.com>
541 * tracepoint.c (clear_installed_tracepoints): Add casts.
543 2015-10-29 Pedro Alves <palves@redhat.com>
545 * server.c (handle_v_cont, process_serial_event): Add enum
546 gdb_signal casts to signal parsing code.
548 2015-10-29 Pedro Alves <palves@redhat.com>
550 * linux-low.h (NULL_REGSET): Define.
551 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
552 * linux-arm-low.c (arm_regsets): Likewise.
553 * linux-crisv32-low.c (cris_regsets): Likewise.
554 * linux-m68k-low.c (m68k_regsets): Likewise.
555 * linux-mips-low.c (mips_regsets): Likewise.
556 * linux-nios2-low.c (nios2_regsets): Likewise.
557 * linux-ppc-low.c (ppc_regsets): Likewise.
558 * linux-s390-low.c (s390_regsets): Likewise.
559 * linux-sh-low.c (sh_regsets): Likewise.
560 * linux-sparc-low.c (sparc_regsets): Likewise.
561 * linux-tic6x-low.c (tic6x_regsets): Likewise.
562 * linux-tile-low.c (tile_regsets): Likewise.
563 * linux-x86-low.c (x86_regsets): Likewise.
564 * linux-xtensa-low.c (xtensa_regsets): Likewise.
566 2015-10-29 Pedro Alves <palves@redhat.com>
568 * linux-low.h (NULL_REGSET): Define.
569 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
570 * linux-arm-low.c (arm_regsets): Likewise.
571 * linux-crisv32-low.c (cris_regsets): Likewise.
572 * linux-m68k-low.c (m68k_regsets): Likewise.
573 * linux-mips-low.c (mips_regsets): Likewise.
574 * linux-nios2-low.c (nios2_regsets): Likewise.
575 * linux-ppc-low.c (ppc_regsets): Likewise.
576 * linux-s390-low.c (s390_regsets): Likewise.
577 * linux-sh-low.c (sh_regsets): Likewise.
578 * linux-sparc-low.c (sparc_regsets): Likewise.
579 * linux-tic6x-low.c (tic6x_regsets): Likewise.
580 * linux-tile-low.c (tile_regsets): Likewise.
581 * linux-x86-low.c (x86_regsets): Likewise.
582 * linux-xtensa-low.c (xtensa_regsets): Likewise.
584 2015-10-26 Doug Evans <dje@google.com>
586 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
588 2015-10-26 Doug Evans <dje@google.com>
590 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
592 2015-10-26 Doug Evans <dje@google.com>
594 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
596 (attach_thread, find_new_threads_callback): Ditto.
598 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
600 * mem-break.h (set_breakpoint_data): Remove.
602 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
604 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
605 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
606 (initialize_low): Remove set_breakpoint_data call.
607 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
608 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
609 (initialize_low): Remove set_breakpoint_data call.
610 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
611 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
612 (initialize_low): Remove set_breakpoint_data call.
614 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
616 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
617 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
618 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
619 * target.h (target_breakpoint_kind_from_pc): New macro.
621 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
623 * linux-low.c (default_breakpoint_kind_from_pc): New function.
624 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
625 the default breakpoint kind.
627 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
629 * linux-arm-low.c (arm_supports_z_point_type): Add software
632 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
634 * linux-arm-low.c: Refactor breakpoint definitions.
635 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
636 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
638 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
640 * Makefile.in: Add arm.c/o.
641 * configure.srv: Likewise.
642 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
643 (arm_breakpoint_kind_from_pc): New function.
644 (arm_sw_breakpoint_from_kind): Return proper kind.
645 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
647 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
649 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
651 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
652 (struct raw_breakpoint) <size>: Remove.
653 (struct raw_breakpoint) <kind>: Add.
654 (bp_size): New function.
655 (bp_opcode): Likewise.
656 (find_raw_breakpoint_at): Adjust for kind.
657 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
658 (remove_memory_breakpoint): Adjust for kind call bp_size.
659 (set_raw_breakpoint_at): Adjust for kind.
660 (set_breakpoint): Likewise.
661 (set_breakpoint_at): Call breakpoint_kind_from_pc.
662 (delete_raw_breakpoint): Adjust for kind.
663 (delete_breakpoint): Likewise.
664 (find_gdb_breakpoint): Likewise.
665 (set_gdb_breakpoint_1): Likewise.
666 (set_gdb_breakpoint): Likewise.
667 (delete_gdb_breakpoint_1): Likewise.
668 (delete_gdb_breakpoint): Likewise.
669 (uninsert_raw_breakpoint): Likewise.
670 (reinsert_raw_breakpoint): Likewise.
671 (set_breakpoint_data): Remove.
672 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
673 (check_mem_read): Adjust for kind call bp_size.
674 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
675 (clone_one_breakpoint): Adjust for kind.
676 * mem-break.h (set_gdb_breakpoint): Likewise.
677 (delete_gdb_breakpoint): Likewise.
678 * server.c (process_serial_event): Likewise.
680 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
682 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
683 (struct linux_target_ops) <breakpoint>: Remove.
684 (struct linux_target_ops) <breakpoint_len>: Remove.
685 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
686 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
687 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
688 (arm_sw_breakpoint_from_kind): New function.
689 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
690 (struct linux_target_ops) <breakpoint>: Remove.
691 (struct linux_target_ops) <breakpoint_len>: Remove.
692 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
693 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
694 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
695 (struct linux_target_ops) <breakpoint>: Remove.
696 (struct linux_target_ops) <breakpoint_len>: Remove.
697 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
698 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
699 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
700 (struct linux_target_ops) <breakpoint>: Remove.
701 (struct linux_target_ops) <breakpoint_len>: Remove.
702 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
703 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
704 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
705 and sw_breakpoint_from_kind to increment the pc.
706 (linux_breakpoint_kind_from_pc): New function.
707 (linux_sw_breakpoint_from_kind): New function.
708 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
709 (initialize_low): Call breakpoint_kind_from_pc and
710 sw_breakpoint_from_kind to replace breakpoint_data/len.
711 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
713 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
714 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
715 (struct linux_target_ops) <breakpoint>: Remove.
716 (struct linux_target_ops) <breakpoint_len>: Remove.
717 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
718 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
719 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
720 (struct linux_target_ops) <breakpoint>: Remove.
721 (struct linux_target_ops) <breakpoint_len>: Remove.
722 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
723 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
724 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
725 (struct linux_target_ops) <breakpoint>: Remove.
726 (struct linux_target_ops) <breakpoint_len>: Remove.
727 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
728 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
729 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
730 (struct linux_target_ops) <breakpoint>: Remove.
731 (struct linux_target_ops) <breakpoint_len>: Remove.
732 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
733 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
734 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
735 (struct linux_target_ops) <breakpoint>: Remove.
736 (struct linux_target_ops) <breakpoint_len>: Remove.
737 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
738 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
739 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
740 (struct linux_target_ops) <breakpoint>: Remove.
741 (struct linux_target_ops) <breakpoint_len>: Remove.
742 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
743 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
744 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
745 (struct linux_target_ops) <breakpoint>: Remove.
746 (struct linux_target_ops) <breakpoint_len>: Remove.
747 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
748 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
749 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
750 (struct linux_target_ops) <breakpoint>: Remove.
751 (struct linux_target_ops) <breakpoint_len>: Remove.
752 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
753 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
754 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
755 (struct linux_target_ops) <breakpoint>: Remove.
756 (struct linux_target_ops) <breakpoint_len>: Remove.
757 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
758 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
759 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
760 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
761 (struct linux_target_ops) <breakpoint>: Remove.
762 (struct linux_target_ops) <breakpoint_len>: Remove.
763 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
764 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
765 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
766 (struct linux_target_ops) <breakpoint>: Remove.
767 (struct linux_target_ops) <breakpoint_len>: Remove.
768 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
769 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
771 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
773 * linux-cris-low.c (cris_get_pc): Remove void arg.
775 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
777 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
780 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
782 * inferiors.c (thread_pid_matches_callback): New function.
783 (find_thread_process): New function.
784 (remove_thread): Reset current_thread.
785 (remove_process): Assert threads have been removed first.
787 2015-10-15 Yao Qi <yao.qi@linaro.org>
789 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
791 (aarch64_remove_point): Likewise.
792 * regcache.c (regcache_register_size): New function.
794 2015-10-12 Yao Qi <yao.qi@linaro.org>
796 * linux-aarch64-low.c: Update all callers as emit_load_store
797 is renamed to aarch64_emit_load_store.
799 2015-10-12 Yao Qi <yao.qi@linaro.org>
801 * linux-aarch64-low.c: Update all callers of function renaming
802 from emit_insn to aarch64_emit_insn.
804 2015-10-12 Yao Qi <yao.qi@linaro.org>
806 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
808 (struct aarch64_memory_operand): Likewise.
810 (emit_insn): Move to arch/aarch64-insn.c.
811 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
812 (emit_load_store): Move to arch/aarch64-insn.c.
813 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
814 (can_encode_int32): Remove.
816 2015-10-12 Yao Qi <yao.qi@linaro.org>
818 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
819 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
820 (aarch64_relocate_instruction): Likewise.
821 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
822 (struct aarch64_insn_visitor): Likewise.
824 2015-10-12 Yao Qi <yao.qi@linaro.org>
826 * linux-aarch64-low.c (struct aarch64_insn_data): New.
827 (struct aarch64_insn_visitor): New.
828 (struct aarch64_insn_relocation_data): New.
829 (aarch64_ftrace_insn_reloc_b): New function.
830 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
831 (aarch64_ftrace_insn_reloc_cb): Likewise.
832 (aarch64_ftrace_insn_reloc_tb): Likewise.
833 (aarch64_ftrace_insn_reloc_adr): Likewise.
834 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
835 (aarch64_ftrace_insn_reloc_others): Likewise.
837 (aarch64_relocate_instruction): Use visitor.
839 2015-10-12 Yao Qi <yao.qi@linaro.org>
841 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
842 int. Add argument buf.
843 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
844 aarch64_relocate_instruction.
846 2015-10-12 Yao Qi <yao.qi@linaro.org>
848 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
849 argument insn. Remove local variable insn. Don't call
851 (aarch64_install_fast_tracepoint_jump_pad): Call
854 2015-09-30 Yao Qi <yao.qi@linaro.org>
856 * linux-aarch64-low.c (emit_movk): Shorten a long line.
857 (emit_load_store_pair): Likewise.
859 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
861 * dll.c (match_dll): Add cast(s).
862 (unloaded_dll): Likewise.
863 * linux-low.c (second_thread_of_pid_p): Likewise.
864 (delete_lwp_callback): Likewise.
865 (count_events_callback): Likewise.
866 (select_event_lwp_callback): Likewise.
867 (linux_set_resume_request): Likewise.
868 * server.c (accumulate_file_name_length): Likewise.
869 (emit_dll_description): Likewise.
870 (handle_qxfer_threads_worker): Likewise.
871 (visit_actioned_threads): Likewise.
872 * thread-db.c (any_thread_of): Likewise.
873 * tracepoint.c (same_process_p): Likewise.
874 (match_blocktype): Likewise.
875 (build_traceframe_info_xml): Likewise.
877 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
879 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
881 (gdb_unparse_agent_expr): Likewise.
882 * hostio.c (require_data): Likewise.
883 (handle_pread): Likewise.
884 * linux-low.c (disable_regset): Likewise.
885 (fetch_register): Likewise.
886 (store_register): Likewise.
887 (get_dynamic): Likewise.
888 (linux_qxfer_libraries_svr4): Likewise.
889 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
890 (set_fast_tracepoint_jump): Likewise.
891 (uninsert_fast_tracepoint_jumps_at): Likewise.
892 (reinsert_fast_tracepoint_jumps_at): Likewise.
893 (validate_inserted_breakpoint): Likewise.
894 (clone_agent_expr): Likewise.
895 * regcache.c (init_register_cache): Likewise.
896 * remote-utils.c (putpkt_binary_1): Likewise.
897 (decode_M_packet): Likewise.
898 (decode_X_packet): Likewise.
899 (look_up_one_symbol): Likewise.
900 (relocate_instruction): Likewise.
901 (monitor_output): Likewise.
902 * server.c (handle_search_memory): Likewise.
903 (handle_qxfer_exec_file): Likewise.
904 (handle_qxfer_libraries): Likewise.
905 (handle_qxfer): Likewise.
906 (handle_query): Likewise.
907 (handle_v_cont): Likewise.
908 (handle_v_run): Likewise.
909 (captured_main): Likewise.
910 * target.c (write_inferior_memory): Likewise.
911 * thread-db.c (try_thread_db_load_from_dir): Likewise.
912 * tracepoint.c (init_trace_buffer): Likewise.
913 (add_tracepoint_action): Likewise.
914 (add_traceframe): Likewise.
915 (add_traceframe_block): Likewise.
916 (cmd_qtdpsrc): Likewise.
917 (cmd_qtdv): Likewise.
918 (cmd_qtstatus): Likewise.
919 (response_source): Likewise.
920 (response_tsv): Likewise.
921 (cmd_qtnotes): Likewise.
922 (gdb_collect): Likewise.
923 (initialize_tracepoint): Likewise.
925 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
927 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
928 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
929 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
931 (enum aarch64_condition_codes): New enum.
932 (w0): New static global.
935 (struct aarch64_memory_operand) <type>: New
936 MEMORY_OPERAND_POSTINDEX type.
937 (postindex_memory_operand): New helper function.
938 (emit_ret): New function.
939 (emit_load_store_pair): New function, factored out of emit_stp
940 with support for MEMORY_OPERAND_POSTINDEX.
941 (emit_stp): Rewrite using emit_load_store_pair.
942 (emit_ldp): New function.
943 (emit_load_store): Likewise.
944 (emit_ldr): Mention post-index instruction in comment.
945 (emit_ldrh): New function.
946 (emit_ldrb): New function.
947 (emit_ldrsw): Mention post-index instruction in comment.
948 (emit_str): Likewise.
949 (emit_subs): New function.
950 (emit_cmp): Likewise.
951 (emit_and): Likewise.
952 (emit_orr): Likewise.
953 (emit_orn): Likewise.
954 (emit_eor): Likewise.
955 (emit_mvn): Likewise.
956 (emit_lslv): Likewise.
957 (emit_lsrv): Likewise.
958 (emit_asrv): Likewise.
959 (emit_mul): Likewise.
960 (emit_sbfm): Likewise.
961 (emit_sbfx): Likewise.
962 (emit_ubfm): Likewise.
963 (emit_ubfx): Likewise.
964 (emit_csinc): Likewise.
965 (emit_cset): Likewise.
966 (emit_nop): Likewise.
967 (emit_ops_insns): New helper function.
968 (emit_pop): Likewise.
969 (emit_push): Likewise.
970 (aarch64_emit_prologue): New function.
971 (aarch64_emit_epilogue): Likewise.
972 (aarch64_emit_add): Likewise.
973 (aarch64_emit_sub): Likewise.
974 (aarch64_emit_mul): Likewise.
975 (aarch64_emit_lsh): Likewise.
976 (aarch64_emit_rsh_signed): Likewise.
977 (aarch64_emit_rsh_unsigned): Likewise.
978 (aarch64_emit_ext): Likewise.
979 (aarch64_emit_log_not): Likewise.
980 (aarch64_emit_bit_and): Likewise.
981 (aarch64_emit_bit_or): Likewise.
982 (aarch64_emit_bit_xor): Likewise.
983 (aarch64_emit_bit_not): Likewise.
984 (aarch64_emit_equal): Likewise.
985 (aarch64_emit_less_signed): Likewise.
986 (aarch64_emit_less_unsigned): Likewise.
987 (aarch64_emit_ref): Likewise.
988 (aarch64_emit_if_goto): Likewise.
989 (aarch64_emit_goto): Likewise.
990 (aarch64_write_goto_address): Likewise.
991 (aarch64_emit_const): Likewise.
992 (aarch64_emit_call): Likewise.
993 (aarch64_emit_reg): Likewise.
994 (aarch64_emit_pop): Likewise.
995 (aarch64_emit_stack_flush): Likewise.
996 (aarch64_emit_zero_ext): Likewise.
997 (aarch64_emit_swap): Likewise.
998 (aarch64_emit_stack_adjust): Likewise.
999 (aarch64_emit_int_call_1): Likewise.
1000 (aarch64_emit_void_call_2): Likewise.
1001 (aarch64_emit_eq_goto): Likewise.
1002 (aarch64_emit_ne_goto): Likewise.
1003 (aarch64_emit_lt_goto): Likewise.
1004 (aarch64_emit_le_goto): Likewise.
1005 (aarch64_emit_gt_goto): Likewise.
1006 (aarch64_emit_ge_got): Likewise.
1007 (aarch64_emit_ops_impl): New static global variable.
1008 (aarch64_emit_ops): New target function, return
1009 &aarch64_emit_ops_impl.
1010 (struct linux_target_ops): Install it.
1012 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1014 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1015 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1017 * linux-aarch64-ipa.c: New file.
1018 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1020 (aarch64_get_thread_area): New target method.
1021 (extract_signed_bitfield): New helper function.
1022 (aarch64_decode_ldr_literal): New function.
1023 (enum aarch64_opcodes): New enum.
1024 (struct aarch64_register): New struct.
1025 (struct aarch64_operand): New struct.
1026 (x0): New static global.
1035 (aarch64_register): New helper function.
1036 (register_operand): Likewise.
1037 (immediate_operand): Likewise.
1038 (struct aarch64_memory_operand): New struct.
1039 (offset_memory_operand): New helper function.
1040 (preindex_memory_operand): Likewise.
1041 (enum aarch64_system_control_registers): New enum.
1042 (ENCODE): New macro.
1043 (emit_insn): New helper function.
1044 (emit_b): New function.
1045 (emit_bcond): Likewise.
1046 (emit_cb): Likewise.
1047 (emit_tb): Likewise.
1048 (emit_blr): Likewise.
1049 (emit_stp): Likewise.
1050 (emit_ldp_q_offset): Likewise.
1051 (emit_stp_q_offset): Likewise.
1052 (emit_load_store): Likewise.
1053 (emit_ldr): Likewise.
1054 (emit_ldrsw): Likewise.
1055 (emit_str): Likewise.
1056 (emit_ldaxr): Likewise.
1057 (emit_stxr): Likewise.
1058 (emit_stlr): Likewise.
1059 (emit_data_processing_reg): Likewise.
1060 (emit_data_processing): Likewise.
1061 (emit_add): Likewise.
1062 (emit_sub): Likewise.
1063 (emit_mov): Likewise.
1064 (emit_movk): Likewise.
1065 (emit_mov_addr): Likewise.
1066 (emit_mrs): Likewise.
1067 (emit_msr): Likewise.
1068 (emit_sevl): Likewise.
1069 (emit_wfe): Likewise.
1070 (append_insns): Likewise.
1071 (can_encode_int32_in): New helper function.
1072 (aarch64_relocate_instruction): New function.
1073 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1074 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1075 (struct linux_target_ops): Install aarch64_get_thread_area,
1076 aarch64_install_fast_tracepoint_jump_pad and
1077 aarch64_get_min_fast_tracepoint_insn_len.
1079 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1081 * Makefile.in (aarch64-insn.o): New rule.
1082 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1084 2015-09-21 Yao Qi <yao.qi@linaro.org>
1086 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1088 2015-09-21 Yao Qi <yao.qi@linaro.org>
1090 * tracepoint.c (max_jump_pad_size): Remove.
1092 2015-09-18 Yao Qi <yao.qi@linaro.org>
1094 * linux-aarch64-low.c: Don't include sys/uio.h.
1095 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1097 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1099 * tracepoint.c (eval_result_type): Change prototype.
1100 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1102 2015-09-15 Pedro Alves <palves@redhat.com>
1104 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1105 Check whether to report exec events instead of checking whether
1106 multiprocess is enabled.
1108 2015-09-15 Pedro Alves <palves@redhat.com>
1111 * remote-utils.c (prepare_resume_reply): Merge
1112 TARGET_WAITKIND_VFORK_DONE switch case with the
1113 TARGET_WAITKIND_FORKED case.
1115 2015-09-15 Yao Qi <yao.qi@linaro.org>
1117 * server.c (handle_query): Check string comparison using
1118 "else if" instead of "if".
1120 2015-09-15 Yao Qi <yao.qi@linaro.org>
1122 * server.c (vCont_supported): New global variable.
1123 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1124 matches. Append ";vContSupported+" to own_buf.
1125 (handle_v_requests): Append ";s;S" to own_buf if target supports
1126 hardware single step or vCont_supported is false.
1127 (capture_main): Set vCont_supported to zero.
1129 2015-09-15 Yao Qi <yao.qi@linaro.org>
1131 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1133 (linux_supports_hardware_single_step): ... New function.
1134 (linux_target_ops): Update.
1135 * lynx-low.c (lynx_target_ops): Set field
1136 supports_hardware_single_step to target_can_do_hardware_single_step.
1137 * nto-low.c (nto_target_ops): Likewise.
1138 * spu-low.c (spu_target_ops): Likewise.
1139 * win32-low.c (win32_target_ops): Likewise.
1140 * target.c (target_can_do_hardware_single_step): New function.
1141 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1142 Remove. <supports_hardware_single_step>: New field.
1143 (target_supports_conditional_breakpoints): Remove.
1144 (target_supports_hardware_single_step): New macro.
1145 (target_can_do_hardware_single_step): Declare.
1146 * server.c (handle_query): Use target_supports_hardware_single_step
1147 instead of target_supports_conditional_breakpoints.
1149 2015-09-15 Yao Qi <yao.qi@linaro.org>
1151 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1153 (struct linux_target_ops the_low_target): Install
1154 aarch64_linux_siginfo_fixup.
1156 2015-09-11 Don Breazeal <donb@codesourcery.com>
1157 Luis Machado <lgustavo@codesourcery.com>
1159 * linux-low.c (linux_mourn): Static declaration.
1160 (linux_arch_setup): Move in front of
1161 handle_extended_wait.
1162 (linux_arch_setup_thread): New function.
1163 (handle_extended_wait): Handle exec events. Call
1164 linux_arch_setup_thread. Make event_lwp argument a
1165 pointer-to-a-pointer.
1166 (check_zombie_leaders): Do not check stopped threads.
1167 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1168 (linux_low_filter_event): Add lwp and thread for exec'ing
1169 non-leader thread if leader thread has been deleted.
1170 Refactor code into linux_arch_setup_thread and call it.
1171 Pass child lwp pointer by reference to handle_extended_wait.
1172 (linux_wait_for_event_filtered): Update comment.
1173 (linux_wait_1): Prevent clobbering exec event status.
1174 (linux_supports_exec_events): New function.
1175 (linux_target_ops) <supports_exec_events>: Initialize new member.
1176 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1178 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1179 * server.c (report_exec_events): New global variable.
1180 (handle_query): Handle qSupported query for exec-events feature.
1181 (captured_main): Initialize report_exec_events.
1182 * server.h (report_exec_events): Declare new global variable.
1183 * target.h (struct target_ops) <supports_exec_events>: New
1185 (target_supports_exec_events): New macro.
1186 * win32-low.c (win32_target_ops) <supports_exec_events>:
1187 Initialize new member.
1189 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1191 * linux-low.c (linux_low_enable_btrace): Remove.
1192 (linux_target_ops): Replace linux_low_enable_btrace with
1193 linux_enable_btrace.
1195 2015-09-03 Yao Qi <yao.qi@linaro.org>
1197 * linux-aarch64-low.c (aarch64_insert_point): Call
1198 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1201 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1203 * linux-low.c (check_stopped_by_breakpoint): Use
1204 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1206 2015-08-27 Pedro Alves <palves@redhat.com>
1208 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1210 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1212 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1213 the XNEW-family equivalent.
1214 (compile_bytecodes): Likewise.
1215 * dll.c (loaded_dll): Likewise.
1216 * event-loop.c (append_callback_event): Likewise.
1217 (create_file_handler): Likewise.
1218 (create_file_event): Likewise.
1219 * hostio.c (handle_open): Likewise.
1220 * inferiors.c (add_thread): Likewise.
1221 (add_process): Likewise.
1222 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1223 * linux-arm-low.c (arm_new_process): Likewise.
1224 (arm_new_thread): Likewise.
1225 * linux-low.c (add_to_pid_list): Likewise.
1226 (linux_add_process): Likewise.
1227 (handle_extended_wait): Likewise.
1228 (add_lwp): Likewise.
1229 (enqueue_one_deferred_signal): Likewise.
1230 (enqueue_pending_signal): Likewise.
1231 (linux_resume_one_lwp_throw): Likewise.
1232 (linux_resume_one_thread): Likewise.
1233 (linux_read_memory): Likewise.
1234 (linux_write_memory): Likewise.
1235 * linux-mips-low.c (mips_linux_new_process): Likewise.
1236 (mips_linux_new_thread): Likewise.
1237 (mips_add_watchpoint): Likewise.
1238 * linux-x86-low.c (initialize_low_arch): Likewise.
1239 * lynx-low.c (lynx_add_process): Likewise.
1240 * mem-break.c (set_raw_breakpoint_at): Likewise.
1241 (set_breakpoint): Likewise.
1242 (add_condition_to_breakpoint): Likewise.
1243 (add_commands_to_breakpoint): Likewise.
1244 (clone_agent_expr): Likewise.
1245 (clone_one_breakpoint): Likewise.
1246 * regcache.c (new_register_cache): Likewise.
1247 * remote-utils.c (look_up_one_symbol): Likewise.
1248 * server.c (queue_stop_reply): Likewise.
1249 (start_inferior): Likewise.
1250 (queue_stop_reply_callback): Likewise.
1251 (handle_target_event): Likewise.
1252 * spu-low.c (fetch_ppc_memory): Likewise.
1253 (store_ppc_memory): Likewise.
1254 * target.c (set_target_ops): Likewise.
1255 * thread-db.c (thread_db_load_search): Likewise.
1256 (try_thread_db_load_1): Likewise.
1257 * tracepoint.c (add_tracepoint): Likewise.
1258 (add_tracepoint_action): Likewise.
1259 (create_trace_state_variable): Likewise.
1260 (cmd_qtdpsrc): Likewise.
1261 (cmd_qtro): Likewise.
1262 (add_while_stepping_state): Likewise.
1263 * win32-low.c (child_add_thread): Likewise.
1264 (get_image_name): Likewise.
1266 2015-08-25 Yao Qi <yao.qi@linaro.org>
1268 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1270 2015-08-25 Yao Qi <yao.qi@linaro.org>
1272 * Makefile.in (aarch64-linux.o): New rule.
1273 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1275 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1276 (aarch64_init_debug_reg_state): Make it extern.
1277 (aarch64_linux_prepare_to_resume): Remove.
1279 2015-08-25 Yao Qi <yao.qi@linaro.org>
1281 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1282 lwp_arch_private_info and ptid_of_lwp.
1284 2015-08-25 Yao Qi <yao.qi@linaro.org>
1286 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1287 Find proc_info by find_process_pid. All callers updated.
1289 2015-08-25 Yao Qi <yao.qi@linaro.org>
1291 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1293 (debug_reg_change_callback): Remove.
1294 (aarch64_notify_debug_reg_change): Remove.
1296 2015-08-25 Yao Qi <yao.qi@linaro.org>
1298 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1299 Call current_lwp_ptid.
1301 2015-08-25 Yao Qi <yao.qi@linaro.org>
1303 * linux-aarch64-low.c (debug_reg_change_callback): Use
1306 2015-08-25 Yao Qi <yao.qi@linaro.org>
1308 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1310 2015-08-25 Yao Qi <yao.qi@linaro.org>
1312 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1314 2015-08-25 Yao Qi <yao.qi@linaro.org>
1316 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1319 2015-08-25 Yao Qi <yao.qi@linaro.org>
1321 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1323 (debug_reg_change_callback): Remove argument entry and add argument
1324 lwp. Remove local variable thread. Don't print thread id in the
1325 debugging output. Don't check whether pid of thread equals to pid.
1326 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1327 iterate_over_lwps instead find_inferior.
1329 2015-08-24 Pedro Alves <palves@redhat.com>
1331 * inferiors.c (get_first_process): New function.
1332 * inferiors.h (get_first_process): New declaration.
1333 * remote-utils.c (read_ptid): Default to the first process in the
1334 list, instead of to the current thread's process.
1336 2015-08-24 Pedro Alves <palves@redhat.com>
1338 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1339 * event-loop.c: Likewise.
1340 * remote-utils.c: Likewise.
1341 * tracepoint.c: Likewise.
1343 2015-08-24 Pedro Alves <palves@redhat.com>
1345 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1348 2015-08-21 Pedro Alves <palves@redhat.com>
1350 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1351 instead of literal 1.
1353 2015-08-21 Pedro Alves <palves@redhat.com>
1355 * tdesc.c (default_description): Explicitly zero-initialize.
1357 2015-08-21 Pedro Alves <palves@redhat.com>
1360 * inferiors.c (remove_thread): Discard any pending stop reply for
1362 * server.c (remove_all_on_match_pid): Rename to ...
1363 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1365 (discard_queued_stop_replies): Change parameter to a ptid. Now
1367 (handle_v_kill, kill_inferior_callback, captured_main)
1368 (process_serial_event): Adjust.
1369 * server.h (discard_queued_stop_replies): Declare.
1371 2015-08-21 Pedro Alves <palves@redhat.com>
1373 * linux-low.c (wait_for_sigstop): Always switch to no thread
1374 selected if the previously current thread dies.
1375 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1376 process instead of the current thread's.
1377 * remote-utils.c (input_interrupt): Don't check if there's no
1379 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1380 current thread to the general thread fails, error out.
1381 (handle_qxfer_auxv, handle_qxfer_libraries)
1382 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1383 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1384 (handle_query): Check if there's a thread selected instead of
1385 checking whether there's any thread in the thread list.
1386 (handle_qxfer_threads, handle_qxfer_btrace)
1387 (handle_qxfer_btrace_conf): Don't error out early if there's no
1388 thread in the thread list.
1389 (handle_v_cont, myresume): Don't set the current thread to the
1391 (process_serial_event) <Hg handling>: Also set thread_id if the
1392 previous general thread is still alive.
1393 (process_serial_event) <g/G handling>: If setting the current
1394 thread to the general thread fails, error out.
1395 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1396 thread's lwp instead of the current thread's.
1397 * target.c (set_desired_thread): If the desired thread was not
1398 found, leave the current thread pointing to NULL. Return an int
1399 (boolean) indicating success.
1400 * target.h (set_desired_thread): Change return type to int.
1402 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1404 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1405 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1407 (ps_get_thread_area): New function.
1409 2015-08-19 Gary Benson <gbenson@redhat.com>
1411 * hostio.c (handle_pread): Do not attempt to read more data
1412 than hostio_reply_with_data can fit in a packet.
1414 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1416 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1418 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1420 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1422 2015-08-06 Pedro Alves <palves@redhat.com>
1424 * tracepoint.c (expr_eval_result): Now an int.
1426 2015-08-06 Pedro Alves <palves@redhat.com>
1428 * gdbthread.h (struct regcache): Forward declare.
1429 (struct thread_info) <regcache_data>: Now a struct regcache
1431 * inferiors.c (inferior_regcache_data)
1432 (set_inferior_regcache_data): Now work with struct regcache
1434 * inferiors.h (struct regcache): Forward declare.
1435 (inferior_regcache_data, set_inferior_regcache_data): Now work
1436 with struct regcache pointers.
1437 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1438 (free_register_cache_thread): Remove struct regcache pointer
1441 2015-08-06 Pedro Alves <palves@redhat.com>
1443 * server.c (captured_main): On error, print the exception message
1444 to stderr, and if run_once is set, throw a quit.
1446 2015-08-06 Pedro Alves <palves@redhat.com>
1448 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1451 2015-08-06 Pedro Alves <palves@redhat.com>
1453 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1454 reading beyond the passed in buffer length.
1456 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1458 * tracepoint.c (symbol_list) <required>: Remove.
1460 2015-08-06 Pedro Alves <palves@redhat.com>
1462 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1463 count if stopping and suspending threads.
1464 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1465 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1466 (linux_detach): Complete an ongoing step-over.
1467 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1469 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1470 (linux_wait_1): If passing a signal to the inferior after
1471 finishing a step-over, unsuspend and re-resume all lwps. If we
1472 see a single-step event but the thread should be continuing, don't
1473 pass the trap to gdb.
1474 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1475 internal_error instead of gdb_assert.
1476 (enqueue_pending_signal): New function.
1477 (check_ptrace_stopped_lwp_gone): Add debug output.
1478 (start_step_over): Use internal_error instead of gdb_assert.
1479 (complete_ongoing_step_over): New function.
1480 (linux_resume_one_thread): Don't resume a suspended thread.
1481 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1484 2015-08-06 Pedro Alves <palves@redhat.com>
1486 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1487 (linux_thread_alive): Use lwp_is_marked_dead.
1488 (extended_event_reported): Delete.
1489 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1490 instead of extended_event_reported.
1491 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1493 (lwp_is_marked_dead): New function.
1494 (lwp_running): Use lwp_is_marked_dead.
1495 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1498 2015-08-06 Pedro Alves <palves@redhat.com>
1500 * linux-low.c (linux_wait_1): Move fork event output out of the
1501 !report_to_gdb check. Pass event_child->waitstatus to
1502 target_waitstatus_to_string instead of ourstatus.
1504 2015-08-04 Yao Qi <yao.qi@linaro.org>
1506 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1507 if current_thread is 32 bit.
1509 2015-08-04 Yao Qi <yao.qi@linaro.org>
1511 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1512 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1513 * server.c (extended_protocol): Remove "static".
1514 * server.h (extended_protocol): Declare it.
1516 2015-08-04 Yao Qi <yao.qi@linaro.org>
1518 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1519 both aarch64 and aarch32.
1520 (aarch64_set_pc): Likewise.
1522 2015-08-04 Yao Qi <yao.qi@linaro.org>
1524 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1525 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1526 arm-with-neon.xml to srv_xmlfiles.
1527 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1528 (is_64bit_tdesc): New function.
1529 (aarch64_linux_read_description): New function.
1530 (aarch64_arch_setup): Call aarch64_linux_read_description.
1531 (regs_info): Rename to regs_info_aarch64.
1532 (aarch64_regs_info): Return right regs_info.
1533 (initialize_low_arch): Call initialize_low_arch_aarch32.
1535 2015-08-04 Yao Qi <yao.qi@linaro.org>
1537 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1538 * linux-aarch32-low.c: New file.
1539 * linux-aarch32-low.h: New file.
1540 * linux-arm-low.c (arm_fill_gregset): Move it to
1541 linux-aarch32-low.c.
1542 (arm_store_gregset): Likewise.
1543 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1544 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1545 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1546 (regs_info): Rename to regs_info_arm.
1547 (arm_regs_info): Return regs_info_aarch32 if
1548 have_ptrace_getregset is 1 and target description is
1549 arm_with_neon or arm_with_vfpv3.
1550 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1551 Call initialize_low_arch_aarch32 instead.
1553 2015-08-04 Yao Qi <yao.qi@linaro.org>
1555 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1556 * linux-low.c: ... here.
1557 * linux-low.h (have_ptrace_getregset): Declare it.
1559 2015-08-04 Pedro Alves <palves@redhat.com>
1561 * thread-db.c (struct thread_db): Use new typedefs.
1562 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1564 (disable_thread_event_reporting): Cast result of dlsym to
1565 destination function pointer type.
1566 (thread_db_mourn): Use td_ta_delete_ftype.
1568 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1570 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1572 (CDX_BREAKPOINT): Define for R2.
1573 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1574 (the_low_target): Add comments.
1576 2015-07-30 Yao Qi <yao.qi@linaro.org>
1578 * linux-arm-low.c (arm_hwcap): Remove it.
1579 (arm_read_description): New local variable arm_hwcap. Don't
1580 set arm_hwcap to zero.
1582 2015-07-30 Yao Qi <yao.qi@linaro.org>
1584 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1585 Use regcache->tdesc instead.
1586 (arm_store_wmmxregset): Likewise.
1587 (arm_fill_vfpregset): Likewise.
1588 (arm_store_vfpregset): Likewise.
1590 2015-07-30 Yao Qi <yao.qi@linaro.org>
1592 * linux-arm-low.c: Include arch/arm.h.
1593 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1594 (arm_store_gregset): Likewise.
1596 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1598 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1599 ptrace's 4th parameter.
1601 2015-07-27 Yao Qi <yao.qi@linaro.org>
1603 * configure.srv (case aarch64*-*-linux*): Don't set
1606 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1608 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1610 * linux-arm-low.c: Likewise.
1611 * linux-cris-low.c: Likewise.
1612 * linux-crisv32-low.c: Likewise.
1613 * linux-low.c: Likewise.
1614 * linux-m68k-low.c: Likewise.
1615 * linux-mips-low.c: Likewise.
1616 * linux-nios2-low.c: Likewise.
1617 * linux-s390-low.c: Likewise.
1618 * linux-sparc-low.c: Likewise.
1619 * linux-tic6x-low.c: Likewise.
1620 * linux-tile-low.c: Likewise.
1621 * linux-x86-low.c: Likewise.
1623 2015-07-24 Pedro Alves <palves@redhat.com>
1625 * config.in: Regenerate.
1626 * configure: Regenerate.
1628 2015-07-24 Pedro Alves <palves@redhat.com>
1630 * acinclude.m4: Include ../ptrace.m4.
1631 * configure.ac: Call GDB_AC_PTRACE.
1632 * config.in, configure: Regenerate.
1634 2015-07-24 Yao Qi <yao.qi@linaro.org>
1636 * linux-low.c (linux_create_inferior): Remove setting to
1637 proc->priv->new_inferior.
1638 (linux_attach): Likewise.
1639 (linux_low_filter_event): Likewise.
1640 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1642 2015-07-24 Yao Qi <yao.qi@linaro.org>
1644 * linux-low.c (linux_arch_setup): New function.
1645 (linux_low_filter_event): If proc->tdesc is NULL and
1646 proc->attached is true, call the_low_target.arch_setup.
1647 Otherwise, keep status pending, and return.
1648 (linux_resume_one_lwp_throw): Don't call get_pc if
1649 thread->while_stepping isn't NULL. Don't call
1650 get_thread_regcache if proc->tdesc is NULL.
1651 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1652 (linux_target_ops): Install arch_setup.
1653 * server.c (start_inferior): Call the_target->arch_setup.
1654 * target.h (struct target_ops) <arch_setup>: New field.
1655 (target_arch_setup): New marco.
1656 * lynx-low.c (lynx_target_ops): Update.
1657 * nto-low.c (nto_target_ops): Update.
1658 * spu-low.c (spu_target_ops): Update.
1659 * win32-low.c (win32_target_ops): Update.
1661 2015-07-24 Yao Qi <yao.qi@linaro.org>
1663 * linux-low.c (linux_add_process): Don't set
1664 proc->priv->new_inferior.
1665 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1666 (linux_attach): Likewise.
1668 2015-07-24 Yao Qi <yao.qi@linaro.org>
1670 * server.c (start_inferior): Code refactor.
1672 2015-07-24 Yao Qi <yao.qi@linaro.org>
1674 * server.c (process_serial_event): Set general_thread.
1676 2015-07-21 Yao Qi <yao.qi@linaro.org>
1678 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1679 aarch64_linux_get_debug_reg_capacity.
1681 2015-07-17 Yao Qi <yao.qi@linaro.org>
1683 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1684 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1685 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1686 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1687 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1688 (AARCH64_HWP_ALIGNMENT): Likewise.
1689 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1690 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1691 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1692 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1693 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1694 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1695 (struct aarch64_debug_reg_state): Likewise.
1696 (struct arch_lwp_info): Likewise.
1697 (aarch64_align_watchpoint): Likewise.
1698 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1699 (aarch64_watchpoint_length): Likewise.
1700 (aarch64_point_encode_ctrl_reg): Likewise
1701 (aarch64_point_is_aligned): Likewise.
1702 (aarch64_align_watchpoint): Likewise.
1703 (aarch64_linux_set_debug_regs):
1704 (aarch64_dr_state_insert_one_point): Likewise.
1705 (aarch64_dr_state_remove_one_point): Likewise.
1706 (aarch64_handle_breakpoint): Likewise.
1707 (aarch64_handle_aligned_watchpoint): Likewise.
1708 (aarch64_handle_unaligned_watchpoint): Likewise.
1709 (aarch64_handle_watchpoint): Likewise.
1711 2015-07-17 Yao Qi <yao.qi@linaro.org>
1713 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1714 and don't aarch64_get_debug_reg_state. All callers update.
1715 (aarch64_handle_aligned_watchpoint): Likewise.
1716 (aarch64_handle_unaligned_watchpoint): Likewise.
1717 (aarch64_handle_watchpoint): Likewise.
1718 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1719 (aarch64_remove_point): Likewise.
1721 2015-07-17 Yao Qi <yao.qi@linaro.org>
1723 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1725 (aarch64_handle_unaligned_watchpoint): Likewise.
1727 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1729 Revert the previous 3 commits:
1730 Move gdb_regex* to common/
1731 Move linux_find_memory_regions_full & co.
1732 gdbserver build-id attribute generator
1734 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1735 Jan Kratochvil <jan.kratochvil@redhat.com>
1737 gdbserver build-id attribute generator.
1738 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1739 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1740 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1742 (get_dynamic): Use find_pdhr to traverse program headers.
1743 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1744 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1745 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1746 (get_hex_build_id): New.
1747 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1748 to reply XML document.
1750 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1751 Jan Kratochvil <jan.kratochvil@redhat.com>
1753 * target.c: Include target/target-utils.h and fcntl.h.
1754 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1755 (target_fileio_read_stralloc): New functions.
1757 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1759 * Makefile.in (OBS): Add gdb_regex.o.
1761 * config.in: Rebuilt.
1762 * configure: Rebuilt.
1764 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1765 Jan Kratochvil <jan.kratochvil@redhat.com>
1767 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1768 * Makefile.in (OBS): Add target-utils.o.
1769 (linux-maps.o, target-utils.o): New.
1770 * configure.srv (srv_linux_obj): Add linux-maps.o.
1772 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1774 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1776 (the_low_target): Install it.
1778 2015-07-14 Pedro Alves <palves@redhat.com>
1780 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1781 Instead, ignore ECHILD, and throw an error for other errnos.
1783 2015-07-10 Pedro Alves <palves@redhat.com>
1785 * event-loop.c (struct callback_event) <data>: Change type to
1786 gdb_client_data instance instead of gdb_client_data pointer.
1787 (append_callback_event): Adjust.
1789 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1791 * linux-aarch64-low.c: Add comments for each linux_target_ops
1792 method. Remove comments already covered in target_ops and
1793 linux_target_ops definitions.
1794 (the_low_target): Add comments for each unimplemented method.
1796 2015-07-09 Yao Qi <yao.qi@linaro.org>
1798 * linux-aarch64-low.c (aarch64_regmap): Remove.
1799 (aarch64_usrregs_info): Remove.
1800 (regs_info): Set field usrregs to NULL.
1802 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1804 * linux-low.c: Include "rsp-low.h"
1805 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1806 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1807 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1808 (handle_btrace_enable_pt): New.
1809 (handle_btrace_general_set): Support "pt".
1810 (handle_btrace_conf_general_set): Support "pt:size".
1812 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1814 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1817 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1819 * linux-aarch64-low.c: Remove comment about endianness.
1820 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1821 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1824 2015-06-24 Gary Benson <gbenson@redhat.com>
1826 * linux-i386-ipa.c (stdint.h): Do not include.
1827 * lynx-i386-low.c (stdint.h): Likewise.
1828 * lynx-ppc-low.c (stdint.h): Likewise.
1829 * mem-break.c (stdint.h): Likewise.
1830 * thread-db.c (stdint.h): Likewise.
1831 * tracepoint.c (stdint.h): Likewise.
1832 * win32-low.c (stdint.h): Likewise.
1834 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1836 * server.c (write_qxfer_response): Update call to
1837 remote_escape_output.
1839 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1840 Jan Kratochvil <jan.kratochvil@redhat.com>
1842 Merge multiple hex conversions.
1843 * gdbreplay.c (tohex): Rename to 'fromhex'.
1844 (logchar): Use fromhex.
1846 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1848 * server.c (handle_qxfer_libraries): Set `version' attribute for
1851 2015-06-10 Gary Benson <gbenson@redhat.com>
1853 * target.h (struct target_ops) <multifs_open>: New field.
1854 <multifs_unlink>: Likewise.
1855 <multifs_readlink>: Likewise.
1856 * linux-low.c (nat/linux-namespaces.h): New include.
1857 (linux_target_ops): Initialize the_target->multifs_open,
1858 the_target->multifs_unlink and the_target->multifs_readlink.
1859 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1860 * hostio.c (hostio_fs_pid): New static variable.
1861 (hostio_handle_new_gdb_connection): New function.
1862 (handle_setfs): Likewise.
1863 (handle_open): Use the_target->multifs_open as appropriate.
1864 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1865 (handle_readlink): Use the_target->multifs_readlink as
1867 (handle_vFile): Handle vFile:setfs packets.
1868 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1869 after target_handle_new_gdb_connection.
1871 2015-06-10 Gary Benson <gbenson@redhat.com>
1873 * configure.ac (AC_CHECK_FUNCS): Add setns.
1874 * config.in: Regenerate.
1875 * configure: Likewise.
1876 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1877 (linux-namespaces.o): New rule.
1878 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1880 2015-06-09 Gary Benson <gbenson@redhat.com>
1882 * hostio.c (handle_open): Process mode argument with
1883 fileio_to_host_mode.
1885 2015-06-01 Yao Qi <yao.qi@linaro.org>
1887 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1888 * linux-x86-low.c: Likewise.
1890 2015-05-28 Don Breazeal <donb@codesourcery.com>
1892 * linux-low.c (handle_extended_wait): Initialize
1893 thread_info.last_resume_kind for new fork children.
1895 2015-05-15 Pedro Alves <palves@redhat.com>
1897 * target.h (target_handle_new_gdb_connection): Rewrite using if
1898 wrapped in do/while.
1900 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1902 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1903 * configure, config.in: Regenerate.
1904 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1907 2015-05-12 Don Breazeal <donb@codesourcery.com>
1909 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1910 PTRACE_EVENT_VFORK_DONE.
1911 (linux_low_ptrace_options, extended_event_reported): Add vfork
1913 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1914 and "vforkdone" for RSP 'T' Stop Reply Packet.
1915 * server.h (report_vfork_events): Declare
1918 2015-05-12 Don Breazeal <donb@codesourcery.com>
1920 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1921 (the_low_target) <new_fork>: Initialize new member.
1922 * linux-arm-low.c (arm_new_fork): New function.
1923 (the_low_target) <new_fork>: Initialize new member.
1924 * linux-low.c (handle_extended_wait): Call new target function
1926 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1927 * linux-mips-low.c (mips_add_watchpoint): New function
1928 extracted from mips_insert_point.
1929 (the_low_target) <new_fork>: Initialize new member.
1930 (mips_linux_new_fork): New function.
1931 (mips_insert_point): Call mips_add_watchpoint.
1932 * linux-x86-low.c (x86_linux_new_fork): New function.
1933 (the_low_target) <new_fork>: Initialize new member.
1935 2015-05-12 Don Breazeal <donb@codesourcery.com>
1937 * linux-low.c (handle_extended_wait): Implement return value,
1938 rename argument 'event_child' to 'event_lwp', handle
1939 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1940 (linux_low_ptrace_options): New function.
1941 (linux_low_filter_event): Call linux_low_ptrace_options,
1942 use different argument fo linux_enable_event_reporting,
1943 use return value from handle_extended_wait.
1944 (extended_event_reported): New function.
1945 (linux_wait_1): Call extended_event_reported and set
1946 status to report fork events.
1947 (linux_write_memory): Add pid to debug message.
1948 (reset_lwp_ptrace_options_callback): New function.
1949 (linux_handle_new_gdb_connection): New function.
1950 (linux_target_ops): Initialize new structure member.
1951 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1952 * lynx-low.c: Initialize new structure member.
1953 * remote-utils.c (prepare_resume_reply): Implement stop reason
1954 "fork" for "T" stop message.
1955 * server.c (handle_query): Call handle_new_gdb_connection.
1956 * server.h (report_fork_events): Declare global flag.
1957 * target.h (struct target_ops) <handle_new_gdb_connection>:
1959 (target_handle_new_gdb_connection): New macro.
1960 * win32-low.c: Initialize new structure member.
1962 2015-05-12 Don Breazeal <donb@codesourcery.com>
1964 * mem-break.c (APPEND_TO_LIST): Define macro.
1965 (clone_agent_expr): New function.
1966 (clone_one_breakpoint): New function.
1967 (clone_all_breakpoints): New function.
1968 * mem-break.h: Declare new functions.
1970 2015-05-12 Don Breazeal <donb@codesourcery.com>
1972 * linux-low.c (linux_supports_fork_events): New function.
1973 (linux_supports_vfork_events): New function.
1974 (linux_target_ops): Initialize new structure members.
1975 (initialize_low): Call linux_check_ptrace_features.
1976 * lynx-low.c (lynx_target_ops): Initialize new structure
1978 * server.c (report_fork_events, report_vfork_events):
1980 (handle_query): Add new features to qSupported packet and
1982 (captured_main): Initialize new global variables.
1983 * target.h (struct target_ops) <supports_fork_events>:
1985 <supports_vfork_events>: New member.
1986 (target_supports_fork_events): New macro.
1987 (target_supports_vfork_events): New macro.
1988 * win32-low.c (win32_target_ops): Initialize new structure
1991 2015-05-12 Gary Benson <gbenson@redhat.com>
1993 * server.c (handle_qxfer_exec_file): Use current process
1996 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1998 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1999 Remove HAVE_PTRACE_GETREGS conditionals.
2000 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2001 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2003 2015-05-08 Yao Qi <yao.qi@linaro.org>
2005 * linux-low.c (linux_supports_conditional_breakpoints): New
2007 (linux_target_ops): Install new target method.
2008 * lynx-low.c (lynx_target_ops): Install NULL hook for
2009 supports_conditional_breakpoints.
2010 * nto-low.c (nto_target_ops): Likewise.
2011 * spu-low.c (spu_target_ops): Likewise.
2012 * win32-low.c (win32_target_ops): Likewise.
2013 * server.c (handle_query): Check
2014 target_supports_conditional_breakpoints.
2015 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2017 (target_supports_conditional_breakpoints): New macro.
2019 2015-05-06 Pedro Alves <palves@redhat.com>
2022 * server.c (start_inferior): If the process exits, mourn it.
2024 2015-04-21 Gary Benson <gbenson@redhat.com>
2026 * hostio.c (fileio_open_flags_to_host): Factored out to
2027 fileio_to_host_openflags in common/fileio.c. Single use
2030 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2032 * linux-xtensa-low.c (xtensa_fill_gregset)
2033 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2036 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2038 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2039 (regs_info): Replace usrregs pointer with NULL.
2041 2015-04-17 Gary Benson <gbenson@redhat.com>
2043 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2044 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2045 * server.c (handle_qxfer_exec_file): New function.
2046 (qxfer_packets): Add exec-file entry.
2047 (handle_query): Report qXfer:exec-file:read as supported packet.
2049 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2051 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2053 2015-04-09 Gary Benson <gbenson@redhat.com>
2055 * hostio-errno.c (errno_to_fileio_error): Remove function.
2056 Update caller to use remote_fileio_to_fio_error.
2058 2015-04-09 Yao Qi <yao.qi@linaro.org>
2060 * linux-low.c (linux_insert_point): Call
2061 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2062 (linux_remove_point): Call remove_memory_breakpoint if type is
2064 * linux-x86-low.c (x86_insert_point): Don't call
2065 insert_memory_breakpoint.
2066 (x86_remove_point): Don't call remove_memory_breakpoint.
2068 2015-04-01 Pedro Alves <palves@redhat.com>
2069 Cleber Rosa <crosa@redhat.com>
2071 * server.c (gdbserver_usage): Reorganize and extend the usage
2074 2015-03-24 Pedro Alves <palves@redhat.com>
2076 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2077 output. Also dump TRAP_TRACE.
2078 (linux_low_filter_event): In debug output, distinguish a
2079 resume_stop SIGSTOP from a delayed SIGSTOP.
2081 2015-03-24 Gary Benson <gbenson@redhat.com>
2083 * linux-x86-low.c (x86_linux_new_thread): Moved to
2085 (x86_linux_prepare_to_resume): Likewise.
2087 2015-03-24 Gary Benson <gbenson@redhat.com>
2089 * Makefile.in (x86-linux-dregs.o): New rule.
2090 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2091 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2092 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2093 (x86_linux_dr_get): Likewise.
2094 (x86_linux_dr_set): Likewise.
2095 (update_debug_registers_callback): Likewise.
2096 (x86_linux_dr_set_addr): Likewise.
2097 (x86_linux_dr_get_addr): Likewise.
2098 (x86_linux_dr_set_control): Likewise.
2099 (x86_linux_dr_get_control): Likewise.
2100 (x86_linux_dr_get_status): Likewise.
2101 (x86_linux_update_debug_registers): Likewise.
2103 2015-03-24 Gary Benson <gbenson@redhat.com>
2105 * linux-x86-low.c (x86_linux_update_debug_registers):
2106 New function, factored out from...
2107 (x86_linux_prepare_to_resume): ...this.
2109 2015-03-24 Gary Benson <gbenson@redhat.com>
2111 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2112 (x86_linux_dr_set): Likewise.
2113 (update_debug_registers_callback): Likewise.
2114 (x86_linux_dr_set_addr): Likewise.
2115 (x86_linux_dr_get_addr): Likewise.
2116 (x86_linux_dr_set_control): Likewise.
2117 (x86_linux_dr_get_control): Likewise.
2118 (x86_linux_dr_get_status): Likewise.
2119 (x86_linux_prepare_to_resume): Likewise.
2121 2015-03-24 Gary Benson <gbenson@redhat.com>
2123 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2124 Use perror_with_name. Pass string through gettext.
2125 (x86_linux_dr_set): Likewise.
2127 2015-03-24 Gary Benson <gbenson@redhat.com>
2129 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2130 (x86_linux_dr_set_addr): ...this.
2131 (x86_dr_low_get_addr): Rename to...
2132 (x86_linux_dr_get_addr): ...this.
2133 (x86_dr_low_set_control): Rename to...
2134 (x86_linux_dr_set_control): ...this.
2135 (x86_dr_low_get_control): Rename to...
2136 (x86_linux_dr_get_control): ...this.
2137 (x86_dr_low_get_status): Rename to...
2138 (x86_linux_dr_get_status): ...this.
2139 (x86_dr_low): Update with new function names.
2141 2015-03-24 Gary Benson <gbenson@redhat.com>
2143 * Makefile.in (x86-linux.o): New rule.
2144 * configure.srv: Add x86-linux.o to relevant targets.
2145 * linux-low.c (lwp_set_arch_private_info): New function.
2146 (lwp_arch_private_info): Likewise.
2147 * linux-x86-low.c: Include nat/x86-linux.h.
2148 (arch_lwp_info): Removed structure.
2149 (update_debug_registers_callback):
2150 Use lwp_set_debug_registers_changed.
2151 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2152 and lwp_set_debug_registers_changed.
2153 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2155 2015-03-24 Gary Benson <gbenson@redhat.com>
2157 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2158 * linux-arm-low.c (arm_new_thread): Likewise.
2159 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2160 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2161 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2162 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2164 2015-03-24 Gary Benson <gbenson@redhat.com>
2166 * linux-low.c (ptid_of_lwp): New function.
2167 (lwp_is_stopped): Likewise.
2168 (lwp_stop_reason): Likewise.
2169 * linux-x86-low.c (update_debug_registers_callback):
2171 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2174 2015-03-24 Gary Benson <gbenson@redhat.com>
2176 * linux-low.h (linux_stop_lwp): Remove declaration.
2178 2015-03-24 Gary Benson <gbenson@redhat.com>
2180 * linux-low.h: Include nat/linux-nat.h.
2181 * linux-low.c (iterate_over_lwps_args): New structure.
2182 (iterate_over_lwps_filter): New function.
2183 (iterate_over_lwps): Likewise.
2184 * linux-x86-low.c (update_debug_registers_callback):
2185 Update signature to what iterate_over_lwps expects.
2186 Remove PID check that iterate_over_lwps now performs.
2187 (x86_dr_low_set_addr): Use iterate_over_lwps.
2188 (x86_dr_low_set_control): Likewise.
2190 2015-03-24 Gary Benson <gbenson@redhat.com>
2192 * linux-x86-low.c (x86_debug_reg_state): New function.
2193 (x86_linux_prepare_to_resume): Use the above.
2195 2015-03-24 Gary Benson <gbenson@redhat.com>
2197 * linux-low.c (current_lwp_ptid): New function.
2198 * linux-x86-low.c: Include nat/linux-nat.h.
2199 (x86_dr_low_get_addr): Use current_lwp_ptid.
2200 (x86_dr_low_get_control): Likewise.
2201 (x86_dr_low_get_status): Likewise.
2203 2015-03-20 Pedro Alves <palves@redhat.com>
2205 * tracepoint.c (cmd_qtstatus): Make "str" const.
2207 2015-03-20 Pedro Alves <palves@redhat.com>
2209 * server.c (handle_general_set): Make "req_str" const.
2211 2015-03-19 Pedro Alves <palves@redhat.com>
2213 * linux-low.c (linux_resume_one_lwp): Rename to ...
2214 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2215 instead call perror_with_name.
2216 (check_ptrace_stopped_lwp_gone): New function.
2217 (linux_resume_one_lwp): Reimplement as wrapper around
2218 linux_resume_one_lwp_throw that swallows errors if the LWP is
2221 2015-03-19 Pedro Alves <palves@redhat.com>
2223 * linux-low.c (count_events_callback, select_event_lwp_callback):
2224 No longer check whether the thread has resume_stop as last resume
2227 2015-03-19 Pedro Alves <palves@redhat.com>
2229 * linux-low.c (count_events_callback, select_event_lwp_callback):
2230 Use the lwp's status_pending_p field, not the thread's.
2232 2015-03-19 Pedro Alves <palves@redhat.com>
2234 * linux-low.c (select_event_lwp_callback): Update comments to
2235 no longer mention SIGTRAP.
2237 2015-03-18 Gary Benson <gbenson@redhat.com>
2239 * server.c (handle_query): Do not report vFile:fstat as supported.
2241 2015-03-11 Gary Benson <gbenson@redhat.com>
2243 * hostio.c (sys/types.h): New include.
2244 (sys/stat.h): Likewise.
2245 (common-remote-fileio.h): Likewise.
2246 (handle_fstat): New function.
2247 (handle_vFile): Handle vFile:fstat packets.
2249 2015-03-11 Gary Benson <gbenson@redhat.com>
2251 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2252 struct stat.st_blocks and struct stat.st_blksize.
2253 * configure: Regenerate.
2254 * config.in: Likewise.
2255 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2256 (OBS): Add common-remote-fileio.o.
2257 (common-remote-fileio.o): New rule.
2259 2015-03-09 Pedro Alves <palves@redhat.com>
2261 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2262 'struct sockaddr' pointer in 'accept' call.
2264 2015-03-09 Pedro Alves <palves@redhat.com>
2267 2015-03-07 Pedro Alves <palves@redhat.com>
2268 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2269 or <winsock2.h> here. Instead include "gdb_socket.h".
2270 (remote_open): Use union gdb_sockaddr_u.
2271 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2272 or <winsock2.h> here. Instead include "gdb_socket.h".
2273 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2274 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2276 (init_named_socket, gdb_agent_helper_thread): Use union
2279 2015-03-07 Pedro Alves <palves@redhat.com>
2281 * configure.ac (build_warnings): Move
2282 -Wdeclaration-after-statement to the C-specific set.
2283 * configure: Regenerate.
2285 2015-03-07 Pedro Alves <palves@redhat.com>
2287 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2288 or <winsock2.h> here. Instead include "gdb_socket.h".
2289 (remote_open): Use union gdb_sockaddr_u.
2290 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2291 or <winsock2.h> here. Instead include "gdb_socket.h".
2292 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2293 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2295 (init_named_socket, gdb_agent_helper_thread): Use union
2298 2015-03-07 Pedro Alves <palves@redhat.com>
2300 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2303 2015-03-06 Yao Qi <yao.qi@linaro.org>
2305 * linux-aarch64-low.c (aarch64_insert_point): Use
2306 show_debug_regs as a boolean.
2307 (aarch64_remove_point): Likewise.
2309 2015-03-05 Pedro Alves <palves@redhat.com>
2311 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2312 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2313 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2314 * nto-low.c (nto_target_ops): Likewise.
2315 * spu-low.c (spu_target_ops): Likewise.
2316 * win32-low.c (win32_target_ops): Likewise.
2318 2015-03-04 Pedro Alves <palves@redhat.com>
2320 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2321 Decide whether a breakpoint triggered based on the SIGTRAP's
2323 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2324 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2325 (linux_low_filter_event): Check for breakpoints before checking
2327 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2329 (linux_stopped_by_sw_breakpoint)
2330 (linux_supports_stopped_by_sw_breakpoint)
2331 (linux_stopped_by_hw_breakpoint)
2332 (linux_supports_stopped_by_hw_breakpoint): New functions.
2333 (linux_target_ops): Install new target methods.
2335 2015-03-04 Pedro Alves <palves@redhat.com>
2337 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2338 * server.c (swbreak_feature, hwbreak_feature): New globals.
2339 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2340 (captured_main): Clear swbreak_feature and hwbreak_feature.
2341 * server.h (swbreak_feature, hwbreak_feature): Declare.
2342 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2343 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2344 supports_stopped_by_hw_breakpoint>: New fields.
2345 (target_supports_stopped_by_sw_breakpoint)
2346 (target_stopped_by_sw_breakpoint)
2347 (target_supports_stopped_by_hw_breakpoint)
2348 (target_stopped_by_hw_breakpoint): Declare.
2350 2015-03-04 Pedro Alves <palves@redhat.com>
2352 enum lwp_stop_reason -> enum target_stop_reason
2353 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2354 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2355 (linux_wait_1, stuck_in_jump_pad_callback)
2356 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2357 (linux_stopped_by_watchpoint):
2358 * linux-low.h (enum lwp_stop_reason): Delete.
2359 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2360 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2362 2015-03-04 Yao Qi <yao.qi@linaro.org>
2364 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2366 2015-03-03 Gary Benson <gbenson@redhat.com>
2368 * hostio.c (handle_vFile): Fix prefix lengths.
2370 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2372 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2375 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2377 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2378 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2379 (clean): Add "rm -f" for above C files.
2380 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2381 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2382 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2383 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2384 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2385 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2386 (init_registers_s390x_vx_linux64)
2387 (init_registers_s390x_tevx_linux64)
2388 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2389 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2391 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2392 (s390_store_vxrs_high): New functions.
2393 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2395 (s390_arch_setup): Add logic for selecting one of the new target
2396 descriptions. Activate the new vector regsets if applicable.
2397 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2398 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2399 and init_registers_s390x_tevx_linux64.
2401 2015-03-01 Pedro Alves <palves@redhat.com>
2403 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2406 2015-02-27 Pedro Alves <palves@redhat.com>
2408 * linux-x86-low.c (u_debugreg_offset): New function.
2409 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2411 2015-02-27 Pedro Alves <palves@redhat.com>
2413 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2414 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2415 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2416 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2417 (ps_lsetfpregs, ps_getpid)
2418 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2419 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2420 (ps_lsetxregs, ps_plog): Declare.
2422 2015-02-27 Pedro Alves <palves@redhat.com>
2424 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2425 IP_AGENT_EXPORT_FUNC.
2426 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2427 IP_AGENT_EXPORT_FUNC.
2428 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2429 (IP_AGENT_EXPORT): Delete.
2430 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2431 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2432 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2433 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2434 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2435 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2436 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2437 (traceframe_read_count, traceframe_write_count)
2438 (traceframes_created, trace_state_variables, get_raw_reg)
2439 (get_trace_state_variable_value, set_trace_state_variable_value)
2440 (ust_loaded, helper_thread_id, cmd_buf): Use
2441 IPA_SYM_EXPORTED_NAME.
2442 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2443 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2444 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2445 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2446 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2447 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2448 EXTERN_C_PUSH/EXTERN_C_POP.
2449 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2450 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2451 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2452 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2453 (traceframe_write_count, traceframe_read_count)
2454 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2455 (about_to_request_buffer_space, get_trace_state_variable_value)
2456 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2457 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2458 EXTERN_C_PUSH/EXTERN_C_POP.
2459 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2460 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2461 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2462 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2463 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2464 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2465 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2466 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2468 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2469 (IP_AGENT_EXPORT_VAR_DECL): Define.
2471 (gdb_agent_get_raw_reg): Declare.
2473 2015-02-27 Tom Tromey <tromey@redhat.com>
2474 Pedro Alves <palves@redhat.com>
2476 Rename symbols whose names are reserved C++ keywords throughout.
2478 2015-02-27 Pedro Alves <palves@redhat.com>
2480 * Makefile.in (COMPILER): New, get it from autoconf.
2481 (CXX): Get from autoconf instead.
2482 (COMPILE.pre): Use COMPILER.
2483 (CC-LD): Rename to ...
2484 (CC_LD): ... this. Use COMPILER.
2485 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2486 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2487 * acinclude.m4: Include build-with-cxx.m4.
2488 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2489 Disable -Werror by default if building in C++ mode.
2490 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2491 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2492 the C++ compiler. Save/restore CXXFLAGS too.
2493 * configure: Regenerate.
2495 2015-02-27 Pedro Alves <palves@redhat.com>
2497 * acinclude.m4: Include libiberty.m4.
2498 * configure.ac: Call libiberty_INIT.
2499 * config.in, configure: Regenerate.
2501 2015-02-26 Pedro Alves <palves@redhat.com>
2503 * linux-low.c (linux_wait_1): When incrementing the PC past a
2504 program breakpoint always use the_low_target.breakpoint_len as
2505 increment, rather than the maximum between that and
2506 the_low_target.decr_pc_after_break.
2508 2015-02-23 Pedro Alves <palves@redhat.com>
2510 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2511 thread was doing a step-over; always adjust the PC if
2512 we stepped over a permanent breakpoint.
2513 (linux_wait_1): If we stepped over breakpoint that was on top of a
2514 permanent breakpoint, manually advance the PC past it.
2516 2015-02-23 Pedro Alves <palves@redhat.com>
2518 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2520 (x86_fill_gregset, x86_store_gregset): Use it when handling
2523 2015-02-20 Pedro Alves <palves@redhat.com>
2525 * thread-db.c: Include "nat/linux-procfs.h".
2526 (thread_db_init): Skip listing new threads if the kernel supports
2527 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2529 2015-02-20 Pedro Alves <palves@redhat.com>
2531 * linux-low.c (status_pending_p_callback): Use ptid_match.
2533 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2535 PR breakpoints/16812
2536 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2537 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2538 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2540 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2542 PR breakpoints/15956
2543 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2545 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2547 * linux-low.c (linux_low_btrace_conf): Print size.
2548 * server.c (handle_btrace_conf_general_set): New.
2549 (hanle_general_set): Call handle_btrace_conf_general_set.
2550 (handle_query): Report Qbtrace-conf:bts:size as supported.
2552 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2554 * linux-low.c (linux_low_enable_btrace): Update parameters.
2555 (linux_low_btrace_conf): New.
2556 (linux_target_ops)<to_btrace_conf>: Initialize.
2557 * server.c (current_btrace_conf): New.
2558 (handle_btrace_enable): Rename to ...
2559 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2560 to target_enable_btrace. Update comment. Update users.
2561 (handle_qxfer_btrace_conf): New.
2562 (qxfer_packets): Add btrace-conf entry.
2563 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2564 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2565 (target_ops)<read_btrace_conf>: New.
2566 (target_enable_btrace): Update parameters.
2567 (target_read_btrace_conf): New.
2569 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2571 * server.c (handle_btrace_general_set): Remove call to
2572 target_supports_btrace.
2573 (supported_btrace_packets): New.
2574 (handle_query): Call supported_btrace_packets.
2575 * target.h: include btrace-common.h.
2576 (btrace_target_info): Removed.
2577 (supports_btrace, target_supports_btrace): Update parameters.
2579 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2581 * Makefile.in (SFILES): Add common/btrace-common.c.
2582 (OBS): Add common/btrace-common.o.
2583 (btrace-common.o): Add build rules.
2584 * linux-low: Include btrace-common.h.
2585 (linux_low_read_btrace): Use struct btrace_data. Call
2586 btrace_data_init and btrace_data_fini.
2588 2015-02-06 Pedro Alves <palves@redhat.com>
2590 * thread-db.c (find_new_threads_callback): Add debug output.
2592 2015-02-04 Pedro Alves <palves@redhat.com>
2594 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2595 (resume_stopped_resumed_lwps): New function.
2596 (linux_wait_for_event_filtered): Use it.
2598 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2600 * Makefile.in (SFILES): Add linux-personality.c.
2601 (linux-personality.o): New rule.
2602 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2603 list of objects to be built.
2604 * linux-low.c: Include nat/linux-personality.h.
2605 (linux_create_inferior): Remove code to disable address space
2606 randomization (moved to ../nat/linux-personality.c). Create
2607 cleanup to disable address space randomization.
2609 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2611 * Makefile.in (posix-strerror.o): New rule.
2612 (mingw-strerror.o): Likewise.
2613 * configure: Regenerated.
2614 * configure.ac: Source file ../common/common.host. Initialize new
2615 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2617 2015-01-14 Yao Qi <yao@codesourcery.com>
2619 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2620 (ppc-linux.o): New rule.
2621 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2622 * configure.ac: AC_CHECK_FUNCS(getauxval).
2623 * config.in: Re-generated.
2624 * configure: Re-generated.
2625 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2626 ppc64_64bit_inferior_p
2628 2015-01-14 Yao Qi <yao@codesourcery.com>
2630 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2631 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2632 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2633 (PT_ORIG_R3, PT_TRAP): Likewise.
2634 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2635 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2636 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2638 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2640 * i387-fp.c (i387_cache_to_xsave): In look over
2641 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2642 zmmh_low_space field by use of zmmh_high_space.
2644 2015-01-09 Pedro Alves <palves@redhat.com>
2646 * linux-low.c (step_over_bkpt): Move higher up in the file.
2647 (handle_extended_wait): Don't store the stop_pc here.
2648 (get_stop_pc): Adjust comments and rename to ...
2649 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2650 stopped for a software breakpoint or hardware breakpoint.
2651 (thread_still_has_status_pending_p): New function.
2652 (status_pending_p_callback): Use
2653 thread_still_has_status_pending_p. If the event is no longer
2654 interesting, resume the LWP.
2655 (handle_tracepoints): Add assert.
2656 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2657 (wstatus_maybe_breakpoint): New function.
2658 (cancel_breakpoint): Delete function.
2659 (check_stopped_by_watchpoint): New function, factored out from
2660 linux_low_filter_event.
2661 (lp_status_maybe_breakpoint): Delete function.
2662 (linux_low_filter_event): Remove filter_ptid argument.
2663 Leave thread group exits pending here. Store the LWP's stop PC.
2664 Always leave events pending.
2665 (linux_wait_for_event_filtered): Pull all events out of the
2666 kernel, and leave them all pending.
2667 (count_events_callback, select_event_lwp_callback): Consider all
2669 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2670 (select_event_lwp): Only give preference to the stepping LWP in
2671 all-stop mode. Adjust comments.
2672 (ignore_event): New function.
2673 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2674 references to cancel_breakpoints. Adjust to renames. Also give
2675 equal priority to all LWPs that have had events in non-stop mode.
2676 If reporting a software breakpoint event, unadjust the LWP's PC.
2677 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2678 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2680 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2681 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2682 (linux_stopped_by_watchpoint): Adjust.
2683 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2684 * linux-low.h (enum lwp_stop_reason): New.
2685 (struct lwp_info) <stop_pc>: Adjust comment.
2686 <stopped_by_watchpoint>: Delete field.
2687 <stop_reason>: New field.
2688 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2689 * mem-break.c (software_breakpoint_inserted_here)
2690 (hardware_breakpoint_inserted_here): New function.
2691 * mem-break.h (software_breakpoint_inserted_here)
2692 (hardware_breakpoint_inserted_here): Declare.
2693 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2694 (cancel_breakpoints): Delete.
2695 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2696 (upload_fast_traceframes): Remove references to
2699 2015-01-09 Pedro Alves <palves@redhat.com>
2701 * thread-db.c (find_new_threads_callback): Ignore thread if the
2702 kernel thread ID is -1.
2704 2015-01-09 Pedro Alves <palves@redhat.com>
2706 * linux-low.c (linux_attach_fail_reason_string): Move to
2707 nat/linux-ptrace.c, and rename.
2708 (linux_attach_lwp): Update comment.
2709 (attach_proc_task_lwp_callback): New function.
2710 (linux_attach): Adjust to rename and use
2711 linux_proc_attach_tgid_threads.
2712 (linux_attach_fail_reason_string): Delete declaration.
2714 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2716 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2717 * server.c (gdbserver_version): Likewise.
2719 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2721 * remote-utils.c: Include ctype.h.
2722 (input_interrupt): Explicitly handle the case when the char
2723 received is the NUL byte. Improve the printing of non-ASCII
2726 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2728 * linux-low.c (linux_low_filter_event): Update call to
2729 linux_enable_event_reporting following the addition of
2730 a new parameter to that function.
2732 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2735 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2736 (AARCH64_FPCR_REGNO): Likewise.
2737 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2738 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2739 (aarch64_store_fpregset): Likewise.
2741 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2743 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2744 Remove FIXME comment about assumption about N.
2746 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2748 * configure.ac: If large-file support is disabled in GDBserver,
2749 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2750 * configure: Regenerate.
2752 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2754 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2755 warning upon ENODATA from ptrace.
2756 * linux-s390-low.c (s390_store_tdb): New.
2757 (s390_regsets): Add regset for NT_S390_TDB.
2759 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2761 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2762 without a fill_function.
2763 * linux-s390-low.c (s390_fill_last_break): Remove.
2764 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2765 (s390_arch_setup): Use regset's size instead of fill_function for
2768 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2770 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2771 the regset's store function when ptrace returned an error.
2772 * regcache.c (get_thread_regcache): Invalidate register cache
2773 before fetching inferior's registers.
2775 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2777 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2778 while-loop as for-loop.
2779 (regsets_store_inferior_registers): Likewise.
2781 2014-11-28 Yao Qi <yao@codesourcery.com>
2783 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2784 * config.in, configure: Re-generate.
2785 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2788 2014-11-21 Yao Qi <yao@codesourcery.com>
2790 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2791 (AC_CHECK_HEADERS): Remove malloc.h.
2792 * configure: Re-generated.
2793 * config.in: Re-generated.
2794 * server.h: Don't include alloca.h and malloc.h.
2795 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2796 Don't include malloc.h.
2798 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2800 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2801 corresponding ERRNO check in same block.
2803 2014-11-12 Pedro Alves <palves@redhat.com>
2805 * server.c (cont_thread): Update comment.
2806 (start_inferior, attach_inferior): No longer clear cont_thread.
2807 (handle_v_cont): No longer set cont_thread.
2808 (captured_main): Clear cont_thread each time a GDB connects.
2810 2014-11-12 Pedro Alves <palves@redhat.com>
2812 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2813 thread, and don't resume all threads if the Hc thread has exited.
2815 2014-11-12 Pedro Alves <palves@redhat.com>
2817 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2818 the process group instead of to a specific LWP.
2820 2014-10-15 Pedro Alves <palves@redhat.com>
2823 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2825 (arm_set_thread_context): Delete.
2826 (the_low_target): Adjust.
2827 * win32-i386-low.c (debug_registers_changed)
2828 (debug_registers_used): Delete.
2829 (update_debug_registers_callback): New function.
2830 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2831 needing to update their debug registers.
2832 (win32_get_current_dr): New function.
2833 (x86_dr_low_get_addr, x86_dr_low_get_control)
2834 (x86_dr_low_get_status): Fetch the debug register from the thread
2836 (i386_initial_stuff): Adjust.
2837 (i386_get_thread_context): Remove current_event parameter. Don't
2838 clear debug_registers_changed nor copy DR values to
2840 (i386_set_thread_context): Delete.
2841 (i386_prepare_to_resume): New function.
2842 (i386_thread_added): Mark the thread as needing to update irs
2844 (the_low_target): Remove i386_set_thread_context and install
2845 i386_prepare_to_resume.
2846 * win32-low.c (win32_get_thread_context): Adjust.
2847 (win32_set_thread_context): Use SetThreadContext
2849 (win32_prepare_to_resume): New function.
2850 (win32_require_context): New function, factored out from ...
2851 (thread_rec): ... this.
2852 (continue_one_thread): Call win32_prepare_to_resume on each thread
2853 we're about to continue.
2854 (win32_resume): Call win32_prepare_to_resume on the event thread.
2855 * win32-low.h (struct win32_thread_info)
2856 <debug_registers_changed>: New field.
2857 (struct win32_target_ops): Change prototype of set_thread_context,
2858 delete set_thread_context and add prepare_to_resume.
2859 (win32_require_context): New declaration.
2861 2014-10-08 Gary Benson <gbenson@redhat.com>
2863 * server.h: Do not include common-exceptions.h.
2865 2014-10-08 Gary Benson <gbenson@redhat.com>
2867 * server.h: Do not include cleanups.h.
2869 2014-09-30 James Hogan <james.hogan@imgtec.com>
2871 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2874 2014-09-23 Yao Qi <yao@codesourcery.com>
2876 * linux-low.c (lp_status_maybe_breakpoint): New function.
2877 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2878 (count_events_callback): Likewise.
2879 (select_event_lwp_callback): Likewise.
2880 (cancel_breakpoints_callback): Likewise.
2882 2014-09-19 Don Breazeal <donb@codesourcery.com>
2884 * linux-low.c (handle_extended_wait): Call
2885 linux_ptrace_get_extended_event.
2886 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2887 linux_is_extended_waitstatus.
2889 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2891 * Makefile.in (CPPFLAGS): Define.
2892 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2893 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2895 2014-09-16 Gary Benson <gbenson@redhat.com>
2897 * inferiors.h (current_inferior): Renamed as...
2898 (current_thread): New variable. All uses updated.
2899 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2900 (maybe_move_out_of_jump_pad): Likewise.
2901 (cancel_breakpoint): Likewise.
2902 (linux_low_filter_event): Likewise.
2903 (wait_for_sigstop): Likewise.
2904 (linux_resume_one_lwp): Likewise.
2905 (need_step_over_p): Likewise.
2906 (start_step_over): Likewise.
2907 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2908 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2909 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2910 and save_inferior as saved_thread.
2911 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2913 (regcache_invalidate_thread): Likewise.
2914 * remote-utils.c (prepare_resume_reply): Likewise.
2915 * thread-db.c (thread_db_get_tls_address): Likewise.
2916 (disable_thread_event_reporting): Likewise.
2917 (remove_thread_event_breakpoints): Likewise.
2918 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2920 * target.h (set_desired_inferior): Renamed as...
2921 (set_desired_thread): New declaration. All uses updated.
2922 * server.c (myresume): Updated comment to reference thread instead
2924 (handle_serial_event): Likewise.
2925 (handle_target_event): Likewise.
2927 2014-09-12 Tom Tromey <tromey@redhat.com>
2928 Gary Benson <gbenson@redhat.com>
2930 * regcache.h: Include common-regcache.h.
2931 (regcache_read_pc): Don't declare.
2932 * regcache.c (get_thread_regcache_for_ptid): New function.
2934 2014-09-11 Tom Tromey <tromey@redhat.com>
2935 Gary Benson <gbenson@redhat.com>
2937 * symbol.c: New file.
2938 * Makefile.in (SFILES): Add symbol.c.
2939 (OBS): Add symbol.o.
2941 2014-09-11 Gary Benson <gbenson@redhat.com>
2943 * target.c (target_stop_ptid, target_continue_ptid): New
2946 2014-09-11 Tom Tromey <tromey@redhat.com>
2947 Gary Benson <gbenson@redhat.com>
2949 * target.h: Include target/target.h.
2950 * target.c (target_read_memory, target_read_uint32)
2951 (target_write_memory): New functions.
2953 2014-09-11 Gary Benson <gbenson@redhat.com>
2955 * server.h (debug_hw_points): Don't declare.
2956 * server.c (debug_hw_points): Don't define. Replace all uses
2957 with show_debug_regs.
2958 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2959 all uses with show_debug_regs.
2961 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2963 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2964 endianness into account.
2965 (ppc_supply_ptrace_register): Likewise.
2967 2014-09-03 James Hogan <james.hogan@imgtec.com>
2969 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2970 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2972 2014-09-03 Gary Benson <gbenson@redhat.com>
2974 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2975 ALL_DEBUG_ADDRESS_REGISTERS.
2977 2014-09-02 Gary Benson <gbenson@redhat.com>
2979 * i386-low.h: Renamed as...
2980 * x86-low.h: New file. All type, function and variable name
2981 prefixes changed from "i386_" to "x86_". All references updated.
2982 * i386-low.c: Renamed as...
2983 * x86-low.c: New file. All type, function and variable name
2984 prefixes changed from "i386_" to "x86_". All references updated.
2986 2014-09-02 Gary Benson <gbenson@redhat.com>
2988 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2989 (x86_linux_new_thread): Likewise.
2991 2014-08-29 Gary Benson <gbenson@redhat.com>
2993 * server.h (setjmp.h): Do not include.
2994 (toplevel): Do not declare.
2995 (common-exceptions.h): Include.
2996 (cleanups.h): Likewise.
2997 * server.c (toplevel): Do not define.
2998 (exit_code): New static global.
2999 (detach_or_kill_for_exit_cleanup): New function.
3000 (main): New function. Original main renamed to...
3001 (captured_main): New function.
3002 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3004 2014-08-29 Gary Benson <gbenson@redhat.com>
3006 * Makefile.in (SFILES): Add common/common-exceptions.c.
3007 (OBS): Add common-exceptions.o.
3008 (common-exceptions.o): New rule.
3009 * utils.c (prepare_to_throw_exception): New function.
3011 2014-08-29 Gary Benson <gbenson@redhat.com>
3013 * config.in: Regenerate.
3014 * configure: Likewise.
3016 2014-08-29 Gary Benson <gbenson@redhat.com>
3018 * Makefile.in (SFILES): Add common/cleanups.c.
3020 (cleanups.o): New rule.
3022 2014-08-29 Gary Benson <gbenson@redhat.com>
3024 * utils.c (internal_vwarning): New function.
3026 2014-08-28 Gary Benson <gbenson@redhat.com>
3028 * utils.h (fatal): Remove declaration.
3029 * utils.c (fatal): Remove function.
3031 2014-08-28 Gary Benson <gbenson@redhat.com>
3033 * tracepoint.c (gdb_agent_init): Replace fatal with
3035 (initialize_tracepoint): Likewise.
3037 2014-08-28 Gary Benson <gbenson@redhat.com>
3039 * remote-utils.c (remote_prepare): Replace fatal with error.
3041 2014-08-28 Gary Benson <gbenson@redhat.com>
3043 * linux-low.c (linux_async): Replace fatal with warning.
3045 (linux_start_non_stop): Return -1 if linux_async failed.
3047 2014-08-28 Gary Benson <gbenson@redhat.com>
3049 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3051 (i386_dr_low_get_addr): Remove vague comment.
3052 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3055 2014-08-28 Gary Benson <gbenson@redhat.com>
3057 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3058 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3060 (linux_resume_one_lwp): Likewise.
3061 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3063 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3064 with internal_error.
3065 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3066 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3067 (find_register_by_name): Replace fatal with internal_error.
3068 (find_regno): Likewise.
3069 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3070 * thread-db.c (thread_db_create_event): Likewise.
3071 (thread_db_load_search): Likewise.
3072 (try_thread_db_load_1): Likewise.
3073 * tracepoint.c (get_jump_space_head): Replace fatal with
3075 (claim_trampoline_space): Likewise.
3076 (have_fast_tracepoint_trampoline_buffer): Likewise.
3077 (cmd_qtstart): Likewise.
3078 (stop_tracing): Likewise.
3079 (fast_tracepoint_collecting): Likewise.
3080 (target_malloc): Likewise.
3081 (download_tracepoint): Likewise.
3082 (download_trace_state_variables): Replace check with gdb_assert.
3083 (upload_fast_traceframes): Replace fatal with internal_error.
3085 2014-08-19 Tom Tromey <tromey@redhat.com>
3086 Gary Benson <gbenson@redhat.com>
3088 * Makefile.in (SFILES): Add common/common-debug.c.
3089 (OBS): Add common-debug.o.
3090 (common-debug.o): New rule.
3091 * debug.h (debug_printf): Don't declare.
3092 * debug.c (debug_printf): Renamed and rewritten as...
3093 (debug_vprintf): New function.
3095 2014-08-19 Gary Benson <gbenson@redhat.com>
3097 * utils.h: Do not include print-utils.h.
3099 2014-08-19 Tom Tromey <tromey@redhat.com>
3100 Gary Benson <gbenson@redhat.com>
3102 * server.h: Add static assertion.
3103 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3105 2014-08-19 Tom Tromey <tromey@redhat.com>
3106 Gary Benson <gbenson@redhat.com>
3108 * Makefile.in (SFILES): Add common/errors.c.
3109 (OBS): Add errors.o.
3110 (IPA_OBS): Add errors-ipa.o.
3111 (errors.o): New rule.
3112 (errors-ipa.o): Likewise.
3113 * utils.h (perror_with_name, error, warning): Don't declare.
3114 * utils.c (warning): Renamed and rewritten as...
3115 (vwarning): New function.
3116 (error): Renamed and rewritten as...
3117 (verror): New function.
3118 (internal_error): Renamed and rewritten as...
3119 (internal_verror): New function.
3121 2014-08-07 Gary Benson <gbenson@redhat.com>
3123 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3124 * configure: Regenerate.
3125 * config.in: Likewise.
3126 * server.h: Do not include errno.h.
3127 * event-loop.c: Likewise.
3128 * hostio-errno.c: Likewise.
3129 * linux-low.c: Likewise.
3130 * remote-utils.c: Likewise.
3131 * spu-low.c: Likewise.
3132 * utils.c: Likewise.
3133 * gdbreplay.c: Unconditionally include errno.h.
3135 2014-08-07 Gary Benson <gbenson@redhat.com>
3137 * server.h: Do not include string.h.
3138 * event-loop.c: Likewise.
3139 * linux-low.c: Likewise.
3140 * regcache.c: Likewise.
3141 * remote-utils.c: Likewise.
3142 * spu-low.c: Likewise.
3143 * utils.c: Likewise.
3145 2014-08-07 Gary Benson <gbenson@redhat.com>
3147 * server.h: Do not include gdb_assert.h.
3149 2014-08-07 Gary Benson <gbenson@redhat.com>
3151 * server.h: Do not include common-utils.h.
3153 2014-08-07 Gary Benson <gbenson@redhat.com>
3155 * server.h: Do not include ptid.h.
3156 * notif.h: Likewise.
3158 2014-08-07 Gary Benson <gbenson@redhat.com>
3160 * server.h: Do not include gdb_locale.h.
3162 2014-08-07 Gary Benson <gbenson@redhat.com>
3164 * server.h: Do not include gdb/signals.h.
3165 * win32-low.c: Likewise.
3167 2014-08-07 Gary Benson <gbenson@redhat.com>
3169 * server.h: Do not include pathmax.h.
3171 2014-08-07 Gary Benson <gbenson@redhat.com>
3173 * server.h: Do not include libiberty.h.
3174 * linux-bfin-low.c: Likewise.
3176 2014-08-07 Gary Benson <gbenson@redhat.com>
3178 * server.h: Do not include ansidecl.h.
3180 2014-08-07 Gary Benson <gbenson@redhat.com>
3182 * linux-x86-low.c: Do not include stddef.h.
3183 * lynx-ppc-low.c: Likewise.
3184 * tracepoint.c: Likewise.
3186 2014-08-07 Gary Benson <gbenson@redhat.com>
3188 * server.h: Do not include stdarg.h.
3189 * nto-low.c: Likewise.
3191 2014-08-07 Gary Benson <gbenson@redhat.com>
3193 * server.h: Do not include stdlib.h.
3194 * inferiors.c: Likewise.
3195 * linux-low.c: Likewise.
3196 * regcache.c: Likewise.
3197 * spu-low.c: Likewise.
3198 * tracepoint.c: Likewise.
3199 * utils.c: Likewise.
3201 2014-08-07 Gary Benson <gbenson@redhat.com>
3203 * server.h: Do not include stdio.h.
3204 * linux-low.c: Likewise.
3205 * remote-utils.c: Likewise.
3206 * spu-low.c: Likewise.
3207 * utils.c: Likewise.
3208 * wincecompat.c: Likewise.
3210 2014-08-06 Gary Benson <gbenson@redhat.com>
3212 * regcache.c (init_register_cache): Move conditionals inside if.
3214 2014-08-06 Gary Benson <gbenson@redhat.com>
3216 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3218 2014-07-31 Gary Benson <gbenson@redhat.com>
3220 * ax.h: Do not include server.h.
3221 * gdbthread.h: Likewise.
3222 * lynx-low.h: Likewise.
3223 * notif.h: Likewise.
3225 2014-07-30 Gary Benson <gbenson@redhat.com>
3227 * server.h: Include common-defs.h.
3228 Do not include config.h or build-gnulib-gdbserver/config.h.
3230 2014-07-30 Gary Benson <gbenson@redhat.com>
3232 * hostio-errno.c: Move server.h to top of includes list.
3233 * inferiors.c: Likewise.
3234 * linux-x86-low.c: Likewise.
3235 * notif.c: Include server.h.
3237 2014-07-24 Tom Tromey <tromey@redhat.com>
3238 Gary Benson <gbenson@redhat.com>
3240 * server.h (CORE_ADDR): Now unsigned.
3242 2014-07-16 Pedro Alves <palves@redhat.com>
3244 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3246 2014-07-15 Pedro Alves <palves@redhat.com>
3248 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3251 2014-07-11 Pedro Alves <palves@redhat.com>
3253 * linux-low.c (kill_wait_lwp): New function, based on
3254 kill_one_lwp_callback, but use my_waitpid directly.
3255 (kill_one_lwp_callback, linux_kill): Use it.
3257 2014-06-23 Pedro Alves <palves@redhat.com>
3259 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3260 before setting DR0..DR3.
3262 2014-06-20 Gary Benson <gbenson@redhat.com>
3264 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3265 * configure: Regenerated.
3266 * config.in: Likewise.
3268 2014-06-20 Gary Benson <gbenson@redhat.com>
3270 * Makefile.in (SFILES): Update locations for files moved
3272 (object file files): Reordered.
3274 2014-06-20 Gary Benson <gbenson@redhat.com>
3276 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3277 (i386_dr_low_set_addr): Likewise.
3278 (i386_dr_low_get_addr): Likewise.
3279 (i386_dr_low_can_set_control): Likewise.
3280 (i386_dr_low_set_control): Likewise.
3281 (i386_dr_low_get_control): Likewise.
3282 (i386_dr_low_get_status): Likewise.
3283 (i386_get_debug_register_length): Likewise.
3284 * linux-x86-low.c (i386_dr_low_set_addr):
3285 Changed signature. Made static.
3286 (i386_dr_low_get_addr): Likewise.
3287 (i386_dr_low_set_control): Likewise.
3288 (i386_dr_low_get_control): Likewise.
3289 (i386_dr_low_get_status): Likewise.
3290 (i386_dr_low): New global variable.
3291 * win32-i386-low.c (i386_dr_low_set_addr):
3292 Changed signature. Made static.
3293 (i386_dr_low_get_addr): Likewise.
3294 (i386_dr_low_set_control): Likewise.
3295 (i386_dr_low_get_control): Likewise.
3296 (i386_dr_low_get_status): Likewise.
3297 (i386_dr_low): New global variable.
3299 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3301 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3302 * Makefile.in (AR, AR_FLAGS): Define.
3303 * configure: Regenerate.
3305 2014-06-19 Gary Benson <gbenson@redhat.com>
3307 * Makefile.in (i386-dregs.o): New rule.
3308 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3309 * i386-low.c (target.h): Remove include.
3310 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3311 (DR_CONTROL_SHIFT): Likewise.
3312 (DR_CONTROL_SIZE): Likewise.
3313 (DR_RW_EXECUTE): Likewise.
3314 (DR_RW_WRITE): Likewise.
3315 (DR_RW_READ): Likewise.
3316 (DR_RW_IORW): Likewise.
3317 (DR_LEN_1): Likewise.
3318 (DR_LEN_2): Likewise.
3319 (DR_LEN_4): Likewise.
3320 (DR_LEN_8): Likewise.
3321 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3322 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3323 (DR_ENABLE_SIZE): Likewise.
3324 (DR_LOCAL_SLOWDOWN): Likewise.
3325 (DR_GLOBAL_SLOWDOWN): Likewise.
3326 (DR_CONTROL_RESERVED): Likewise.
3327 (I386_DR_CONTROL_MASK): Likewise.
3328 (I386_DR_VACANT): Likewise.
3329 (I386_DR_LOCAL_ENABLE): Likewise.
3330 (I386_DR_GLOBAL_ENABLE): Likewise.
3331 (I386_DR_DISABLE): Likewise.
3332 (I386_DR_SET_RW_LEN): Likewise.
3333 (I386_DR_GET_RW_LEN): Likewise.
3334 (I386_DR_WATCH_HIT): Likewise.
3335 (i386_wp_op_t): Likewise.
3336 (i386_show_dr): Likewise.
3337 (i386_length_and_rw_bits): Likewise.
3338 (i386_insert_aligned_watchpoint): Likewise.
3339 (i386_remove_aligned_watchpoint): Likewise.
3340 (i386_handle_nonaligned_watchpoint): Likewise.
3341 i386_update_inferior_debug_regs(): Likewise.
3342 (i386_dr_insert_watchpoint): Likewise.
3343 (i386_dr_remove_watchpoint): Likewise.
3344 (i386_dr_region_ok_for_watchpoint): Likewise.
3345 (i386_dr_stopped_data_address): Likewise.
3346 (i386_dr_stopped_by_watchpoint): Likewise.
3348 2014-06-19 Gary Benson <gbenson@redhat.com>
3350 * i386-low.c (i386_dr_show): Renamed to
3351 i386_show_dr and made static. All uses updated.
3352 (i386_dr_length_and_rw_bits): Renamed to
3353 i386_length_and_rw_bits and made static.
3355 (i386_dr_insert_aligned_watchpoint): Renamed to
3356 i386_insert_aligned_watchpoint and made static.
3358 (i386_dr_remove_aligned_watchpoint): Renamed to
3359 i386_remove_aligned_watchpoint and made static.
3361 (i386_dr_update_inferior_debug_regs): Renamed to
3362 i386_update_inferior_debug_regs and made static.
3365 2014-06-18 Gary Benson <gbenson@redhat.com>
3367 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3368 (i386_dr_low_can_set_control): Likewise.
3369 (i386_get_debug_register_length): Likewise.
3370 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3371 (i386_dr_low_can_set_control): Likewise.
3372 (i386_get_debug_register_length): Likewise.
3374 2014-06-17 Gary Benson <gbenson@redhat.com>
3376 * i386-low.h (i386-dregs.h): New include.
3377 (DR_FIRSTADDR): Now in i386-dregs.h.
3378 (DR_LASTADDR): Likewise.
3379 (DR_NADDR): Likewise.
3380 (DR_STATUS): Likewise.
3381 (DR_CONTROL): Likewise.
3382 (i386_debug_reg_state): Likewise.
3383 (i386_dr_insert_watchpoint): Likewise.
3384 (i386_dr_remove_watchpoint): Likewise.
3385 (i386_dr_region_ok_for_watchpoint): Likewise.
3386 (i386_dr_stopped_data_address): Likewise.
3387 (i386_dr_stopped_by_watchpoint): Likewise.
3388 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3390 2014-06-18 Gary Benson <gbenson@redhat.com>
3392 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3393 i386_dr_insert_watchpoint.
3394 (i386_low_remove_watchpoint): Renamed to
3395 i386_dr_remove_watchpoint.
3396 (i386_low_region_ok_for_watchpoint): Renamed to
3397 i386_dr_region_ok_for_watchpoint.
3398 (i386_low_stopped_data_address): Renamed to
3399 i386_dr_stopped_data_address.
3400 (i386_low_stopped_by_watchpoint): Renamed to
3401 i386_dr_stopped_by_watchpoint.
3402 * i386-low.c (i386_show_dr): Renamed to
3403 i386_dr_show and made nonstatic. All uses updated.
3404 (i386_length_and_rw_bits): Renamed to
3405 i386_dr_length_and_rw_bits and made nonstatic.
3407 (i386_insert_aligned_watchpoint): Renamed to
3408 i386_dr_insert_aligned_watchpoint and made nonstatic.
3410 (i386_remove_aligned_watchpoint): Renamed to
3411 i386_dr_remove_aligned_watchpoint and made nonstatic.
3413 (i386_update_inferior_debug_regs): Renamed to
3414 i386_dr_update_inferior_debug_regs and made nonstatic.
3416 (i386_low_insert_watchpoint): Renamed to
3417 i386_dr_insert_watchpoint. All uses updated.
3418 (i386_low_remove_watchpoint): Renamed to
3419 i386_dr_remove_watchpoint. All uses updated.
3420 (i386_low_region_ok_for_watchpoint): Renamed to
3421 i386_dr_region_ok_for_watchpoint. All uses updated.
3422 (i386_low_stopped_data_address): Renamed to
3423 i386_dr_stopped_data_address. All uses updated.
3424 (i386_low_stopped_by_watchpoint): Renamed to
3425 i386_dr_stopped_by_watchpoint. All uses updated.
3427 2014-06-18 Gary Benson <gbenson@redhat.com>
3429 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3430 (i386_dr_low_can_set_control): Likewise.
3431 (i386_insert_aligned_watchpoint): New check.
3433 2014-06-18 Gary Benson <gbenson@redhat.com>
3435 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3438 2014-06-18 Gary Benson <gbenson@redhat.com>
3440 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3441 instead of fatal and error.
3442 (i386_handle_nonaligned_watchpoint): Likewise.
3444 2014-06-18 Gary Benson <gbenson@redhat.com>
3446 * i386-low.c (i386_get_debug_register_length): New macro.
3447 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3448 (i386_show_dr): Use debug_printf instead of fprintf. Use
3449 phex to format values.
3451 2014-06-18 Gary Benson <gbenson@redhat.com>
3453 * i386-low.h: Comment changes.
3454 * i386-low.c: Likewise.
3456 2014-06-18 Gary Benson <gbenson@redhat.com>
3458 * i386-low.c: Whitespace changes.
3460 2014-06-12 Tom Tromey <tromey@redhat.com>
3462 * utils.c (freeargv): Remove.
3464 2014-06-12 Tom Tromey <tromey@redhat.com>
3466 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3467 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3468 (parse_debug_format_options): Likewise.
3469 (gdbserver_usage): Likewise.
3470 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3471 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3472 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3474 ($(LIBGNU)): Depend on libiberty.
3475 (all-lib): Recurse into all subdirs.
3476 (install-only): Invoke "install" target in subdirs.
3477 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3479 * configure: Rebuild.
3480 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3481 for vasprintf, vsnprintf, or gettimeofday.
3482 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3485 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3487 * development.sh: Delete.
3488 * Makefile.in (config.status): Adjust dependency on development.sh.
3489 * configure.ac: Adjust development.sh source call.
3490 * configure: Regenerate.
3492 2014-06-02 Pedro Alves <palves@redhat.com>
3494 * ax.c (gdb_free_agent_expr): New function.
3495 * ax.h (gdb_free_agent_expr): New declaration.
3496 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3498 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3500 (clear_breakpoint_conditions_and_commands): New function.
3501 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3502 (clear_breakpoint_conditions_and_commands): New declaration.
3504 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3506 * linux-aarch64-low.c (asm/ptrace.h): Include.
3508 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3510 Fix TLS access for -static -pthread.
3511 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3512 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3513 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3515 2014-05-20 Pedro Alves <palves@redhat.com>
3517 * linux-aarch64-low.c (aarch64_insert_point)
3518 (aarch64_remove_point): No longer check whether the type is
3519 supported here. Adjust to new interface.
3520 (the_low_target): Install aarch64_supports_z_point_type as
3521 supports_z_point_type method.
3522 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3523 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3524 instead of a Z packet char. Adjust.
3525 (arm_supports_z_point_type): New function.
3526 (arm_insert_point, arm_remove_point): Adjust to new interface.
3527 (the_low_target): Install arm_supports_z_point_type.
3528 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3529 (cris_insert_point, cris_remove_point): Adjust to new interface.
3530 Don't check whether the type is supported here.
3531 (the_low_target): Install cris_supports_z_point_type.
3532 * linux-low.c (linux_supports_z_point_type): New function.
3533 (linux_insert_point, linux_remove_point): Adjust to new interface.
3534 * linux-low.h (struct linux_target_ops) <insert_point,
3535 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3536 raw_breakpoint pointer parameter.
3537 <supports_z_point_type>: New method.
3538 * linux-mips-low.c (mips_supports_z_point_type): New function.
3539 (mips_insert_point, mips_remove_point): Adjust to new interface.
3540 Use mips_supports_z_point_type.
3541 (the_low_target): Install mips_supports_z_point_type.
3542 * linux-ppc-low.c (the_low_target): Install NULL as
3543 supports_z_point_type method.
3544 * linux-s390-low.c (the_low_target): Install NULL as
3545 supports_z_point_type method.
3546 * linux-sparc-low.c (the_low_target): Install NULL as
3547 supports_z_point_type method.
3548 * linux-x86-low.c (x86_supports_z_point_type): New function.
3549 (x86_insert_point): Adjust to new insert_point interface. Use
3550 insert_memory_breakpoint. Adjust to new
3551 i386_low_insert_watchpoint interface.
3552 (x86_remove_point): Adjust to remove_point interface. Use
3553 remove_memory_breakpoint. Adjust to new
3554 i386_low_remove_watchpoint interface.
3555 (the_low_target): Install x86_supports_z_point_type.
3556 * lynx-low.c (lynx_target_ops): Install NULL as
3557 supports_z_point_type callback.
3558 * nto-low.c (nto_supports_z_point_type): New.
3559 (nto_insert_point, nto_remove_point): Adjust to new interface.
3560 (nto_target_ops): Install nto_supports_z_point_type.
3561 * mem-break.c: Adjust intro comment.
3562 (struct raw_breakpoint) <raw_type, size>: New fields.
3563 <inserted>: Update comment.
3564 <shlib_disabled>: Delete field.
3565 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3566 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3567 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3568 (raw_bkpt_type_to_target_hw_bp_type): New function.
3569 (find_enabled_raw_code_breakpoint_at): New function.
3570 (find_raw_breakpoint_at): New type and size parameters. Use them.
3571 (insert_memory_breakpoint): New function, based off
3572 set_raw_breakpoint_at.
3573 (remove_memory_breakpoint): New function.
3574 (set_raw_breakpoint_at): Reimplement.
3575 (set_breakpoint): New, based on set_breakpoint_at.
3576 (set_breakpoint_at): Reimplement.
3577 (delete_raw_breakpoint): Go through the_target->remove_point
3578 instead of assuming memory breakpoints.
3579 (find_gdb_breakpoint_at): Delete.
3580 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3581 (find_gdb_breakpoint): New function.
3582 (set_gdb_breakpoint_at): Delete.
3583 (z_type_supported): New function.
3584 (set_gdb_breakpoint_1): New function, loosely based off
3585 set_gdb_breakpoint_at.
3586 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3587 (delete_gdb_breakpoint_at): Delete.
3588 (delete_gdb_breakpoint_1): New function, loosely based off
3589 delete_gdb_breakpoint_at.
3590 (delete_gdb_breakpoint): New function.
3591 (clear_gdb_breakpoint_conditions): Rename to ...
3592 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3594 (add_condition_to_breakpoint): Make static.
3595 (add_breakpoint_condition): Take a struct breakpoint pointer
3596 instead of an address. Adjust.
3597 (gdb_condition_true_at_breakpoint): Rename to ...
3598 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3600 (gdb_condition_true_at_breakpoint): Reimplement.
3601 (add_breakpoint_commands): Take a struct breakpoint pointer
3602 instead of an address. Adjust.
3603 (gdb_no_commands_at_breakpoint): Rename to ...
3604 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3605 parameter. Return true if no breakpoint was found. Change debug
3607 (gdb_no_commands_at_breakpoint): Reimplement.
3608 (run_breakpoint_commands): Rename to ...
3609 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3610 and change return type to boolean.
3611 (run_breakpoint_commands): New function.
3612 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3613 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3614 breakpoint. Go through the_target->remove_point instead of
3615 assuming memory breakpoint.
3616 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3617 software and hardware breakpoints.
3618 (reinsert_raw_breakpoint): Go through the_target->insert_point
3619 instead of assuming memory breakpoint.
3620 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3621 software and hardware breakpoints.
3622 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3623 Check both software and hardware breakpoints.
3624 (validate_inserted_breakpoint): Assert the breakpoint is a
3625 software breakpoint. Set the inserted flag to -1 instead of
3626 setting shlib_disabled.
3627 (delete_disabled_breakpoints): Adjust.
3628 (validate_breakpoints): Only validate software breakpoints.
3629 Adjust to inserted flag change.
3630 (check_mem_read, check_mem_write): Skip breakpoint types other
3631 than software breakpoints. Adjust to inserted flag change.
3632 * mem-break.h (enum raw_bkpt_type): New enum.
3633 (raw_breakpoint, struct process_info): Forward declare.
3634 (Z_packet_to_target_hw_bp_type): Delete declaration.
3635 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3636 (set_gdb_breakpoint, delete_gdb_breakpoint)
3637 (clear_breakpoint_conditions): New declarations.
3638 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3639 (breakpoint_inserted_here): Update comment.
3640 (add_breakpoint_condition, add_breakpoint_commands): Replace
3641 address parameter with a breakpoint pointer parameter.
3642 (gdb_breakpoint_here): Update comment.
3643 (delete_gdb_breakpoint_at): Delete.
3644 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3645 * server.c (process_point_options): Take a struct breakpoint
3646 pointer instead of an address. Adjust.
3647 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3648 delete_gdb_breakpoint.
3649 * spu-low.c (spu_target_ops): Install NULL as
3650 supports_z_point_type method.
3651 * target.h: Include mem-break.h.
3652 (struct target_ops) <prepare_to_access_memory>: Update comment.
3653 <supports_z_point_type>: New field.
3654 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3655 instead of a char. Also take a raw breakpoint pointer.
3656 * win32-arm-low.c (the_low_target): Install NULL as
3657 supports_z_point_type.
3658 * win32-i386-low.c (i386_supports_z_point_type): New function.
3659 (i386_insert_point, i386_remove_point): Adjust to new interface.
3660 (the_low_target): Install i386_supports_z_point_type.
3661 * win32-low.c (win32_supports_z_point_type): New function.
3662 (win32_insert_point, win32_remove_point): Adjust to new interface.
3663 (win32_target_ops): Install win32_supports_z_point_type.
3664 * win32-low.h (struct win32_target_ops):
3665 <supports_z_point_type>: New method.
3666 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3667 instead of a char. Also take a raw breakpoint pointer.
3669 2014-05-20 Pedro Alves <palves@redhat.com>
3671 * mem-break.h: Include break-common.h.
3672 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3673 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3674 (Z_packet_to_target_hw_bp_type): New declaration.
3675 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3676 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3677 (Z_PACKET_ACCESS_WP): Delete macros.
3678 (Z_packet_to_hw_type): Delete function.
3679 * i386-low.h: Don't include break-common.h here.
3680 (Z_packet_to_hw_type): Delete declaration.
3681 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3682 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3683 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3684 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3685 * linux-aarch64-low.c: Don't include break-common.h here.
3686 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3687 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3688 (Z_packet_to_target_hw_bp_type): Delete function.
3689 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3691 (mips_insert_point, mips_remove_point): Use
3692 Z_packet_to_target_hw_bp_type.
3694 2014-05-20 Pedro Alves <palves@redhat.com>
3696 * linux-aarch64-low.c: Include break-common.h.
3697 (enum target_point_type): Delete.
3698 (Z_packet_to_point_type): Rename to ...
3699 (Z_packet_to_target_hw_bp_type): ... this, and return a
3700 target_hw_bp_type instead.
3701 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3702 instead of an enum target_point_type.
3703 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3705 (aarch64_dr_state_insert_one_point)
3706 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3707 (aarch64_handle_aligned_watchpoint)
3708 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3709 Take an enum target_hw_bp_type instead of an enum
3711 (aarch64_supports_z_point_type): New function.
3712 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3713 use Z_packet_to_target_hw_bp_type.
3715 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3717 * configure.ac: Only use -Werror by default when DEVELOPMENT
3719 * configure: Regenerate.
3721 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3723 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3724 * linux-x86-low.c (X86_64_USER_REGS): New.
3725 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3727 2014-04-28 Yao Qi <yao@codesourcery.com>
3729 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3732 2014-04-25 Pedro Alves <palves@redhat.com>
3735 * linux-low.c (linux_attach_fail_reason_string): New function.
3736 (linux_attach_lwp): Delete.
3737 (linux_attach_lwp_1): Rename to ...
3738 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3739 argument. Remove "initial" parameter. Return int instead of
3740 void. Don't error or warn here.
3741 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3742 failure to attach to the tgid. Call warning when failing to
3744 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3745 argument. Remove "initial" parameter. Return int instead of
3746 void. Don't error or warn here.
3747 (linux_attach_fail_reason_string): New declaration.
3748 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3749 interface change. Use linux_attach_fail_reason_string.
3751 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3752 Walfred Tedeschi <walfred.tedeschi@intel.com>
3754 * Makefile.in: Added rules to handle new files
3755 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3756 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3757 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3758 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3759 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3760 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3762 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3763 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3764 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3765 i386/x32-avx512.xml.
3766 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3767 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3768 i386/x32-avx512-linux.xml.
3769 * i387-fp.c (num_avx512_k_registers): New constant for number
3771 (num_avx512_zmmh_low_registers): New constant for number of
3772 lower ZMM registers (0-15).
3773 (num_avx512_zmmh_high_registers): New constant for number of
3774 higher ZMM registers (16-31).
3775 (num_avx512_ymmh_registers): New contant for number of higher
3776 YMM registers (ymm16-31 added by avx521 on x86_64).
3777 (num_avx512_xmm_registers): New constant for number of higher
3778 XMM registers (xmm16-31 added by AVX512 on x86_64).
3779 (struct i387_xsave): Add space for AVX512 registers.
3780 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3781 Add code to handle AVX512 registers.
3782 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3783 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3784 prototypei from generated file.
3785 (tdesc_amd64_avx512_linux): Likewise.
3786 (init_registers_x32_avx512_linux): Likewise.
3787 (tdesc_x32_avx512_linux): Likewise.
3788 (init_registers_i386_avx512_linux): Likewise.
3789 (tdesc_i386_avx512_linux): Likewise.
3790 (x86_64_regmap): Add AVX512 registers.
3791 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3793 (initialize_low_arch): Add code to initialize AVX512 registers.
3795 2014-04-23 Pedro Alves <palves@redhat.com>
3797 * mem-break.c (find_gdb_breakpoint_at): Make static.
3798 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3800 2014-04-23 Pedro Alves <palves@redhat.com>
3802 * i386-low.c: Don't include break-common.h here.
3803 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3804 prototype to take target_hw_bp_type as argument instead of a Z
3806 * i386-low.h: Include break-common.h here.
3807 (Z_packet_to_hw_type): Declare.
3808 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3810 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3811 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3812 (x86_remove_point): Convert the packet number to a
3813 target_hw_bp_type before calling i386_low_remove_watchpoint.
3814 * win32-i386-low.c (i386_insert_point): Convert the packet number
3815 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3816 (i386_remove_point): Convert the packet number to a
3817 target_hw_bp_type before calling i386_low_remove_watchpoint.
3819 2014-04-23 Pedro Alves <palves@redhat.com>
3821 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3823 2014-04-10 Pedro Alves <palves@redhat.com>
3825 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3826 Check if the condition or command is NULL before checking if the
3827 breakpoint is known. On success, return true.
3828 * mem-break.h (add_breakpoint_condition): Document return.
3829 (add_breakpoint_commands): Add describing comment.
3830 * server.c (skip_to_semicolon): New function.
3831 (process_point_options): Use it.
3833 2014-04-09 Pedro Alves <palves@redhat.com>
3835 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3838 2014-02-27 Pedro Alves <palves@redhat.com>
3841 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3843 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3845 (last_thread_of_process_p): Take a PID argument instead of a
3847 (linux_wait_for_lwp): Delete.
3848 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3850 (linux_low_filter_event): New function, party factored out from
3851 linux_wait_for_event.
3852 (linux_wait_for_event): Rename to ...
3853 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3854 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3855 sigsuspend. Check for zombie leaders.
3856 (linux_wait_for_event): Reimplement as wrapper around
3857 linux_wait_for_event_filtered.
3858 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3859 a normal or signal exit is seen, it's the whole process exiting.
3860 (wait_for_sigstop): No longer a for_each_inferior callback.
3861 Rewrite on top of linux_wait_for_event_filtered.
3862 (stop_all_lwps): Call wait_for_sigstop directly.
3863 * server.c (resume, handle_target_event): Handle
3864 TARGET_WAITKIND_NO_RESUMED.
3866 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3868 * win32-low.c (psapi_get_dll_name,
3869 * win32_CreateToolhelp32Snapshot): Delete.
3870 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3871 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3873 (handle_load_dll): Add function description.
3874 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3876 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3878 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3880 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3881 base address when calling win32_add_one_solib.
3882 (handle_load_dll): Delete local variable load_addr.
3883 Remove 0x1000 offset applied to DLL base address when calling
3884 win32_add_one_solib.
3885 (handle_unload_dll): Add comment.
3887 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3889 * win32-low.c (win32_add_all_dlls): Renames
3890 win32_ensure_ntdll_loaded. Rewrite function documentation.
3891 Adjust implementation to always load all DLLs.
3892 Add 0x1000 offset to DLL base address when calling
3893 win32_add_one_solib.
3894 (child_initialization_done): New static global.
3895 (do_initial_child_stuff): Set child_initialization_done to
3896 zero during child initialization, and 1 after. Replace call
3897 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3899 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3900 (handle_unload_dll): Add function documentation.
3901 (get_child_debug_event): Ignore load and unload DLL events
3902 during child initialization.
3904 2014-02-20 Doug Evans <dje@google.com>
3906 Remove global all_lwps.
3907 * inferiors.h (ptid_of): Move here from linux-low.h.
3908 (pid_of, lwpid_of): Ditto.
3909 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3910 parameter is a struct thread_info * now.
3911 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3912 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3913 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3915 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3916 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3917 * linux-arm-low.c (update_registers_callback): Update, "entry"
3918 parameter is a struct thread_info * now.
3919 Fetch lwpid from current_inferior directly.
3920 (arm_insert_point): Pass &all_threads to find_inferior instead of
3922 (arm_remove_point): Ditto.
3923 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3924 (arm_prepare_to_resume): Fetch pid from thread.
3925 (arm_read_description): Fetch lwpid from current_inferior directly.
3926 * linux-low.c (all_lwps): Delete.
3927 (delete_lwp): Delete call to remove_inferior.
3928 (handle_extended_wait): Fetch lwpid from thread.
3929 (add_lwp): Don't set lwp->entry.id. Remove call to
3930 add_inferior_to_list.
3931 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3932 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3933 (kill_one_lwp_callback): Ditto.
3934 (linux_kill): Don't dereference NULL pointer.
3935 Fetch ptid,lwpid from thread.
3936 (get_detach_signal): Fetch ptid from thread.
3937 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3938 Simplify call to regcache_invalidate_thread.
3939 (delete_lwp_callback): Update, "entry" parameter is a
3940 struct thread_info * now. Fetch pid from thread.
3941 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3942 (status_pending_p_callback): Update, "entry" parameter is a
3943 struct thread_info * now. Fetch ptid from thread.
3944 (find_lwp_pid): Update, "entry" parameter is a
3945 struct thread_info * now.
3946 (linux_wait_for_lwp): Fetch pid from thread.
3947 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3948 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3949 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3950 (dequeue_one_deferred_signal): Ditto.
3951 (cancel_breakpoint): Fetch ptid from current_inferior.
3952 (linux_wait_for_event): Pass &all_threads to find_inferior,
3953 not &all_lwps. Fetch ptid, lwpid from thread.
3954 (count_events_callback): Update, "entry" parameter is a
3955 struct thread_info * now.
3956 (select_singlestep_lwp_callback): Ditto.
3957 (select_event_lwp_callback): Ditto.
3958 (cancel_breakpoints_callback): Ditto.
3959 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3961 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3962 (unsuspend_one_lwp): Update, "entry" parameter is a
3963 struct thread_info * now.
3964 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3966 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3967 Fetch lwpid from thread, not lwp.
3968 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3969 Pass &all_threads to find_inferior, not &all_lwps.
3970 (send_sigstop): Fetch lwpid from thread, not lwp.
3971 (send_sigstop_callback): Update, "entry" parameter is a
3972 struct thread_info * now.
3973 (suspend_and_send_sigstop_callback): Ditto.
3974 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3975 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3976 struct thread_info * now.
3977 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3979 (lwp_running): Update, "entry" parameter is a
3980 struct thread_info * now.
3981 (stop_all_lwps): Fetch ptid from thread.
3982 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3983 (linux_resume_one_lwp): Fetch lwpid from thread.
3984 (linux_set_resume_request): Update, "entry" parameter is a
3985 struct thread_info * now. Fetch pid, lwpid from thread.
3986 (resume_status_pending_p): Update, "entry" parameter is a
3987 struct thread_info * now.
3988 (need_step_over_p): Ditto. Fetch lwpid from thread.
3989 (start_step_over): Fetch lwpid from thread.
3990 (linux_resume_one_thread): Update, "entry" parameter is a
3991 struct thread_info * now. Fetch lwpid from thread.
3992 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3993 (proceed_one_lwp): Update, "entry" parameter is a
3994 struct thread_info * now. Fetch lwpid from thread.
3995 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3996 struct thread_info * now.
3997 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3998 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3999 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4001 (regsets_store_inferior_registers): Ditto.
4002 (fetch_register, store_register): Ditto.
4003 (linux_read_memory, linux_write_memory): Ditto.
4004 (linux_request_interrupt): Ditto.
4005 (linux_read_auxv): Ditto.
4006 (linux_xfer_siginfo): Ditto.
4007 (linux_qxfer_spu): Ditto.
4008 (linux_qxfer_libraries_svr4): Ditto.
4009 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4010 moved to inferiors.h.
4012 (get_thread_lwp): Update.
4013 (struct lwp_info): Delete member "entry". Simplify comment for
4016 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4017 current_inferior directly.
4018 (update_watch_registers_callback): Update, "entry" parameter is a
4019 struct thread_info * now. Fetch pid from thread.
4020 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4021 (mips_insert_point): Fetch lwpid from current_inferior.
4022 Pass &all_threads to find_inferior, not &all_lwps.
4023 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4024 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4026 (mips_stopped_data_address): Ditto.
4027 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4029 * linux-tile-low.c (tile_arch_setup): Ditto.
4030 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4031 (update_debug_registers_callback): Update, "entry" parameter is a
4032 struct thread_info * now. Fetch pid from thread.
4033 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4034 Pass &all_threads to find_inferior, not &all_lwps.
4035 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4036 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4037 Pass &all_threads to find_inferior, not &all_lwps.
4038 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4039 (i386_dr_low_get_status): Ditto.
4040 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4041 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4042 (x86_linux_read_description): Ditto.
4043 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4045 2014-02-20 Doug Evans <dje@google.com>
4047 * inferiors.c (get_first_inferior): Fix buglet.
4049 2014-02-19 Doug Evans <dje@google.com>
4051 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4052 * inferiors.c (add_thread): Change result type to struct thread_info *.
4053 All callers updated.
4054 (add_lwp): Call add_thread here instead of in callers.
4055 All callers updated.
4056 * linux-low.h (get_lwp_thread): Rewrite.
4057 (struct lwp_info): New member "thread".
4059 2014-02-19 Doug Evans <dje@google.com>
4061 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4062 All callers updated.
4064 2014-02-19 Doug Evans <dje@google.com>
4066 * inferiors.c (add_thread): Fix whitespace.
4068 2014-02-19 Doug Evans <dje@google.com>
4070 * dll.c (clear_dlls): Replace accessing list implemention details
4072 * gdbthread.h (get_first_thread): Declare.
4073 * inferiors.c (for_each_inferior_with_data): New function.
4074 (get_first_thread): New function.
4075 (find_thread_ptid): Simplify.
4076 (get_first_inferior): New function.
4077 (clear_list): Delete.
4078 (one_inferior_p): New function.
4079 (clear_inferior_list): New function.
4080 (clear_inferiors): Update.
4081 * inferiors.h (for_each_inferior_with_data): Declare.
4082 (clear_inferior_list): Declare.
4083 (one_inferior_p): Declare.
4084 (get_first_inferior): Declare.
4085 * linux-low.c (linux_wait_for_event): Replace accessing list
4086 implemention details with API function.
4087 * server.c (target_running): Ditto.
4088 (accumulate_file_name_length): New function.
4089 (emit_dll_description): New function.
4090 (handle_qxfer_libraries): Replace accessing list implemention
4091 details with API function.
4092 (handle_qxfer_threads_worker): New function.
4093 (handle_qxfer_threads_proper): Replace accessing list implemention
4094 details with API function.
4095 (handle_query): Ditto.
4096 (visit_actioned_threads_callback_ftype): New typedef.
4097 (visit_actioned_threads_data): New struct.
4098 (visit_actioned_threads): Rewrite to be find_inferior callback.
4099 (resume): Call find_inferior.
4100 (handle_status): Replace accessing list implemention
4101 details with API function.
4102 (process_serial_event): Replace accessing list implemention details
4104 * target.c (set_desired_inferior): Replace accessing list implemention
4105 details with API function.
4106 * tracepoint.c (same_process_p): New function.
4107 (gdb_agent_about_to_close): Replace accessing list implemention
4108 details with API function.
4109 * win32-low.c (child_delete_thread): Replace accessing list
4110 implemention details with API function.
4111 (match_dll_by_basename): New function.
4112 (dll_is_loaded_by_basename): New function.
4113 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4114 details call to dll_is_loaded_by_basename.
4116 2014-02-19 Doug Evans <dje@google.com>
4118 * dll.h (struct dll_info): Add comment.
4119 * gdbthread.h (struct thread_info): Add comment.
4120 (current_ptid): Simplify.
4121 * inferiors.c (add_process): Update.
4122 (remove_process): Update.
4123 * inferiors.h (struct process_info): Rename member "head" to "entry".
4124 * linux-low.c (delete_lwp): Update.
4126 (last_thread_of_process_p): Update.
4127 (kill_one_lwp_callback, linux_kill): Update.
4128 (status_pending_p_callback): Update.
4129 (wait_for_sigstop): Update. Simplify read of ptid.
4130 (start_step_over): Update.
4131 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4132 (get_lwp_thread): Update.
4133 (struct lwp_info): Rename member "head" to "entry".
4134 * regcache.h (inferior_list_entry): Delete.
4135 * server.c (kill_inferior_callback): Update.
4136 (detach_or_kill_inferior_callback): Update.
4137 (print_started_pid): Update.
4138 (print_attached_pid): Update.
4139 (process_serial_event): Simplify read of ptid.
4140 * thread-db.c (thread_db_create_event): Update.
4141 (thread_db_get_tls_address): Update.
4142 * win32-low.c (current_inferior_ptid): Simplify.
4144 2014-02-19 Tom Tromey <tromey@redhat.com>
4146 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4148 (target_supports_btrace): Update.
4150 2014-02-14 Yao Qi <yao@codesourcery.com>
4152 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4153 (rsp-low-ipa.o): New target.
4155 2014-02-12 Tom Tromey <tromey@redhat.com>
4157 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4158 convert_ascii_to_int.
4159 * regcache.c (registers_to_string): Likewise.
4160 * remote-utils.c (decode_M_packet): Likewise.
4161 * server.c (process_serial_event): Likewise.
4163 2014-02-12 Tom Tromey <tromey@redhat.com>
4165 * server.c (handle_query, handle_v_run): Use hex2bin, not
4167 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4169 2014-02-12 Tom Tromey <tromey@redhat.com>
4171 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4172 convert_int_to_ascii.
4173 * regcache.c (registers_to_string, collect_register_as_string):
4175 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4177 * server.c (process_serial_event): Likewise.
4178 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4179 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4181 2014-02-12 Tom Tromey <tromey@redhat.com>
4183 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4184 bin2hex, not hexify.
4185 * tracepoint.c (cmd_qtstatus): Likewise.
4187 2014-02-12 Tom Tromey <tromey@redhat.com>
4189 * remote-utils.c (monitor_output): Pass explicit length to
4192 2014-02-12 Tom Tromey <tromey@redhat.com>
4194 * tracepoint.c: Include rsp-low.h.
4195 * server.c: Include rsp-low.h.
4196 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4197 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4199 * remote-utils.c: Include rsp-low.h.
4200 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4201 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4202 (convert_int_to_ascii, convert_ascii_to_int): Move to
4204 * regcache.c: Include rsp-low.h.
4205 * ax.c: Include rsp-low.h.
4206 * Makefile.in (SFILES): Add common/rsp-low.c.
4207 (OBS): Add rsp-low.o.
4208 (rsp-low.o): New target.
4210 2014-02-12 Tom Tromey <tromey@redhat.com>
4212 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4213 Include print-utils.h.
4214 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4215 (plongest, thirty_two, phex_nz): Remove.
4216 * Makefile.in (SFILES): Add common/print-utils.c.
4217 (OBS): Add print-utils.o.
4218 (print-utils-ipa.o): New target.
4219 (print-utils.o): New target.
4220 (IPA_OBJS): Add print-utils-ipa.o.
4222 2014-02-06 Tom Tromey <tromey@redhat.com>
4224 * Makefile.in (SFILES): Fix indentation.
4226 2014-02-05 Doug Evans <dje@google.com>
4228 * linux-low.c (linux_wait_for_event): Improve comment.
4229 (linux_wait_1): Keep current_inferior in sync with event_child.
4231 2014-01-22 Doug Evans <dje@google.com>
4233 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4235 2014-01-22 Doug Evans <dje@google.com>
4237 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4238 * configure: Regenerate.
4239 * config.in: Regenerate.
4240 * Makefile.in (SFILES): Add debug.c.
4242 * debug.c: New file.
4243 * debug.h: New file.
4244 * linux-aarch64-low.c (*): Update all debugging printfs to use
4245 debug_printf instead of fprintf.
4246 * linux-arm-low.c (*): Ditto.
4247 * linux-cris-low.c (*): Ditto.
4248 * linux-crisv32-low.c (*): Ditto.
4249 * linux-m32r-low.c (*): Ditto.
4250 * linux-sparc-low.c (*): Ditto.
4251 * linux-x86.c (*): Ditto.
4252 * linux-low.c (*): Ditto.
4253 (linux_wait_1): Add calls to debug_enter, debug_exit.
4254 (linux_wait): Remove redundant debugging printf.
4255 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4256 (linux_resume, unstop_all_lwps): Ditto.
4257 * mem-break.c (*): Update all debugging printfs to use
4258 debug_printf instead of fprintf.
4259 * remote-utils.c (*): Ditto.
4260 * thread-db.c (*): Ditto.
4261 * server.c #include <ctype.h>, "gdb_vecs.h".
4262 (debug_threads): Moved to debug.c.
4263 (*): Update all debugging printfs to use debug_printf instead of
4265 (start_inferior): Replace call to fflush with call to debug_flush.
4266 (monitor_show_help): Mention set debug-format.
4267 (parse_debug_format_options): New function.
4268 (handle_monitor_command): Handle "monitor set debug-format".
4269 (gdbserver_usage): Mention --debug-format.
4270 (main): Parse --debug-format.
4271 * server.h (debug_threads): Declaration moved to debug.h.
4273 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4274 trace_debug_1 that uses debug_printf.
4275 (tracepoint_look_up_symbols): Update all debugging printfs to use
4276 debug_printf instead of fprintf.
4278 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4280 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4283 2014-01-17 Pedro Alves <palves@redhat.com>
4286 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4287 defined after including gdb_proc_service.h.
4289 2014-01-16 Doug Evans <dje@google.com>
4291 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4292 (match_dll): Use it.
4294 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4296 * target.h (target_ops) <read_btrace>: Change parameters and
4297 return type to allow error reporting.
4298 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4299 trace reading errors on.
4300 * linux-low.c (linux_low_read_btrace): Pass trace reading
4302 (linux_low_disable_btrace): New.
4304 2014-01-15 Doug Evans <dje@google.com>
4306 * inferiors.c (thread_id_to_gdb_id): Delete.
4307 * inferiors.h (thread_id_to_gdb_id): Delete.
4309 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4311 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4312 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4315 2014-01-08 Pedro Alves <palves@redhat.com>
4317 * server.c (handle_status): Don't discard previous queued stop
4318 replies or thread's pending status here.
4319 (main) <disconnection>: Do it here instead.
4321 2014-01-08 Pedro Alves <palves@redhat.com>
4323 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4324 * server.c (visit_actioned_threads, handle_pending_status): New
4326 (handle_v_cont): Factor out parts to ...
4327 (resume): ... this new function. If in all-stop, and a thread
4328 being resumed has a pending status, report it without actually
4330 (myresume): Adjust to use the new 'resume' function.
4331 (clear_pending_status_callback, set_pending_status_callback)
4332 (find_status_pending_thread_callback): New functions.
4333 (handle_status): Handle the case of multiple threads having
4334 interesting statuses to report. Report threads' real last signal
4335 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4336 with an interesting thread to report the status for, instead of
4337 always reporting the status of the first thread.
4339 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4341 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4342 * gdbreplay.c (gdbreplay_version): Likewise.
4344 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4346 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4347 iov.iov_len with the real length in use.
4349 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4351 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4352 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4353 for all targets that use win32-low.c.
4354 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4355 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4357 2013-12-13 Pedro Alves <palves@redhat.com>
4359 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4360 if equal to TARGET_WAITKIND_LOADED.
4361 * win32-low.c (cached_status): New static global.
4362 (win32_wait): Add declaration.
4363 (do_initial_child_stuff): Flush all initial pending debug events
4364 up to the initial breakpoint.
4365 (win32_wait): If CACHED_STATUS was set, return that instead
4366 of doing a real wait. Remove the code resuming the execution
4367 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4368 during the initial phase. Also remove the code changing
4369 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4370 TARGET_WAITKIND_STOPPED.
4372 2013-12-11 Yao Qi <yao@codesourcery.com>
4374 * notif.c (handle_notif_ack): Return 0 if no notification
4377 2013-11-20 Doug Evans <dje@google.com>
4379 * linux-low.c (linux_set_resume_request): Fix comment.
4381 2013-11-20 Doug Evans <dje@google.com>
4383 * linux-low.c (resume_status_pending_p): Tweak comment.
4385 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4387 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4388 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4389 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4390 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4391 (srv_amd64_regobj): Add amd64-mpx.o.
4392 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4393 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4394 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4395 * i387-fp.c (num_pl_bnd_register) Added constant.
4396 (num_pl_bnd_cfg_registers) Added constant.
4397 (struct i387_xsave) Added reserved area and MPX fields.
4398 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4399 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4401 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4402 (init_registers_amd64_mpx_linux): Declare new function.
4403 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4404 (x86_64_regmap): Add MPX registers.
4405 (x86_linux_read_description): Add MPX case.
4406 (initialize_low_arch): Initialize MPX targets.
4408 2013-11-18 Tom Tromey <tromey@redhat.com>
4410 * configure: Rebuild.
4411 * configure.ac: Don't check for stdlib.h.
4412 * gdbreplay.c: Unconditionally include stdlib.h.
4414 2013-11-18 Tom Tromey <tromey@redhat.com>
4416 * config.in: Rebuild.
4417 * configure: Rebuild.
4418 * configure.ac: Don't use AC_HEADER_DIRENT.
4420 2013-11-18 Tom Tromey <tromey@redhat.com>
4422 * server.h: Don't check HAVE_STRING_H.
4423 * gdbreplay.c: Don't check HAVE_STRING_H.
4424 * configure: Rebuild.
4426 2013-11-18 Tom Tromey <tromey@redhat.com>
4428 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4431 2013-11-08 Tom Tromey <tromey@redhat.com>
4433 * configure, config.in: Rebuild.
4434 * configure.ac: Remove unused configury.
4436 2013-11-08 Tom Tromey <tromey@redhat.com>
4438 * acinclude.m4: Include common.m4, codeset.m4.
4439 * configure, config.in: Rebuild.
4440 * configure.ac: Use GDB_AC_COMMON.
4442 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4444 * linux-s390-low.c (HWCAP_S390_TE): New define.
4445 (s390_arch_setup): Consider the TE field in the HWCAP for
4446 determining 'have_regset_tdb'.
4448 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4451 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4454 2013-10-02 Pedro Alves <palves@redhat.com>
4456 * server.c (process_serial_event): Don't output "GDBserver
4457 exiting" if GDB is connected through stdio.
4458 * target.c (mywait): Likewise, be silent if GDB is connected
4461 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4463 * lynx-low.c (lynx_add_threads_after_attach): New function.
4464 (lynx_attach): Remove call to add_thread. Add call to
4465 lynx_add_threads_after_attach instead.
4467 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4469 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4470 * config.in, configure: Regenerated.
4472 2013-09-18 Yao Qi <yao@codesourcery.com>
4475 * server.c (start_inferior): Clear 'resume_info'.
4477 2013-09-16 Jiong Wang <jiwang@tilera.com>
4479 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4482 2013-09-16 Jiong Wang <jiwang@tilera.com>
4484 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4485 linux-tile-low.o to srv_tgtobj.
4487 2013-09-16 Will Newton <will.newton@linaro.org>
4489 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4492 2013-09-06 Pedro Alves <palves@redhat.com>
4494 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4495 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4496 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4497 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4498 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4499 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4501 2013-09-06 Pedro Alves <palves@redhat.com>
4503 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4504 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4506 2013-09-06 Pedro Alves <palves@redhat.com>
4508 * linux-amd64-ipa.c: Include tracepoint.h.
4509 * linux-i386-ipa.c: Include tracepoint.h.
4511 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4513 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4514 (ps_get_thread_area): New function.
4516 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4518 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4519 (initialize_low_arch): Call init_registers_crisv32 rather than
4520 init_register_crisv32.
4522 2013-09-05 Pedro Alves <palves@redhat.com>
4524 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4526 * hostio.h: ... this new file.
4527 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4528 win32-low.c: Include hostio.h.
4530 2013-09-05 Pedro Alves <palves@redhat.com>
4532 * server.h (gdb_client_data, handler_func, callback_handler_func)
4533 (delete_file_handler, add_file_handler, append_callback_event)
4534 (delete_callback_event, start_event_loop, initialize_event_loop):
4535 Move to event-loop.h and include it.
4536 * event-loop.h: New file.
4538 2013-09-05 Pedro Alves <palves@redhat.com>
4540 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4541 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4542 (loaded_dll, unloaded_dll): Move to ...
4543 * dll.h: ... this new file.
4544 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4546 2013-09-05 Pedro Alves <palves@redhat.com>
4548 * server.h (current_process, get_thread_process, all_processes)
4549 (add_inferior_to_list, for_each_inferior, current_inferior)
4550 (remove_inferior, add_process, remove_process, find_process_pid)
4551 (have_started_inferiors_p, have_attached_inferiors_p)
4552 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4553 (clear_inferiors, find_inferior, find_inferior_id)
4554 (inferior_target_data, set_inferior_target_data)
4555 (inferior_regcache_data, set_inferior_regcache_data): Move to
4556 inferiors.h, and include it.
4557 * inferiors.h: New file.
4559 2013-09-05 Pedro Alves <palves@redhat.com>
4561 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4565 2013-09-05 Pedro Alves <palves@redhat.com>
4567 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4569 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4570 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4571 (handle_tracepoint_general_set, handle_tracepoint_query)
4572 (tracepoint_finished_step, tracepoint_was_hit)
4573 (release_while_stepping_state_list, current_traceframe)
4574 (in_readonly_region, traceframe_read_mem)
4575 (fetch_traceframe_registers, traceframe_read_sdata)
4576 (traceframe_read_info, struct fast_tpoint_collect_status)
4577 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4578 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4579 (supply_fast_tracepoint_registers)
4580 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4581 (ipa_tdesc, claim_trampoline_space)
4582 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4583 (agent_mem_read, agent_get_trace_state_variable_value)
4584 (agent_set_trace_state_variable_value, agent_tsv_read)
4585 (agent_mem_read_string, get_raw_reg_func_addr)
4586 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4587 * tracepoint.h: ... this new file.
4589 2013-09-05 Pedro Alves <palves@redhat.com>
4591 * server.h (perror_with_name, error, fatal, warning, paddress)
4592 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4594 * utils.h: New file.
4596 2013-09-05 Pedro Alves <palves@redhat.com>
4598 * server.h (remote_debug, noack_mode, transport_is_reliable)
4599 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4600 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4601 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4602 (write_enn, initialize_async_io, enable_async_io)
4603 (disable_async_io, check_remote_input_interrupt_request)
4604 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4605 (dead_thread_notify, prepare_resume_reply)
4606 (decode_address_to_semicolon, decode_address, decode_m_packet)
4607 (decode_M_packet, decode_X_packet, decode_xfer_write)
4608 (decode_search_memory_packet, unhexify, hexify)
4609 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4610 (look_up_one_symbol, relocate_instruction)
4611 (monitor_output): Move to remote-utils.h, and include it.
4612 * remote-utils.h: New file.
4614 2013-09-05 Pedro Alves <palves@redhat.com>
4616 * server.h (_): Delete.
4618 2013-09-02 Pedro Alves <palves@redhat.com>
4620 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4621 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4623 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4625 2013-09-02 Pierre Muller <muller@sourceware.org>
4627 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4628 or WriteProcessMemory complete successfully and handle
4629 ERROR_PARTIAL_COPY error.
4631 2013-09-02 Pedro Alves <palves@redhat.com>
4633 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4634 error instead of EIO.
4636 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4639 * linux-low.c: Include filestuff.h.
4640 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4641 * lynx-low.c: Include filestuff.h.
4642 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4643 * server.c: Include filestuff.h.
4644 (main): Call notice_open_fds.
4645 * spu-low.c: Include filestuff.h.
4646 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4648 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4650 * Makefile.in: Explain why ../target and ../nat are not
4651 listed as include file search paths.
4652 (linux-waitpid.o): New object file rule.
4653 * configure.srv (srv_native_linux_obj): New variable.
4654 Replace all occurrences of linux native object files with
4655 $srv_native_linux_obj.
4656 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4657 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4658 (linux_enable_event_reporting): Remove declaration.
4659 (my_waitpid): Moved to common/linux-waitpid.c.
4660 (linux_wait_for_event): Pass ptid when calling
4661 linux_enable_event_reporting.
4662 (linux_supports_tracefork_flag): Remove.
4663 (linux_enable_event_reporting): Likewise.
4664 (linux_tracefork_grandchild): Remove.
4665 (STACK_SIZE): Moved to common/linux-ptrace.c.
4666 (linux_tracefork_child): Remove.
4667 (linux_test_for_tracefork): Remove.
4668 (linux_look_up_symbols): Call linux_supports_traceclone.
4669 (initialize_low): Remove call to linux_test_for_tracefork.
4670 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4671 common/linux-ptrace.h.
4672 (PTRACE_TYPE_ARG4): Likewise.
4673 Include linux-ptrace.h.
4675 2013-08-21 Pedro Alves <palves@redhat.com>
4677 * config.in: Renegerate.
4679 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4681 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4682 (SFILES): Remove $(srcdir)/common/target-common.c and
4683 add $(srcdir)/target/waitstatus.c.
4684 (OBS): Remove target-common.o and add waitstatus.o.
4685 (server_h): Remove $(srcdir)/../common/target-common.h and
4686 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4687 and $(srcdir)/../target/waitstatus.h.
4688 (target-common.o): Remove.
4689 (waitstatus.o): New target object file.
4690 * target.h: Do not include target-common.h and
4691 include target/resume.h, target/wait.h and
4692 target/waitstatus.h.
4694 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4696 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4697 to PTRACE_TYPE_ARG3.
4698 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4699 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4701 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4702 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4704 2013-07-27 Jie Zhang <jie@codesourcery.com>
4705 Daniel Jacobowitz <dan@codesourcery.com>
4706 Yao Qi <yao@codesourcery.com>
4708 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4709 (mips-linux-watch.o): New rule.
4710 (mips_linux_watch_h): New variable.
4711 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4713 * linux-mips-low.c: Include mips-linux-watch.h.
4714 (struct arch_process_info, struct arch_lwp_info): New.
4715 (update_watch_registers_callback): New function.
4716 (mips_linux_new_process, mips_linux_new_thread) New functions.
4717 (mips_linux_prepare_to_resume, mips_insert_point): New
4719 (mips_remove_point, mips_stopped_by_watchpoint): New
4721 (rsp_bp_type_to_target_hw_bp_type): New function.
4722 (mips_stopped_data_address): New function.
4723 (the_low_target): Add watchpoint support functions.
4725 2013-07-27 Yao Qi <yao@codesourcery.com>
4727 * i386-low.c: Include break-common.h.
4728 (enum target_hw_bp_type): Remove.
4730 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4732 * Makefile.in (SFILES): /common/target-common.c.
4733 (OBS): Add target-common.o.
4734 (server_h): Add $(srcdir)/../common/target-common.h.
4735 (target-common.o): New target.
4736 * server.c (queue_stop_reply_callback): Free
4737 status string after use.
4738 * target.c (target_waitstatus_to_string): Remove.
4739 * target.h: Include target-common.h.
4740 (resume_kind): Likewise.
4741 (target_waitkind): Likewise.
4742 (target_waitstatus): Likewise.
4743 (TARGET_WNOHANG): Likewise.
4745 2013-07-04 Yao Qi <yao@codesourcery.com>
4747 * Makefile.in (host_alias): Use @host_noncanonical@.
4748 (target_alias): Use @target_noncanonical@.
4749 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4750 ACX_NONCANONICAL_HOST.
4751 * configure: Regenerated.
4754 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4756 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4757 * configure: Rebuild.
4758 * Makefile.in (version_host, version_target): Get from configure.
4759 (version.c): Use $(version_host) and $(version_target).
4761 2013-07-03 Pedro Alves <palves@redhat.com>
4763 * Makefile.in (config.status): Depend on development.sh.
4764 * acinclude.m4: Include libmcheck.m4.
4765 * configure: Regenerate.
4767 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4769 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4770 attribute inside the parentheses.
4771 (winapi_DebugSetProcessKillOnExit): Ditto.
4772 (winapi_DebugBreakProcess): Ditto.
4773 (winapi_GenerateConsoleCtrlEvent): Ditto.
4775 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4777 * notif.h (notif_event): Add a dummy member to avoid compiler
4780 2013-07-01 Pedro Alves <palves@redhat.com>
4782 * hostio.c (HOSTIO_PATH_MAX): Define.
4783 (require_filename, handle_open, handle_unlink, handle_readlink):
4786 2013-07-01 Pedro Alves <palves@redhat.com>
4788 * server.h: Include "pathmax.h".
4789 * linux-low.c: Don't include sys/param.h.
4790 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4792 * win32-low.c: Don't include sys/param.h.
4793 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4795 2013-07-01 Pedro Alves <palves@redhat.com>
4797 * event-loop.c: Don't check HAVE_UNISTD_H before including
4799 * gdbreplay.c: Likewise.
4800 * remote-utils.c: Likewise.
4801 * server.c: Likewise.
4802 * configure.ac: Don't check for unistd.h.
4803 * configure: Regenerate.
4805 2013-06-28 Tom Tromey <tromey@redhat.com>
4807 * Makefile.in (version.c): Use version.in, not
4810 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4812 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4813 * configure: Rebuild.
4814 * Makefile.in (version_host, version_target): Get from configure.
4815 (version.c): Use $(version_host) and $(version_target).
4817 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4819 Fix trace-status to output user name without trailing colon.
4820 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4822 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4824 Fix trace-status to output proper start-time and stop-time.
4825 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4826 output start time and stop time in hex as gdb expects.
4828 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4830 * tracepoint.c (build_traceframe_info_xml): Output trace state
4831 variables present in the trace buffer.
4833 2013-06-24 Tom Tromey <tromey@redhat.com>
4835 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4837 (version.o): Remove.
4838 * gdbreplay.c: Include version.h.
4839 (version, host_name): Don't declare.
4840 * server.h: Include version.h.
4841 (version, host_name): Don't declare.
4843 2013-06-12 Pedro Alves <palves@redhat.com>
4845 * linux-x86-low.c (linux_is_elf64): Delete global.
4846 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4847 with local linux_pid_exe_is_elf_64_file use.
4849 2013-06-11 Pedro Alves <palves@redhat.com>
4851 * linux-low.c (regset_disabled, disable_regset): New functions.
4852 (regsets_fetch_inferior_registers)
4853 (regsets_store_inferior_registers): Use them.
4854 (initialize_regsets_info); Don't allocate the disabled_regsets
4856 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4859 2013-06-11 Pedro Alves <palves@redhat.com>
4861 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4864 2013-06-11 Pedro Alves <palves@redhat.com>
4866 * linux-x86-low.c (initialize_low_arch): Call
4867 init_registers_x32_avx_linux.
4869 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4871 Fix compatibility with Android Bionic.
4872 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4875 2013-06-07 Pedro Alves <palves@redhat.com>
4878 * Makefile.in (OBS): Add tdesc.o.
4879 (IPA_OBJS): Add tdesc-ipa.o.
4880 (tdesc-ipa.o): New rule.
4881 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4883 * linux-low.c (new_inferior): Delete.
4884 (disabled_regsets, num_regsets): Delete.
4885 (linux_add_process): Adjust to set the new per-process
4887 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4888 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4889 was a stop. When calling arch_setup, switch the current inferior
4890 to the thread that got an event.
4891 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4892 (regsets_fetch_inferior_registers)
4893 (regsets_store_inferior_registers): New regsets_info parameter.
4895 (linux_register_in_regsets): New regs_info parameter. Adjust to
4897 (register_addr, fetch_register, store_register): New usrregs_info
4898 parameter. Adjust to use it.
4899 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4900 parameter regs_info. Adjust to use it.
4901 (linux_fetch_registers): Get the current inferior's regs_info, and
4903 (linux_store_registers): Ditto.
4904 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4905 (initialize_low): Don't initialize the target_regsets here. Call
4906 initialize_low_arch.
4907 * linux-low.h (target_regsets): Delete declaration.
4908 (struct regsets_info): New.
4909 (struct usrregs_info): New.
4910 (struct regs_info): New.
4911 (struct process_info_private) <new_inferior>: New field.
4912 (struct linux_target_ops): Delete the num_regs, regmap, and
4913 regset_bitmap fields. New field regs_info.
4914 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4915 * i387-fp.c (num_xmm_registers): Delete.
4916 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4917 calls to new interface.
4918 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4919 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4920 Infer the number of xmm registers from the regcache's target
4922 * i387-fp.h (num_xmm_registers): Delete.
4923 * inferiors.c (add_thread): Don't install the thread's regcache
4925 * proc-service.c (gregset_info): Fetch the current inferior's
4926 regs_info. Adjust to use it.
4927 * regcache.c: Include tdesc.h.
4928 (register_bytes, reg_defs, num_registers)
4929 (gdbserver_expedite_regs): Delete.
4930 (get_thread_regcache): If the thread doesn't have a regcache yet,
4931 create one, instead of aborting gdbserver.
4932 (regcache_invalidate_one): Rename to ...
4933 (regcache_invalidate_thread): ... this.
4934 (regcache_invalidate_one): New.
4935 (regcache_invalidate): Only invalidate registers of the current
4937 (init_register_cache): Add target_desc parameter, and use it.
4938 (new_register_cache): Ditto. Assert the target description has a
4939 non zero registers_size.
4940 (regcache_cpy): Add assertions. Adjust.
4941 (realloc_register_cache, set_register_cache): Delete.
4942 (registers_to_string, registers_from_string): Adjust.
4943 (find_register_by_name, find_regno, find_register_by_number)
4944 (register_cache_size): Add target_desc parameter, and use it.
4945 (free_register_cache_thread, free_register_cache_thread_one)
4946 (regcache_release, register_cache_size): New.
4947 (register_size): Add target_desc parameter, and use it.
4948 (register_data, supply_register, supply_register_zeroed)
4949 (supply_regblock, supply_register_by_name, collect_register)
4950 (collect_register_as_string, collect_register_by_name): Adjust.
4951 * regcache.h (struct target_desc): Forward declare.
4952 (struct regcache) <tdesc>: New field.
4953 (init_register_cache, new_register_cache): Add target_desc
4955 (regcache_invalidate_thread): Declare.
4956 (regcache_invalidate_one): Delete declaration.
4957 (regcache_release): Declare.
4958 (find_register_by_number, register_cache_size, register_size)
4959 (find_regno): Add target_desc parameter.
4960 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4962 * remote-utils.c: Include tdesc.h.
4963 (outreg, prepare_resume_reply): Adjust.
4964 * server.c: Include tdesc.h.
4965 (gdbserver_xmltarget): Delete declaration.
4966 (get_features_xml, process_serial_event): Adjust.
4967 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4969 (struct process_info) <tdesc>: New field.
4970 (ipa_tdesc): Declare.
4971 * tdesc.c: New file.
4972 * tdesc.h: New file.
4973 * tracepoint.c: Include tdesc.h.
4974 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4975 (get_context_regcache): Adjust to pass ipa_tdesc down.
4976 (do_action_at_tracepoint): Adjust to get the register cache size
4977 from the context regcache's description.
4978 (traceframe_walk_blocks): Adjust to get the register cache size
4979 from the current trace frame's description.
4980 (traceframe_get_pc): Adjust to get current trace frame's
4981 description and pass it down.
4982 (gdb_collect): Adjust to get the register cache size from the
4984 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4985 (gdbserver_xmltarget): Delete.
4986 (initialize_low_tracepoint): Set the ipa's target description.
4987 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4988 (initialize_low_tracepoint): Set the ipa's target description.
4989 * linux-x86-low.c: Include tdesc.h.
4990 [__x86_64__] (is_64bit_tdesc): New.
4991 (ps_get_thread_area, x86_get_thread_area): Use it.
4992 (i386_cannot_store_register): Rename to ...
4993 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4994 (i386_cannot_fetch_register): Rename to ...
4995 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4996 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4998 (target_regsets): Rename to ...
4999 (x86_regsets): ... this.
5000 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5002 (x86_siginfo_fixup): Use is_64bit_tdesc.
5003 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5004 (tdesc_x32_avx_linux, tdesc_x32_linux)
5005 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5007 (x86_linux_update_xmltarget): Delete.
5008 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5009 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5010 (AMD64_LINUX_USER64_CS): New.
5011 (x86_linux_read_description): New, based on
5012 x86_linux_update_xmltarget.
5013 (same_process_callback): New.
5014 (x86_arch_setup_process_callback): New.
5015 (x86_linux_update_xmltarget): New.
5016 (x86_regsets_info): New.
5017 (amd64_linux_regs_info): New.
5018 (i386_linux_usrregs_info): New.
5019 (i386_linux_regs_info): New.
5020 (x86_linux_regs_info): New.
5021 (x86_arch_setup): Reimplement.
5022 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5023 (x86_emit_ops): Ditto.
5024 (the_low_target): Adjust. Install x86_linux_regs_info,
5025 x86_cannot_fetch_register, and x86_cannot_store_register.
5026 (initialize_low_arch): New.
5027 * linux-ia64-low.c (tdesc_ia64): Declare.
5028 (ia64_fetch_register): Adjust.
5029 (ia64_usrregs_info, regs_info): New globals.
5030 (ia64_regs_info): New function.
5031 (the_low_target): Adjust.
5032 (initialize_low_arch): New function.
5033 * linux-sparc-low.c (tdesc_sparc64): Declare.
5034 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5036 (sparc_arch_setup): New function.
5037 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5038 (the_low_target): Adjust.
5039 (initialize_low_arch): New function.
5040 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5041 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5042 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5043 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5044 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5045 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5046 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5047 (tdesc_powerpc_isa205_vsx64l): Declare.
5048 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5049 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5050 (ppc_set_pc, ppc_get_hwcap): Adjust.
5051 (ppc_usrregs_info): Forward declare.
5052 (!__powerpc64__) ppc_regmap_adjusted: New global.
5053 (ppc_arch_setup): Adjust to the current process'es target
5055 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5056 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5057 (ppc_store_evrregset): Adjust.
5058 (target_regsets): Rename to ...
5059 (ppc_regsets): ... this, and make static.
5060 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5061 (ppc_regs_info): New function.
5062 (the_low_target): Adjust.
5063 (initialize_low_arch): New function.
5064 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5065 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5066 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5067 (tdesc_s390x_linux64v2): Declare.
5068 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5069 (s390_fill_gregset, s390_store_last_break): Adjust.
5070 (target_regsets): Rename to ...
5071 (s390_regsets): ... this, and make static.
5072 (s390_get_pc, s390_set_pc): Adjust.
5073 (s390_get_hwcap): New target_desc parameter, and use it.
5074 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5075 (s390_arch_setup): Adjust to set the current process'es target
5076 description. Don't adjust the regmap.
5077 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5078 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5079 (regs_info_3264): New globals.
5080 (s390_regs_info): New function.
5081 (the_low_target): Adjust.
5082 (initialize_low_arch): New function.
5083 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5084 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5085 [__mips64] (init_registers_mips_linux)
5086 (init_registers_mips_dsp_linux): Delete defines.
5087 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5088 (have_dsp): New global.
5089 (mips_read_description): New, based on mips_arch_setup.
5090 (mips_arch_setup): Reimplement.
5091 (get_usrregs_info): New function.
5092 (mips_cannot_fetch_register, mips_cannot_store_register)
5093 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5094 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5095 (target_regsets): Rename to ...
5096 (mips_regsets): ... this, and make static.
5097 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5098 (dsp_regs_info, regs_info): New globals.
5099 (mips_regs_info): New function.
5100 (the_low_target): Adjust.
5101 (initialize_low_arch): New function.
5102 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5103 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5105 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5106 (arm_read_description): New, with bits factored from
5108 (arm_arch_setup): Reimplement.
5109 (target_regsets): Rename to ...
5110 (arm_regsets): ... this, and make static.
5111 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5112 (arm_regs_info): New function.
5113 (the_low_target): Adjust.
5114 (initialize_low_arch): New function.
5115 * linux-m68k-low.c (tdesc_m68k): Declare.
5116 (target_regsets): Rename to ...
5117 (m68k_regsets): ... this, and make static.
5118 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5119 (m68k_regs_info): New function.
5120 (m68k_arch_setup): New function.
5121 (the_low_target): Adjust.
5122 (initialize_low_arch): New function.
5123 * linux-sh-low.c (tdesc_sharch): Declare.
5124 (target_regsets): Rename to ...
5125 (sh_regsets): ... this, and make static.
5126 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5127 (sh_regs_info, sh_arch_setup): New functions.
5128 (the_low_target): Adjust.
5129 (initialize_low_arch): New function.
5130 * linux-bfin-low.c (tdesc_bfin): Declare.
5131 (bfin_arch_setup): New function.
5132 (bfin_usrregs_info, regs_info): New globals.
5133 (bfin_regs_info): New function.
5134 (the_low_target): Adjust.
5135 (initialize_low_arch): New function.
5136 * linux-cris-low.c (tdesc_cris): Declare.
5137 (cris_arch_setup): New function.
5138 (cris_usrregs_info, regs_info): New globals.
5139 (cris_regs_info): New function.
5140 (the_low_target): Adjust.
5141 (initialize_low_arch): New function.
5142 * linux-cris-low.c (tdesc_crisv32): Declare.
5143 (cris_arch_setup): New function.
5144 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5145 (cris_regs_info): New function.
5146 (the_low_target): Adjust.
5147 (initialize_low_arch): New function.
5148 * linux-m32r-low.c (tdesc_m32r): Declare.
5149 (m32r_arch_setup): New function.
5150 (m32r_usrregs_info, regs_info): New globals.
5151 (m32r_regs_info): Adjust.
5152 (initialize_low_arch): New function.
5153 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5154 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5155 (tic6x_usrregs_info): Forward declare.
5156 (tic6x_read_description): New function, based on ...
5157 (tic6x_arch_setup): ... this. Reimplement.
5158 (target_regsets): Rename to ...
5159 (tic6x_regsets): ... this, and make static.
5160 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5161 (tic6x_regs_info): New function.
5162 (the_low_target): Adjust.
5163 (initialize_low_arch): New function.
5164 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5165 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5166 (target_regsets): Rename to ...
5167 (xtensa_regsets): ... this, and make static.
5168 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5170 (xtensa_arch_setup, xtensa_regs_info): New functions.
5171 (the_low_target): Adjust.
5172 (initialize_low_arch): New function.
5173 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5174 (nios2_arch_setup): Set the current process'es tdesc.
5175 (target_regsets): Rename to ...
5176 (nios2_regsets): ... this.
5177 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5178 (nios2_regs_info): New function.
5179 (the_low_target): Adjust.
5180 (initialize_low_arch): New function.
5181 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5182 (aarch64_arch_setup): Set the current process'es tdesc.
5183 (target_regsets): Rename to ...
5184 (aarch64_regsets): ... this.
5185 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5186 (aarch64_regs_info): New function.
5187 (the_low_target): Adjust.
5188 (initialize_low_arch): New function.
5189 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5191 (target_regsets): Rename to ...
5192 (tile_regsets): ... this.
5193 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5194 (tile_regs_info): New function.
5195 (tile_arch_setup): Set the current process'es tdesc.
5196 (the_low_target): Adjust.
5197 (initialize_low_arch): New function.
5198 * spu-low.c (tdesc_spu): Declare.
5199 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5200 * win32-arm-low.c (tdesc_arm): Declare.
5201 (arm_arch_setup): New function.
5202 (the_low_target): Install arm_arch_setup instead of
5204 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5205 (init_windows_x86): Rename to ...
5206 (i386_arch_setup): ... this. Set `win32_tdesc'.
5207 (the_low_target): Adjust.
5208 * win32-low.c (win32_tdesc): New global.
5209 (child_add_thread): Don't create the thread cache here.
5210 (do_initial_child_stuff): Set the new process'es tdesc.
5211 * win32-low.h (struct target_desc): Forward declare.
5212 (win32_tdesc): Declare.
5213 * lynx-i386-low.c (tdesc_i386): Declare global.
5214 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5215 * lynx-low.c (lynx_tdesc): New global.
5216 (lynx_add_process): Set the new process'es tdesc.
5217 * lynx-low.h (struct target_desc): Forward declare.
5218 (lynx_tdesc): Declare global.
5219 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5220 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5221 * nto-low.c (nto_tdesc): New global.
5222 (do_attach): Set the new process'es tdesc.
5223 * nto-low.h (struct target_desc): Forward declare.
5224 (nto_tdesc): Declare.
5225 * nto-x86-low.c (tdesc_i386): Declare.
5226 (nto_x86_arch_setup): Set `nto_tdesc'.
5228 2013-06-04 Gary Benson <gbenson@redhat.com>
5230 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5231 to qSupported response when appropriate.
5232 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5233 with nonzero-length annex.
5234 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5235 arguments supplied in annex.
5237 2013-05-31 Doug Evans <dje@google.com>
5240 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5241 64 bits in 64-cross-32 environment.
5243 2013-05-28 Pedro Alves <palves@redhat.com>
5245 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5246 (aarch64-without-fpu.c): Delete rule.
5247 * configure.srv (aarch64*-*-linux*): Remove references to
5248 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5249 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5252 2013-05-24 Pedro Alves <palves@redhat.com>
5254 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5255 instead of strchr/decode_address. Error if the range isn't split
5256 with a ','. Don't assume there's be a ':' in the action.
5258 2013-05-23 Yao Qi <yao@codesourcery.com>
5259 Pedro Alves <palves@redhat.com>
5261 * linux-low.c (lwp_in_step_range): New function.
5262 (linux_wait_1): If the thread was range stepping and stopped
5263 outside the stepping range, report the stop to GDB. Otherwise,
5264 continue stepping. Add range stepping debug output.
5265 (linux_set_resume_request): Copy the step range from the resume
5267 (linux_supports_range_stepping): New.
5268 (linux_target_ops) <supports_range_stepping>: Set to
5269 linux_supports_range_stepping.
5270 * linux-low.h (struct linux_target_ops)
5271 <supports_range_stepping>: New field.
5272 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5273 * linux-x86-low.c (x86_supports_range_stepping): New.
5274 (the_low_target) <supports_range_stepping>: Set to
5275 x86_supports_range_stepping.
5276 * server.c (handle_v_cont): Handle 'r' action.
5277 (handle_v_requests): Append ";r" if the target supports range
5279 * target.h (struct thread_resume) <step_range_start,
5280 step_range_end>: New fields.
5281 (struct target_ops) <supports_range_stepping>:
5283 (target_supports_range_stepping): New macro.
5285 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5287 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5288 confusion in comment.
5290 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5292 * lynx-low.c (struct process_info_private): New type.
5293 (lynx_add_process): New function.
5294 (lynx_create_inferior, lynx_attach): Replace calls to
5295 add_process by calls to lynx_add_process.
5296 (lynx_resume): If PTID is null, then try using
5297 current_process()->private->last_wait_event_ptid.
5299 (lynx_clear_inferiors): Delete. The contents of that function
5300 has been inlined in lynx_mourn;
5301 (lynx_wait_1): Save the ptid in the process's private data.
5302 (lynx_mourn): Free the process' private data. Replace call
5303 to lynx_clear_inferiors by call to clear_inferiors.
5305 2013-05-17 Yao Qi <yao@codesourcery.com>
5307 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5310 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5312 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5313 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5314 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5315 PT_TEXT_END_ADDR guards. Update comments.
5316 (linux_target_op) <read_offsets>: Conditionally define to
5317 linux_read_offsets if the target is UCLIBC and if it defines
5318 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5320 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5321 Andrew Jenner <andrew@codesourcery.com>
5323 * Makefile.in (SFILES): Add linux-nios2-low.c.
5324 (clean): Add action to delete nios2-linux.c.
5325 (nios2-linux.c): New rule.
5326 * configure.srv: Add nios2*-*-linux*.
5327 * linux-nios2-low.c: New.
5329 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5331 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5333 2013-04-25 Hui Zhu <hui@codesourcery.com>
5336 * ax.c (ax_printf): Add fflush.
5338 2013-04-22 Tom Tromey <tromey@redhat.com>
5340 * Makefile.in (SFILES): Add filestuff.c.
5341 (OBS): Add filestuff.o.
5342 (filestuff.o): New target.
5343 * config.in, configure: Rebuild.
5344 * configure.ac: Check for fdwalk, pipe2.
5346 2013-04-17 Pedro Alves <palves@redhat.com>
5348 * configure.ac (USE_THREAD_DB): Delete variable.
5349 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5350 Don't AC_SUBST USE_THREAD_DB.
5351 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5352 * config.in, configure: Regenerate.
5354 2013-04-16 Pedro Alves <palves@redhat.com>
5356 * linux-low.h (struct lwp_info) <thread_known>: Move under
5357 the USE_THREAD_DB #ifdef.
5359 2013-04-16 Pedro Alves <palves@redhat.com>
5361 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5362 (linux-low.o): Delete rule.
5363 * linux-low.h: Always include "gdb_thread_db.h" instead of
5364 conditionally including thread_db.h.
5365 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5368 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5370 * Makefile.in (install-only): Fix make install regression.
5372 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5374 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5375 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5377 * gdbserver.1: Remove.
5379 2013-03-22 Pedro Alves <palves@redhat.com>
5381 * linux-low.c (handle_extended_wait): Don't call
5382 linux_enable_event_reporting.
5384 2013-03-15 Tony Theodore <tonyt@logyst.com>
5387 * Makefile.in (SHELL): Use @SHELL@.
5389 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5391 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5394 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5396 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5397 Remove extraneous NULL element.
5399 2013-03-13 Yao Qi <yao@codesourcery.com>
5401 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5402 'V' block in trace frame.
5404 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5406 * target.h (struct target_ops): Add btrace ops.
5407 (target_supports_btrace): New macro.
5408 (target_enable_btrace): New macro.
5409 (target_disable_btrace): New macro.
5410 (target_read_btrace): New macro.
5411 * gdbthread.h (struct thread_info): Add btrace field.
5412 * server.c: Include btrace-common.h.
5413 (handle_btrace_general_set): New function.
5414 (handle_btrace_enable): New function.
5415 (handle_btrace_disable): New function.
5416 (handle_general_set): Call handle_btrace_general_set.
5417 (handle_qxfer_btrace): New function.
5418 (struct qxfer qxfer_packets[]): Add btrace entry.
5419 * inferiors.c (remove_thread): Disable btrace.
5420 * linux-low: Include linux-btrace.h.
5421 (linux_low_enable_btrace): New function.
5422 (linux_low_read_btrace): New function.
5423 (linux_target_ops): Add btrace ops.
5424 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5425 Add srv_linux_btrace=yes.
5426 (x86_64-*-linux*): Add linux-btrace.o.
5427 Add srv_linux_btrace=yes.
5428 * configure.ac: Define HAVE_LINUX_BTRACE.
5429 * config.in: Regenerated.
5430 * configure: Regenerated.
5432 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5434 * server.c (handle_qxfer): Preserve error message if -3 is
5436 (qxfer): Document the -3 return value.
5438 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5440 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5441 (linux_btrace_h): New variable.
5442 (linux-btrace.o): New rule.
5444 2013-03-08 Stan Shebs <stan@codesourcery.com>
5445 Hafiz Abid Qadeer <abidh@codesourcery.com>
5447 * tracepoint.c (trace_buffer_size): New global.
5448 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5449 (init_trace_buffer): Change to one-argument function. Allocate
5450 trace buffer memory.
5451 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5452 handle QTBuffer:size packet.
5453 (cmd_bigqtbuffer_size): New function.
5454 (initialize_tracepoint): Call init_trace_buffer with
5455 DEFAULT_TRACE_BUFFER_SIZE.
5456 * server.c (handle_query): Add QTBuffer:size in the
5459 2013-03-07 Yao Qi <yao@codesourcery.com>
5461 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5462 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5464 (cmd_qtsp): Adjust condition. Do post increment.
5465 Set cur_action and cur_step_action back to 0.
5467 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5470 * linux-low.c (linux_write_memory): Return early success if LEN is
5473 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5475 * configure.srv: Add x86_64-*-cygwin* as target.
5477 2013-02-28 Tom Tromey <tromey@redhat.com>
5479 * configure.ac: Invoke AC_SYS_LARGEFILE.
5480 * configure, config.in: Rebuild.
5482 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5484 * win32-low.c: Throughout, fix format strings and casts of
5485 printf-like functions to avoid type related warnings on all
5487 (get_child_debug_event): Print dwDebugEventCode as hex since
5488 that's how it's usually documented.
5490 2013-02-28 Yao Qi <yao@codesourcery.com>
5492 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5495 2013-02-27 Jiong Wang <jiwang@tilera.com>
5497 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5498 (reg-tilegx32.c): New rule.
5499 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5500 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5501 different register info initializer according to elf class.
5502 (init_registers_tilgx32): New function. The tilegx32 register info
5504 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5505 (tile_store_gregset): Likewise.
5507 2013-02-27 Yao Qi <yao@codesourcery.com>
5509 * server.c (process_point_options): Print debug message when
5510 debug_threads is true.
5512 2013-02-26 Yao Qi <yao@codesourcery.com>
5514 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5516 2013-02-19 Pedro Alves <palves@redhat.com>
5517 Kai Tietz <ktietz@redhat.com>
5521 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5522 instead of strtoul to extract address from packet.
5523 (process_serial_event) <'z'>: Likewise.
5525 2013-02-18 Yao Qi <yao@codesourcery.com>
5527 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5529 2013-02-14 Pedro Alves <palves@redhat.com>
5533 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5534 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5536 2013-02-14 Pedro Alves <palves@redhat.com>
5538 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5540 2013-02-14 Pedro Alves <palves@redhat.com>
5542 * tracepoint.c (save_string): Delete.
5543 (add_tracepoint_action): Use savestring instead of save_string.
5545 2013-02-12 Pedro Alves <palves@redhat.com>
5547 * linux-xtensa-low.c: Ditto.
5548 * xtensa-xtregs.c: Ditto.
5550 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5552 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5555 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5557 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5558 aarch64_num_wp_regs and aarch64_num_bp_regs to
5559 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5561 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5563 * linux-aarch64-low.c (ps_get_thread_area): Replace
5564 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5566 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5567 Marcus Shawcroft <marcus.shawcroft@arm.com>
5568 Nigel Stephens <nigel.stephens@arm.com>
5569 Yufeng Zhang <yufeng.zhang@arm.com>
5571 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5572 (aarch64.c, aarch64-without-fpu.c): New targets.
5573 * configure.srv (aarch64*-*-linux*): New.
5574 * linux-aarch64-low.c: New file.
5576 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5578 * linux-low.c (handle_extended_wait, linux_create_inferior)
5579 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5580 (dequeue_one_deferred_signal, linux_resume_one_thread)
5581 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5582 (linux_tracefork_grandchild, linux_test_for_tracefork)
5583 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5584 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5585 where the argument is 0.
5587 2013-01-25 Yao Qi <yao@codesourcery.com>
5589 * event-loop.c: Include "queue.h".
5590 (gdb_event_p): New typedef.
5591 (struct gdb_event) <next_event>: Remove.
5592 (event_queue): Change to QUEUE(gdb_event_p).
5593 (async_queue_event): Remove.
5594 (gdb_event_xfree): New.
5595 (initialize_event_loop): New.
5596 (process_event): Use API from QUEUE.
5597 (wait_for_event): Likewise.
5598 * server.c (main): Call initialize_event_loop.
5599 * server.h (initialize_event_loop): Declare.
5601 2013-01-18 Yao Qi <yao@codesourcery.com>
5603 * ax.h (struct eval_agent_expr_context): New.
5604 (gdb_eval_agent_expr): Update declaration.
5605 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5606 TFRAME. Add new argument CTX.
5607 * server.h (struct eval_agent_expr_context): Declare.
5608 (agent_mem_read, agent_tsv_read): Update declaration.
5609 (agent_mem_read_string): Likewise.
5610 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5611 (add_traceframe_block): Add new argument TPOINT.
5612 Increase TPOINT->traceframe_usage.
5613 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5614 eval_tracepoint_agent_expr.
5615 (condition_true_at_tracepoint): Likewise.
5616 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5617 (agent_mem_read_string, agent_tsv_read): Likewise.
5619 2013-01-16 Yao Qi <yao@codesourcery.com>
5621 * linux-low.c (linux_resume_one_lwp): Don't check
5622 'lwp->bp_reinsert != 0'.
5624 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5625 Pedro Alves <palves@redhat.com>
5627 * lynx-low.c (ptrace_request_to_str): Define a temporary
5628 macro and use it to simplify this function's implementation.
5630 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5632 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5635 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5637 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5639 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5641 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5643 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5645 * lynx-low.c (lynx_resume): Use the resume_info parameter
5646 to determine the ptid for the lynx_ptrace call, unless
5647 it is equal to minus_one_ptid, in which case we use the
5648 ptid of the current_inferior.
5649 (lynx_wait_1): After having received a thread create/exit
5650 event, resume the inferior's execution using the signaling
5651 thread's ptid, rather than the old ptid.
5653 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5655 * lynx-low.c (lynx_resume): Delete variable ret.
5657 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5659 * gdbreplay.c (gdbreplay_version): Update copyright year.
5660 * server.c (gdbserver_version): Likewise.
5662 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5664 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5667 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5669 * lynx-low.c (ptrace_request_to_str): Add handling for
5672 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5674 * lynx-low.c (lynx_attach): Delete variable new_process.
5676 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5678 * lynx-low.c (lynx_create_inferior): Delete variable
5681 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5683 * lynx-low.c (ptrace_request_to_str): Do not handle
5684 PTRACE_GETTHREADLIST if this macro does not exist.
5686 2012-12-15 Yao Qi <yao@codesourcery.com>
5688 * Makefile.in (OBS): Add notif.o.
5689 * notif.c, notif.h: New.
5690 * server.c: Include "notif.h".
5691 (struct vstop_notif) <next>: Remove.
5693 (queue_stop_reply): Update.
5694 (push_event, send_next_stop_reply): Remove.
5695 (discard_queued_stop_replies): Update.
5696 (notif_stop): New variable.
5697 (handle_v_stopped): Remove.
5698 (handle_v_requests): Don't call handle_v_stopped. Call
5699 handle_ack_notif instead.
5700 (queue_stop_reply_callback): Call notif_event_enque instead
5701 of queue_stop_reply.
5702 (handle_status): Don't call send_next_stop_reply, call
5703 notif_write_event instead.
5704 (kill_inferior_callback): Likewise.
5705 (detach_or_kill_inferior_callback): Likewise.
5706 (main): Call initialize_notif.
5707 (process_serial_event): Call QUEUE_is_empty.
5708 (handle_target_event): Call notif_push instead of push event.
5709 * server.h (push_event): Remove declaration.
5711 2012-12-10 Tom Tromey <tromey@redhat.com>
5713 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5714 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5717 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5718 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5719 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5720 (amd64-linux-ipa.o, ax.o): Rewrite.
5721 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5722 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5723 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5724 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5725 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5726 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5727 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5728 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5729 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5730 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5731 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5732 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5733 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5734 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5735 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5736 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5737 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5738 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5739 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5740 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5741 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5742 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5743 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5744 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5745 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5746 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5747 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5748 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5749 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5750 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5751 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5752 (reg-tilegx.o): Remove.
5753 (all_object_files): New macro.
5754 Include .deps files.
5755 * aclocal.m4, configure: Rebuild.
5756 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5757 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5758 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5760 2012-12-05 Tom Tromey <tromey@redhat.com>
5763 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5765 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5767 * configure.ac: Check for linux/perf_event.h.
5768 * config.in: Regenerated.
5769 * configure: Regenerated.
5771 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5773 * hostio.c (handle_readlink): Decrease buffer size
5774 parameter passed to readlink by one byte.
5776 2012-11-26 Yao Qi <yao@codesourcery.com>
5778 * configure.ac (build_warnings): Append '-Wempty-body'.
5779 * configure: Regenerated.
5780 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5783 2012-11-15 Pierre Muller <muller@sourceware.org>
5785 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5786 * config.in: Regenerate.
5787 * configure: Regenerate.
5788 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5789 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5790 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5791 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5793 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5794 instead of <sys/wait.h> header.
5795 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5797 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5799 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5800 (various make rules): Remove -DGDBSERVER
5802 2012-11-09 Yao Qi <yao@codesourcery.com>
5804 * spu-low.c (current_ptid): Move it to ..
5805 * gdbthread.h: ... here. New.
5806 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5807 * server.c (myresume, process_serial_event): Likewise.
5808 * thread-db.c (thread_db_find_new_threads): Likewise.
5809 * tracepoint.c (run_inferior_command): Likewise.
5811 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5813 * server.c (handle_search_memory_1): Include access length in
5816 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5818 * linux-crisv32-low.c: Fix compile errors.
5820 2012-09-04 Yao Qi <yao@codesourcery.com>
5822 * tracepoint.c (cmd_qtsv): Adjust debug message.
5823 Don't check CUR_TPOINT.
5825 2012-08-28 Yao Qi <yao@codesourcery.com>
5827 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5828 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5829 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5830 Remove declarations of xmalloc, xreallloc, xstrdup and
5832 * Makefile.in (libiberty_h): New.
5833 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5834 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5836 2012-08-23 Yao Qi <yao@codesourcery.com>
5838 * server.h: Remove declaration of 'xsnprintf'.
5840 2012-08-22 Keith Seitz <keiths@redhat.com>
5842 * server.h: Include build-gnulib-gbserver/config.h.
5843 * gdbreplay.c: Likewise.
5845 2012-08-08 Doug Evans <dje@google.com>
5847 * Makefile.in (SFILES): Add gdb_vecs.c.
5848 (OBS): Add gdb_vecs.o.
5849 (gdb_vecs_h, host_defs_h): New variables.
5850 (thread-db.o): Add $(gdb_vecs_h) dependency.
5851 (gdb_vecs.o): New rule.
5852 * thread-db.c: #include "gdb_vecs.h".
5853 (thread_db_load_search): Use a vector to iterate over path elements.
5854 Handle text appearing after "$pdir".
5856 * configure.ac: Add check for strstr.
5857 * config.in: Regenerate.
5858 * configure: Regenerate.
5860 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5862 * hostio.c (handle_pread): If pread fails, fall back to attempting
5864 (handle_pwrite): Likewise for pwrite.
5866 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5868 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5869 between unsupported TYPE and unimplementable ADDR/LEN combination.
5870 (arm_insert_point): Act on new return value.
5872 2012-07-31 Pedro Alves <palves@redhat.com>
5874 * server.c (process_point_options): Only skip tokens if we find
5875 one that is unrecognized. Don't treat 'X' specially while
5876 skipping unrecognized tokens.
5878 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5880 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5881 to 4-byte-align HW breakpoint addresses for Thumb.
5883 2012-07-27 Yao Qi <yao@codesourcery.com>
5887 * server.h: Declare gdb_agent_about_to_close.
5888 * target.c (kill_inferior): Include "agent.h".
5889 New. Send command 'kill'.
5890 * target.h (kill_inferior): Removed macro.
5891 * tracepoint.c (gdb_agent_about_to_close): New.
5892 (gdb_agent_helper_thread): Handle command 'close'.
5893 Wait endlessly until the inferior stops.
5894 Install gdb_agent_remove_socket to atexit hook.
5895 (agent_socket_name): New static variable.
5896 (gdb_agent_socket_init): Replace local variable 'name' with
5897 'agent_socket_name'.
5898 (gdb_agent_remove_socket): New.
5900 2012-07-27 Yao Qi <yao@codesourcery.com>
5902 * server.c (process_point_options): Stop at 'X' when parsing.
5904 2012-07-19 Michael Eager <eager@eagercon.com>
5906 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5908 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5909 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5910 hardware breakpoint.
5912 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5914 * gdbserver/linux-low.c (initialize_low): Call
5915 linux_ptrace_init_warnings.
5917 2012-07-02 Doug Evans <dje@google.com>
5919 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5922 2012-07-02 Stan Shebs <stan@codesourcery.com>
5924 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5925 (ax.o): Add it to build rule.
5927 (OBS): Add format.o.
5928 (IPA_OBS): Add format.o.
5929 * server.c (handle_query): Claim support for breakpoint commands.
5930 (process_point_options): Add command case.
5931 (process_serial_event): Leave running if there are printfs in
5933 * mem-break.h (any_persistent_commands): Declare.
5934 (add_breakpoint_commands): Declare.
5935 (gdb_no_commands_at_breakpoint): Declare.
5936 (run_breakpoint_commands): Declare.
5937 * mem-break.c (struct point_command_list): New struct.
5938 (struct breakpoint): New field command_list.
5939 (any_persistent_commands): New function.
5940 (add_commands_to_breakpoint): New function.
5941 (add_breakpoint_commands): New function.
5942 (gdb_no_commands_at_breakpoint): New function.
5943 (run_breakpoint_commands): New function.
5944 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5946 * ax.c: Include format.h.
5947 (ax_printf): New function.
5948 (gdb_eval_agent_expr): Add printf opcode.
5950 2012-06-13 Yao Qi <yao@codesourcery.com>
5952 * server.c (start_inferior): Remove duplicated writes to fields
5953 'last_resume_kind' and 'last_status' of 'current_inferior'.
5955 2012-06-12 Yao Qi <yao@codesourcery.com>
5956 Pedro Alves <palves@redhat.com>
5958 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5960 * server.c (handle_v_cont): Extend comment.
5962 2012-06-11 Yao Qi <yao@codesourcery.com>
5964 * linux-low.c (linux_attach): Add 'static'.
5966 2012-06-06 Yao Qi <yao@codesourcery.com>
5968 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5970 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5972 Fix gcc -flto compilation warning.
5973 * server.c (main): Make variable multi_mode and attach volatile.
5975 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5977 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5978 if the platform doesn't know about it.
5980 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5982 * Makefile.in (SFILES): Add linux-tile-low.c.
5983 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5984 * configure.srv: Handle tilegx-*-linux*.
5985 * linux-tile-low.c: New file.
5987 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5989 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5991 2012-05-24 Pedro Alves <palves@redhat.com>
5995 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5997 2012-05-24 Pedro Alves <palves@redhat.com>
6001 Replace target_signal with gdb_signal throughout.
6003 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6005 * linux-low.c (linux_store_registers): Avoid the copying sequence
6006 when no data has been retrieved by ptrace.
6008 2012-05-22 Will Deacon <will.deacon@arm.com>
6010 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6011 Include asm/ptrace.h.
6012 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6015 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6017 * linux-low.c (linux_store_registers): Don't re-retrieve data
6018 with ptrace that has already been obtained from /proc. Always
6019 copy any data retrieved with ptrace to the buffer supplied.
6021 2012-05-11 Yao Qi <yao@codesourcery.com>
6022 Pedro Alves <palves@redhat.com>
6024 * linux-low.c (enum stopping_threads_kind): New.
6025 (stopping_threads): Change type to `enum stopping_threads_kind'.
6026 (handle_extended_wait): If stopping and suspending threads, leave
6027 the new_lwp suspended too.
6028 (linux_wait_for_event): Adjust.
6029 (stop_all_lwps): Set `stopping_threads' to
6030 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6031 whether we're suspending threads or just stopping them. Assert no
6034 2012-04-29 Yao Qi <yao@codesourcery.com>
6036 * server.h: Move some code to ...
6037 * gdbthread.h: ... here. New.
6038 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6039 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6040 (nto-low.o, win32-low.o): Likewise.
6041 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6042 * regcache.c, remote-utils.c, server.c: Likewise.
6043 * target.c, tracepoint.c, win32-low.c: Likewise.
6045 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6047 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6048 (PTRACE_ARG4_TYPE): Likewise.
6049 (PTRACE_XFER_TYPE): Likewise.
6050 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6051 ptrace to PTRACE_ARG3_TYPE.
6052 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6053 (PTRACE_ARG4_TYPE): Likewise.
6054 (PTRACE_XFER_TYPE): Likewise.
6055 (linux_detach_one_lwp): Cast fourth argument of
6056 ptrace to long then PTRACE_ARG4_TYPE.
6057 (regsets_fetch_inferior_registers): Cast third argument of
6058 ptrace to long then PTRACE_ARG3_TYPE.
6059 (regsets_store_inferior_registers): Likewise.
6061 2012-04-20 Pedro Alves <palves@redhat.com>
6063 * configure: Regenerate.
6065 2012-04-19 Pedro Alves <palves@redhat.com>
6067 * Makefile.in (GNULIB_BUILDDIR): New.
6068 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6069 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6070 (all, install-only, uninstall, clean-info, all-lib, clean): No
6071 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6072 (maintainer-clean realclean distclean): Use subdir_do.
6074 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6075 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6076 * acinclude.m4: Include acx_configure_dir.m4.
6077 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6078 calls. Call AC_PROG_RANLIB. Configure gnulib using
6081 (GNULIB_STDINT_H): Adjust.
6082 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6083 * gdbreplay.c: Include build-gnulib/config.h.
6084 * server.h: Likewise.
6085 * aclocal.m4: Regenerate.
6086 * config.in: Regenerate.
6087 * configure: Regenerate.
6089 2012-04-19 Pedro Alves <palves@redhat.com>
6091 * Makefile.in (LIBGNU, INCGNU): Adjust.
6092 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6093 (all, install-only, uninstall, clean-info, all-lib, clean)
6094 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6095 * configure.ac: Adjust AC_OUTPUT output.
6096 * aclocal.m4: Regenerate.
6097 * configure: Regenerate.
6099 2012-04-19 Pedro Alves <palves@redhat.com>
6101 * Makefile.in (generated_files): New.
6102 (server_h): Remove the explicit dependency on config.h, and depend
6103 on $generated_files.
6105 2012-04-19 Pedro Alves <palves@redhat.com>
6107 * Makefile.in (INCGNU): Add -Ignulib.
6109 2012-04-19 Pedro Alves <palves@redhat.com>
6111 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6112 (INCGNU): ... this, and spell out -I here.
6113 (GNULIB_LIB): Rename to ...
6115 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6117 2012-04-19 Pedro Alves <palves@redhat.com>
6119 * config.in: Regenerate.
6121 2012-04-19 Pedro Alves <palves@redhat.com>
6123 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6124 * server.h (memmem): Remove declaration.
6125 * config.in: Regenerate.
6126 * configure: Regenerate.
6128 2012-04-19 Yao Qi <yao@codesourcery.com>
6130 * Makefile.in (SFILES): Add common/vec.c.
6134 2012-04-19 Yao Qi <yao@codesourcery.com>
6136 * remote-utils.c (prepare_resume_reply): Replace with macro
6137 target_core_of_thread.
6138 * server.c (handle_qxfer_threads_proper): Likewise.
6139 * target.h (traget_core_of_thread): New macro.
6141 2012-04-18 Pedro Alves <palves@redhat.com>
6143 * aclocal.m4: Regenerate.
6144 * configure: Regenerate.
6146 2012-04-16 Yao Qi <yao@codesourcery.com>
6148 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6149 duplicated on address.
6151 2012-04-16 Yao Qi <yao@codesourcery.com>
6153 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6154 (struct tracepoint_action_ops) <send>: New field.
6155 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6156 (agent_expr_send, x_tracepoint_action_send): New.
6157 (l_tracepoint_action_send): New.
6158 (cmd_qtdp): Download and install tracepoint
6159 according to `use_agent'.
6160 (run_inferior_command): Add one more parameter `len'.
6162 (tracepoint_send_agent): New.
6163 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6165 2012-04-16 Yao Qi <yao@codesourcery.com>
6167 * tracepoint.c (download_tracepoints): Moved to ...
6168 (cmd_qtstart): ... here.
6170 2012-04-14 Yao Qi <yao@codesourcery.com>
6172 * tracepoint.c: Include inttypes.h.
6173 (struct collect_memory_action): Use sized types.
6174 (struct tracepoint): Likewise.
6175 (cmd_qtdp, stop_tracing): Update print specifiers.
6176 (cmd_qtp, response_tracepoint): Likewise.
6177 (collect_data_at_tracepoint): Likewise.
6178 (collect_data_at_step): Likewise.
6180 2012-04-14 Yao Qi <yao@codesourcery.com>
6182 Import gnulib module inttypes.
6183 * aclocal.m4, config.in, configure: Regenerated.
6185 2012-04-14 Yao Qi <yao@codesourcery.com>
6187 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6188 Makefile and config.status at last.
6190 2012-04-13 Yao Qi <yao@codesourcery.com>
6192 * tracepoint.c: Include stdint.h unconditionally.
6194 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6196 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6197 on BFD_HAVE_SYS_PROCFS_TYPE.
6198 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6199 * configure: Regenerate.
6200 * config.in: Likewise.
6202 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6204 * Makefile.in (clean): Also remove x32.c x32-linux.c
6205 x32-avx.c x32-avx-linux.c.
6206 (x32.o): New target.
6208 (x32-linux.o): Likewise.
6209 (x32-linux.c): Likewise.
6210 (x32-avx.o): Likewise.
6211 (x32-avx.c): Likewise.
6212 (x32-avx-linux.o): Likewise.
6213 (x32-avx-linux.c): Likewise.
6215 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6216 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6217 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6218 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6219 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6220 i386/x32-avx-linux.xml.
6222 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6223 (init_registers_x32_avx_linux): Likwise.
6224 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6225 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6227 2012-04-13 Pedro Alves <palves@redhat.com>
6229 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6230 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6231 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6232 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6235 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6237 * linux-x86-low.c (compat_x32_clock_t): New.
6238 (compat_x32_siginfo_t): Likewise.
6239 (compat_x32_siginfo_from_siginfo): Likewise.
6240 (siginfo_from_compat_x32_siginfo): Likewise.
6241 (linux_is_elf64): Likewise.
6242 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6243 and siginfo_from_compat_x32_siginfo for x32.
6244 (x86_arch_setup): Set linux_is_elf64.
6246 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6249 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6251 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6252 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6253 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6254 compatible with process.
6256 2012-04-12 Yao Qi <yao@codesourcery.com>
6258 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6259 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6260 (install-only, install-info, clean): Handle sub dir gnulib.
6261 (all-lib, am--refresh): New targets.
6262 (memmem.o): Remove target.
6263 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6264 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6265 (AC_REPLACE_FUNCS): Remove memmem.
6266 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6267 (AC_OUTPUT): Generate Makefile in gnulib/.
6268 * aclocal.m4, config.in, configure: Regenerated.
6270 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6272 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6274 2012-04-05 Pedro Alves <palves@redhat.com>
6276 -Werror=strict-aliasing
6278 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6281 2012-04-04 Pedro Alves <palves@redhat.com>
6283 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6284 (sparc_store_gregset_from_stack, sparc_store_gregset)
6285 (sparc_breakpoint_at): Fix formatting.
6287 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6289 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6291 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6292 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6293 * config.in: Regenerate.
6294 * configure: Likewise.
6296 2012-03-29 Pedro Alves <palves@redhat.com>
6298 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6299 Correct ptrace arguments.
6301 2012-03-28 Pedro Alves <palves@redhat.com>
6303 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6304 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6305 (IA64_FR1_REGNUM): New defines.
6306 (ia64_fetch_register): New.
6307 (the_low_target): Install it.
6308 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6310 * linux-low.c (linux_fetch_registers): Try the
6311 the_low_target.fetch_register hook first.
6313 * linux-arm-low.c (the_low_target): Adjust.
6314 * linux-bfin-low.c (the_low_target): Adjust.
6315 * linux-cris-low.c (the_low_target): Adjust.
6316 * linux-crisv32-low.c (the_low_target): Adjust.
6317 * linux-m32r-low.c (the_low_target): Adjust.
6318 * linux-m68k-low.c (the_low_target): Adjust.
6319 * linux-mips-low.c (the_low_target): Adjust.
6320 * linux-ppc-low.c (the_low_target): Adjust.
6321 * linux-s390-low.c (the_low_target): Adjust.
6322 * linux-sh-low.c (the_low_target): Adjust.
6323 * linux-sparc-low.c (the_low_target): Adjust.
6324 * linux-tic6x-low.c (the_low_target): Adjust.
6325 * linux-x86-low.c (the_low_target): Adjust.
6326 * linux-xtensa-low.c (the_low_target): Adjust.
6328 2012-03-26 Pedro Alves <palves@redhat.com>
6330 * server.c (handle_qxfer_libraries): Don't bail early if
6331 the_target->qxfer_libraries_svr4 is not NULL.
6333 2012-03-26 Pedro Alves <palves@redhat.com>
6335 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6337 2012-03-23 Pedro Alves <palves@redhat.com>
6339 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6340 "library-list-svr4" element's start tag when the the DSO list is
6343 2012-03-23 Pedro Alves <palves@redhat.com>
6345 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6346 a variable whose type size is the same as the inferior's pointer
6349 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6351 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6353 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6354 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6355 * linux-low.h: Include <signal.h>.
6356 (struct siginfo): Remove forward declaration.
6357 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6360 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6362 * .gitignore: Ignore more files.
6364 2012-03-19 Pedro Alves <palves@redhat.com>
6365 Jan Kratochvil <jan.kratochvil@redhat.com>
6367 * server.c (cont_thread, general_thread): Add describing comments.
6368 (start_inferior): Clear `cont_thread'.
6369 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6372 2012-03-15 Yao Qi <yao@codesourcery.com>
6374 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6376 (cmd_qtdp): ... here.
6378 2012-03-15 Yao Qi <yao@codesourcery.com>
6380 * tracepoint.c (struct tracepoint_action_ops): New.
6381 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6382 (m_tracepoint_action_download): New.
6383 (r_tracepoint_action_download): New.
6384 (x_tracepoint_action_download): New.
6385 (l_tracepoint_action_download): New.
6386 (add_tracepoint_action): Install `action->ops' according type.
6387 (download_tracepoint_1): Move code `download' function pointer
6388 of various tracepoint_action_ops.
6390 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6392 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6393 linux_ptrace_attach_warnings.
6395 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6397 * Makefile.in (linux-ptrace.o): New.
6398 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6399 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6400 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6401 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6402 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6404 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6406 2012-03-08 Yao Qi <yao@codesourcery.com>
6407 Pedro Alves <palves@redhat.com>
6409 Fix PR server/13392.
6410 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6412 * tracepoint.c (remove_tracepoint): New.
6413 (cmd_qtdp): Call remove_tracepoint when failed to install.
6415 2012-03-07 Pedro Alves <palves@redhat.com>
6417 * linux-low.c (get_detach_signal): New.
6418 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6419 Pass on pending signals to PTRACE_DETACH. Check the result of the
6421 * server.c (program_signals, program_signals_p): New.
6422 (handle_general_set): Handle QProgramSignals.
6423 * server.h (program_signals, program_signals_p): Declare.
6425 2012-03-05 Pedro Alves <palves@redhat.com>
6426 Jan Kratochvil <jan.kratochvil@redhat.com>
6428 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6431 2012-03-03 Yao Qi <yao@codesourcery.com>
6433 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6434 agent_look_up_symbols.
6436 2012-03-03 Yao Qi <yao@codesourcery.com>
6438 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6439 (linux-x86-low.o): Likewise.
6440 * server.h: Remove in_process_agent_loaded.
6441 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6445 2012-03-03 Yao Qi <yao@codesourcery.com>
6447 * tracepoint.c (gdb_agent_capability): New global.
6448 (in_process_agent_loaded_ust): Renamed to
6449 `in_process_agent_supports_ust'.
6451 (in_process_agent_supports_ust): Call agent_capability_check.
6452 (clear_installed_tracepoints): Assert that agent supports
6455 2012-03-03 Yao Qi <yao@codesourcery.com>
6457 * linux-low.c (linux_supports_agent): New.
6458 (linux_target_ops): Initialize field `supports_agent' with
6459 linux_supports_agent.
6460 * target.h (struct target_ops) <supports_agent>: New.
6461 (target_supports_agent): New macro.
6462 * server.c (handle_general_set): Handle packet 'QAgent'.
6463 (handle_query): Send `QAgent+'.
6464 * Makefile.in (server.o): Depends on agent.h.
6466 2012-03-03 Yao Qi <yao@codesourcery.com>
6468 * Makefile.in (OBS): Add agent.o.
6469 Add new rule for agent.o.
6470 Track dependence of tracepoint.c on agent.h.
6471 * tracepoint.c (run_inferior_command_1):
6472 (run_inferior_command): Call agent_run_command.
6473 (gdb_ust_connect_sync_socket): Deleted. Move it to
6475 (resume_thread, stop_thread): Likewise.
6476 (gdb_ust_socket_init): Renamed to ...
6477 (gdb_agent_socket_init): ... New.
6478 (gdb_ust_thread): Renamed to ...
6479 (gdb_agent_helper_thread): ... New.
6480 (gdb_ust_init): Move some code to ...
6481 (gdb_agent_init): ... here. New.
6482 [HAVE_UST]: Call gdb_ust_init.
6483 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6484 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6485 * config.in, configure: Regenerated.
6487 2012-03-02 Pedro Alves <palves@redhat.com>
6489 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6490 * linux-low.c (struct simple_pid_list): New.
6491 (stopped_pids): New a struct simple_pid_list pointer.
6492 (add_to_pid_list, pull_pid_from_list): New.
6493 (handle_extended_wait): Don't assume the first signal new children
6494 report is SIGSTOP. Adjust call to pull_pid_from_list.
6495 (linux_wait_for_lwp): Adjust.
6497 2012-03-02 Yao Qi <yao@codesourcery.com>
6499 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6502 2012-03-02 Yao Qi <yao@codesourcery.com>
6504 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6505 `stop_pc' and `tpoint'. Update caller.
6507 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6509 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6510 * linux-low.c (use_linux_regsets): New macro.
6511 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6512 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6513 (linux_register_in_regsets): New function.
6514 (usr_fetch_inferior_registers): Skip registers covered by
6516 (usr_store_inferior_registers): Likewise.
6517 (usr_fetch_inferior_registers): New macro.
6518 (usr_store_inferior_registers): Likewise.
6519 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6520 (linux_store_registers): Likewise.
6521 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6523 (init_registers_mips64_dsp_linux): Likewise.
6524 (init_registers_mips_linux): New macro.
6525 (init_registers_mips_dsp_linux): Likewise.
6526 (mips_dsp_num_regs): Likewise.
6527 (DSP_BASE, DSP_CONTROL): New fallback macros.
6528 (mips_base_regs): New macro.
6529 (mips_regmap): Use it. Fix the size.
6530 (mips_dsp_regmap): New variable.
6531 (mips_dsp_regset_bitmap): Likewise.
6532 (mips_arch_setup): New function.
6533 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6535 (mips_cannot_store_register): Likewise.
6536 (the_low_target): Update .arch_setup, .num_regs and .regmap
6537 initializers. Add .regset_bitmap initializer.
6538 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6540 * linux-bfin-low.c (the_low_target): Likewise.
6541 * linux-cris-low.c (the_low_target): Likewise.
6542 * linux-crisv32-low.c (the_low_target): Likewise.
6543 * linux-ia64-low.c (the_low_target): Likewise.
6544 * linux-m32r-low.c (the_low_target): Likewise.
6545 * linux-m68k-low.c (the_low_target): Likewise.
6546 * linux-ppc-low.c (the_low_target): Likewise.
6547 * linux-s390-low.c (the_low_target): Likewise.
6548 * linux-sh-low.c (the_low_target): Likewise.
6549 * linux-sparc-low.c (the_low_target): Likewise.
6550 * linux-tic6x-low.c (the_low_target): Likewise.
6551 * linux-x86-low.c (the_low_target): Likewise.
6552 * linux-xtensa-low.c (the_low_target): Likewise.
6553 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6554 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6555 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6557 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6558 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6560 2012-02-29 Yao Qi <yao@codesourcery.com>
6561 Pedro Alves <palves@redhat.com>
6563 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6564 `step_over_finished' is true.
6566 2012-02-27 Pedro Alves <palves@redhat.com>
6568 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6569 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6571 2012-02-27 Pedro Alves <palves@redhat.com>
6574 * linux-low.c (pid_is_stopped): New.
6575 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6577 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6579 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6582 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6584 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6586 2012-02-24 Luis Machado <lgustavo@codesourcery>
6588 * server.c (handle_query): Advertise support for target-side
6589 breakpoint condition evaluation.
6590 (process_point_options): New function.
6591 (process_serial_event): When inserting a breakpoint, check for
6592 a target-side condition that should be evaluated.
6594 * mem-break.c: Include regcache.h and ax.h.
6595 (point_cond_list_t): New data structure.
6596 (breakpoint) <cond_list>: New field.
6597 (find_gdb_breakpoint_at): Make non-static.
6598 (delete_gdb_breakpoint_at): Clear any target-side
6600 (clear_gdb_breakpoint_conditions): New function.
6601 (add_condition_to_breakpoint): Likewise.
6602 (add_breakpoint_condition): Likewise.
6603 (gdb_condition_true_at_breakpoint): Likewise.
6604 (gdb_breakpoint_here): Return result directly instead
6605 of going through a local variable.
6607 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6608 (clear_gdb_breakpoint_conditions): Likewise.
6609 (add_breakpoint_condition): Likewise.
6610 (gdb_condition_true_at_breakpoint): Likewise.
6612 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6613 (need_step_over_p): Take target-side breakpoint condition into
6616 2012-02-24 Luis Machado <lgustavo@codesourcery>
6618 * server.h: Include tracepoint.h.
6619 (agent_mem_read, agent_get_trace_state_variable_value,
6620 agent_set_trace_state_variable_value,
6621 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6622 get_set_tsv_func_addr): New prototypes.
6624 * ax.h: New include file.
6625 * ax.c: New source file.
6627 * tracepoint.c: Include ax.h.
6628 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6629 agent_expr, eval_result_type): Move to ax.h.
6630 (parse_agent_expr): Rename to ...
6631 (gdb_parse_agent_expr): ... this, make it non-static and move
6633 (unparse_agent_expr) Rename to ...
6634 (gdb_unparse_agent_expr): ... this, make it non-static and move
6636 (eval_agent_expr): Rename to ...
6637 (eval_tracepoint_agent_expr): ... this.
6638 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6639 forward declarations.
6640 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6641 (agent_get_trace_state_variable_value): New function.
6642 (agent_set_trace_state_variable_value): New function.
6643 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6644 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6645 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6646 (condition_true_at_tracepoint): Likewise.
6647 (parse_agent_expr): Rename to ...
6648 (gdb_parse_agent_expr): ... this and move to ax.c.
6649 (unparse_agent_expr): Rename to ...
6650 (gdb_unparse_agent_expr): ... this and move to ax.c.
6651 (gdb_agent_op_name): Move to ax.c.
6652 (eval_agent_expr): Rename to ...
6653 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6655 (eval_tracepoint_agent_expr): New function.
6656 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6658 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6660 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6661 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6662 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6663 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6664 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6665 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6666 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6667 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6668 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6669 (compile_bytecodes): Remove forward declaration.
6670 (is_goto_target): Move to ax.c.
6671 (compile_bytecodes): Move to ax.c and call
6672 agent_get_trace_state_variable_value (...) and
6673 agent_set_trace_state_variable_value (...).
6675 * Makefile.in: Update ax.c and IPA dependencies.
6677 2012-02-24 Pedro Alves <palves@redhat.com>
6679 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6680 (cmd_bigqtbuffer_circular): ... this. Only handle
6681 'QTBuffer:circular:'.
6682 (handle_tracepoint_general_set): Adjust.
6684 2012-02-16 Yao Qi <yao@codesourcery.com>
6686 * inferiors.c: Move code to ...
6687 * dll.c: .... here. New.
6688 * server.h: Declare clear_dlls.
6689 * Makefile.in (SFILES): Add dll.c.
6693 2012-02-11 Yao Qi <yao@codesourcery.com>
6695 * server.c: (handle_monitor_command): Add a new parameter
6697 (handle_query): Update caller.
6699 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6701 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6702 * configure, config.in: Regenerate.
6703 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6706 2012-02-02 Pedro Alves <palves@redhat.com>
6708 Try SIGKILL first, then PTRACE_KILL.
6709 * linux-low.c (linux_kill_one_lwp): New.
6710 (linux_kill_one_lwp): Rename to ...
6711 (kill_one_lwp_callback): ... this. Use the new
6714 2012-02-02 Pedro Alves <palves@redhat.com>
6716 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6719 2012-01-27 Pedro Alves <palves@redhat.com>
6721 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6722 (elf_64_file_p): Make static.
6723 (linux_pid_exe_is_elf_64_file): New.
6724 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6725 Delete declarations.
6726 (linux_pid_exe_is_elf_64_file): Declare.
6727 * linux-x86-low.c (x86_arch_setup): Use
6728 linux_pid_exe_is_elf_64_file.
6730 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6732 * linux-low.c (linux_wait_for_event_1): Rename to ...
6733 (linux_wait_for_event): ... here and merge it with former
6734 linux_wait_for_event - new variable wait_ptid, use it.
6735 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6737 2012-01-23 Pedro Alves <palves@redhat.com>
6739 * server.c (main): Avoid yet another case of infinite loop while
6740 detaching/killing after a longjmp.
6742 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6745 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6747 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6749 * hostio.c (handle_readlink): New function.
6750 (handle_vFile): Call it to handle "vFile:readlink" packets.
6752 2012-01-20 Pedro Alves <palves@redhat.com>
6753 Ulrich Weigand <ulrich.weigand@linaro.org>
6755 * server.c (handle_v_requests): Only support vAttach and vRun to
6756 start multiple processes when in extended protocol mode.
6758 2012-01-17 Pedro Alves <palves@redhat.com>
6760 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6761 memalign plus mprotect to allocate the scratch buffer.
6763 2012-01-13 Pedro Alves <palves@redhat.com>
6765 * server.c (attach_inferior): Clear `cont_thread'.
6767 2012-01-13 Pedro Alves <palves@redhat.com>
6769 * server.c (main): Avoid infinite loop while detaching/killing
6772 2012-01-09 Doug Evans <dje@google.com>
6774 * server.c (start_inferior): Set last_ptid in --wrapper case.
6776 2012-01-06 Yao Qi <yao@codesourcery.com>
6778 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6780 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6782 2012-01-04 Yao Qi <yao@codesourcery.com>
6784 * tracepoint.c (cmd_qtdp): Print debug message
6785 for static tracepoint.
6787 2012-01-04 Yao Qi <yao@codesourcery.com>
6789 * tracepoint.c (trace_vdebug): Differentiate debug message
6790 between gdbserver and IPA.
6792 2012-01-03 Yao Qi <yao@codesourcery.com>
6794 * tracepoint.c (tracepoint_was_hit): Don't collect for
6797 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6799 * terminal.h: Reformat copyright header.
6801 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6803 * server.c (gdbserver_version): Update copyright year.
6804 * gdbreplay.c (gdbreplay_version): Likewise.
6806 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6808 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6811 2011-12-18 Hui Zhu <teawater@gmail.com>
6812 * linux-low.c (linux_create_inferior): Save return value to ret.
6814 2011-12-18 Hui Zhu <teawater@gmail.com>
6816 * linux-low.c (linux_create_inferior): Save return value to ret.
6818 2011-12-16 Doug Evans <dje@google.com>
6820 * linux-low.c (linux_create_inferior): If stdio connection,
6821 redirect stdin from /dev/null, stdout to stderr.
6822 * remote-utils.c (remote_is_stdio): New static global.
6823 (remote_connection_is_stdio): New function.
6824 (remote_prepare): Handle stdio connection.
6825 (remote_open): Ditto.
6826 (remote_close): Don't close stdin for stdio connections.
6827 (read_prim,write_prim): New functions. Replace all calls to
6828 read/write to these.
6829 * server.c (main): Watch for "-" argument. Move call to
6830 remote_prepare before start_inferior.
6831 * server.h (STDIO_CONNECTION_NAME): New macro.
6832 (remote_connection_is_stdio): Declare.
6834 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6835 in debugging output.
6837 2011-12-15 Yao Qi <yao@codesourcery.com>
6839 * tracepoint.c: Include sys/syscall.h.
6840 (gdb_ust_thread): Remove preprocessor conditional.
6842 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6844 * linux-low.c (linux_detach_one_lwp): Call
6845 the_low_target.prepare_to_resume before detaching.
6847 2011-12-14 Yao Qi <yao@codesourcery.com>
6849 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6852 2011-12-14 Yao Qi <yao@codesourcery.com>
6854 * i386-low.c (i386_low_stopped_data_address): Initialize local
6857 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6861 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6862 DR_CONTROL unless necessary. Extend comments.
6863 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6864 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6866 2011-12-13 Yao Qi <yao@codesourcery.com>
6868 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6870 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6872 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6874 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6875 Print new debug message for such case.
6877 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6879 Fix overlapping memcpy.
6880 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6881 the read_inferior_memory transfer.
6882 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6883 write_inferior_memory transfer.
6884 (set_fast_tracepoint_jump): New variable buf. Use it for the
6885 read_inferior_memory and write_inferior_memory transfers.
6886 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6887 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6888 Use it for the write_inferior_memory transfer.
6889 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6892 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6894 * linux-low.c (fetch_register, store_register): Make code
6895 consistent, fix formatting.
6897 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6899 * linux-low.c (usr_store_inferior_registers): Factor out code
6900 to handle individual registers into...
6901 (store_register): ... this new function.
6903 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6905 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6906 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6907 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6908 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6909 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6910 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6911 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6912 (srv_xmlfiles): Add new XML files.
6914 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6916 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6917 (init_registers_s390_linux32v1): Add prototype.
6918 (init_registers_s390_linux32v2): Likewise.
6919 (init_registers_s390_linux64v1): Likewise.
6920 (init_registers_s390_linux64v2): Likewise.
6921 (init_registers_s390x_linux64v1): Likewise.
6922 (init_registers_s390x_linux64v2): Likewise.
6923 (s390_num_regs): Increment to 52.
6924 (s390_regmap): Add orig_r2 register.
6925 (s390_num_regs_3264): Increment to 68.
6926 (s390_regmap_3264): Add orig_r2 register.
6927 (s390_collect_ptrace_register): Handle orig_r2 register.
6928 (s390_supply_ptrace_register): Likewise.
6929 (s390_fill_last_break): New function.
6930 (s390_store_last_break): Likewise.
6931 (s390_fill_system_call): New function.
6932 (s390_store_system_call): Likewise.
6933 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6935 (s390_check_regset): New function.
6936 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6937 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6938 Update target_regsets for available register sets.
6940 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6941 Jan Kratochvil <jan.kratochvil@redhat.com>
6943 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6944 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6946 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6947 * linux-low.h (struct process_info_private): New member r_debug.
6948 * server.c (handle_qxfer_libraries): Call
6949 the_target->qxfer_libraries_svr4.
6950 (handle_qxfer_libraries_svr4): New function.
6951 (qxfer_packets): New entry "libraries-svr4".
6952 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6953 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6954 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6955 PACKET_qXfer_libraries_svr4.
6957 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6959 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6960 PSW address/mask between 8-byte and 16-byte formats.
6961 (s390_supply_ptrace_register): Likewise.
6962 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6963 basic addressing mode bit.
6965 2011-11-24 Stan Shebs <stan@codesourcery.com>
6967 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6969 2011-11-17 Stan Shebs <stan@codesourcery.com>
6971 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6972 (tracing_start_time): New global.
6973 (tracing_stop_time): New global.
6974 (tracing_user_name): New global.
6975 (tracing_notes): New global.
6976 (tracing_stop_note): New global.
6977 (cmd_qtstart): Set traceframe_usage, start_time.
6978 (stop_tracing): Set stop_time.
6979 (cmd_qtstatus): Report additional status.
6980 (cmd_qtp): New function.
6981 (handle_tracepoint_query): Call it.
6982 (cmd_qtnotes): New function.
6983 (handle_tracepoint_general_set): Call it.
6984 (get_timestamp): Rename from tsv_get_timestamp.
6986 2011-11-14 Stan Shebs <stan@codesourcery.com>
6987 Kwok Cheung Yeung <kcy@codesourcery.com>
6989 * linux-x86-low.c (small_jump_insn): New.
6990 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6991 trampoline and error message, build a trampoline and issue a small
6992 jump instruction to it.
6993 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6994 trampoline and error message.
6995 (x86_get_min_fast_tracepoint_insn_len): New.
6996 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6997 * linux-low.h (struct linux_target_ops): Add arguments to
6998 install_fast_tracepoint_jump_pad operation, add new operation.
6999 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7001 (linux_get_min_fast_tracepoint_insn_len): New function.
7002 (linux_target_op): Add new operation.
7003 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7004 (gdb_trampoline_buffer_end): Ditto.
7005 (gdb_trampoline_buffer_error): Ditto.
7006 (struct ipa_sym_addresses): Add fields for new IPA variables.
7007 (symbol_list): Add entries for new IPA variables.
7008 (struct tracepoint): Add fields to hold the address range of the
7009 trampoline used by the tracepoint.
7010 (trampoline_buffer_head): New static variable.
7011 (trampoline_buffer_tail): Ditto.
7012 (claim_trampoline_space): New function.
7013 (have_fast_tracepoint_trampoline_buffer): New function.
7014 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7016 (install_fast_tracepoint): Ditto, also add error buffer argument.
7017 (cmd_qtminftpilen): New function.
7018 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7019 (fast_tracepoint_from_trampoline_address): New function.
7020 (fast_tracepoint_collecting): Handle trampoline as part of jump
7022 (set_trampoline_buffer_space): New function.
7023 (initialize_tracepoint): Initialize new IPA variables.
7024 * target.h (struct target_ops): Add arguments to
7025 install_fast_tracepoint_jump_pad operation, add new
7026 get_min_fast_tracepoint_insn_len operation.
7027 (target_get_min_fast_tracepoint_insn_len): New.
7028 (install_fast_tracepoint_jump_pad): Add arguments.
7029 * server.h (IPA_BUFSIZ): Define.
7030 * linux-i386-ipa.c: Include extra header files.
7031 (initialize_fast_tracepoint_trampoline_buffer): New function.
7032 (initialize_low_tracepoint): Call it.
7033 * server.h (set_trampoline_buffer_space): Declare.
7034 (claim_trampoline_space): Ditto.
7035 (have_fast_tracepoint_trampoline_buffer): Ditto.
7037 2011-11-14 Yao Qi <yao@codesourcery.com>
7039 * server.c (handle_query): Handle InstallInTrace for qSupported.
7040 * tracepoint.c (add_tracepoint): Sort list.
7041 (install_tracepoint, download_tracepoint): New.
7042 (cmd_qtdp): Call them to install and download tracepoints.
7043 (sort_tracepoints): Removed.
7044 (cmd_qtstart): Update.
7046 2011-11-14 Yao Qi <yao@codesourcery.com>
7048 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7049 * mem-break.h: Declare.
7050 * tracepoint.c (cmd_qtstart): Move some code to ...
7051 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7053 (download_tracepoints): Move some code to ...
7054 (download_tracepoint_1): ... here. New.
7056 2011-11-08 Yao Qi <yao@codesourcery.com>
7058 * remote-utils.c (relocate_instruction): A comment fix.
7060 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7062 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7063 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7064 dr_status_mirror and dr_control_mirror from debug_reg_state.
7065 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7066 (i386_initial_stuff): Remove use of deleted globals.
7067 (i386_get_thread_context, i386_set_thread_context,
7068 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7069 from debug_reg_state.
7071 2011-11-05 Yao Qi <yao@codesourcery.com>
7073 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7074 address as TPOINT's.
7076 2011-11-02 Stan Shebs <stan@codesourcery.com>
7078 * tracepoint.c (agent_mem_read_string): New function.
7079 (eval_agent_expr): Call it for tracenz.
7080 * server.c (handle_query): Report support for tracenz.
7082 2011-11-02 Yao Qi <yao@codesourcery.com>
7084 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7086 2011-11-02 Yao Qi <yao@codesourcery.com>
7088 * target.h: Fix a typo in comment.
7090 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7092 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7093 clobber the breakpoints' shadows with fast tracepoint jumps.
7094 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7095 * target.c (write_inferior_memory): Also pass MYADDR down to
7098 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7100 * configure.ac: Check support for personality routine.
7101 * configure: Regenerate.
7102 * config.in: Likewise.
7103 * linux-low.c: Include <sys/personality.h>.
7104 Define ADDR_NO_RANDOMIZE if necessary.
7105 (linux_create_inferior): Disable address space randomization when
7106 forking inferior, if requested.
7107 (linux_supports_disable_randomization): New function.
7108 (linux_target_ops): Install it.
7109 * server.h (disable_randomization): Declare.
7110 * server.c (disable_randomization): New global variable.
7111 (handle_general_set): Handle QDisableRandomization.
7112 (handle_query): Likewise for qSupported.
7113 (main): Support --disable-randomization and --no-disable-randomization
7114 command line arguments.
7115 * target.h (struct target_ops): Add supports_disable_randomization.
7116 (target_supports_disable_randomization): New macro.
7118 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7120 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7122 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7123 [!PT_GETDSBT] (target_loadmap): New definition.
7124 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7125 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7126 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7127 and PT_GETDSBT to LINUX_LOADMAP.
7128 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7129 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7131 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7133 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7134 (arm_linux_hwbp_cap): New static variable.
7135 (arm_linux_get_hwbp_cap): Replace by ...
7136 (arm_linux_init_hwbp_cap): ... this new function.
7137 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7138 (arm_linux_get_hw_watchpoint_count): Likewise.
7139 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7140 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7141 (arm_prepare_to_resume): Use perror_with_name instead of error.
7143 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7145 * linux-arm-low.c: Include <signal.h>.
7146 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7147 (struct arm_linux_hwbp_cap): New data type.
7148 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7149 (struct arm_linux_hw_breakpoint): New data type.
7150 (MAX_BPTS, MAX_WPTS): Define.
7151 (struct arch_process_info, struct arch_lwp_info): New data types.
7152 (arm_linux_get_hwbp_cap): New function.
7153 (arm_linux_get_hw_breakpoint_count): Likewise.
7154 (arm_linux_get_hw_watchpoint_count): Likewise.
7155 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7156 (arm_hwbp_control_initialize): Likewise.
7157 (arm_hwbp_control_is_enabled): Likewise.
7158 (arm_hwbp_control_is_initialized): Likewise.
7159 (arm_hwbp_control_disable): Likewise.
7160 (arm_linux_hw_breakpoint_equal): Likewise.
7161 (arm_linux_hw_point_initialize): Likewise.
7162 (struct update_registers_data): New data structure.
7163 (update_registers_callback: New function.
7164 (arm_insert_point): Likewise.
7165 (arm_remove_point): Likewise.
7166 (arm_stopped_by_watchpoint): Likewise.
7167 (arm_stopped_data_address): Likewise.
7168 (arm_new_process): Likewise.
7169 (arm_new_thread): Likewise.
7170 (arm_prepare_to_resume): Likewise.
7171 (the_low_target): Register arm_insert_point, arm_remove_point,
7172 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7173 arm_new_thread, and arm_prepare_to_resume.
7175 2011-09-15 Stan Shebs <stan@codesourcery.com>
7177 * server.h (struct emit_ops): Add compare-goto fields.
7178 * tracepoint.c (gdb_agent_op_sizes): New table.
7179 (emit_eq_goto): New function.
7180 (emit_ne_goto): New function.
7181 (emit_lt_goto): New function.
7182 (emit_le_goto): New function.
7183 (emit_gt_goto): New function.
7184 (emit_ge_goto): New function.
7185 (is_goto_target): New function.
7186 (compile_bytecodes): Recognize special cases of compare-goto
7187 combinations and call specialized emitters for them.
7188 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7189 (amd64_emit_ne_goto): New function.
7190 (amd64_emit_lt_goto): New function.
7191 (amd64_emit_le_goto): New function.
7192 (amd64_emit_gt_goto): New function.
7193 (amd64_emit_ge_goto): New function.
7194 (amd64_emit_ops): Add the new functions.
7195 (i386_emit_eq_goto): New function.
7196 (i386_emit_ne_goto): New function.
7197 (i386_emit_lt_goto): New function.
7198 (i386_emit_le_goto): New function.
7199 (i386_emit_gt_goto): New function.
7200 (i386_emit_ge_goto): New function.
7201 (i386_emit_ops): Add the new functions.
7203 2011-09-08 Stan Shebs <stan@codesourcery.com>
7205 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7206 (i386_emit_epilogue): Restore %ebx.
7208 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7210 * server.c (step_thread): Remove definition.
7211 (process_serial_event): Don't handle Hs.
7212 * server.h (step_thread): Remove declaration.
7213 * target.c (set_desired_inferior): Remove use of step_thread.
7215 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7217 * linux-low.c: Include linux-procfs.h.
7218 (linux_attach_lwp_1): Update comments.
7219 (linux_attach): Scan for existing threads when attaching to a
7220 process that is the tgid.
7221 * Makefile.in: Update dependencies.
7223 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7225 * configure.srv: Add linux-procfs.o dependencies.
7227 2011-08-14 Yao Qi <yao@codesourcery.com>
7229 * target.h (struct target_ops): Fix indent.
7230 * win32-low.c (win32_target_ops): Fix comment.
7232 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7233 Yao Qi <yao@codesourcery.com>
7235 * Makefile.in (clean): Remove tic6x-*.c files.
7236 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7237 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7238 (tic6x-c64xp-linux.c): Likewise.
7239 * configure.srv: Add support for tic6x-*-uclinux.
7240 * linux-tic6x-low.c: New.
7241 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7243 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7244 Yao Qi <yao@codesourcery.com>
7246 * target.h (struct target_ops): Add read_loadmap.
7247 * linux-low.c (struct target_loadseg): New type.
7248 (struct target_loadmap): New type.
7249 (linux_read_loadmap): New function.
7250 (linux_target_ops): Add linux_read_loadmap.
7251 * server.c (handle_query): Support qXfer:fdpic:read packet.
7252 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7255 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7257 * win32-low.c: Include <stdint.h>.
7259 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7261 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7262 to the inferior here.
7263 (i386_remove_aligned_watchpoint): Ditto.
7264 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7265 fit part of the watchpoint in the debug registers.
7266 (i386_update_inferior_debug_regs): New.
7267 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7268 registers, and only update the inferior on success.
7269 (i386_low_remove_watchpoint): Ditto.
7271 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7273 * linux-low.c (compare_ints, unique, list_threads, show_process,
7274 linux_core_of_thread): Delete.
7275 (linux_target_ops): Change linux_core_of_thread to
7276 linux_common_core_of_thread.
7277 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7278 * utils.c (malloc_failure): Change type of argument.
7279 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7280 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7281 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7282 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7283 (IPA_OBJS): Add common-utils-ipa.o.
7284 (ptid_h, linux_osdata_h): New macros.
7285 (server_h): Add common/common-utils.h, common/xml-utils.h,
7286 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7288 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7289 ptid.o, buffer.o): New rules.
7290 (linux-low.o): Add common/linux-osdata.h as a dependency.
7291 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7292 * configure.ac: Add AC_HEADER_DIRENT check.
7293 * config.in: Regenerate.
7294 * configure: Regenerate.
7295 * remote-utils.c (xml_escape_text): Delete.
7296 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7297 buffer_xml_printf): Move to common/buffer.c.
7298 * server.c (main): Remove call to initialize_inferiors.
7299 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7300 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7301 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7302 internal_error, gdb_assert, gdb_assert_fail): Delete.
7303 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7304 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7306 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7307 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7308 initialize_inferiors): Delete.
7310 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7312 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7315 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7317 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7319 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7321 2011-05-26 Yao Qi <yao@codesourcery.com>
7323 * Makefile.in (thread-db.o): Track dependence to
7324 common/gdb_thread_db.h.
7325 * thread-db.c: include gdb_thread_db.h from right place.
7327 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7329 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7330 __FILE__ and __LINE__ to internal_error.
7332 2011-05-13 Doug Evans <dje@google.com>
7334 * thread-db.c (try_thread_db_load_from_sdir): New function.
7335 (try_thread_db_load_from_dir): New function.
7336 (thread_db_load_search): Handle $sdir, ignore $pdir.
7337 Remove trying of system directories if search of
7338 libthread-db-search-path fails, that is now done via $sdir.
7340 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7342 * server.c (handle_query): Add EnableDisableTracepoints to the list
7343 of supported features.
7344 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7346 (cmd_qtenable_disable): New.
7347 (cmd_qtstart): Install tracepoints even if disabled.
7348 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7349 receiving a QTEnable or QTDisable packet.
7350 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7351 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7353 (gdb_probe): Skip data collection if static tracepoint is disabled.
7355 2011-05-10 Doug Evans <dje@google.com>
7357 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7359 2011-05-04 Doug Evans <dje@google.com>
7361 * linux-low.c (linux_join): Skip process lookup.
7362 * spu-low.c (spu_join): Ditto.
7363 * server.c (join_inferiors_callback): Delete.
7364 (process_serial_event): For 'D' packet (detach) call join_inferior
7367 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7369 * README: Don't mention xscale*-*-linux*.
7370 * configure.srv (xscale*-*-linux*): Don't handle target.
7372 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7374 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7376 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7377 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7378 (i386_emit_void_call_2): Likewise.
7380 2011-04-26 Yao Qi <yao@codesourcery.com>
7382 * linux-low.c: Move common macros to linux-ptrace.h.
7383 Include linux-ptrace.h.
7384 * Makefile.in (linux_ptrace_h): New.
7385 (linux-low.o): Depends on linux-ptrace.h.
7387 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7389 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7390 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7391 (remote_prepare): New function with most of the TCP code from ...
7392 (remote_open): ... here. Detect PORT here unconditionally. Move also
7393 setting transport_is_reliable.
7394 * server.c (run_once): New variable.
7395 (gdbserver_usage): Document it.
7396 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7397 the first run if RUN_ONCE.
7398 * server.h (run_once, remote_prepare): New declarations.
7400 2011-04-19 Tom Tromey <tromey@redhat.com>
7402 * win32-low.c (handle_load_dll): Remove duplicate "the".
7404 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7406 Remove support for old Cygwin 1.5 versions.
7407 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7408 function to avoid warning.
7409 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7412 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7414 * gdbserver/server.h (Macro _): Define it if not available.
7416 2011-03-14 Michael Snyder <msnyder@vmware.com>
7418 * hostio.c (handle_close): Remove unnecessary null test.
7420 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7422 * Makefile.in (maintainer-clean realclean distclean): Remove
7423 "make ... subdir_do" command.
7425 2011-03-10 Michael Snyder <msnyder@vmware.com>
7427 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7429 * server.c (handle_v_run): Free alloced buffer on early return.
7431 2011-03-09 Yao Qi <yao@codesourcery.com>
7434 2011-03-04 Yao Qi <yao@codesourcery.com>
7436 * Makefile.in: Remove GNU make feature --directory.
7438 2011-03-05 Yao Qi <yao@codesourcery.com>
7440 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7441 (subdir_do): New make target. Copied from gdb/Makefile.
7442 (maintainer-clean, realclean, distclean, clean): Call corresponding
7443 make targets in common/Makefile.
7445 2011-02-11 Yao Qi <yao@codesourcery.com>
7447 * configure.ac: Call AC_PROG_RANLIB.
7448 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7449 * configure: Regenerate.
7451 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7453 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7455 2011-03-06 Yao Qi <yao@codesourcery.com>
7457 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7459 2011-03-05 Yao Qi <yao@codesourcery.com>
7461 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7462 (subdir_do): New make target. Copied from gdb/Makefile.
7463 (maintainer-clean, realclean, distclean, clean): Call corresponding
7464 make targets in common/Makefile.
7466 2011-03-04 Yao Qi <yao@codesourcery.com>
7468 * Makefile.in: Remove GNU make feature --directory.
7470 2011-03-04 Michael Snyder <msnyder@vmware.com>
7472 * server.c (queue_stop_reply): Call xmalloc not malloc.
7474 2011-03-02 Michael Snyder <msnyder@vmware.com>
7476 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7478 2011-02-28 Michael Snyder <msnyder@vmware.com>
7480 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7481 (cmd_qtframe): Ditto.
7482 (cmd_qtbuffer): Ditto.
7483 (cmd_bigqtbuffer): Ditto.
7485 * utils.c (decimal2str): Initialize 'width' to nine, then
7488 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7490 * hostio.c (require_data): Free *data, not data.
7492 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7494 * hostio.c (require_data): Use free, not xfree.
7496 2011-02-27 Michael Snyder <msnyder@vmware.com>
7498 * server.c (handle_query): Discard unused value.
7500 * hostio.c (require_data): Free malloc memory before returning
7503 2011-02-26 Michael Snyder <msnyder@vmware.com>
7505 * linux-low.c (list_threads): Call closedir for dirent.
7507 2011-02-27 Michael Snyder <msnyder@vmware.com>
7509 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7510 a case statement falls through.
7512 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7514 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7517 2011-02-26 Michael Snyder <msnyder@vmware.com>
7519 * utils.c (decimal2str): Eliminate dead code and dead param.
7520 (pulongest): Drop dead param from call to decimal2str.
7523 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7525 Revert the following patch (not approved yet):
7526 2011-02-21 Hui Zhu <teawater@gmail.com>
7527 * tracepoint.c (tp_printf): New function.
7528 (eval_agent_expr): Handle gdb_agent_op_printf.
7530 2011-02-21 Hui Zhu <teawater@gmail.com>
7532 * tracepoint.c (tp_printf): New function.
7533 (eval_agent_expr): Handle gdb_agent_op_printf.
7535 2011-02-18 Tom Tromey <tromey@redhat.com>
7537 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7538 (tracepoint.o): Likewise.
7539 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7540 (gdb_agent_op_names): Likewise.
7542 2011-02-18 Tom Tromey <tromey@redhat.com>
7544 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7545 gdb_agent_op_rot>: New constants.
7546 (gdb_agent_op_names): Add pick and roll.
7547 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7550 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7552 * aclocal.m4: Regenerated with aclocal-1.11.1.
7554 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7556 * server.c (handle_qxfer_traceframe_info): New.
7557 (qxfer_packets): Register "traceframe-info".
7558 (handle_query): Report support for qXfer:traceframe-info:read+.
7559 * tracepoint.c (match_blocktype): New.
7560 (traceframe_find_block_type): Rename to ...
7561 (traceframe_walk_blocks): ... this. Add callback filter argument,
7563 (traceframe_find_block_type): New, reimplemented on top of
7564 traceframe_walk_blocks.
7565 (build_traceframe_info_xml): New.
7566 (traceframe_read_info): New.
7567 * server.h (traceframe_read_info): Declare.
7569 2011-02-11 Yao Qi <yao@codesourcery.com>
7571 * configure.ac: Call AC_PROG_RANLIB.
7572 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7573 * configure: Regenerate.
7575 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7577 * server.c (gdb_read_memory): Change return semantics to allow
7579 (handle_search_memory_1): Adjust.
7580 (process_serial_event) <'m' packet>: Handle partial transfers.
7581 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7583 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7585 * regcache.c (init_register_cache): Initialize
7586 regcache->register_status.
7587 (free_register_cache): Release regcache->register_status.
7588 (regcache_cpy): Copy register_status.
7589 (registers_to_string): Print 'x's for unavailable registers.
7590 (supply_register): Mark the register's status valid or
7591 unavailable, depending on whether a buffer was passed in or not.
7592 (supply_register_zeroed): New.
7593 (supply_regblock): Mark the registers' status valid or
7594 unavailable, depending on whether a buffer was passed in or not.
7595 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7596 (struct regcache): New `register_status' field.
7597 (supply_register_zeroed): Declare.
7598 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7599 supply_register_zeroed, rather than passing a NULL buffer to
7601 * tracepoint.c (fetch_traceframe_registers): Update comment.
7603 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7605 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7608 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7610 * server.h (decode_xfer_write): Change prototype.
7611 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7612 and don't extract the annex here.
7613 * server.c (decode_xfer_read): Remove `annex' parameter,
7614 and don't extract the annex here.
7616 (struct qxfer): New.
7617 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7618 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7619 (handle_qxfer_statictrace): New functions, abstracted out from
7620 handle_query, and made to use the struct qxfer interface.
7621 (handle_threads_qxfer_proper): Rename to ...
7622 (handle_qxfer_threads_proper): ... this.
7623 (handle_threads_qxfer): Rename to ...
7624 (handle_qxfer_threads): ... this. Adjust.
7625 (qxfer_packets): New array.
7626 (handle_qxfer): New function.
7627 (handle_query): Use handle_qxfer.
7629 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7631 * gdbreplay.c: Shorten lines of >= 80 columns.
7632 * linux-low.c: Ditto.
7633 * linux-ppc-low.c: Ditto.
7634 * linux-s390-low.c: Ditto.
7635 * linux-sparc-low.c: Ditto.
7636 * linux-x86-low.c: Ditto.
7637 * linux-xtensa-low.c: Ditto.
7638 * mem-break.c: Ditto.
7640 * regcache.h: Ditto.
7641 * remote-utils.c: Ditto.
7644 * thread-db.c: Ditto.
7645 * tracepoint.c: Ditto.
7647 * win32-low.h: Ditto.
7649 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7651 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7654 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7656 * server.c (gdbserver_version): Update copyright year in version
7658 * gdbreplay.c (gdbreplay_version): Ditto.
7660 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7662 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7663 * linux-bfin-low.c: New file.
7664 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7665 PT_DATA_ADDR for BFIN targets.
7666 * Makefile.in (SFILES): Add linux-bfin-low.c.
7667 (clean): Remove reg-bfin.c.
7668 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7669 * README: Mention supported Blackfin targets.
7671 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7673 * .gitignore: New file.
7675 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7677 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7679 2010-10-22 Jie Zhang <jie@codesourcery.com>
7681 * Makefile.in: Add FLAGS_TO_PASS variable.
7682 (install): Remove dependency of install-only and recursively
7683 invoke make for install-only.
7685 2010-10-04 Doug Evans <dje@google.com>
7687 * Makefile.in (uninstall): Use $(DESTDIR).
7689 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7693 * linux-x86-low.c (compat_siginfo_from_siginfo)
7694 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7695 si_code is < 0. Check for si_code == SI_TIMER before checking for
7698 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7700 * lynx-i386-low.c: New file.
7701 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7703 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7705 * lynx-low.c (ptrace_request_to_str): Remove handling for
7706 request values that have been removed in LynxOS 5.x.
7708 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7710 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7713 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7715 * configure.ac: Add --enable-inprocess-agent option.
7716 * configure: Rebuilt.
7718 2010-09-06 Yao Qi <yao@codesourcery.com>
7720 * linux-low.c (linux_kill): Remove unused variable.
7721 (linux_stabilize_threads): Likewise.
7722 * server.c (start_inferior): Likewise.
7723 (queue_stop_reply_callback): Likewise.
7724 * tracepoint.c (do_action_at_tracepoint): Likewise.
7726 2010-09-06 Yao Qi <yao@codesourcery.com>
7728 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7731 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7733 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7735 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7737 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7740 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7742 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7743 gdbserver/lynx-ppc-low.c: New files.
7744 * Makefile.in (lynx_low_h): New variable.
7745 (lynx-low.o, lynx-ppc-low.o): New rules.
7746 * configure.ac: On LynxOS, link with -lnetinet.
7747 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7748 * configure: regenerate.
7750 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7752 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7753 * configure.ac: Add check for vasprintf and vsnprintf.
7754 * configure, config.in: Regenerate.
7755 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7757 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7759 * gdbreplay.c: Move include of alloca.h up, next to include of
7761 * server.h: Add include of malloc.h.
7762 * mem-break.c: Remove include of malloc.h.
7763 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7765 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7767 * Makefile.in (memmem.o): Build with -Wno-error.
7769 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7771 * utils.c (xsnprintf): Make non-static.
7772 * server.h: Add xsnprintf declaration.
7773 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7774 replace calls to snprintf by calls to xsnprintf throughout.
7776 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7778 * configure.ac: Add configure check for alloca.
7779 * configure, config.in: Regenerate.
7780 * server.h: Include alloca.h if it exists.
7781 * gdbreplay.c: Include alloca.h if it exists.
7783 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7785 * linux-low.c (__SIGRTMIN): Define if not already defined.
7786 (linux_create_inferior): Check for __ANDROID__ rather than
7788 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7789 are already deferred.
7790 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7791 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7792 stopped and already has a pending signal to report.
7793 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7794 a pending signal to report or is moving out of a jump pad.
7795 (linux_init_signals): Check for __ANDROID__ rather than
7798 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7800 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7801 debug_threads check. Avoid a linear search when not doing debug
7804 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7806 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7807 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7808 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7809 (process_event): Change local fd's type to gdb_fildes_t.
7810 (create_file_handler): Adjust prototype.
7811 (delete_file_handler): Adjust prototype.
7812 (handle_file_event): Adjust prototype. Use pfildes.
7813 (create_file_event): Adjsut prototype.
7814 * remote-utils.c (remote_desc, listen_desc): Change type to
7816 * server.h: New gdb_fildes_t typedef.
7817 [USE_WIN32API]: Include winsock2.h.
7818 (delete_file_handler, add_file_handler): Adjust prototypes.
7820 * utils.c (pfildes): New.
7822 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7824 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7825 * configure: Regenerate.
7827 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7829 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7830 (linux_done_accessing_memory): ... this.
7831 (linux_target_ops): Adjust.
7832 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7833 * nto-low.c (nto_target_ops): Adjust comment.
7834 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7835 * spu-low.c (spu_target_ops): Adjust comment.
7836 * target.h (target_ops): Rename unprepare_to_access_memory field
7837 to done_accessing_memory.
7838 (unprepare_to_access_memory): Rename to ...
7839 (done_accessing_memory): ... this.
7841 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7843 * linux-low.c (linux_prepare_to_access_memory): New.
7844 (linux_unprepare_to_access_memory): New.
7845 (linux_target_ops): Install them.
7846 * server.c (read_memory): Rename to ...
7847 (gdb_read_memory): ... this. Use
7848 prepare_to_access_memory/prepare_to_access_memory.
7849 (write_memory): Rename to ...
7850 (gdb_write_memory): ... this. Use
7851 prepare_to_access_memory/prepare_to_access_memory.
7852 (handle_search_memory_1): Adjust.
7853 (process_serial_event): Adjust.
7854 * target.h (struct target_ops): New fields
7855 prepare_to_access_memory and unprepare_to_access_memory.
7856 (prepare_to_access_memory, unprepare_to_access_memory): New.
7857 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7858 prepare_to_access_memory/prepare_to_access_memory.
7859 * nto-low.c (nto_target_ops): Adjust.
7860 * spu-low.c (spu_target_ops): Adjust.
7861 * win32-low.c (win32_target_ops): Adjust.
7863 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7865 * Makefile.in (WARN_CFLAGS): Get it from configure.
7866 (WERROR_CFLAGS): New.
7867 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7868 * configure.ac: Introduce --enable-werror, which adds -Werror to
7869 the compiler command line. Enabled by default. Disable with
7870 --disable-werror. Add -Wdeclaration-after-statement
7871 Wpointer-arith and -Wformat-nonliteral to warning flags.
7872 * configure: Regenerate.
7874 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7876 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7878 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7880 * gdbreplay.c (remote_error): New.
7882 (expect): Use gdbchar. Check for error reading from GDB.
7883 Clarify sync error output.
7884 (play): Check for errors writing to GDB.
7885 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7886 * remote-utils.c (getpkt): Check for errors writing to the remote
7889 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7891 * linux-low.c (linux_wait_1): Move non-debugging code out of
7892 `debug_threads' control.
7894 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7896 * linux-low.c (linux_wait_1): Don't set last_status here.
7897 * server.c (push_event, queue_stop_reply_callback): Assert we're
7898 not pushing a TARGET_WAITKIND_IGNORE event.
7899 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7900 (myresume, handle_target_event): Set the thread's last_resume_kind
7901 and last_status from the target returned status.
7903 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7907 * linux-x86-low.c (update_debug_registers_callback): New.
7908 (i386_dr_low_set_addr): Use it.
7909 (i386_dr_low_get_addr): New.
7910 (i386_dr_low_set_control): Use update_debug_registers_callback.
7911 (i386_dr_low_get_control): New.
7912 (i386_dr_low_get_status): Adjust.
7913 * linux-low.c (linux_stop_lwp): New.
7914 * linux-low.h (linux_stop_lwp): Declare.
7916 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7917 argument instead of a i386_debug_reg_state.
7918 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7919 a i386_debug_reg_state.
7920 (i386_insert_aligned_watchpoint): Adjust.
7921 (i386_remove_aligned_watchpoint): Adjust.
7922 (i386_low_stopped_data_address): Read the debug registers from the
7923 inferior instead of from the mirrors.
7924 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7925 (i386_dr_low_get_addr): Declare.
7926 (i386_dr_low_get_control): Declare.
7927 (i386_dr_low_get_status): Change prototype.
7929 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7930 (i386_dr_low_get_addr): New.
7931 (i386_dr_low_get_control): New.
7932 (i386_dr_low_get_status): Adjust prototype. Return
7934 (i386_initial_stuff): Clear dr_status_mirror and
7936 (i386_get_thread_context): Adjust.
7937 (i386_set_thread_context): Adjust.
7938 (i386_thread_added): Adjust.
7940 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7942 * linux-low.h (linux_thread_area): Delete declaration.
7944 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7946 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7947 after its termination.
7949 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7951 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7952 (gdb_wants_all_stopped): Delete.
7953 (linux_wait_1): Don't call them.
7954 * server.c (handle_v_cont): Tag all threads as want-stopped.
7955 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7956 stopped as "client-wants-stopped".
7958 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7960 * Makefile.in (signals_h): New.
7961 (server_h): Depend on it.
7962 (server.o): Don't depend on $(signals_def).
7963 (signals.o): Depend on $(signals_def).
7965 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7967 * Makefile.in (signals_def): New.
7968 (server_h): Append include/gdb/signals.h and signals_def.
7969 (server.o): Append signals_def.
7971 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7973 * server.c (handle_target_event): Use target_signal_to_host for
7974 resume_info.sig initialization.
7975 * target.h (struct thread_resume) <sig>: New comment.
7977 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7979 * server.c (handle_query): strcpy() the returned string from paddress()
7980 instead of sprintf().
7981 * utils.c (paddress): Return phex_nz().
7983 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7985 * server.c (handle_v_cont): Call mourn_inferior if process
7987 (myresume): Likewise.
7989 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7991 Static tracepoints, and integration with UST.
7993 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7994 * mem-break.c (uninsert_all_breakpoints)
7995 (reinsert_all_breakpoints): New.
7996 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7997 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7998 (gdb_agent_ust_loaded, helper_thread_id)
7999 (gdb_agent_helper_thread_id): New macros.
8000 (struct ipa_sym_addresses): Add addr_ust_loaded,
8001 addr_helper_thread_id, addr_cmd_buf.
8002 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8003 (in_process_agent_loaded_ust): New.
8004 (write_e_ust_not_loaded): New.
8005 (maybe_write_ipa_ust_not_loaded): New.
8006 (struct collect_static_trace_data_action): New.
8007 (enum tracepoint_type) <static_tracepoint>: New.
8008 (struct tracepoint) <handle>: Mention static tracepoints.
8009 (struct static_tracepoint_ctx): New.
8010 (CMD_BUF_SIZE): New.
8011 (add_tracepoint_action): Handle static tracepoint actions.
8012 (unprobe_marker_at): New.
8013 (clear_installed_tracepoints): Handle static tracepoints.
8014 (cmd_qtdp): Handle static tracepoints.
8015 (probe_marker_at): New.
8016 (cmd_qtstart): Handle static tracepoints.
8017 (response_tracepoint): Handle static tracepoints.
8018 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8019 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8020 (get_context_regcache): Handle static tracepoints.
8021 (do_action_at_tracepoint): Handle static tracepoint actions.
8022 (traceframe_find_block_type): Handle static trace data blocks.
8023 (traceframe_read_sdata): New.
8024 (download_tracepoints): Download static tracepoint actions.
8025 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8026 (GDB_PROBE_NAME): New.
8031 (ust_marker_to_static_tracepoint): New.
8033 (collect_ust_data_at_tracepoint): New.
8034 (gdb_ust_probe): New.
8035 (UNIX_PATH_MAX, SOCK_DIR): New.
8036 (gdb_ust_connect_sync_socket): New.
8037 (resume_thread, stop_thread): New.
8038 (run_inferior_command): New.
8039 (init_named_socket): New.
8040 (gdb_ust_socket_init): New.
8041 (cstr_to_hexstr): New.
8043 (first_marker, next_marker): New.
8044 (response_ust_marker): New.
8045 (cmd_qtfstm, cmd_qtsstm): New.
8046 (unprobe_marker_at, probe_marker_at): New.
8047 (cmd_qtstmat, gdb_ust_thread): New.
8048 (gdb_ust_init): New.
8049 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8050 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8052 (x86_64_st_collect_regmap): New.
8053 (X86_64_NUM_ST_COLLECT_GREGS): New.
8054 (AMD64_RIP_REGNUM): New.
8055 (supply_static_tracepoint_registers): New.
8056 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8058 (i386_st_collect_regmap): New.
8059 (i386_NUM_ST_COLLECT_GREGS): New.
8060 (supply_static_tracepoint_registers): New.
8061 * server.c (handle_query): Handle qXfer:statictrace:read.
8062 <qSupported>: Report support for StaticTracepoints, and
8063 qXfer:statictrace:read features.
8064 * server.h (traceframe_read_sdata)
8065 (supply_static_tracepoint_registers): Declare.
8066 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8067 (unpack_varlen_hex): Include in IPA build.
8068 * Makefile.in (ustlibs, ustinc): New.
8069 (IPA_OBJS): Add remote-utils-ipa.o.
8070 ($(IPA_LIB)): Link -ldl and -lpthread.
8072 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8073 * config.in, configure: Regenerate.
8075 2010-06-20 Ian Lance Taylor <iant@google.com>
8076 Pedro Alves <pedro@codesourcery.com>
8078 * linux-x86-low.c (always_true): Delete.
8079 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8080 trying to fool the compiler with always_true.
8082 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8084 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8085 conditions in gdbserver.
8087 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8089 * spu-low.c (spu_read_memory): Wrap around local store limit.
8090 (spu_write_memory): Likewise.
8092 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8094 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8095 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8097 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8099 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8100 uses with LONGEST uses.
8102 2010-06-14 Stan Shebs <stan@codesourcery.com>
8103 Pedro Alves <pedro@codesourcery.com>
8107 * linux-x86-low.c: Include limits.h.
8112 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8113 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8114 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8115 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8116 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8117 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8118 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8119 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8120 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8121 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8122 (amd64_emit_void_call_2): New.
8123 (amd64_emit_ops): New.
8124 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8125 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8126 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8127 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8128 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8129 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8130 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8131 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8132 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8133 (i386_emit_stack_adjust, i386_emit_int_call_1)
8134 (i386_emit_void_call_2): New.
8135 (i386_emit_ops): New.
8136 (x86_emit_ops): New.
8137 (the_low_target): Install x86_emit_ops.
8138 * server.h (struct emit_ops): New.
8139 (get_raw_reg_func_addr): Declare.
8140 (current_insn_ptr, emit_error): Declare.
8141 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8142 (set_trace_state_variable_value): New defines.
8143 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8144 addr_get_trace_state_variable_value and
8145 addr_set_trace_state_variable_value.
8146 (symbol_list): New fields for get_raw_reg,
8147 get_trace_state_variable_value and set_trace_state_variable_value.
8148 (condfn): New typedef.
8149 (struct tracepoint): New field `compiled_cond'.
8150 (do_action_at_tracepoint): Clear compiled_cond.
8151 (get_trace_state_variable_value, set_trace_state_variable_value):
8153 (condition_true_at_tracepoint): If there's a compiled condition,
8155 (current_insn_ptr, emit_error): New globals.
8156 (struct bytecode_address): New.
8157 (get_raw_reg_func_addr): New.
8158 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8159 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8160 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8161 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8162 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8163 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8164 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8165 (compile_tracepoint_condition, compile_bytecodes): New.
8166 * target.h (emit_ops): Forward declare.
8167 (struct target_ops): New field emit_ops.
8168 (target_emit_ops): New.
8169 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8170 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8171 * linux-low.c (linux_emit_ops): New.
8172 (linux_target_ops): Install it.
8173 * linux-low.h (struct linux_target_ops): New field emit_ops.
8175 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8177 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8178 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8180 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8181 Stan Shebs <stan@codesourcery.com>
8183 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8184 (all): Depend on $(extra_libraries).
8185 (install-only): Install the IPA.
8186 (IPA_OBJS, IPA_LIB): New.
8187 (clean): Remove the IPA lib.
8188 (IPAGENT_CFLAGS): New.
8189 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8190 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8191 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8192 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8193 * configure.ac: Check for atomic builtins support in the compiler.
8194 (IPA_DEPFILES, extra_libraries): Define.
8195 * configure.srv (ipa_obj): Add description.
8196 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8197 (i[34567]86-*-linux*): Set ipa_obj.
8198 (x86_64-*-linux*): Set ipa_obj.
8199 * linux-low.c (stabilizing_threads): New.
8200 (supports_fast_tracepoints): New.
8201 (linux_detach): Stabilize threads before detaching.
8202 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8203 the lwp is either not stabilizing, or is moving out of a jump pad.
8204 (linux_fast_tracepoint_collecting): New.
8205 (maybe_move_out_of_jump_pad): New.
8206 (enqueue_one_deferred_signal): New.
8207 (dequeue_one_deferred_signal): New.
8208 (linux_wait_for_event_1): If moving out of a jump pad, defer
8209 pending signals to later.
8210 (linux_stabilize_threads): New.
8211 (linux_wait_1): Check if threads need moving out of jump pads, and
8213 (stuck_in_jump_pad_callback): New.
8214 (move_out_of_jump_pad_callback): New.
8216 (linux_resume_one_lwp): Handle moving out of jump pads.
8217 (linux_set_resume_request): Dequeue deferred signals.
8218 (need_step_over_p): Also step over fast tracepoint jumps.
8219 (start_step_over): Also uninsert fast tracepoint jumps.
8220 (finish_step_over): Also reinsert fast tracepoint jumps.
8221 (linux_install_fast_tracepoint_jump): New.
8222 (linux_target_ops): Install linux_stabilize_threads and
8223 linux_install_fast_tracepoint_jump_pad.
8224 * linux-low.h (linux_target_ops) <get_thread_area,
8225 install_fast_tracepoint_jump_pad>: New fields.
8226 (struct lwp_info) <collecting_fast_tracepoint,
8227 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8228 (linux_get_thread_area): Declare.
8229 * linux-x86-low.c (jump_insn): New.
8230 (x86_get_thread_area): New.
8231 (append_insns): New.
8233 (amd64_install_fast_tracepoint_jump_pad): New.
8234 (i386_install_fast_tracepoint_jump_pad): New.
8235 (x86_install_fast_tracepoint_jump_pad): New.
8236 (the_low_target): Install x86_get_thread_area and
8237 x86_install_fast_tracepoint_jump_pad.
8238 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8239 (struct fast_tracepoint_jump): New.
8240 (fast_tracepoint_jump_insn): New.
8241 (fast_tracepoint_jump_shadow): New.
8242 (find_fast_tracepoint_jump_at): New.
8243 (fast_tracepoint_jump_here): New.
8244 (delete_fast_tracepoint_jump): New.
8245 (set_fast_tracepoint_jump): New.
8246 (uninsert_fast_tracepoint_jumps_at): New.
8247 (reinsert_fast_tracepoint_jumps_at): New.
8248 (set_breakpoint_at): Use write_inferior_memory.
8249 (uninsert_raw_breakpoint): Use write_inferior_memory.
8250 (check_mem_read): Mask out fast tracepoint jumps.
8251 (check_mem_write): Mask out fast tracepoint jumps.
8252 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8253 (set_fast_tracepoint_jump): Declare.
8254 (delete_fast_tracepoint_jump)
8255 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8256 (reinsert_fast_tracepoint_jumps_at): Declare.
8257 * regcache.c: Don't compile many functions when building the
8258 in-process agent library.
8259 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8260 the register buffer in the heap.
8261 (free_register_cache): If the register buffer isn't owned by the
8262 regcache, don't free it.
8263 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8264 pre-existing register caches.
8265 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8267 (convert_ascii_to_int): : Constify `from' parameter type.
8268 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8269 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8270 the needed buffer in-place.
8271 (relocate_instruction): New.
8272 * server.c (handle_query) <qSymbols>: If the target supports
8273 tracepoints, give it a chance of looking up symbols. Report
8274 support for fast tracepoints.
8275 (handle_status): Stabilize threads.
8276 (process_serial_event): Adjust.
8277 * server.h (struct fast_tracepoint_jump): Forward declare.
8278 (struct process_info) <fast_tracepoint_jumps>: New field.
8279 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8280 (decode_X_packet, decode_M_packet): Adjust.
8281 (relocate_instruction): Declare.
8282 (in_process_agent_loaded): Declare.
8283 (tracepoint_look_up_symbols): Declare.
8284 (struct fast_tpoint_collect_status): Declare.
8285 (fast_tracepoint_collecting): Declare.
8286 (force_unlock_trace_buffer): Declare.
8287 (handle_tracepoint_bkpts): Declare.
8288 (initialize_low_tracepoint)
8289 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8290 * target.h (struct target_ops) <stabilize_threads,
8291 install_fast_tracepoint_jump_pad>: New fields.
8292 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8293 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8294 [HAVE_STDINT_H]: Include stdint.h.
8295 (trace_debug_1): Rename to ...
8296 (trace_vdebug): ... this.
8297 (trace_debug): Rename to ...
8298 (trace_debug_1): ... this. Add `level' parameter.
8300 (ATTR_USED, ATTR_NOINLINE): New.
8301 (IP_AGENT_EXPORT): New.
8302 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8303 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8304 (about_to_request_buffer_space, trace_buffer_is_full)
8305 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8306 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8307 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8308 (traceframe_write_count, traceframes_created)
8309 (trace_state_variables)
8310 New renaming defines.
8311 (struct ipa_sym_addresses): New.
8312 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8314 (ipa_sym_addrs): New.
8315 (all_tracepoint_symbols_looked_up): New.
8316 (in_process_agent_loaded): New.
8317 (write_e_ipa_not_loaded): New.
8318 (maybe_write_ipa_not_loaded): New.
8319 (tracepoint_look_up_symbols): New.
8320 (debug_threads) [IN_PROCESS_AGENT]: New.
8321 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8322 (UNKNOWN_SIDE_EFFECTS): New.
8323 (stop_tracing): New.
8324 (flush_trace_buffer): New.
8325 (stop_tracing_bkpt): New.
8326 (flush_trace_buffer_bkpt): New.
8327 (read_inferior_integer): New.
8328 (read_inferior_uinteger): New.
8329 (read_inferior_data_pointer): New.
8330 (write_inferior_data_pointer): New.
8331 (write_inferior_integer): New.
8332 (write_inferior_uinteger): New.
8333 (struct collect_static_trace_data_action): Delete.
8334 (enum tracepoint_type): New.
8335 (struct tracepoint) <type>: New field `type'.
8336 <actions_str, step_actions, step_actions_str>: Only include in
8338 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8339 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8340 (tracepoints): Use IP_AGENT_EXPORT.
8341 (last_tracepoint): Don't include in the IPA.
8342 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8343 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8344 (alloced_trace_state_variables): New.
8345 (trace_state_variables): Use IP_AGENT_EXPORT.
8346 (traceframe_t): Delete unused variable.
8347 (circular_trace_buffer): Don't include in the IPA.
8348 (trace_buffer_start): Delete.
8349 (struct trace_buffer_control): New.
8350 (trace_buffer_free): Delete.
8351 (struct ipa_trace_buffer_control): New.
8352 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8353 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8355 (trace_buffer_ctrl): New.
8356 (TRACE_BUFFER_CTRL_CURR): New.
8357 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8358 Reimplement as macros.
8359 (trace_buffer_wrap): Delete.
8360 (traceframe_write_count, traceframe_read_count)
8361 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8362 (struct tracepoint_hit_ctx) <type>: New field.
8363 (struct fast_tracepoint_ctx): New.
8364 (memory_barrier): New.
8366 (record_tracepoint_error): Update atomically in the IPA.
8367 (clear_inferior_trace_buffer): New.
8368 (about_to_request_buffer_space): New.
8369 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8370 updating the same buffer.
8371 (add_tracepoint): Default the tracepoint's type to trap
8372 tracepoint, and orig_size to -1.
8373 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8375 (create_trace_state_variable): New parameter `gdb'. Handle it.
8376 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8377 (cmd_qtdp): Handle fast tracepoints.
8379 (max_jump_pad_size): New.
8380 (gdb_jump_pad_head): New.
8381 (get_jump_space_head): New.
8382 (claim_jump_space): New.
8383 (sort_tracepoints): New.
8384 (MAX_JUMP_SIZE): New.
8385 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8387 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8388 support. Upload fast traceframes, and delete internal IPA
8390 (stop_tracing_handler): New.
8391 (flush_trace_buffer_handler): New.
8392 (cmd_qtstop): Upload fast tracepoints.
8393 (response_tracepoint): Handle fast tracepoints.
8394 (tracepoint_finished_step): Upload fast traceframes. Set the
8395 tracepoint hit context's tracepoint type.
8396 (handle_tracepoint_bkpts): New.
8397 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8398 type. Add comment about fast tracepoints.
8399 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8400 non-existing action_str field.
8401 (get_context_regcache): Handle fast tracepoints.
8402 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8404 (fast_tracepoint_from_jump_pad_address): New.
8405 (fast_tracepoint_from_ipa_tpoint_address): New.
8406 (collecting_t): New.
8407 (force_unlock_trace_buffer): New.
8408 (fast_tracepoint_collecting): New.
8411 (write_inferior_data_ptr): New.
8412 (target_tp_heap): New.
8413 (target_malloc): New.
8414 (download_agent_expr): New.
8416 (download_tracepoints): New.
8417 (download_trace_state_variables): New.
8418 (upload_fast_traceframes): New.
8419 (IPA_FIRST_TRACEFRAME): New.
8420 (IPA_NEXT_TRACEFRAME_1): New.
8421 (IPA_NEXT_TRACEFRAME): New.
8422 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8423 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8424 (gdb_jump_pad_buffer_end): New.
8425 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8426 (initialize_tracepoint): Adjust.
8427 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8428 buffer. Initialize the low module.
8429 * utils.c (PREFIX, TOOLNAME): New.
8430 (malloc_failure): Use PREFIX.
8431 (error): In the IPA, an error causes an exit.
8432 (fatal, warning): Use PREFIX.
8433 (internal_error): Use TOOLNAME.
8434 (NUMCELLS): Increase to 10.
8435 * configure, config.in: Regenerate.
8437 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8439 * server.c (handle_query) <qSupported>: Do two passes over the
8440 qSupported string to avoid nesting strtok.
8442 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8444 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8446 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8448 * configure: Regenerate.
8449 * proc-service.list: New.
8451 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8453 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8456 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8458 * gdbreplay.c (remote_open): Check error return from socket() call by
8459 its equality to -1 not by it being negative.
8460 * remote-utils.c (remote_open): Likewise.
8462 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8464 * config.h: Regenerate.
8466 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8468 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8469 doesn't provide PTRACE_GET_THREAD_AREA.
8471 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8473 * linux-m68k-low.c: Include <asm/ptrace.h>
8474 (ps_get_thread_area): Implement.
8476 2010-05-03 Doug Evans <dje@google.com>
8478 * event-loop.c (struct callback_event): New struct.
8479 (callback_list): New global.
8480 (append_callback_event, delete_callback_event): New functions.
8481 (process_callback): New function.
8482 (start_event_loop): Call it.
8483 * remote-utils.c (NOT_SCHEDULED): Define.
8484 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8485 moved out of readchar.
8486 (readchar): Rewrite. Call reschedule before returning.
8487 (reset_readchar): New function.
8488 (remote_close): Call it.
8489 (process_remaining, reschedule): New functions.
8490 * server.h (callback_handler_func): New typedef.
8491 (append_callback_event, delete_callback_event): Declare.
8493 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8495 * proc-service.c (ps_pglobal_lookup): Use
8496 thread_db_look_up_one_symbol.
8497 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8498 parameter. Use it instead of all_symbols_looked_up.
8499 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8501 (all_symbols_looked_up): Don't declare.
8502 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8503 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8505 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8506 Set all_symbols_looked_up here.
8507 (thread_db_look_up_one_symbol): New.
8508 (thread_db_get_tls_address): Adjust.
8509 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8510 thread_db object on the heap, and tentatively set it in the
8512 (thread_db_init): Don't set all_symbols_looked_up here.
8513 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8515 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8517 * linux-low.c (linux_kill, linux_detach): Adjust.
8518 (status_pending_p_callback): Remove redundant statement. Check
8519 for !TARGET_WAITIKIND_IGNORE, instead of
8520 TARGET_WAITKIND_STOPPED.
8521 (handle_tracepoints): Make sure LWP is locked. Adjust.
8522 (linux_wait_for_event_1): Adjust.
8523 (linux_cancel_breakpoints): New.
8524 (unsuspend_one_lwp): New.
8525 (unsuspend_all_lwps): New.
8526 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8527 (send_sigstop_callback): Change return type to int, add new
8528 `except' parameter and handle it.
8529 (suspend_and_send_sigstop_callback): New.
8530 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8531 pass them down. If SUSPEND, also increment the lwp's suspend
8533 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8534 (need_step_over_p): Don't consider suspended LWPs.
8535 (start_step_over): Adjust.
8536 (proceed_one_lwp): Change return type to int, add new `except'
8537 parameter and handle it.
8538 (unsuspend_and_proceed_one_lwp): New.
8539 (proceed_all_lwps): Use find_inferior instead of
8541 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8542 also decrement the suspend count of LWPs. Pass `except' down,
8543 instead of hacking its suspend count.
8544 (linux_pause_all): Add `freeze' parameter. Adjust.
8545 (linux_unpause_all): New.
8546 (linux_target_ops): Install linux_unpause_all.
8547 * server.c (handle_status): Adjust.
8548 * target.h (struct target_ops): New fields `unpause_all' and
8549 `cancel_breakpoints'. Add new parameter to `pause_all'.
8550 (pause_all): Add new `freeze' parameter.
8552 (cancel_breakpoints): New.
8553 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8555 (cmd_qtstart): Pause threads.
8556 (stop_tracing): Pause threads, and cancel breakpoints.
8557 * win32-low.c (win32_target_ops): Adjust.
8559 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8561 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8562 the inferior right away from here...
8563 (linux_wait_1): ... to here, and adjust to check the thread's
8564 last_resume_kind instead of the lwp's step or stop_expected flags.
8566 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8568 * README: Use consistent `GDB' and `GDBserver' spellings.
8570 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8572 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8573 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8574 (linux_detach_one_lwp): Assume the lwp is stopped.
8575 (any_thread_of): Delete.
8576 (linux_detach): Stop all lwps here. Don't blindly delete all
8578 (delete_lwp_callback): New.
8579 (linux_mourn): Delete all lwps of the process that is gone.
8580 (linux_wait_1): Don't delete the last lwp of the process here.
8581 * mem-break.h (mark_breakpoints_out): Declare.
8582 * mem-break.c (mark_breakpoints_out): New.
8583 (free_all_breakpoints): Use it.
8584 * server.c (handle_target_event): If the process is gone, mark
8586 * thread-db.c (struct thread_db) <create_bp>: New field.
8587 (thread_db_enable_reporting): Fix prototype. Store a thread event
8588 breakpoint reference in the thread_db struct.
8589 (thread_db_load_search): Clear the thread_db object.
8590 (try_thread_db_load_1): Ditto.
8591 (switch_to_process): New.
8592 (disable_thread_event_reporting): Use it.
8593 (remove_thread_event_breakpoints): New.
8594 (thread_db_detach, thread_db_mourn): Use it.
8596 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8598 * linux-low.c (linux_enable_event_reporting): New.
8599 (linux_wait_for_event_1, handle_extended_wait): Use it.
8601 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8603 * linux-low.c (linux_kill_one_lwp, linux_kill)
8604 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8605 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8606 SIGSTOP even if the LWP is stopped.
8607 (send_sigstop_callback): New.
8608 (stop_all_lwps): Use send_sigstop_callback instead.
8609 (linux_resume_one_thread): Adjust.
8610 (proceed_one_lwp): Still proceed an LWP that the client has
8611 requested to stop, if we haven't reported it as stopped yet. Make
8612 sure that LWPs the client want stopped, have a pending SIGSTOP.
8614 2010-04-26 Doug Evans <dje@google.com>
8616 * server.c (handle_general_set): Make static.
8618 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8619 Print received char after testing for error/eof instead of before.
8620 (input_interrupt): Tweak comment.
8622 2010-04-23 Doug Evans <dje@google.com>
8624 * server.c (start_inferior): Print inferior argv if --debug.
8626 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8628 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8629 * nto-x86-low.c: Include server.h
8631 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8633 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8634 be consistent with other sources of this directory.
8635 (init_registers_amd64): Correct name of source file of this function
8638 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8640 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8643 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8645 * win32-i386-low.c: Add 64-bit support.
8646 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8647 (init_registers_amd64): Declare.
8648 (mappings): Add 64-bit version of array.
8649 (init_windows_x86): New function.
8650 (the_low_target): Change init_arch field to init_windows_x86.
8652 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8654 * win32-low.c: Adapt to support also 64-bit architecture.
8655 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8656 (get_image_name): Use SIZE_T type for local variable `done'.
8657 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8658 (toolhelp_get_dll_name): Idem.
8659 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8660 Use uintptr_t typecast to avoid warning.
8661 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8662 (handle_exception): Use phex_nz to avoid warning.
8663 (win32_wait): Remove unused local variable `process'.
8665 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8667 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8670 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8672 * configure.ac: Use `ws2_32' library for srv_mingw.
8673 * configure: Regenerate.
8674 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8675 * remote-utils.c: Likewise.
8677 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8679 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8680 if __x86_64__ is defined.
8682 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8684 * configure: Regenerate.
8686 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8688 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8689 * target.h (target_ops): New get_tib_address field.
8690 * win32-low.h (win32_thread_info): Add thread_local_base field.
8691 * win32-low.c (child_add_thread): Add tlb argument.
8692 Set thread_local_base field to TLB.
8693 (get_child_debug_event): Adapt to child_add_thread change.
8694 (win32_get_tib_address): New function.
8695 (win32_target_ops): Set get_tib_address field to
8696 win32_get_tib_address.
8697 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8699 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8701 * linux-low.c (linux_mourn): Also remove the process.
8702 * server.c (handle_target_event): Don't remove the process here.
8703 * nto-low.c (nto_mourn): New.
8704 (nto_target_ops): Install it.
8705 * spu-low.c (spu_mourn): New.
8706 (spu_target_ops): Install it.
8707 * win32-low.c (win32_mourn): New.
8708 (win32_target_ops): Install it.
8710 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8712 * server.h (buffer_xml_printf): Remove redundant `;'.
8714 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8716 * regcache.c (set_register_cache): Invalidate regcaches before
8717 changing the register cache layout.
8718 (regcache_invalidate_one): Allow a NULL regcache.
8719 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8720 regcaches before changing the register cache layout or the target
8723 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8725 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8726 variable warning on Linux/x86-64.
8728 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8730 GDBserver disconnected tracing support.
8732 * linux-low.c (linux_remove_process): Delete.
8733 (add_lwp): Don't set last_resume_kind here.
8734 (linux_kill): Use `mourn'.
8735 (linux_detach): Use `thread_db_detach', and `mourn'.
8737 (linux_attach_lwp_1): Adjust comment.
8738 (linux_attach): last_resume_kind moved the thread_info; adjust.
8739 (status_pending_p_callback): Adjust.
8740 (linux_wait_for_event_1): Adjust.
8741 (count_events_callback, select_singlestep_lwp_callback)
8742 (select_event_lwp_callback, cancel_breakpoints_callback)
8743 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8744 (proceed_one_lwp): Adjust.
8745 (linux_async): Add debug output.
8746 (linux_thread_stopped): New.
8747 (linux_pause_all): New.
8748 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8750 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8751 (thread_db_free): Delete declaration.
8752 (thread_db_detach, thread_db_mourn): Declare.
8753 * thread-db.c (thread_db_init): Use thread_db_mourn.
8754 (thread_db_free): Delete, split in two.
8755 (disable_thread_event_reporting): New.
8756 (thread_db_detach): New.
8757 (thread_db_mourn): New.
8759 * server.h (struct thread_info) <last_resume_kind>: New field.
8760 <attached>: Add comment.
8761 <gdb_detached>: New field.
8762 (handler_func): Change return type to int.
8763 (handle_serial_event, handle_target_event): Ditto.
8764 (gdb_connected): Declare.
8766 (disconnected_tracing): Declare.
8767 (stop_tracing): Declare.
8769 * server.c (handle_query) <qSupported>: Report support for
8770 disconnected tracing.
8771 (queue_stop_reply_callback): Account for running threads.
8772 (gdb_wants_thread_stopped): New.
8773 (gdb_wants_all_threads_stopped): New.
8774 (gdb_reattached_process): New.
8775 (handle_status): Clear the `gdb_detached' flag of all processes.
8776 In all-stop, stop all threads.
8777 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8778 (process_serial_event): If the remote connection breaks, or if an
8779 exit was forced with "monitor exit", force an event loop exit.
8780 Handle disconnected tracing on detach.
8781 (handle_serial_event): Adjust.
8782 (handle_target_event): If GDB isn't connected, forward events back
8783 to the inferior, unless the last process exited, in which case,
8784 exit gdbserver. Adjust interface.
8786 * remote-utils.c (remote_open): Don't block in accept. Instead
8787 register an event loop source on the listen socket file
8788 descriptor. Refactor bits into ...
8789 (listen_desc): ... this new global.
8790 (gdb_connected): ... this new function.
8791 (enable_async_notification): ... this new function.
8792 (handle_accept_event): ... this new function.
8793 (remote_close): Clear remote_desc.
8795 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8797 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8799 (mourn_inferior): Define.
8800 (target_process_qsupported): Avoid the dangling else problem.
8801 (thread_stopped): Define.
8802 (pause_all): Define.
8803 (target_waitstatus_to_string): Declare.
8804 * target.c (target_waitstatus_to_string): New.
8806 * tracepoint.c (tracing): Make extern.
8807 (disconnected_tracing): New.
8808 (stop_tracing): Make extern. Handle tracing stops due to GDB
8810 (cmd_qtdisconnected): New.
8811 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8812 (handle_tracepoint_general_set): Handle QTDisconnected.
8814 * event-loop.c (event_handler_func): Change return type to int.
8815 (process_event): Bail out if the event handler wants the event
8817 (handle_file_event): Ditto.
8818 (start_event_loop): Bail out if the event handler wants the event
8821 * nto-low.c (nto_target_ops): Adjust.
8822 * spu-low.c (spu_wait): Don't remove the process here.
8823 (spu_target_ops): Adjust.
8824 * win32-low.c (win32_wait): Don't remove the process here.
8825 (win32_target_ops): Adjust.
8827 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8829 * regcache.c (realloc_register_cache): Invalidate inferior's
8830 regcache before recreating it.
8832 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8834 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8836 2010-04-09 Stan Shebs <stan@codesourcery.com>
8837 Pedro Alves <pedro@codesourcery.com>
8839 * server.h (LONGEST): New.
8840 (struct thread_info) <while_stepping>: New field.
8841 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8843 (initialize_tracepoint, handle_tracepoint_general_set)
8844 (handle_tracepoint_query, tracepoint_finished_step)
8845 (tracepoint_was_hit, release_while_stepping_state_list):
8846 (current_traceframe): Declare.
8847 * server.c (handle_general_set): Handle tracepoint packets.
8849 (write_memory): New.
8850 (handle_search_memory_1): Use read_memory.
8851 (handle_query): Report support for conditional tracepoints, trace
8852 state variables, and tracepoint sources. Handle tracepoint
8854 (main): Initialize the tracepoints module.
8855 (process_serial_event): Handle traceframe reads/writes.
8857 * linux-low.c (handle_tracepoints): New.
8858 (linux_wait_1): Call it.
8859 (linux_resume_one_lwp): Handle while-stepping.
8860 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8861 (linux_target_ops): Install them.
8862 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8864 * linux-x86-low.c (x86_supports_tracepoints): New.
8865 (the_low_target). Install it.
8867 * mem-break.h (delete_breakpoint): Declare.
8868 * mem-break.c (delete_breakpoint): Make external.
8870 * target.h (struct target_ops): Add `supports_tracepoints',
8871 `read_pc', and `write_pc' fields.
8872 (target_supports_tracepoints): Define.
8873 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8876 * regcache.h (struct regcache) <registers_owned>: New field.
8877 (init_register_cache, regcache_cpy): Declare.
8878 (regcache_read_pc, regcache_write_pc): Declare.
8879 (register_cache_size): Declare.
8880 (supply_regblock): Declare.
8881 * regcache.c (init_register_cache): New.
8882 (new_register_cache): Use it.
8883 (regcache_cpy): New.
8884 (register_cache_size): New.
8885 (supply_regblock): New.
8886 (regcache_read_pc, regcache_write_pc): New.
8888 * tracepoint.c: New.
8890 * Makefile.in (OBS): Add tracepoint.o.
8891 (tracepoint.o): New rule.
8893 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8895 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8897 (i386-mmx.c): Likewise.
8898 (i386-mmx-linux.o): Likewise.
8899 (i386-mmx-linux.c): Likewise.
8901 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8902 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8903 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8904 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8906 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8907 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8908 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8910 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8912 * Makefile.in (clean): Updated.
8914 (i386-avx.c): Likewise.
8915 (i386-avx-linux.o): Likewise.
8916 (i386-avx-linux.c): Likewise.
8917 (amd64-avx.o): Likewise.
8918 (amd64-avx.c): Likewise.
8919 (amd64-avx-linux.o): Likewise.
8920 (amd64-avx-linux.c): Likewise.
8922 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8923 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8924 (srv_amd64_regobj): Add amd64-avx.o.
8925 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8926 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8927 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8928 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8929 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8930 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8931 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8933 * i387-fp.c: Include "i386-xstate.h".
8935 (i387_cache_to_xsave): Likewise.
8936 (i387_xsave_to_cache): Likewise.
8937 (x86_xcr0): Likewise.
8939 * i387-fp.h (i387_cache_to_xsave): Likewise.
8940 (i387_xsave_to_cache): Likewise.
8941 (x86_xcr0): Likewise.
8943 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8944 * linux-crisv32-low.c (target_regsets): Likewise.
8945 * linux-m68k-low.c (target_regsets): Likewise.
8946 * linux-mips-low.c (target_regsets): Likewise.
8947 * linux-ppc-low.c (target_regsets): Likewise.
8948 * linux-s390-low.c (target_regsets): Likewise.
8949 * linux-sh-low.c (target_regsets): Likewise.
8950 * linux-sparc-low.c (target_regsets): Likewise.
8951 * linux-xtensa-low.c (target_regsets): Likewise.
8953 * linux-low.c: Include <sys/uio.h>.
8954 (regsets_fetch_inferior_registers): Support nt_type.
8955 (regsets_store_inferior_registers): Likewise.
8956 (linux_process_qsupported): New.
8957 (linux_target_ops): Add linux_process_qsupported.
8959 * linux-low.h (regset_info): Add nt_type.
8960 (linux_target_ops): Add process_qsupported.
8962 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8964 (init_registers_i386_avx_linux): New.
8965 (init_registers_amd64_avx_linux): Likewise.
8966 (xmltarget_i386_linux_no_xml): Likewise.
8967 (xmltarget_amd64_linux_no_xml): Likewise.
8968 (PTRACE_GETREGSET): Likewise.
8969 (PTRACE_SETREGSET): Likewise.
8970 (x86_fill_xstateregset): Likewise.
8971 (x86_store_xstateregset): Likewise.
8972 (use_xml): Likewise.
8973 (x86_linux_update_xmltarget): Likewise.
8974 (x86_linux_process_qsupported): Likewise.
8975 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8976 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8977 init_registers_i386_linux here. Call
8978 x86_linux_update_xmltarget.
8979 (the_low_target): Add x86_linux_process_qsupported.
8981 * server.c (handle_query): Call target_process_qsupported.
8983 * target.h (target_ops): Add process_qsupported.
8984 (target_process_qsupported): New.
8986 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8988 * inferiors.c (add_thread): Set last_status kind to
8989 TARGET_WAITKIND_IGNORE.
8990 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8991 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8992 (linux_wait_1): Move `thread' local definition to block that uses
8993 it. Don't NULL initialize `event_child'.
8994 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8995 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8996 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8998 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9000 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9001 an extended waitstatus, or by a watchpoint.
9002 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9003 thread was stepping or has been stopped by a watchpoint.
9005 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9007 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9008 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9009 of another, then delete the previous, and validate all
9011 (validate_inserted_breakpoint): New.
9012 (delete_disabled_breakpoints): New.
9013 (validate_breakpoints): New.
9014 (check_mem_read): Validate breakpoints before trusting their
9015 shadow. Delete disabled breakpoints.
9016 (check_mem_write): Validate breakpoints before trusting they
9017 should be inserted. Delete disabled breakpoints.
9018 * mem-break.h (validate_breakpoints):
9019 * server.c (handle_query): Validate breakpoints when we see a
9022 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9024 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9025 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9026 if we could tell there's a GDB breakpoint at stop_pc.
9027 (need_step_over_p): Don't do a step over if we find a GDB
9028 breakpoint at the resume PC.
9030 * mem-break.c (struct raw_breakpoint): New.
9031 (enum bkpt_type): New type `gdb_breakpoint'.
9032 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9033 fields. New field `raw'.
9034 (find_raw_breakpoint_at): New.
9035 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9037 (set_breakpoint_at): Adjust.
9038 (delete_raw_breakpoint): New.
9039 (release_breakpoint): New.
9040 (delete_breakpoint): Rename to...
9041 (delete_breakpoint_1): ... this. Add proc parameter. Use
9042 release_breakpoint. Return ENOENT.
9043 (delete_breakpoint): Reimplement.
9044 (find_breakpoint_at): Delete.
9045 (find_gdb_breakpoint_at): New.
9046 (delete_breakpoint_at): Delete.
9047 (set_gdb_breakpoint_at): New.
9048 (delete_gdb_breakpoint_at): New.
9049 (gdb_breakpoint_here): New.
9050 (set_reinsert_breakpoint): Use release_breakpoint.
9051 (uninsert_breakpoint): Rename to ...
9052 (uninsert_raw_breakpoint): ... this.
9053 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9054 (reinsert_raw_breakpoint): Change parameter type to
9056 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9058 (check_breakpoints): Adjust. Use release_breakpoint.
9059 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9060 (breakpoint_inserted_here): Ditto.
9061 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9062 Don't trust the breakpoint's shadow if it is not inserted.
9063 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9064 (delete_all_breakpoints): Adjust.
9065 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9066 use delete_breakpoint_1.
9068 * mem-break.h (breakpoints_supported): Delete declaration.
9069 (set_gdb_breakpoint_at): Declare.
9070 (gdb_breakpoint_here): Declare.
9071 (delete_breakpoint_at): Delete.
9072 (delete_gdb_breakpoint_at): Declare.
9074 * server.h (struct raw_breakpoint): Forward declare.
9075 (struct process_info): New field `raw_breakpoints'.
9077 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9080 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9082 * linux-low.c (status_pending_p_callback): Fix comment.
9083 (linux_wait_for_event_1): Move most of the internal breakpoint
9084 handling from here...
9085 (linux_wait_1): ... to here.
9086 (count_events_callback): New.
9087 (select_singlestep_lwp_callback): New.
9088 (select_event_lwp_callback): New.
9089 (cancel_breakpoints_callback): New.
9090 (select_event_lwp): New.
9091 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9092 priority to all LWPs that have had events that should be reported
9093 to the client. Cancel breakpoints when about to reporting the
9094 event to the client, not while stopping lwps. No longer cancel
9095 finished single-steps here.
9096 (cancel_finished_single_step): Delete.
9097 (cancel_finished_single_steps): Delete.
9099 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9101 * mem-break.c (enum bkpt_type): New.
9102 (struct breakpoint): New field `type'.
9103 (set_breakpoint_at): Change return type to struct breakpoint
9104 pointer. Set type to `other_breakpoint' by default.
9105 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9106 in the breakpoint list.
9107 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9108 (reinsert_breakpoint): Rename to ...
9109 (reinsert_raw_breakpoint): ... this.
9110 (reinsert_breakpoints_at): Adjust.
9111 * mem-break.h (struct breakpoint): Declare.
9112 (set_breakpoint_at): Change return type to struct breakpoint
9115 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9117 * server.c (handle_query): Assign, not compare.
9119 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9121 Teach linux gdbserver to step-over-breakpoints.
9123 * linux-low.c (can_hardware_single_step): New.
9124 (supports_breakpoints): New.
9125 (handle_extended_wait): If stopping threads, read the stop pc of
9128 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9129 low target doesn't support retrieving the PC.
9130 (add_lwp): Set last_resume_kind to resume_continue.
9131 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9132 (linux_attach): Don't clear stop_expected. Set the lwp's
9133 last_resume_kind to resume_stop.
9134 (linux_detach_one_lwp): Don't check for removed breakpoints.
9135 (check_removed_breakpoint): Delete.
9136 (status_pending_p): Rename to ...
9137 (status_pending_p_callback): ... this. Don't check for removed
9138 breakpoints. Don't consider threads that are stopped from GDB's
9140 (linux_wait_for_lwp): Always read the stop_pc here.
9141 (cancel_breakpoint): New.
9142 (step_over_bkpt): New global.
9143 (linux_wait_for_event_1): Implement stepping over breakpoints.
9144 (gdb_wants_lwp_stopped): New.
9145 (gdb_wants_all_stopped): New.
9146 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9147 single-step traps here. Store the thread's last reported target
9149 (send_sigstop): Don't clear stop_expected. Always set it,
9151 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9152 (cancel_finished_single_step): New.
9153 (cancel_finished_single_steps): New.
9154 (wait_for_sigstop): Don't cancel finished single-step traps here.
9155 (linux_resume_one_lwp): Don't check for removed breakpoints.
9156 Don't set `step' on non-hardware step archs.
9157 (linux_set_resume_request): Ignore resume_stop requests if already
9158 stopping or stopped. Set the lwp's last_resume_kind.
9159 (resume_status_pending_p): Don't check for removed breakpoints.
9160 (need_step_over_p): New.
9161 (start_step_over): New.
9162 (finish_step_over): New.
9163 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9164 requests. Clear the thread's last reported target waitstatus.
9165 Don't use the `suspended' flag. Don't consider pending breakpoints.
9166 (linux_resume): Start a step-over if necessary.
9167 (proceed_one_lwp): New.
9168 (proceed_all_lwps): New.
9169 (unstop_all_lwps): New.
9170 * linux-low.h (struct lwp_info): Rewrite comment for the
9171 `suspended' flag. Add the `stop_pc' field. Delete the
9172 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9173 Add `'last_resume_kind' and `need_step_over' fields.
9174 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9175 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9176 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9177 (set_raw_breakpoint_at): New.
9178 (set_breakpoint_at): Rewrite to use it.
9179 (reinsert_breakpoint_handler): Delete.
9180 (set_reinsert_breakpoint): New.
9181 (reinsert_breakpoint_by_bp): Delete.
9182 (delete_reinsert_breakpoints): New.
9183 (uninsert_breakpoint): Rewrite.
9184 (uninsert_breakpoints_at): New.
9185 (reinsert_breakpoint): Rewrite.
9186 (reinsert_breakpoints_at): New.
9187 (check_breakpoints): Rewrite.
9188 (breakpoint_here): New.
9189 (breakpoint_inserted_here): New.
9190 (check_mem_read): Adjust.
9191 * mem-break.h (breakpoints_supported, breakpoint_here)
9192 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9193 (reinsert_breakpoint_by_bp): Delete declaration.
9194 (delete_reinsert_breakpoints): Declare.
9195 (reinsert_breakpoint): Delete declaration.
9196 (reinsert_breakpoints_at): Declare.
9197 (uninsert_breakpoint): Delete declaration.
9198 (uninsert_breakpoints_at): Declare.
9199 (check_breakpoints): Adjust prototype.
9200 * server.h: Adjust include order.
9201 (struct thread_info): Declare here. Add a `last_status' field.
9203 2010-03-23 Michael Snyder <msnyder@vmware.com>
9205 * server.c (crc32): New function.
9206 (handle_query): Add handling for 'qCRC:' request.
9208 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9210 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9211 lwp had been stopped by a watchpoint.
9213 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9215 * server.h (internal_error): Declare.
9216 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9217 * utils.c (internal_error): New function.
9219 2010-03-15 Andreas Schwab <schwab@redhat.com>
9221 * configure.srv: Fix typo setting srv_regobj.
9223 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9225 * linux-low.c (fetch_register): Avoid passing a non string literal
9227 (usr_store_inferior_registers): Ditto.
9229 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9231 * linux-low.c (linux_write_memory): Bail out early if peeking
9234 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9236 * linux-low.h (struct lwp_info): New fields
9237 `stopped_by_watchpoint' and `stopped_data_address'.
9238 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9239 here, and cache them in the lwp object.
9240 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9242 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9244 (linux_stopped_by_watchpoint): Rewrite.
9245 (linux_stopped_data_address): Rewrite.
9247 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9249 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9250 switching the current inferior, not before.
9252 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9254 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9255 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9256 i386-linux.c and amd64-linux.c.
9257 (reg-i386.o): Removed.
9258 (reg-i386.c): Likewise.
9259 (reg-i386-linux.o): Likewise.
9260 (reg-i386-linux.c): Likewise.
9261 (reg-x86-64.o): Likewise.
9262 (reg-x86-64.c): Likewise.
9263 (reg-x86-64-linux.o): Likewise.
9264 (reg-x86-64-linux.c): Likewise.
9267 (i386-linux.o): Likewise.
9268 (i386-linux.c): Likewise.
9269 (amd64.o): Likewise.
9270 (amd64.c): Likewise.
9271 (amd64-linux.o): Likewise.
9272 (amd64-linux.c): Likewise.
9274 * configure.srv (srv_i386_regobj): New.
9275 (srv_i386_linux_regobj): Likewise.
9276 (srv_amd64_regobj): Likewise.
9277 (srv_amd64_linux_regobj): Likewise.
9278 (srv_i386_32bit_xmlfiles): Likewise.
9279 (srv_i386_64bit_xmlfiles): Likewise.
9280 (srv_i386_xmlfiles): Likewise.
9281 (srv_amd64_xmlfiles): Likewise.
9282 (srv_i386_linux_xmlfiles): Likewise.
9283 (srv_amd64_linux_xmlfiles): Likewise.
9284 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9285 srv_xmlfiles to $srv_i386_xmlfiles.
9286 (i[34567]86-*-mingw32ce*): Likewise.
9287 (i[34567]86-*-mingw*): Likewise.
9288 (i[34567]86-*-nto*): Likewise.
9289 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9290 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9291 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9292 (x86_64-*-linux*): Likewise.
9294 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9295 (init_registers_amd64_linux): New.
9296 (x86_arch_setup): Replace init_registers_x86_64_linux with
9297 init_registers_amd64_linux.
9299 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9301 * configure.ac: Check for libdl. If it is not available link against
9302 static libthread_db.
9303 * configure: Regenerate.
9305 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9309 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9310 handing a read watchpoint.
9311 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9313 2010-02-12 Doug Evans <dje@google.com>
9315 * linux-low.c (linux_supports_tracefork_flag): Document.
9316 (linux_look_up_symbols): Add comment.
9318 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9320 * regcache.c (supply_register): Clear regcache if buf is NULL.
9322 2010-02-02 Nicolas Roche <roche@sourceware.org>
9323 Joel Brobecker <brobecker@adacore.com>
9325 * inferiors.c (find_inferior): Add function documentation.
9326 (unloaded_dll): Handle the case where the unloaded dll has not
9327 been previously registered in the dll list.
9329 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9331 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9332 (thumb2_breakpoint): New.
9333 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9335 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9337 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9338 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9341 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9343 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9345 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9347 * linux-s390-low.c (s390_collect_ptrace_register)
9348 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9350 2010-01-21 Doug Evans <dje@google.com>
9352 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9353 (PTRACE_ARG4_TYPE): New macro.
9354 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9355 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9356 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9357 (usr_store_inferior_registers): Ditto.
9358 (linux_read_memory, linux_write_memory): Ditto.
9359 (linux_test_for_tracefork): Ditto.
9361 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9362 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9364 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9366 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9369 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9371 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9372 prototype to take a regcache. Adjust.
9374 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9376 * regcache.h (struct thread_info): Forward declare.
9377 (struct regcache): New.
9378 (new_register_cache): Adjust prototype.
9379 (get_thread_regcache): Declare.
9380 (free_register_cache): Adjust prototype.
9381 (registers_to_string, registers_from_string): Ditto.
9382 (supply_register, supply_register_by_name, collect_register)
9383 (collect_register_as_string, collect_register_by_name): Ditto.
9384 * regcache.c (struct inferior_regcache_data): Delete.
9385 (get_regcache): Rename to ...
9386 (get_thread_regcache): ... this. Adjust. Switch inferior before
9388 (regcache_invalidate_one): Adjust.
9389 (regcache_invalidate): Fix prototype.
9390 (new_register_cache): Return the new register cache.
9391 (free_register_cache): Change prototype.
9392 (realloc_register_cache): Adjust.
9393 (registers_to_string): Change prototype to take a regcache. Adjust.
9394 (registers_from_string): Ditto.
9395 (register_data): Ditto.
9396 (supply_register): Ditto.
9397 (supply_register_by_name): Ditto.
9398 (collect_register): Ditto.
9399 (collect_register_as_string): Ditto.
9400 (collect_register_by_name): Ditto.
9401 * server.c (process_serial_event): Adjust.
9402 * linux-low.h (regset_fill_func, regset_store_func): Change
9404 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9406 * linux-low.c (get_stop_pc): Adjust.
9407 (check_removed_breakpoint): Adjust.
9408 (linux_wait_for_event): Adjust.
9409 (linux_resume_one_lwp): Adjust.
9410 (fetch_register): Add regcache parameter. Adjust.
9411 (usr_store_inferior_registers): Ditto.
9412 (regsets_fetch_inferior_registers): Ditto.
9413 (regsets_store_inferior_registers): Ditto.
9414 (linux_fetch_registers, linux_store_registers): Ditto.
9415 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9417 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9419 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9420 prototype to take a regcache.
9421 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9422 * remote-utils.c (convert_ascii_to_int, outreg)
9423 (prepare_resume_reply): Change prototype to take a regcache.
9425 * target.h (struct target_ops) <fetch_registers, store_registers>:
9426 Change prototype to take a regcache.
9427 (fetch_inferior_registers, store_inferior_registers): Change
9428 prototype to take a regcache. Adjust.
9429 * proc-service.c (ps_lgetregs): Adjust.
9430 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9431 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9432 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9433 take a regcache. Adjust.
9434 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9435 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9436 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9437 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9438 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9439 (cris_cannot_fetch_register):
9440 (cris_breakpoint_at): Change prototype to take a regcache.
9442 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9443 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9444 to take a regcache. Adjust.
9445 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9447 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9448 take a regcache. Adjust.
9449 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9450 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9451 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9452 * linux-mips-low.c (mips_get_pc):
9453 (mips_set_pc): Change prototype to take a regcache. Adjust.
9454 (mips_reinsert_addr): Adjust.
9455 (mips_collect_register): Change prototype to take a regcache.
9457 (mips_supply_register):
9458 (mips_collect_register_32bit, mips_supply_register_32bit)
9459 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9460 (mips_store_fpregset): Ditto.
9461 * linux-ppc-low.c (ppc_supply_ptrace_register)
9462 (ppc_supply_ptrace_register): Ditto.
9463 (parse_spufs_run): Adjust.
9464 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9465 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9466 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9467 take a regcache. Adjust.
9468 * linux-s390-low.c (s390_collect_ptrace_register)
9469 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9470 (s390_set_pc): Change prototype to take a regcache. Adjust.
9471 (s390_arch_setup): Adjust.
9472 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9473 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9474 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9475 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9476 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9478 (sparc_breakpoint_at): Adjust.
9479 * linux-xtensa-low.c (xtensa_fill_gregset):
9480 (xtensa_store_gregset):
9481 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9482 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9483 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9484 prototype to take a regcache. Adjust.
9485 * win32-arm-low.c (arm_fetch_inferior_register)
9486 (arm_store_inferior_register): Change prototype to take a
9488 * win32-i386-low.c (i386_fetch_inferior_register)
9489 (i386_store_inferior_register): Change prototype to take a
9491 * win32-low.c (child_fetch_inferior_registers)
9492 (child_store_inferior_registers): Change prototype to take a
9494 (win32_wait): Adjust.
9495 (win32_fetch_inferior_registers): Change prototype to take a
9497 (win32_store_inferior_registers): Adjust.
9498 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9499 store_inferior_register>: Change prototype to take a regcache.
9501 2010-01-20 Doug Evans <dje@google.com>
9503 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9505 (linux_wait_for_event1, linux_init_signals): Ditto.
9506 (W_STOPCODE): Provide definition if missing.
9508 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9510 * linux-low.c (linux_core_of_thread): New.
9511 (compare_ints, show_process, list_threads): New.
9512 (linux_qxfer_osdata): Report threads and cores.
9513 (linux_target_op): Register linux_core_of_thread.
9514 * remote-utils.c (prepare_resume_reply): Report the core.
9515 (buffer_xml_printf): Support %d specifier.
9516 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9518 (handle_query): Handle qXfer:threads. Announce availability
9520 * target.h (struct target_ops): New field core_of_thread.
9522 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9524 * Makefile.in (clean): Remove new generated files.
9525 (reg-s390.o, reg-s390.c): Remove rules.
9526 (reg-s390x.o, reg-s390x.c): Likewise.
9527 (s390-linux32.o, s390-linux32.c): Add rules.
9528 (s390-linux64.o, s390-linux64.c): Likewise.
9529 (s390x-linux64.o, s390x-linux64.c): Likewise.
9530 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9531 * linux-s390-low.c: Include <elf.h>.
9532 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9533 (init_registers_s390): Remove prototype.
9534 (init_registers_s390x): Likewise.
9535 (init_registers_s390_linux32): Add prototype.
9536 (init_registers_s390_linux64): Likewise.
9537 (init_registers_s390x_linux64): Likewise.
9538 (s390_num_regs_3264): New define.
9539 (s390_regmap_3264): New global variable.
9540 (s390_cannot_fetch_register): Remove obsolete check.
9541 (s390_cannot_store_register): Likewise.
9542 (s390_collect_ptrace_register): Handle upper/lower register halves.
9543 (s390_supply_ptrace_register): Likewise.
9544 (s390_fill_gregset): Update to register number changes.
9545 (s390_get_hwcap): New routine.
9546 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9547 Install appropriate regmap and register set.
9549 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9551 * server.c (gdbserver_version): Update copyright year to 2010.
9552 * gdbreplay.c (gdbreplay_version): Likewise.
9554 2009-12-28 Doug Evans <dje@google.com>
9556 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9557 elf/external.h. Include <elf.h> instead but only if necessary.
9559 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9561 * linux-low.c (linux_remove_process): Remove `detaching'
9562 parameter. Don't release/detach from thread_db here.
9563 (linux_kill): Release/detach from thread_db here, ...
9564 (linux_detach): ... and here, before actually detaching.
9565 (linux_wait_1): ... and here, when a process exits.
9566 * thread-db.c (any_thread_of): New.
9567 (thread_db_free): Switch the current inferior to a thread of the
9570 2009-12-21 Doug Evans <dje@google.com>
9572 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9574 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9575 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9576 warning ifndef __NR_tkill. Move setting of errno there too.
9577 Delete unnecessary resetting of errno after syscall.
9578 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9580 * configure.ac: Check for dladdr.
9581 * config.in: Regenerate.
9582 * configure: Regenerate.
9583 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9584 (try_thread_db_load): Update.
9586 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9588 2009-12-18 Doug Evans <dje@google.com>
9590 * event-loop.c: Include unistd.h if it exists.
9592 * linux-low.c (my_waitpid): Move definition away from being in
9593 between linux_tracefork_child/linux_test_for_tracefork.
9595 * gdb_proc_service.h (psaddr_t): Fix type.
9596 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9597 signature to match glibc.
9599 2009-12-16 Doug Evans <dje@google.com>
9601 * linux-low.c (linux_read_memory): Fix argument to read.
9603 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9605 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9606 events, don't leave current_inferior pointing at null.
9608 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9610 * win32-low.c (LOG): Delete.
9611 (OUTMSG): Output to stderr.
9612 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9613 on compile time LOG macro.
9614 (win32_wait): Fix debug output.
9616 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9618 * win32-low.c (win32_add_one_solib): If the dll name is
9619 "ntdll.dll", prepend the system directory to the dll path.
9621 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9623 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9625 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9626 Vladimir Prus <vladimir@codesourcery.com>
9628 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9629 * configure.ac: Check for __mcoldfire__ and set
9630 gdb_cv_m68k_is_coldfire.
9631 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9632 reg-cf.o and reg-m68k.o.
9633 * configure: Regenerated.
9635 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9637 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9638 Pass it to thread_db_free.
9639 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9640 proper `detaching' argument to linux_remove_process.
9641 * linux-low.h (thread_db_free): Add `detaching' parameter.
9642 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9644 (thread_db_free): Add `detaching' parameter. Only
9645 call td_ta_clear_event if detaching from process.
9647 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9649 * thread-db.c (thread_db_free): Fix typo.
9651 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9654 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9656 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9658 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9659 with an i686 compiler.
9660 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9662 * configure: Rebuilt.
9664 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9668 * server.c (handle_search_memory_1): Correct read_addr initialization
9669 in loop for searching subsequent chunks.
9671 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9673 * configure.ac: New --with-libthread-db option.
9674 * thread-db.c: Allow direct dependence on libthread_db.
9675 (thread_db_free): Adjust.
9676 * config.in: Regenerate.
9677 * configure: Likewise.
9679 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9682 * thread-db.c (attach_thread): New function.
9683 (maybe_attach_thread): Return success/failure.
9684 (find_new_threads_callback): Adjust.
9685 (thread_db_find_new_threads): Loop until no new threads.
9687 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9689 * proc-service.c (ps_lgetregs): Formatting.
9691 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9693 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9694 * configure.ac: Adjust.
9695 * linux-low.h (struct process_info_private): Move members to struct
9697 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9698 * linux-low.c (linux_remove_process): Adjust.
9699 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9700 * server.c (handle_query): Move code ...
9701 (handle_monitor_command): ... here. New function.
9702 * target.h (struct target_ops): New member.
9703 * thread-db.c (struct thread_db): New.
9704 (libthread_db_search_path): New variable.
9705 (thread_db_create_event, thread_db_enable_reporting)
9706 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9707 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9708 (try_thread_db_load_1, dladdr_to_soname): New functions.
9709 (try_thread_db_load, thread_db_load_search): New functions.
9710 (thread_db_init): Search for libthread_db.
9711 (thread_db_free): New function.
9712 (thread_db_handle_monitor_command): Likewise.
9713 * config.in: Regenerate.
9714 * configure: Regenerate.
9716 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9718 * spu-low.c (spu_kill): Wait for inferior to terminate.
9719 Call clear_inferiors.
9720 (spu_detach): Call clear_inferiors.
9722 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9724 * aclocal.m4: Regenerate.
9725 * config.in: Likewise.
9726 * configure: Likewise.
9728 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9730 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9731 (parse_spufs_run): New function.
9732 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9733 (ppc_breakpoint_at): Handle SPU breakpoints.
9735 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9737 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9738 (SPUFS_MAGIC): Define.
9739 (spu_enumerate_spu_ids): New function.
9740 (linux_qxfer_spu): New function.
9741 (linux_target_ops): Install linux_qxfer_spu.
9743 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9745 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9746 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9747 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9748 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9749 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9750 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9751 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9752 (init_registers_powerpc_cell32l): Add prototype.
9753 (init_registers_powerpc_cell64l): Likewise.
9754 (ppc_arch_setup): Detect Cell/B.E. architecture.
9756 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9758 * Makefile.in (datarootdir): New variable.
9760 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9762 * linux-low.c (linux_write_memory): Update debugging output.
9763 * Makefile.in (clean): Add new descriptions.
9764 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9765 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9766 * configure.srv: Add new files for arm*-*-linux*.
9767 * linux-arm-low.c: Add new declarations.
9768 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9769 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9770 (HWCAP_VFPv3D16): New.
9771 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9772 instead of __IWMMXT__.
9773 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9774 (arm_arch_setup): New.
9775 (target_regsets): Remove #ifdef. Add VFP regset.
9776 (the_low_target): Use arm_arch_setup.
9778 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9780 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9781 the main thread again.
9783 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9785 Adding Neutrino gdbserver.
9786 * configure: Regenerated.
9787 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9788 * configure.srv (i[34567]86-*-nto*): New target.
9789 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9790 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9791 (nto_comctrl) [__QNX__]: New function.
9792 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9794 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9796 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9799 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9800 Pedro Alves <pedro@codesourcery.com>
9802 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9803 don't support CONTEXT_EXTENDED_REGISTERS.
9804 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9805 (the_low_target): Install them.
9806 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9807 failing with ERROR_PIPE_NOT_CONNECTED.
9809 2009-06-30 Doug Evans <dje@google.com>
9810 Pierre Muller <muller@ics.u-strasbg.fr>
9812 Add h/w watchpoint support to x86-linux, win32-i386.
9813 * Makefile.in (SFILES): Add i386-low.c
9814 (i386_low_h): Define.
9815 (i386-low.o): Add dependencies.
9816 (linux-x86-low.o): Add i386-low.h dependency.
9817 (win32-i386-low.o): Ditto.
9818 * i386-low.c: New file.
9819 * i386-low.h: New file.
9820 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9821 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9822 * linux-low.c (linux_add_process): Initialize arch_private.
9823 (linux_remove_process): Free arch_private.
9824 (add_lwp): Initialize arch_private.
9825 (delete_lwp): Free arch_private.
9826 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9828 * linux-low.h (process_info_private): New member arch_private.
9829 (lwp_info): New member arch_private.
9830 (linux_target_ops): New members new_process, new_thread,
9832 (ptid_of): New macro.
9833 * linux-x86-low.c: Include stddef.h, i386-low.h.
9834 (arch_process_info): New struct.
9835 (arch_lwp_info): New struct.
9836 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9837 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9838 (i386_dr_low_get_status): New function.
9839 (x86_insert_point, x86_remove_point): New functions.
9840 (x86_stopped_by_watchpoint): New function.
9841 (x86_stopped_data_address): New function.
9842 (x86_linux_new_process, x86_linux_new_thread): New functions.
9843 (x86_linux_prepare_to_resume): New function.
9844 (the_low_target): Add entries for insert_point, remove_point,
9845 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9847 * server.c (debug_hw_points): New global.
9848 (monitor_show_help): Document set debug-hw-points.
9849 (handle_query): Process "set debug-hw-points".
9850 * server.h (debug_hw_points): Declare.
9851 (paddress): Declare.
9852 * utils.c (NUMCELLS, CELLSIZE): New macros.
9853 (get_sell, xsnprintf, paddress): New functions.
9854 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9855 remove_point, stopped_by_watchpoint, stopped_data_address.
9856 * win32-i386-low.c: Include i386-low.h.
9857 (debug_reg_state): Replaces dr.
9858 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9859 (i386_dr_low_get_status): New function.
9860 (i386_insert_point, i386_remove_point): New functions.
9861 (i386_stopped_by_watchpoint): New function.
9862 (i386_stopped_data_address): New function.
9863 (i386_initial_stuff): Update.
9864 (get_thread_context,set_thread_context,i386_thread_added): Update.
9865 (the_low_target): Add entries for insert_point,
9866 remove_point, stopped_by_watchpoint, stopped_data_address.
9867 * win32-low.c (win32_insert_watchpoint): New function.
9868 (win32_remove_watchpoint): New function.
9869 (win32_stopped_by_watchpoint): New function.
9870 (win32_stopped_data_address): New function.
9871 (win32_target_ops): Add entries for insert_watchpoint,
9872 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9873 * win32-low.h (win32_target_ops): New members insert_point,
9874 remove_point, stopped_by_watchpoint, stopped_data_address.
9876 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9878 * server.c (process_serial_event): Re-return unsupported, not
9879 error, if the type isn't recognized. Re-allow supporting only
9880 insert or remove packets. Also call require_running for
9881 breakpoints. Add missing break statement to default case. Tidy.
9882 * target.h (struct target_ops): Rename insert_watchpoint to
9883 insert_point, and remove_watchpoint to remove_point.
9885 * linux-low.h (struct linux_target_ops): Likewise.
9886 * linux-low.c (linux_insert_watchpoint): Rename to ...
9887 (linux_insert_point): ... this. Adjust.
9888 (linux_remove_watchpoint): Rename to ...
9889 (linux_remove_point): ... this. Adjust.
9890 (linux_target_ops): Adjust.
9891 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9892 (cris_insert_point): ... this.
9893 (cris_remove_watchpoint): Rename to ...
9894 (cris_remove_point): ... this.
9895 (the_low_target): Adjust.
9897 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9899 * server.c (handle_v_kill): Pass signal_pid to
9900 kill_inferior if multi_process is zero.
9902 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9904 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9905 * target.h (target_ops): Comment for *_watchpoint to make it clear
9906 the functions can get types '0' and '1'.
9908 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9910 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9911 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9912 * regcache.c (get_regcache): Likewise.
9913 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9914 * win32-low.c (child_fetch_inferior_registers): Remove check for
9917 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9918 Pedro Alves <pedro@codesourcery.com>
9920 * target.h (struct target_ops) <supports_multi_process>: New
9922 (target_supports_multi_process): New.
9923 * server.c (handle_query): Even if GDB reports support, only
9924 enable multi-process if the target also supports it. Report
9925 multi-process support only if the target backend supports it.
9926 * linux-low.c (linux_supports_multi_process): New function.
9927 (linux_target_ops): Install it as target_supports_multi_process
9930 2009-05-24 Doug Evans <dje@google.com>
9932 Global renaming of find_thread_pid to find_thread_ptid.
9933 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9934 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9935 All callers updated.
9937 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9938 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9941 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9942 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9943 (linux_resume_one_lwp): Ditto.
9945 2009-05-23 Doug Evans <dje@google.com>
9947 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9948 from struct inferior_list_entry * to struct lwp_info *.
9949 All callers updated.
9951 2009-05-13 Doug Evans <dje@google.com>
9953 * linux-x86-low.c: Don't include assert.h.
9954 (x86_siginfo_fixup): Use fatal, not assert.
9955 (x86_arch_setup): Fix comment.
9957 2009-05-12 Doug Evans <dje@google.com>
9959 Biarch support for i386/amd64 gdbserver.
9960 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9961 Add linux-x86-low.c.
9962 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9963 (linux-x86-low.o): Add.
9964 * linux-x86-64-low.c: Delete.
9965 * linux-i386-low.c: Delete.
9966 * linux-x86-low.c: New file.
9967 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9969 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9971 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9972 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9973 (linux_child_pid_to_exec_file): New function.
9974 (elf_64_header_p, elf_64_file_p): New functions.
9975 (siginfo_fixup): New function.
9976 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9977 give target a chance to convert layout.
9978 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9979 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9981 2009-05-07 Doug Evans <dje@google.com>
9983 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9984 (regsets_store_inferior_registers): Ditto.
9986 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9990 * linux-low.c (must_set_ptrace_flags): Delete.
9991 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9993 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9994 `lwp->must_set_ptrace_flags' instead.
9995 (linux_wait_for_event_1): Set ptrace options here.
9996 (linux_wait_1): ... not here.
9998 2009-04-30 Doug Evans <dje@google.com>
10000 * inferiors.c (started_inferior_callback): New function.
10001 (attached_inferior_callback): New function.
10002 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10003 * server.c (print_started_pid, print_attached_pid): New functions.
10004 (detach_or_kill_for_exit): New function.
10005 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10006 * server.h (have_started_inferiors_p): Declare.
10007 (have_attached_inferiors_p): Declare.
10009 * inferiors.c (remove_process): Fix memory leak, free process.
10010 * linux-low.c (linux_remove_process): New function.
10011 (linux_kill): Call it instead of remove_process.
10012 (linux_detach, linux_wait_1): Ditto.
10014 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10016 * configure.srv: Add x86 Windows CE target.
10018 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10020 * inferiors.c (get_thread_process): Make global.
10021 * server.h (get_thread_process): Add prototype.
10022 * thread-db.c (find_one_thread): Use get_thread_process
10023 instead of current_process.
10024 (thread_db_get_tls_address): Do not crash if called when
10025 thread layer is not yet initialized.
10027 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10029 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10030 * spu-low.c (current_tid): Rename to ...
10031 (current_ptid): ... this.
10032 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10033 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10034 ptid_get_lwp (current_ptid) instead of current_tid.
10035 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10036 instead of current_tid. Use find_process_pid to verify pid
10037 argument is valid. Pass proper argument to remove_process.
10038 (spu_thread_alive): Compare current_ptid instead of current_tid.
10039 (spu_resume): Likewise.
10041 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10043 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10046 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10048 Implement the multiprocess extensions, and add linux multiprocess
10051 * server.h (ULONGEST): Declare.
10052 (struct ptid, ptid_t): New.
10053 (minus_one_ptid, null_ptid): Declare.
10054 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10055 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10056 (struct inferior_list_entry): Change `id' type from unsigned from
10058 (struct sym_cache, struct breakpoint, struct
10059 process_info_private): Forward declare.
10060 (struct process_info): Declare.
10061 (current_process): Declare.
10062 (all_processes): Declare.
10063 (initialize_inferiors): Declare.
10064 (add_thread): Adjust to use ptid_t.
10065 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10066 (add_process, remove_process, find_thread_pid): Declare.
10067 (find_inferior_id): Adjust to use ptid_t.
10068 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10069 (multi_process): Declare.
10070 (push_event): Adjust to use ptid_t.
10071 (read_ptid, write_ptid): Declare.
10072 (prepare_resume_reply): Adjust to use ptid_t.
10073 (clear_symbol_cache): Declare.
10074 * inferiors.c (all_processes): New.
10075 (null_ptid, minus_one_ptid): New.
10076 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10077 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10078 (add_thread): Change unsigned long to ptid. Remove gdb_id
10080 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10081 (gdb_id_to_thread): Rename to ...
10082 (find_thread_pid): ... this. Change unsigned long to ptid.
10083 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10084 (loaded_dll, pull_pid_from_list): Adjust.
10085 (add_process, remove_process, find_process_pid)
10086 (get_thread_process, current_process, initialize_inferiors): New.
10087 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10088 (struct target_waitstatus) <related_pid>: Ditto.
10089 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10090 return type to int.
10091 (struct target_ops) <join>: Add `pid' argument.
10092 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10093 (struct target_ops) <wait>: Add `ptid' field. Change return type
10095 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10096 (mywait): Add `ptid' argument. Change return type to ptid_t.
10097 (target_pid_to_str): Declare.
10098 * target.c (set_desired_inferior): Adjust to use ptids.
10099 (mywait): Add new `ptid' argument. Adjust.
10100 (target_pid_to_str): New.
10101 * mem-break.h (free_all_breakpoints): Declare.
10102 * mem-break.c (breakpoints): Delelete.
10103 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10104 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10105 to use per-process breakpoint list.
10106 (free_all_breakpoints): New.
10107 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10108 (symbol_cache, all_symbols_looked_up): Delete.
10110 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10112 (prepare_resume_reply): Change ptid argument's type from unsigned
10113 long to ptid_t. Adjust. Implement W;process and X;process.
10114 (free_sym_cache, clear_symbol_cache): New.
10115 (look_up_one_symbol): Adjust to per-process symbol cache. *
10116 * server.c (cont_thread, general_thread, step_thread): Change type
10118 (attached): Delete.
10119 (multi_process): New.
10120 (last_ptid): Change type to ptid_t.
10121 (struct vstop_notif) <ptid>: Change type to ptid_t.
10122 (queue_stop_reply, push_event): Change `ptid' argument's type to
10124 (discard_queued_stop_replies): Add `pid' argument.
10125 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10126 changes. Don't reference the `attached' global.
10127 (attach_inferior): Adjust to mywait interface changes.
10128 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10129 features. Handle and report "multiprocess+". Handle
10131 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10133 (handle_v_kill): New.
10134 (handle_v_stopped): Adjust to use target_pid_to_str.
10135 (handle_v_requests): Allow multiple attaches and runs when
10136 multiprocess extensions are in effect. Handle "vKill".
10137 (myresume): Adjust to use ptids.
10138 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10139 (handle_status): Adjust to discard_queued_stop_replies interface
10141 (first_thread_of, kill_inferior_callback)
10142 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10143 (main): Call initialize_inferiors. Adjust to use ptids, killing
10144 and detaching from all inferiors. Handle multiprocess packet
10146 * linux-low.h: Include gdb_proc_service.h.
10147 (struct process_info_private): New.
10148 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10149 <lwpid_of>: Use ptid_get_lwp.
10150 (get_lwp_thread): Adjust.
10151 (struct lwp_info): Add `dead' member.
10152 (find_lwp_pid): Declare.
10153 * linux-low.c (thread_db_active): Delete.
10154 (new_inferior): Adjust comment.
10155 (inferior_pid): Delete.
10156 (linux_add_process): New.
10157 (handle_extended_wait): Adjust.
10158 (add_lwp): Change unsigned long to ptid.
10159 (linux_create_inferior): Add process to processes table. Adjust
10160 to use ptids. Don't set new_inferior here.
10161 (linux_attach_lwp): Rename to ...
10162 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10163 it. Adjust to use ptids.
10164 (linux_attach_lwp): New.
10165 (linux_attach): Add process to processes table. Don't set
10167 (struct counter): New.
10168 (second_thread_of_pid_p, last_thread_of_process_p): New.
10169 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10170 multiple processes.
10171 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10172 processes. Remove process from process table.
10173 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10174 to multiple processes.
10175 (any_thread_of): New.
10176 (linux_detach): Add `pid' argument, and handle it. Remove process
10177 from processes table.
10178 (linux_join): Add `pid' argument. Handle it.
10179 (linux_thread_alive): Change unsighed long argument to ptid_t.
10180 Consider dead lwps as not being alive.
10181 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10182 threads we're not interested in.
10183 (same_lwp, find_lwp_pid): New.
10184 (linux_wait_for_lwp): Change `pid' argument's type from int to
10186 (linux_wait_for_event): Rename to ...
10187 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10188 from int to ptid_t. Adjust.
10189 (linux_wait_for_event): New.
10190 (linux_wait_1): Add `ptid' argument. Change return type to
10191 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10192 that exit from the process table.
10193 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10195 (mark_lwp_dead): New.
10196 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10197 stopping all threads, mark its main lwp as dead.
10198 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10200 (fetch_register, usr_store_inferior_registers)
10201 (regsets_fetch_inferior_registers)
10202 (regsets_store_inferior_registers, linux_read_memory)
10203 (linux_write_memory): Inline `inferior_pid'.
10204 (linux_look_up_symbols): Adjust to use per-process
10205 `thread_db_active'.
10206 (linux_request_interrupt): Adjust to use ptids.
10207 (linux_read_auxv): Inline `inferior_pid'.
10208 (initialize_low): Don't reference thread_db_active.
10209 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10210 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10211 (ps_getpid): Return the pid of the current inferior.
10212 * thread-db.c (proc_handle, thread_agent): Delete.
10213 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10215 (find_one_thread): Change argument type to ptid_t. Adjust to
10217 (maybe_attach_thread): Adjust to per-process data and ptids.
10218 (thread_db_find_new_threads): Ditto.
10219 (thread_db_init): Ditto.
10220 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10221 processes table. Adjust to use ptids.
10222 (spu_kill, spu_detach): Adjust interface. Remove process from
10224 (spu_join, spu_thread_alive): Adjust interface.
10225 (spu_wait): Adjust interface. Remove process from processes
10226 table. Adjust to use ptids.
10227 * win32-low.c (current_inferior_tid): Delete.
10228 (current_inferior_ptid): New.
10229 (debug_event_ptid): New.
10230 (thread_rec): Take a ptid. Adjust.
10231 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10232 (child_delete_thread): Ditto.
10233 (do_initial_child_stuff): Add `attached' argument. Add process to
10235 (child_fetch_inferior_registers, child_store_inferior_registers):
10237 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10238 (win32_attach): Pass 1 to do_initial_child_stuff.
10239 (win32_kill): Adjust interface. Remove process from processes
10241 (win32_detach): Ditto.
10242 (win32_join): Adjust interface.
10243 (win32_thread_alive): Take a ptid.
10244 (win32_resume): Adjust to use ptids.
10245 (get_child_debug_event): Ditto.
10246 (win32_wait): Adjust interface. Remove exiting process from
10249 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10251 Non-stop mode support.
10253 * server.h (non_stop): Declare.
10254 (gdb_client_data, handler_func): Declare.
10255 (delete_file_handler, add_file_handler, start_event_loop):
10257 (handle_serial_event, handle_target_event, push_event)
10258 (putpkt_notif): Declare.
10259 * target.h (enum resume_kind): New.
10260 (struct thread_resume): Replace `step' field by `kind' field.
10261 (TARGET_WNOHANG): Define.
10262 (struct target_ops) <wait>: Add `options' argument.
10263 <supports_non_stop, async, start_non_stop>: New fields.
10264 (target_supports_non_stop, target_async): New.
10265 (start_non_stop): Declare.
10266 (mywait): Add `options' argument.
10267 * target.c (mywait): Add `options' argument. Print child exit
10268 notifications here.
10269 (start_non_stop): New.
10270 * server.c (non_stop, own_buf, mem_buf): New globals.
10271 (struct vstop_notif): New.
10272 (notif_queue): New global.
10273 (queue_stop_reply, push_event, discard_queued_stop_replies)
10274 (send_next_stop_reply): New.
10275 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10277 (attach_inferior): In non-stop mode, don't wait for the target
10279 (handle_general_set): Handle QNonStop.
10280 (handle_query): When handling qC, return the current general
10281 thread, instead of the first thread of the list.
10282 (handle_query): If the backend supports non-stop mode, include
10283 QNonStop+ in the qSupported query response.
10284 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10286 (handle_v_attach, handle_v_run): Handle non-stop mode.
10287 (handle_v_stopped): New.
10288 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10289 (myresume): Adjust to use resume_kind. Handle non-stop.
10290 (queue_stop_reply_callback): New.
10291 (handle_status): Handle non-stop mode.
10292 (main): Clear non_stop flag on reconnection. Use the event-loop.
10293 Refactor serial protocol handling from here ...
10294 (process_serial_event): ... to this new function. When GDB
10295 selects any thread, select one here. In non-stop mode, wait until
10296 GDB acks all pending events before exiting.
10297 (handle_serial_event, handle_target_event): New.
10298 * remote-utils.c (remote_open): Install remote_desc in the event
10300 (remote_close): Remove remote_desc from the event loop.
10301 (putpkt_binary): Rename to...
10302 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10303 (putpkt_binary): New as wrapper around putpkt_binary_1.
10304 (putpkt_notif): New.
10305 (prepare_resume_reply): In non-stop mode, don't change the
10307 * event-loop.c: New.
10308 * Makefile.in (OBJ): Add event-loop.o.
10309 (event-loop.o): New rule.
10311 * linux-low.h (pid_of): Moved here.
10313 (get_lwp_thread): Use lwpid_of.
10314 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10315 * linux-low.c (pid_of): Delete.
10316 (inferior_pid): Use lwpid_of.
10317 (linux_event_pipe): New.
10318 (target_is_async_p): New.
10320 (handle_extended_wait): Use lwpid_of.
10321 (add_lwp): Don't set lwpid field.
10322 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10323 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10324 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10325 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10326 first. Adjust to linux_wait_for_event interface changes. Use
10328 (linux_detach): Don't delete the main lwp here.
10329 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10330 (status_pending_p): Don't consider explicitly suspended lwps.
10331 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10332 pointer. Add OPTIONS argument. Change return type to int. Use
10333 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10334 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10335 pointer. Add status pointer argument. Return a pid instead of a
10336 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10337 changes. In non-stop mode, don't switch to a random thread.
10338 (linux_wait): Rename to...
10339 (linux_wait_1): ... this. Add target_options argument, and handle
10340 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10341 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10342 clean exit and signal exit code. Don't stop all threads in
10343 non-stop mode. In all-stop mode, only stop all threads when
10344 reporting a stop to GDB. Handle explicit thread stop requests.
10345 (async_file_flush, async_file_mark): New.
10347 (send_sigstop): Use lwpid_of.
10348 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10349 interface changes. In non-stop mode, don't switch to a random
10351 (linux_resume_one_lwp): Use lwpid_of.
10352 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10353 (linux_resume_one_thread): ... this. Handle resume_stop. In
10354 non-stop mode, don't look for pending flag in all threads.
10355 (resume_status_pending_p): Don't consider explicitly suspended
10357 (my_waitpid): Reimplement. Emulate __WALL.
10358 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10360 (sigchld_handler, linux_supports_non_stop, linux_async)
10361 (linux_start_non_stop): New.
10362 (linux_target_ops): Register linux_supports_non_stop, linux_async
10363 and linux_start_non_stop.
10364 (initialize_low): Install SIGCHLD handler.
10365 * thread-db.c (thread_db_create_event, find_one_thread)
10366 (thread_db_get_tls_address): Use lwpid_of.
10367 * win32-low.c (win32_detach): Adjust to use resume_kind.
10368 (win32_wait): Add `options' argument.
10369 * spu-low.c (spu_resume): Adjust to use resume_kind.
10370 (spu_wait): Add `options' argument.
10372 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10374 Decouple target code from remote protocol.
10376 * target.h (enum target_waitkind): New.
10377 (struct target_waitstatus): New.
10378 (struct target_ops) <wait>: Return an unsigned long. Take a
10379 target_waitstatus pointer instead of a char pointer.
10380 (mywait): Likewise.
10381 * target.c (mywait): Change prototype to return an unsigned long.
10382 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10383 * server.h (thread_from_wait, old_thread_from_wait): Delete
10385 (prepare_resume_reply): Change prototype to take a
10387 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10388 (last_status, last_ptid): New.
10389 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10390 pid instead of a signal.
10391 (attach_inferior): Remove "status" and "signal" parameters.
10393 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10395 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10396 (handle_v_requests, myresume): Remove "status" and "signal"
10397 parameters. Adjust.
10398 (handle_status): New.
10399 (main): Delete local `status'. Adjust.
10400 * remote-utils.c: Include target.h.
10401 (prepare_resume_reply): Change prototype to take a
10402 target_waitstatus. Adjust.
10404 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10406 * spu-low.c (spu_wait): Adjust.
10407 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10409 (win32_wait): Adjust.
10411 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10413 * target.h (struct thread_resume): Delete leave_stopped member.
10414 (struct target_ops): Add a `n' argument to the `resume' callback.
10415 * server.c (start_inferior): Adjust.
10416 (handle_v_cont, myresume): Adjust.
10417 * linux-low.c (check_removed_breakpoint): Adjust to resume
10418 interface change, and to removed leave_stopped field.
10419 (resume_ptr): Delete.
10420 (struct thread_resume_array): New.
10421 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10422 resume interface change.
10423 (linux_continue_one_thread, linux_queue_one_thread)
10424 (resume_status_pending_p): Check if the resume field is NULL
10425 instead of checking the leave_stopped member.
10426 (linux_resume): Adjust to the target resume interface change.
10427 * spu-low.c (spu_resume): Adjust to the target resume interface
10429 * win32-low.c (win32_detach, win32_resume): Ditto.
10431 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10433 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10435 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10437 (linux_continue_one_thread): Only preserve the stepping flag if
10438 there's a pending breakpoint.
10440 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10442 * server.c (main): After the inferior having exited, call
10443 remote_close before exiting gdbserver.
10445 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10447 Fix size of FPSCR in Power 7 processors.
10448 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10449 (PPC_FEATURE_HAS_DFP): New #define.
10450 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10453 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10455 * server.c (handle_query) Whitespace and formatting.
10457 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10459 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10460 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10461 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10462 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10463 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10464 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10465 Makefile.in, configure.ac: Fix whitespace throughout.
10466 * configure: Regenerate.
10468 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10470 * inferiors.c (find_inferior): Make it safe for the callback
10471 function to delete the currently iterated inferior.
10473 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10475 * Makefile.in (linuw_low_h): Move higher.
10476 (thread-db.o): Depend on $(linux_low_h).
10478 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10480 Rename "process" to "lwp" throughout.
10482 * linux-low.c (all_processes): Rename to...
10483 (all_lwps): ... this.
10484 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10485 (add_process): Rename to ...
10486 (add_lwp): ... this. Adjust.
10487 (linux_create_inferior): Adjust.
10488 (linux_attach_lwp): Adjust.
10489 (linux_attach): Adjust.
10490 (linux_kill_one_process): Rename to ...
10491 (linux_kill_one_lwp): ... this. Adjust.
10492 (linux_kill): Adjust.
10493 (linux_detach_one_process): Rename to ...
10494 (linux_detach_one_lwp): ... this. Adjust.
10495 (linux_detach): Adjust.
10496 (check_removed_breakpoint): Adjust.
10497 (status_pending_p): Adjust.
10498 (linux_wait_for_process): Rename to ...
10499 (linux_wait_for_lwp): ... this. Adjust.
10500 (linux_wait_for_event): Adjust.
10501 (send_sigstop): Adjust.
10502 (wait_for_sigstop): Adjust.
10503 (stop_all_processes): Rename to ...
10504 (stop_all_lwps): ... this.
10505 (linux_resume_one_process): Rename to ...
10506 (linux_resume_one_lwp): ... this. Adjust.
10507 (linux_set_resume_request, linux_continue_one_thread)
10508 (linux_queue_one_thread, resume_status_pending_p)
10509 (usr_store_inferior_registers, regsets_store_inferior_registers)
10510 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10512 * linux-low.h (get_process): Rename to ...
10513 (get_lwp): ... this. Adjust.
10514 (get_thread_process): Rename to ...
10515 (get_thread_lwp): ... this. Adjust.
10516 (get_process_thread): Rename to ...
10517 (get_lwp_thread): ... this. Adjust.
10518 (struct process_info): Rename to ...
10519 (struct lwp_info): ... this.
10520 (all_processes): Rename to ...
10521 (all_lwps): ... this.
10522 * proc-service.c (ps_lgetregs): Adjust.
10523 * thread-db.c (thread_db_create_event, find_one_thread)
10524 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10526 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10528 * server.c (handle_query): Handle "qAttached".
10530 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10532 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10533 GPLv3, update license URL.
10535 2009-03-01 Doug Evans <dje@google.com>
10537 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10538 (server_h): Add gdb_signals.h.
10539 (signals.o): Update.
10540 * server.h (target_signal_from_host,target_signal_to_host_p)
10541 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10543 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10545 * remote-utils.c (getpkt): Also generate remote-debug
10546 information if noack_mode is set.
10548 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10550 * server.c (handle_query): Report qXfer:siginfo:read and
10551 qXfer:siginfo:write as supported and handle them.
10552 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10553 * linux-low.c (linux_xfer_siginfo): New.
10554 (linux_target_ops): Set it.
10556 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10558 * server.c (gdbserver_usage): Mention --remote-debug.
10559 (main): Accept '--remote-debug' switch.
10561 2009-01-18 Doug Evans <dje@google.com>
10563 * regcache.c (new_register_cache): No need to check result of xcalloc.
10564 * server.c (handle_search_memory): Back out calls to xmalloc,
10565 result is checked and error is returned to user upon failure.
10566 (handle_query): Ditto. Add more checks for result of malloc.
10567 (handle_v_cont): Check result of malloc, report error back to
10569 (handle_v_run): Ditto. Call freeargv.
10570 * server.h (freeargv): Declare.
10571 * utils.c (freeargv): New fn.
10573 2009-01-15 Doug Evans <dje@google.com>
10575 * gdbreplay.c (perror_with_name): Make arg const char *.
10576 * server.h (target_signal_to_name): Make return type const char *.
10577 * thread-db.c (thread_db_err_str): Make return type const char *.
10578 * utils.c (perror_with_name): Make arg const char *.
10580 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10582 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10583 when handling a EXIT_PROCESS_DEBUG_EVENT.
10585 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10587 * gdbreplay.c (gdbreplay_version): Update copyright year.
10588 * server.c (gdbserver_version): Likewise.
10590 2009-01-05 Doug Evans <dje@google.com>
10592 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10593 (handle_extended_wait): Improve comment.
10595 2008-12-13 Doug Evans <dje@google.com>
10597 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10598 * server.h (ATTR_MALLOC): New macro.
10599 (xmalloc,xcalloc,xstrdup): Declare.
10600 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10601 * inferiors.c: Ditto.
10602 * linux-low.c: Ditto.
10603 * mem-break.c: Ditto.
10604 * regcache.c: Ditto.
10605 * remote-utils.c: Ditto.
10608 * win32-low.c: Ditto.
10610 2008-12-12 Doug Evans <dje@google.com>
10612 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10613 in debugging printf.
10615 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10617 2008-12-09 Doug Evans <dje@google.com>
10619 * linux-low.h (struct process_info): Delete member tid, unused.
10620 * thread-db.c (find_one_thread): Update.
10621 (maybe_attach_thread): Update.
10623 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10625 * target.h (struct target_ops): Add qxfer_osdata member.
10626 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10628 (linux_qxfer_osdata): New functions.
10629 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10631 * server.c (handle_query): Handle "qXfer:osdata:read:".
10632 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10633 (buffer_xml_printf): New functions.
10634 * server.h (struct buffer): New.
10635 (buffer_grow_str, buffer_grow_str0): New macros.
10636 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10637 (buffer_xml_printf): Declare.
10639 2008-11-24 Doug Evans <dje@google.com>
10641 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10643 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10645 * server.c (handle_v_run): Always use the supplied argument list.
10647 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10649 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10650 (xtensa_regmap_table): Add entry for scompare1.
10652 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10654 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10655 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10656 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10657 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10658 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10659 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10660 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10661 XML target descriptions.
10662 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10663 when inferior is running on an ISA 2.05 or later processor. Add
10664 special case to return offset for full 64-bit slot of FPSCR when
10667 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10669 * Makefile.in (SFILES, clean): Added sparc64 files.
10670 (reg-sparc64.o, reg-sparc64.c): New.
10671 * configure.srv (sparc*-*-linux*): New configuration.
10672 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10673 syscall arguments for SPARC.
10674 (regsets_store_inferior_registers): Likewise.
10675 * linux-sparc-low.c: New file.
10677 2008-10-21 Doug Evans <dje@google.com>
10679 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10680 (READLINE_DIR,READLINE_DEP): Delete.
10681 (INTERNAL_CFLAGS): Update.
10682 (LINTFLAGS): Update.
10684 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10686 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10687 whole argv from the last run, not just argv[0].
10689 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10691 * regcache.c (new_register_cache): Return NULL if the register
10692 cache size isn't known yet.
10693 (free_register_cache): Avoid dereferencing a NULL regcache.
10695 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10697 * configure.srv: Merge MIPS and MIPS64.
10699 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10701 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10703 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10705 * Makefile.in: Add required vsx dependencies.
10707 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10708 Declare init_registers_powerpc_vsx32l.
10709 Declare init_registers_powerpc_vsx64l.
10710 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10711 (ppc_arch_setup): Check for VSX in hwcap.
10712 (ppc_fill_vsxregset): New function.
10713 (ppc_store_vsxregset): New function.
10714 Add new VSX entry in regset_info target_regsets.
10716 * configure.srv: Add new VSX dependencies.
10718 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10720 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10721 (remote_open): Set or clear transport_is_reliable.
10722 (putpkt_binary): Don't expect acks in noack mode.
10723 (getpkt): Don't send ack/nac in noack mode.
10724 * server.c (handle_general_set): Handle QStartNoAckMode.
10725 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10727 (main): Reset noack_mode on every connection.
10728 * server.h (noack_mode): Declare.
10730 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10732 * Makefile.in (GDBREPLAY_OBS): New variable.
10733 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10735 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10736 Daniel Jacobowitz <dan@codesourcery.com>
10738 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10739 (usr_store_inferior_registers): Likewise.
10740 (regsets_store_inferior_registers): Likewise.
10742 2008-07-31 Rolf Jansen <rj@surtec.com>
10743 Pedro Alves <pedro@codesourcery.com>
10745 * configure.ac: Check for memmem declaration.
10746 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10747 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10748 (disable_packet_qfThreadInfo): Unconditionally compile.
10749 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10750 * configure, config.in: Regenerate.
10752 2008-07-28 Doug Kwan <dougkwan@google.com>
10754 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10755 (linux_write_memory): Remove declaration of errno.
10757 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10759 * linux-low.c (handle_extended_wait): Do not use "status"
10760 variable uninitialized.
10762 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10764 * server.c (handle_v_attach): Inhibit reporting dll changes.
10766 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10768 * remote-utils.c (prepare_resume_reply): If requested, don't
10769 output "thread:TID" in the T stop reply.
10771 * server.c (disable_packet_vCont, disable_packet_Tthread)
10772 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10773 (handle_query): If requested, disable support for qC, qfThreadInfo
10775 (handle_v_requests): If requested, disable support for vCont.
10776 (gdbserver_show_disableable): New.
10777 (main): Handle --disable-packet and --disable-packet=LIST.
10779 * server.h (disable_packet_vCont, disable_packet_Tthread)
10780 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10782 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10784 * server.c (gdbserver_usage): Mention --version.
10786 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10788 * Makefile.in (gdbreplay.o): New rule.
10790 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10792 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10793 message, not gdbserver.
10795 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10796 Nathan Sidwell <nathan@codesourcery.com>
10797 Joseph Myers <joseph@codesourcery.com>
10799 * acinclude.m4: Include ../../config/acx.m4.
10800 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10801 * configure, config.in: Regenerate.
10802 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10803 * server.c (gdbserver_version): Print PKGVERSION.
10804 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10805 (main): Adjust gdbserver_usage calls.
10806 * gdbreplay.c (version, host_name): Add declarations.
10807 (gdbreplay_version, gdbreplay_usage): New.
10808 (main): Accept --version and --help options.
10810 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10812 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10813 (arm_breakpoint_at): Handle Thumb.
10814 (the_low_target): Add comment.
10816 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10818 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10820 2008-05-09 Doug Evans <dje@google.com>
10822 * server.h (decode_search_memory_packet): Declare.
10823 * remote-utils.c (decode_search_memory_packet): New fn.
10824 * server.c (handle_search_memory_1): New fn.
10825 (handle_search_memory): New fn.
10826 (handle_query): Process qSearch:memory packets.
10828 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10830 * regcache.c (registers_length): Remove.
10831 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10832 full register packet.
10833 * regcache.h (registers_length): Remove prototype.
10834 * server.h (PBUFSIZ): Define to 16384.
10836 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10838 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10839 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10840 powerpc-64l.o, and powerpc-altivec64l.o.
10841 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10842 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10843 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10844 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10845 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10848 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10849 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10850 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10851 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10852 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10853 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10854 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10855 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10856 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10857 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10860 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10861 (init_registers_powerpc_32l): ... this new prototype.
10862 (init_registers_powerpc_32): Remove, replace by ...
10863 (init_registers_powerpc_altivec32l): ... this new prototype.
10864 (init_registers_powerpc_e500): Remove, replace by ...
10865 (init_registers_powerpc_e500l): ... this new prototype.
10866 (init_registers_ppc64): Remove, replace by ...
10867 (init_registers_powerpc_64l): ... this new prototype.
10868 (init_registers_powerpc_64): Remove, replace by ...
10869 (init_registers_powerpc_altivec64l): ... this new prototype.
10870 (ppc_num_regs): Set to 73.
10871 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10872 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10873 (ppc_cannot_store_register): Handle orig_r3 and trap.
10874 (ppc_arch_setup): Update init_registers_... calls.
10875 (ppc_fill_gregset): Handle orig_r3 and trap.
10877 * inferiors.c (clear_inferiors): Reset current_inferior.
10879 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10881 * acinclude.m4: Add override.m4.
10882 * configure: Regenerate.
10884 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10886 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10887 initial call to init_register_ppc64.
10889 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10891 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10892 single powerpc*-*-linux* case.
10893 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10895 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10897 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10898 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10900 * linux-ppc-low.c: Include <elf.h>.
10901 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10902 (ppc_hwcap): New global variable.
10903 (ppc_regmap): Remove __SPE__ #ifdef sections.
10904 (ppc_regmap_e500): New global variable.
10905 (ppc_cannot_store_register): Update __SPE__ special case.
10906 (ppc_get_hwcap): New function.
10907 (ppc_arch_setup): Use it to determine whether inferior supports
10908 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10909 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10910 Do not access registers if target does not support AltiVec.
10911 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10912 Do not access registers if target does not support SPE.
10913 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10915 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10917 * linux-low.c (disabled_regsets, num_regsets): New.
10918 (use_regsets_p): Delete.
10919 (linux_wait_for_process): Clear disabled_regsets.
10920 (regsets_fetch_inferior_registers): Check and set it.
10921 (regsets_store_inferior_registers): Likewise.
10922 (linux_fetch_registers, linux_store_registers): Do not use
10924 (initialize_low): Allocate disabled_regsets.
10926 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10928 * Makefile.in (LIBOBJS): New.
10929 (OBS): Use LIBOBJS.
10930 (memmem.o): New rule.
10931 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10932 * configure: Regenerated.
10934 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10936 * server.c (handle_query): Never return "unsupported" for
10937 qXfer:features:read queries.
10939 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10941 * server.c (get_features_xml): Fix inverted condition.
10942 (handle_query): Always support qXfer:feature:read.
10944 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10946 * server.c (wrapper_argv): New.
10947 (start_inferior): Handle wrapper_argv. If set, expect an extra
10949 (gdbserver_usage): Document --wrapper.
10950 (main): Parse --wrapper.
10952 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10954 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10955 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10956 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10957 (ppc_set_pc): Likewise.
10958 (ppc_arch_setup): New function.
10959 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10960 of collect_register.
10961 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10963 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10965 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10966 instead of linux-ppc64-low.o.
10967 * linux-ppc64-low.c: Remove file.
10968 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10969 (linux-ppc64-low.o): Remove rule.
10971 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10972 (init_registers_powerpc_64): Likewise.
10973 (ppc_regmap): Conditionally define depending on __powerpc64__.
10974 (ppc_cannot_store_register): Do not special-case "fpscr" when
10975 compiled on __powerpc64__.
10976 (ppc_collect_ptrace_register): New function.
10977 (ppc_supply_ptrace_register): New function.
10978 (ppc_breakpoint): Change type to "unsigned int".
10979 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10980 (the_low_target): Conditionally provide initializers for the
10981 arch_setup member depending on __powerpc64__. Install
10982 collect_ptrace_register and supply_ptrace_register members.
10984 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10986 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10987 * server.c (gdbserver_xmltarget): Define.
10988 (get_features_xml): Use it to replace "target.xml" and arch_string.
10990 * configure.srv: Remove srv_xmltarget. Add XML files that were
10991 mentioned there to srv_xmlfiles instead. Remove conditional tests
10992 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10993 srv_xmlfiles and srv_regobj to include all possible choices.
10994 * configure.ac (srv_xmltarget): Remove.
10995 (srv_xmlfiles): Do not add "target.xml".
10996 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10997 checks for supplementary target information.
10998 * configure: Regenerate.
10999 * Makefile.in (XML_TARGET): Remove.
11000 (target.xml): Remove rule.
11001 (clean): Do not clean up target.xml.
11002 (.PRECIOUS): Do not mention target.xml.
11004 * target.h (struct target_ops): Remove arch_string member.
11005 * linux-low.c (linux_arch_string): Remove.
11006 (linux_target_ops): Remove arch_string initializer.
11007 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11008 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11009 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11010 * spu-low.c (spu_arch_string): Remove.
11011 (spu_target_ops): Remove arch_string initializer.
11012 * win32-low.c (win32_arch_string): Remove.
11013 (win32_target_ops): Remove arch_string initializer.
11014 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11015 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11016 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11018 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11020 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11021 by collect_ptrace_register and supply_ptrace_register hooks.
11022 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11023 instead of checking for the_low_target.left_pad_xfer.
11024 (usr_store_inferior_registers): Use collect_ptrace_register callback
11025 instead of checking for the_low_target.left_pad_xfer.
11027 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11028 (s390_supply_ptrace_register): Likewise.
11029 (s390_fill_gregset): Call s390_collect_ptrace_register.
11030 (the_low_target): Update.
11032 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11033 (ppc_supply_ptrace_register): Likewise.
11034 (the_low_target): Update.
11036 * linux-i386-low.c (the_low_target): Update.
11037 * linux-x86-64-low.c (the_low_target): Update.
11039 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11041 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11042 reg-s390.o and reg-s390x.o.
11044 * linux-low.c (new_inferior): New global variable.
11045 (linux_create_inferior, linux_attach): Set it.
11046 (linux_wait_for_process): Call the_low_target.arch_setup after the
11047 target has stopped for the first time.
11048 (initialize_low): Do not call the_low_target.arch_setup.
11050 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11051 (s390_set_pc): Likewise.
11052 (s390_arch_setup): New function.
11053 (the_low_target): Use s390_arch_setup as arch_setup routine.
11055 * regcache.c (realloc_register_cache): New function.
11056 (set_register_cache): Call it for each existing regcache.
11058 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11060 * server.h (init_registers): Remove prototype.
11062 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11063 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11064 instead of init_registers ().
11065 * linux-arm-low.c (init_registers_arm): Add prototype.
11066 (init_registers_arm_with_iwmmxt): Likewise.
11067 (the_low_target): Add initializer for arch_setup field.
11068 * linux-cris-low.c (init_registers_cris): Add prototype.
11069 (the_low_target): Add initializer for arch_setup field.
11070 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11071 (the_low_target): Add initializer for arch_setup field.
11072 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11073 (the_low_target): Add initializer for arch_setup field.
11074 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11075 (the_low_target): Add initializer for arch_setup field.
11076 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11077 (the_low_target): Add initializer for arch_setup field.
11078 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11079 (the_low_target): Add initializer for arch_setup field.
11080 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11081 (init_registers_mips64_linux): Likewise.
11082 (the_low_target): Add initializer for arch_setup field.
11083 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11084 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11085 (the_low_target): Add initializer for arch_setup field.
11086 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11087 (init_registers_powerpc_64): Likewise.
11088 (the_low_target): Add initializer for arch_setup field.
11089 * linux-s390-low.c (init_registers_s390): Add prototype.
11090 (init_registers_s390x): Likewise.
11091 (the_low_target): Add initializer for arch_setup field.
11092 * linux-sh-low.c (init_registers_sh): Add prototype.
11093 (the_low_target): Add initializer for arch_setup field.
11094 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11095 (the_low_target): Add initializer for arch_setup field.
11096 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11097 (the_low_target): Add initializer for arch_setup field.
11099 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11100 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11101 instead of init_registers ().
11102 * win32-arm-low.c (init_registers_arm): Add prototype.
11103 (the_low_target): Add initializer for arch_setup field.
11104 * win32-i386-low.c (init_registers_i386): Add prototype.
11105 (the_low_target): Add initializer for arch_setup field.
11107 * spu-low.c (init_registers_spu): Add prototype.
11108 (initialize_low): Call initialie_registers_spu () instead of
11109 initialize_registers ().
11111 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11113 * server.c (handle_v_requests): When handling the vRun and vAttach
11114 packets, if already debugging a process, don't kill it. Return an
11117 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11119 * server.c (handle_query): Correct length check.
11121 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11123 * win32-low.c (do_initial_child_stuff): Add process handle
11124 parameter. Set current_process_handle and current_process_id from the
11125 parameters. Clear globals.
11126 (win32_create_inferior): Don't set current_process_handle and
11127 current_process_id here. Instead pass them on the call to
11128 do_initial_child_stuff.
11129 (win32_attach): Likewise.
11130 (win32_clear_inferiors): New.
11131 (win32_kill): Don't close the current process handle or the
11132 current thread handle here. Instead call win32_clear_inferiors.
11133 (win32_detach): Don't open a new handle to the process. Call
11134 win32_clear_inferiors.
11135 (win32_join): Don't rely on current_process_handle; open a new
11136 handle using the process id.
11137 (win32_wait): Call win32_clear_inferiors when the inferior process
11140 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11142 * server.c (monitor_show_help): Add "exit".
11144 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11146 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11147 (clean): Add reg-xtensa.c.
11148 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11149 * configure.srv (xtensa*-*-linux*) New target.
11150 * linux-xtensa-low.c: New.
11151 * xtensa-xtregs.c: New.
11153 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11155 * hostio.c: Don't include errno.h.
11156 (errno_to_fileio_errno): Move to hostio-errno.
11157 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11158 error number outputting to the target->hostio_last_error callback.
11159 (hostio_packet_error): Use FILEIO_EINVAL directly.
11160 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11161 calls to hostio_error.
11162 * hostio-errno.c: New.
11163 * server.h (hostio_last_error_from_errno): Declare.
11164 * target.h (target_ops): Add hostio_last_error member.
11165 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11166 as hostio_last_error handler.
11167 * spu-low.c (spu_target_ops): Likewise.
11168 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11169 (wince_hostio_last_error): New functions.
11170 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11171 as hostio_last_error handler.
11172 (win32_target_ops) [!_WIN32_WCE]: Register
11173 hostio_last_error_from_errno as hostio_last_error handler.
11174 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11175 (hostio-errno.o): New rule.
11176 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11177 * configure.srv (srv_hostio_err_objs): New variable. Default to
11179 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11180 * configure: Regenerate.
11182 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11184 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11185 (linux_kill, linux_detach): Clean up the process list.
11186 * remote-utils.c (remote_open): Improve port number parsing.
11187 (putpkt_binary, input_interrupt): Only send interrupts if the target
11189 * server.c (extended_protocol): Make static.
11190 (attached): Define earlier.
11191 (exit_requested, response_needed, program_argv): New variables.
11192 (target_running): New.
11193 (start_inferior): Clear attached here.
11194 (attach_inferior): Set attached here.
11195 (require_running): Define.
11196 (handle_query): Use require_running and target_running. Implement
11198 (handle_v_attach, handle_v_run): New.
11199 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11200 (gdbserver_usage): Update.
11201 (main): Redo argument parsing. Handle --debug and --multi. Handle
11202 --attach along with other options or after the port. Save
11203 program_argv. Support no initial program. Resynchronize
11204 communication with GDB after an error. Handle "monitor exit".
11205 Use require_running and target_running. Always allow the extended
11206 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11207 restart in extended mode.
11208 * README: Refer to the GDB manual. Update --attach usage.
11210 2007-12-20 Andreas Schwab <schwab@suse.de>
11212 * linux-low.c (STACK_SIZE): Define.
11213 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11214 (linux_test_for_tracefork): Likewise.
11216 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11218 * linux-low.c (linux_wait_for_event): Update messages. Do not
11219 reinsert auto-delete breakpoints.
11220 * mem-break.c (struct breakpoint): Change return type of handler to
11222 (set_breakpoint_at): Update handler type.
11223 (reinsert_breakpoint_handler): Return 1 instead of calling
11225 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11227 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11228 * mem-break.h (set_breakpoint_at): Update handler type.
11229 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11230 * win32-low.c (auto_delete_breakpoint): New.
11231 (get_child_debug_event): Use it.
11233 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11235 * configure.ac: Check for pread and pwrite.
11236 * hostio.c (handle_pread): Fall back to lseek and read.
11237 (handle_pwrite): Fall back to lseek and write.
11238 * config.in, configure: Regenerated.
11240 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11242 * server.c (myresume): Add own_buf argument.
11243 (main): Update calls.
11245 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11247 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11248 * remote-utils.c (remote_open): Do not call disable_async_io.
11249 (block_async_io): Delete.
11250 (unblock_async_io): Make static.
11251 (initialize_async_io): New.
11252 * server.c (handle_v_cont): Handle async I/O here.
11253 (myresume): Likewise. Move other common resume tasks here...
11254 (main): ... from here. Call initialize_async_io. Disable async
11255 I/O before the main loop.
11256 * server.h (initialize_async_io): Declare.
11257 (block_async_io, unblock_async_io): Delete prototypes.
11258 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11260 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11262 * remote-utils.c (readchar): Allow binary data in received messages.
11264 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11266 * win32-low.c (attaching): New global.
11267 (win32_create_inferior): Clear the `attaching' global.
11268 (win32_attach): Set the `attaching' global.
11269 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11270 attaching. Only set a breakpoint at the entry point if not
11273 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11275 * server.c (main): Don't report dll events on the initial
11276 connection on attaches.
11278 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11280 * server.c (main): Relax numerical bases supported for the pid of
11281 the --attach command line argument.
11283 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11285 * win32-low.c (win32_attach): Call OpenProcess before
11286 DebugActiveProcess, not after. Add last error output to error
11289 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11291 * win32-low.c (win32_get_thread_context)
11292 (win32_set_thread_context): New functions.
11293 (thread_rec): Use win32_get_thread_context.
11294 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11295 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11298 2007-12-03 Leo Zayas
11299 Pedro Alves <pedro_alves@portugalmail.pt>
11301 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11303 (child_add_thread): Minor cleanup.
11304 (child_continue): Resume artificially suspended threads before
11305 calling ContinueDebugEvent.
11306 (suspend_one_thread): New.
11307 (fake_breakpoint_event): New.
11308 (get_child_debug_event): Change return type to int. Check here if
11309 gdb sent an interrupt request. If a soft interrupt was requested,
11310 fake a breakpoint event. Return 0 if there is no event to handle,
11312 (win32_wait): Don't check here if gdb sent an interrupt request.
11313 Ensure there is a valid event to handle.
11314 (win32_request_interrupt): Add soft interruption method as last
11317 2007-12-03 Leo Zayas
11318 Pedro Alves <pedro_alves@portugalmail.pt>
11320 * win32-low.h (win32_thread_info): Add descriptions to the
11321 structure members. Replace `suspend_count' counter by a
11323 * win32-low.c (thread_rec): Update condition of when to get the
11324 context from the inferior. Rely on ContextFlags being set if it
11325 has already been retrieved. Only suspend the inferior thread if
11326 we haven't already. Warn if that fails.
11327 (continue_one_thread): s/suspend_count/suspended/. Only call
11328 ResumeThread once. Warn if that fails.
11330 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11332 * win32-low.c (win32_wait): Don't read from the inferior when it
11333 has already exited.
11335 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11337 * Makefile.in (win32_low_h): New variable.
11338 (win32-low.o): Add dependency on $(win32_low_h).
11339 (win32-arm-low.o, win32-i386-low.o): New rules.
11341 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11343 * hostio.c: Correct copyright year.
11345 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11347 * Makefile.in (OBS): Add hostio.o.
11348 (hostio.o): New rule.
11349 * server.h (handle_vFile): Declare.
11350 * hostio.c: New file.
11351 * server.c (handle_v_requests): Take packet_len and new_packet_len
11352 for binary packets. Call handle_vFile.
11353 (main): Update call to handle_v_requests.
11355 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11357 * linux-low.c: Include <sched.h>.
11359 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11361 * linux-low.c (linux_tracefork_grandchild): New.
11362 (linux_tracefork_child): Use clone.
11363 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11365 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11367 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11369 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11371 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11373 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11375 * inferiors.c (change_inferior_id): Delete.
11376 (add_pid_to_list, pull_pid_from_list): New.
11377 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11378 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11379 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11380 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11381 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11382 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11383 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11384 (using_threads): Always set to 1.
11385 (handle_extended_wait): New.
11386 (add_process): Do not set TID.
11387 (linux_create_inferior): Set must_set_ptrace_flags.
11388 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11389 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11390 (linux_thread_alive): Rename TID argument to LWPID.
11391 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11392 (linux_wait_for_event): Do not use TID or check using_threads. Update
11393 call to dead_thread_notify. Call handle_extended_wait.
11394 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11395 (send_sigstop): Delete sigstop_sent.
11396 (wait_for_sigstop): Avoid TID.
11397 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11398 (linux_test_for_tracefork): New.
11399 (linux_lookup_signals): Use thread_db_active and
11400 linux_supports_tracefork_flag.
11401 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11402 * linux-low.h (get_process_thread): Avoid TID.
11403 (struct process_ifo): Move thread_known and tid to the end. Remove
11405 (linux_attach_lwp, thread_db_init): Update prototypes.
11406 * server.h (change_inferior_id): Delete prototype.
11407 (add_pid_to_list, pull_pid_from_list): New prototypes.
11408 * thread-db.c (thread_db_use_events): New.
11409 (find_first_thread): Rename to...
11410 (find_one_thread): ...this. Update callers and messages. Do not
11411 call fatal. Check thread_db_use_events. Do not call
11412 change_inferior_id or new_thread_notify.
11413 (maybe_attach_thread): Update. Do not call new_thread_notify.
11414 (thread_db_init): Set thread_db_use_events. Check use_events.
11415 * utils.c (fatal, warning): Correct message prefix.
11417 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11419 * Makefile.in (clean): Remove new files.
11420 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11421 (powerpc-64.o, powerpc-64.c): New rules.
11422 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11423 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11425 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11427 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11428 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11429 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11430 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11431 (target_regsets): Add AltiVec and SPE register sets.
11432 * configure.ac: Check for AltiVec and SPE.
11433 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11434 (ppc_fill_vrregset, ppc_store_vrregset): New.
11435 (target_regsets): Add AltiVec register set.
11436 * configure: Regenerated.
11438 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11440 * linux-low.c (O_LARGEFILE): Define.
11441 (linux_read_memory): Use /proc/PID/mem.
11442 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11443 * configure, config.in: Regenerated.
11445 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11447 * linux-low.c (linux_wait_for_event): Do not pass signals while
11450 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11452 * win32-low.c (create_process): New.
11453 (win32_create_inferior): Use create_process instead of
11454 CreateProcess. If create_process failed retry appending an ".exe"
11455 suffix. Store the GetLastError result immediatelly after
11456 create_process calls and use it on the call to error.
11458 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11460 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11462 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11464 * configure.ac: Switch license to GPLv3.
11466 2007-08-01 Michael Snyder <msnyder@access-company.com>
11468 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11470 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11472 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11474 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11475 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11476 CloseToolhelp32Snapshot.
11477 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11478 CloseToolhelp32Snapshot.
11480 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11482 * server.c (main): Check for inferior exit before main loop.
11484 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11486 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11487 instead of on tmp_desc.
11489 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11490 Daniel Jacobowitz <dan@codesourcery.com>
11492 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11493 (add_thread): Minor cleanups.
11494 (clear_inferiors): Move lower in the file. Clear the DLL
11496 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11497 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11498 (xml_escape_text): New.
11499 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11501 (handle_v_cont): Report errors.
11502 (gdbserver_version): Update.
11503 (main): Correct size of own_buf. Do not report initial DLL events.
11504 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11505 (unloaded_dll, xml_escape_text): New.
11506 * win32-low.c (enum target_waitkind): Update comments.
11507 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11508 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11509 (win32_EnumProcessModules, win32_GetModuleInformation)
11510 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11511 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11512 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11513 (win32_Module32First, win32_Module32Next, load_toolhelp)
11514 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11515 (get_child_debug_event): Handle DLL events.
11516 (win32_wait): Likewise.
11518 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11520 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11521 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11523 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11525 * win32-low.c (handle_output_debug_string): Ignore event if not
11528 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11530 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11532 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11534 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11536 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11538 * inferiors.c (change_inferior_id): Add comment.
11539 * linux-low.c (check_removed_breakpoint): Add an early
11540 prototype. Improve debug output.
11541 (linux_attach): Doc update.
11542 (linux_detach_one_process, linux_detach): Clean up before releasing
11544 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11545 * linux-low.h (struct process_info): Doc improvement.
11546 * mem-break.c (delete_all_breakpoints): New.
11547 * mem-break.h (delete_all_breakpoints): New prototype.
11548 * thread-db.c (find_first_thread): New.
11549 (thread_db_create_event): Call it instead of
11550 thread_db_find_new_threads. Clean up unused variables.
11551 (maybe_attach_thread): Remove first thread handling.
11552 (thread_db_find_new_threads): Use find_first_thread.
11553 (thread_db_get_tls_address): Likewise.
11555 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11557 * thread-db.c (thread_db_find_new_threads): Add prototype.
11558 (thread_db_create_event): Check for the main thread before adding
11560 (maybe_attach_thread): Only enable event reporting if TID == 0.
11561 (thread_db_get_tls_address): Check for new threads.
11563 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11565 * linux-low.c (linux_create_inferior): Try execv before execvp.
11566 * spu-low.c (spu_create_inferior): Likewise.
11568 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11570 * linux-low.c (linux_create_inferior): Change execv to execvp.
11571 * spu-low.c (spu_create_inferior): Likewies.
11573 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11575 * Makefile.in (clean): Clean new files instead of deleted ones.
11576 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11577 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11579 * configure.srv: Specify XML files and new regformats for MIPS and
11581 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11582 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11583 an entry for the restart register.
11584 (mips_cannot_fetch_register, mips_cannot_store_register)
11585 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11586 register names to match the XML descriptions.
11587 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11588 restart register instead of $0.
11590 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11591 Markus Deuling <deuling@de.ibm.com>
11593 * remote-utils.c (decode_xfer_write): New function.
11594 * server.h (decode_xfer_write): Add prototype.
11595 * server.c (handle_query): Add PACKET_LEN argument. Support
11596 qXfer:spu:read and qXfer:spu:write packets.
11597 (main): Pass packet_len to handle_query.
11598 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11599 * target.h (target_ops): Add qxfer_spu.
11601 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11603 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11604 accessing non-seekable spufs files.
11606 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11608 * server.c (handle_query): Add reply for qC packet.
11610 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11611 Leo Zayas <lerele@champenstudios@com>
11613 * server.h (check_remote_input_interrupt_request): New function.
11614 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11615 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11616 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11617 (check_remote_input_interrupt_request): New function.
11618 * server.h (check_remote_input_interrupt_request): Declare.
11619 * win32-low.c (winapi_DebugBreakProcess,
11620 winapi_GenerateConsoleCtrlEvent): New typedefs.
11621 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11623 (win32_wait): Check for remote interrupt request
11624 with check_remote_input_interrupt_request.
11625 (win32_request_interrupt): New function.
11626 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11628 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11630 * win32-low.c (debug_registers_changed,
11631 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11632 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11633 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11634 (thread_rec): Get context using the low target.
11635 (child_add_thread): Call thread_added on the low target,
11636 which does the same thing.
11638 (do_initial_child_stuff): Remove debug registers references.
11639 Set context using the low target. Resume threads after
11640 setting the contexts.
11641 (child_continue): Remove dead variable. Remove debug
11642 registers references.
11643 (child_fetch_inferior_registers): Go through the low target.
11644 (do_child_store_inferior_registers): Remove.
11645 (child_store_inferior_registers): Go through the low target.
11646 (win32_resume): Remove debug registers references.
11647 Set context using the low target.
11648 (handle_exception): Change return type to void. Don't record
11649 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11650 first chance exception.
11651 (get_child_debug_event): Change return type to void. Remove
11652 goto loop. Always return after waiting for debug event.
11653 (win32_wait): Convert to switch statement. Handle spurious
11656 * win32-i386-low.c (debug_registers_changed,
11657 debug_registers_used): New.
11658 (initial_stuff): Rename to ...
11659 (i386_initial_stuff): ... this. Clear debug registers
11661 (store_debug_registers): Delete.
11662 (i386_get_thread_context): New.
11663 (load_debug_registers): Delete.
11664 (i386_set_thread_context): New.
11665 (i386_thread_added): New.
11666 (single_step): Rename to ...
11667 (i386_single_step): ... this.
11668 (do_fetch_inferior_registers): Rename to ...
11669 (i386_fetch_inferior_register): ... this.
11670 (i386_store_inferior_register): New.
11671 (the_low_target): Adapt to new interface.
11673 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11674 (arm_get_thread_context): New.
11675 (arm_set_thread_context): New.
11677 (do_fetch_inferior_registers): Rename to ...
11678 (arm_fetch_inferior_register): ... this.
11679 (arm_store_inferior_register): New.
11680 (arm_wince_breakpoint): Reimplement as unsigned long.
11681 (arm_wince_breakpoint_len): Define.
11682 (the_low_target): Adapt to new interface.
11684 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11685 load_debug_registers. Add get_thread_context, set_thread_context,
11686 thread_added and store_inferior_register. Rename
11687 fetch_inferior_registers to fetch_inferior_register.
11688 (regptr): Remove declaration.
11690 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11692 * linux-low.c (linux_detach): Change return type to int. Return 0.
11693 * spu-low.c (spu_detach): Likewise.
11695 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11697 * target.h (target_ops): Change return type of detach to int.
11699 (join_inferior): New.
11700 * server.c (main): Don't skip detach support on mingw32.
11701 If the inferior doesn't support detaching return error.
11702 Call join_inferior instead of using waitpid.
11703 * linux-low.c (linux_join): New.
11704 (linux_target_op): Add linux_join.
11705 * spu-low.c (spu_join): New.
11706 (spu_target_ops): Add spu_join.
11707 * win32-low.c (win32_detach): Adapt to new interface.
11708 Reopen current_process_handle before detaching. Issue a child
11709 resume before detaching.
11711 (win32_target_op): Add win32_join.
11713 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11715 * win32-low.c (win32-attach): Fix return value.
11716 * target.h (target_ops): Describe ATTACH return values.
11718 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11720 * win32-low.c (GETPROCADDRESS): Define.
11721 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11722 (winapi_DebugSetProcessKillOnExit): Likewise.
11723 (win32_create_inferior): Force usage of ansi CreateProcessA.
11724 (win32_attach): Use GETPROCADDRESS.
11725 (win32_detach): Likewise.
11727 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11729 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11731 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11733 * win32-low.c: Commit leftover changes from 2007-03-29.
11735 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11737 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11738 fields short instead of int. Add explicit padding.
11739 (i387_cache_to_fsave): Remove unnecessary casts.
11740 (i387_fsave_to_cache): Doc fix.
11741 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11743 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11745 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11746 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11748 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11750 * configure.srv (arm*-*-mingw32ce*): Move near the other
11753 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11755 * configure.ac: Add errno checking.
11756 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11757 sys/file.h and malloc.h.
11758 (AC_CHECK_DECLS): Add perror.
11759 (srv_mingwce): Handle.
11760 * configure.srv (i[34567]86-*-cygwin*): Add
11761 win32-i386-low.o to srv_tgtobj.
11762 (i[34567]86-*-mingw*): Likewise.
11763 (arm*-*-mingw32ce*): Add case.
11764 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11765 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11766 [__MINGW32CE__] (strerror): New function.
11767 [__MINGW32CE__] (errno): Define to GetLastError.
11768 [__MINGW32CE__] (COUNTOF): New macro.
11769 (remote_open): Remove extra close call.
11770 * mem-break.c (delete_breakpoint_at): New function.
11771 * mem-break.h (delete_breakpoint_at): Declare.
11772 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11773 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11774 [USE_WIN32API] (read, write): Add char* casts.
11775 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11776 * server.h: Include wincecompat.h on Windows CE.
11777 [HAVE_ERRNO_H]: Check.
11778 (perror): Declare if not declared.
11779 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11780 (perror_with_name): Remove errno declaration.
11781 * wincecompat.h: New.
11782 * wincecompat.c: New.
11783 * win32-low.h: New.
11784 * win32-arm-low.c: New.
11785 * win32-i386-low.c: New.
11786 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11787 (OUTMSG2): Make it safe.
11789 (COUNTOF): New macro.
11790 (NUM_REGS): Get it from the low target.
11791 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11792 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11793 (thread_rec): Let low target handle debug registers.
11794 (child_add_thread): Likewise.
11795 (child_init_thread_list): Likewise.
11796 (continue_one_thread): Likewise.
11798 (do_child_fetch_inferior_registers): Move to ...
11799 * win32-i386-low.c: ... here, and rename to ...
11800 (do_fetch_inferior_registers): ... this.
11801 * win32-low.c (child_fetch_inferior_registers):
11802 Go through the low target.
11803 (do_child_store_inferior_registers): Use regptr.
11804 (strwinerror): New function.
11805 (win32_create_inferior): Handle Windows CE.
11806 Use strwinerror instead of strerror on Windows error
11807 codes. Add program to the error output.
11808 Don't close the main thread handle on Windows CE.
11809 (win32_attach): Use coredll.dll on Windows CE.
11810 (win32_kill): Close current process and current
11812 (win32_detach): Use coredll.dll on Windows CE.
11813 (win32_resume): Let low target handle debug registers, and
11815 (handle_exception): Add/Remove initial breakpoint. Avoid
11816 non-existant WSTOPSIG on Windows CE.
11817 (win32_read_inferior_memory): Cast to remove warning.
11818 (win32_arch_string): Go through the low target.
11819 (initialize_low): Call set_breakpoint_data with the low
11820 target's breakpoint.
11821 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11822 FOP_REGNUM, mappings): Move to ...
11823 * win32-i386-low.c: ... here.
11824 * win32-low.c (win32_thread_info): Move to ...
11825 * win32-low.h: ... here.
11826 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11827 win32-arm-low.c and wincecompat.c.
11828 (all:): Add $EXEEXT.
11829 (install-only:): Likewise.
11830 (gdbserver:): Likewise.
11831 (gdbreplay:): Likewise.
11832 * config.in: Regenerate.
11833 * configure: Regenerate.
11835 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11837 * win32-low.c: Rename typedef thread_info to
11838 win32_thread_info throughout.
11840 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11842 * win32-i386-low.c: Rename to ...
11843 * win32-low.c: ... this.
11844 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11845 * Makefile.in: Likewise.
11847 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11849 * remote-utils.c (monitor_output): Constify msg parameter.
11850 * server.h (monitor_output): Likewise.
11851 * win32-i386-low.c (handle_output_debug_string): New.
11852 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11853 handle_output_debug_string.
11854 (get_child_debug_event): Likewise.
11856 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11858 * server.c (main): Correct strtoul check.
11860 2007-03-27 Jon Ringle <jon@ringle.org>
11862 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11864 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11866 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11868 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11870 * terminal.h: Check HAVE_SGTTY_H.
11872 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11874 * remote-utils.c (remote_open): Print out the assigned port number.
11876 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11878 * remote-utils.c (monitor_output): New function.
11879 * server.c (debug_threads): Define here.
11880 (monitor_show_help): New function.
11881 (handle_query): Handle qRcmd.
11882 (main): Do not handle 'd' packet.
11883 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11884 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11887 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11889 * Makefile.in (EXEEXT): New.
11890 (clean): Use $(EXEEXT).
11892 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11894 * target.h (target_ops): Rename send_signal to request_interrupt,
11895 and remove enum target_signal parameter.
11896 * linux-low.c (linux_request_interrupt): Rename from
11897 linux_send_signal, and always send SIGINT.
11898 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11899 and always send SIGINT.
11900 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11902 (input_interrupt): Likewise.
11904 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11906 * server.c (get_features_xml): Check if target implemented
11908 * win32-i386-low.c (win32_arch_string): New.
11909 (win32_target_ops): Add win32_arch_string as arch_string member.
11911 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11913 * spu-low.c (spu_arch_string): New.
11914 (spu_target_ops): Add spu_arch_string.
11916 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11918 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11919 * configure.ac: Do not check for terminal.h.
11920 * configure, config.in: Regenerated.
11922 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11924 * Makefile.in (OBS): Add $(XML_BUILTIN).
11925 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11927 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11928 (arm-with-iwmmxt.c): New.
11929 * config.in, configure: Regenerate.
11930 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11931 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11932 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11933 (arm*-*-linux*): Add iWMMXt and regset support.
11934 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11935 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11936 (arm_store_wmmxregset, target_regsets): New.
11937 * server.c (get_features_xml): Take annex argument. Check builtin
11939 (handle_query): Handle multiple annexes.
11941 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11943 * remote-utils.c [USE_WIN32API] (read, write): Define.
11944 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11947 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11949 * linux-i386-low.c (the_low_target): Set arch_string.
11950 * linux-x86-64-low.c (the_low_target): Likewise.
11951 * linux-low.c (linux_arch_string): New.
11952 (linux_target_ops): Add it.
11953 * linux-low.h (struct linux_target_ops): Add arch_string.
11954 * server.c (write_qxfer_response): Use const void * for DATA.
11955 (get_features_xml): New.
11956 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11957 * target.h (struct target_ops): Add arch_string method.
11959 2007-01-03 Denis Pilat <denis.pilat@st.com>
11960 Daniel Jacobowitz <dan@codesourcery.com>
11962 * linux-low.c (linux_kill): Handle being called with no threads.
11963 * win32-i386-low.c (win32_kill): Likewise.
11964 (get_child_debug_event): Clear current_process_handle.
11966 2006-12-30 Denis PILAT <denis.pilat@st.com>
11967 Daniel Jacobowitz <dan@codesourcery.com>
11969 * remote-utils.c (remote_open): Check the type of specified
11970 serial port devices before opening them.
11971 * server.c (main): Kill the inferior if an error occurs during
11972 the first remote_open.
11974 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11976 * README: Update supported targets.
11978 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11980 * Makefile.in (clean): Remove reg-mips64.c.
11981 (reg-mips64.c, reg-mips64.o): New rules.
11982 * configure.srv: Handle mips64. Include regset support for mips.
11983 * linux-mips-low.c (union mips_register): New.
11984 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11985 (mips_breakpoint, mips_breakpoint_at): Use int.
11986 (mips_collect_register, mips_supply_register)
11987 (mips_collect_register_32bit, mips_supply_register_32bit)
11988 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11989 (mips_store_fpregset, target_regsets): New.
11990 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11992 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11994 * configure.srv: Add target "spu*-*-*".
11995 * Makefile.in (clean): Remove reg-spu.c.
11996 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11997 * spu-low.c: New file.
11999 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12001 * configure.ac: Correct td_thr_tls_get_addr test.
12002 * configure: Regenerated.
12004 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12006 * linux-low.c (linux_wait_for_event): Reformat. Use the
12007 pass_signals array.
12008 * remote-utils.c (decode_address_to_semicolon): New.
12009 * server.c (pass_signals, handle_general_set): New.
12010 (handle_query): Mention QPassSignals for qSupported.
12011 (main): Call handle_general_set.
12012 * server.h (pass_signals, decode_address_to_semicolon): New.
12014 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12016 * server.c (handle_query): Correct error handling for read_auxv.
12018 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12020 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12021 and srv_linux_thread_db to yes.
12022 * linux-s390-low.c (s390_fill_gregset): New function.
12023 (target_regsets): Define data structure.
12025 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12027 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12028 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12029 * config.in, configure: Regenerated.
12030 * inferiors.c (gdb_id_to_thread): New function.
12031 (gdb_id_to_thread_id): Use it.
12032 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12033 * linux-low.h (struct process_info): Add th member.
12034 (thread_db_get_tls_address): New prototype.
12035 * remote-utils.c (decode_address): Make non-static.
12036 * server.c (handle_query): Handle qGetTLSAddr.
12037 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12038 * target.h (struct target_ops): Add get_tls_address.
12039 * thread-db.c (maybe_attach_thread): Save the thread handle.
12040 (thread_db_get_tls_address): New.
12042 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12044 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12045 (linux_resume_one_process): Take a siginfo_t *. Update all
12046 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12047 (struct pending_signals): Add a siginfo_t.
12048 (linux_wait_for_process): Always set last_status.
12049 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12050 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12051 * linux-low.h (struct process_info): Add last_status.
12053 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12055 * remote-utils.c (try_rle): New function.
12056 (putpkt_binary): Use it.
12058 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12060 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12061 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12062 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12063 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12064 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12067 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12069 * server.c (terminal_fd): New variable.
12070 (old_foreground_pgrp): Likewise.
12071 (restore_old_foreground_pgrp): New function.
12072 (start_inferior): Record the terminal file descriptor in terminal_fd
12073 and its original foreground group in old_foreground_pgrp. Register
12074 restore_old_foreground_pgrp with atexit().
12076 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12078 * server.c (handle_query): Correct qPart to qXfer.
12080 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12082 * configure.ac: Check for more headers which are missing on
12083 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12084 * configure.srv: Add Cygwin and mingw32.
12085 * remote-utils.c: Don't include headers unconditionally which
12086 are missing on mingw32. Include <winsock.h> for mingw32.
12087 (remote_open): Adjust for mingw32 support. Flush
12088 standard error after writing to it.
12089 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12090 (unblock_async_io, enable_async_io, disable_async_io)
12091 (readchar, getpkt): Update for Winsock support.
12092 (prepare_resume_reply): Expect a protocol signal number.
12093 * server.c: Disable <sys/wait.h> on mingw32.
12094 (start_inferior): Adjust for mingw32 support. Flush
12095 standard error after writing to it.
12096 (attach_inferior): Likewise. Use protocol signal
12098 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12100 * win32-i386-low.c: New file.
12101 * Makefile.in (XM_CLIBS): Set.
12102 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12103 (win32-i386-low.o): New dependency rule.
12104 * linux-low.c (linux_wait): Use target signal numbers.
12105 * target.h (struct target_ops): Doc fix.
12106 * server.h (target_signal_to_name): New prototype.
12107 * gdbreplay.c: Don't include headers unconditionally which
12108 are missing on mingw32. Include <winsock.h> for mingw32.
12109 (remote_close, remote_open): Adjust for Winsock support.
12110 * configure, config.in: Regenerated.
12112 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12114 * server.c (decode_xfer_read, write_qxfer_response): New.
12115 (handle_query): Take a packet length argument. Handle
12116 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12117 the qSupported response.
12118 (main): Update call to handle_query.
12120 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12122 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12123 (putpkt_binary): Renamed from putpkt and adjusted for binary
12125 (putpkt): New wrapper for putpkt_binary.
12126 (readchar): Don't mask off the high bit.
12127 (decode_X_packet): New function.
12128 * server.c (main): Call putpkt_binary if a handler sets the packet
12129 length. Save the length of the incoming packet. Handle 'X'.
12130 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12132 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12134 * server.c (handle_query): Handle qSupported.
12136 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12138 * remote-utils.c (all_symbols_looked_up): New variable.
12139 (look_up_one_symbol): Check it.
12140 * server.h (look_up_one_symbol): New declaration.
12141 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12143 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12145 * Makefile.in (linux-arm-low.o): Update dependencies.
12146 * linux-arm-low.c: Include "gdb_proc_service.h".
12147 (PTRACE_GET_THREAD_AREA): Define.
12148 (ps_get_thread_area): New function.
12150 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12152 * configure.srv (m68k*-*-uclinux*): New target.
12153 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12154 (linux_resume_one_process): Remove extraneous cast.
12155 (linux_read_offsets): New.
12156 (linux_target_op): Add linux_read_offsets on mmuless systems.
12157 * server.c (handle_query): Add qOffsets logic.
12158 * target.h (struct target_ops): Add read_offsets.
12160 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12162 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12163 (PTRACE_GET_THREAD_AREA): Define.
12164 (ps_get_thread_area): New function.
12165 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12166 (linux-x86-64-low.o): Update.
12168 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12170 * configure.ac: Remove checks for prfpregset_t.
12171 * gdb_proc_service.h: New file.
12172 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12173 new "gdb_proc_service.h".
12174 * proc-service.c: Likewise.
12175 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12176 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12177 * Makefile.in (gdb_proc_service_h): Updated.
12178 * configure, config.in: Regenerated.
12180 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12182 * remote-utils.c (prepare_resume_reply): Move declaration
12183 of gdb_id_from_wait to the top of the block.
12185 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12187 * linux-low.c (regsets_store_inferior_registers): Read the regset
12188 from the target before filling it.
12190 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12192 * server.c (attach_inferior): Return SIGTRAP for a successful
12195 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12197 * Makefile.in (OBS): Add version.o.
12198 (STAGESTUFF): Delete.
12199 (version.o): Add dependencies.
12200 (version.c): Replace rule.
12201 (clean): Remove version.c.
12202 * server.c (gdbserver_version): New.
12203 (gdbserver_usage): Use printf.
12204 (main): Handle --version and --help.
12205 * server.h (version, host_name): Add declarations.
12207 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12219 * linux-x86-64-low.c:
12221 * linux-s390-low.c:
12222 * linux-ppc64-low.c:
12224 * linux-mips-low.c:
12225 * linux-m68k-low.c:
12226 * linux-m32r-low.c:
12229 * linux-ia64-low.c:
12230 * linux-i386-low.c:
12231 * linux-crisv32-low.c:
12243 * gdbserver.1: Add (C) after Copyright. Update the FSF
12246 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12248 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12249 (arm_breakpoint_at): Recognize both breakpoints.
12250 (the_low_target): Use the correct breakpoint instruction.
12252 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12254 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12255 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12256 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12257 (the_low_target): Update.
12259 2005-10-25 Andreas Schwab <schwab@suse.de>
12261 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12263 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12264 (ia64_num_regs): Reduce to 462.
12266 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12268 * acinclude.m4: Correct quoting.
12269 * aclocal.m4: Regenerated.
12271 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12272 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12273 (thread_db_init): Call thread_db_err_str.
12274 * configure.ac: Check for TD_VERSION.
12275 * config.in, configure: Regenerated.
12277 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12279 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12281 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12283 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12284 is not available. Define HAVE_PTRACE_GETREGS if it is.
12285 * config.in, configure: Regenerated.
12286 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12287 * linux-i386-low.c, linux-m68k-low.c: Update to use
12288 HAVE_PTRACE_GETREGS.
12289 * linux-low.c (regsets_fetch_inferior_registers)
12290 (regsets_store_inferior_registers): Only return 0 if we processed
12292 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12293 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12295 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12297 * inferiors.c (struct thread_info): Add gdb_id.
12298 (add_thread): Add gdb_id argument.
12299 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12300 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12301 calls to add_thread.
12302 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12303 * server.c (handle_query): Use thread_to_gdb_id.
12304 (handle_v_cont, main): Use gdb_id_to_thread_id.
12305 * server.h (add_thread): Update prototype.
12306 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12309 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12311 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12312 left-padded registers.
12313 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12314 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12316 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12318 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12319 * configure: Regenerate.
12320 * config.in: Regenerate.
12321 * server.h (NEED_DECLARATION_STRERROR):
12322 Replace with !HAVE_DECL_STRERROR.
12324 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12326 * linux-low.c (linux_wait, linux_send_signal): Don't test
12327 an unsigned long variable for > 0 if it could be MAX_ULONG.
12328 * server.c (myresume): Likewise.
12329 * target.c (set_desired_inferior): Likewise.
12331 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12333 * configure.ac: Simplify and improve check for socklen_t.
12334 * configure, config.in: Regenerate.
12336 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12338 * acconfig.h: Remove.
12339 * configure.ac: Add a test for socklen_t. Use three-argument
12340 AC_DEFINE throughout.
12341 * config.in: Regenerated using autoheader 2.59.
12342 * configure: Regenerated.
12344 * gdbreplay.c (socklen_t): Provide a default.
12345 (remote_open): Use socklen_t.
12346 * remote-utils.c (socklen_t): Provide a default.
12347 (remote_open): Use socklen_t.
12348 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12351 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12353 * linux-low.c (linux_read_memory, linux_write_memory)
12354 (linux_read_auxv): Likewise.
12355 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12356 (check_mem_write): Likewise.
12357 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12359 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12360 (registers_from_string, register_data): Likewise.
12361 * server.c (handle_query, main): Likewise.
12362 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12363 (decode_M_packet): Likewise.
12364 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12365 * target.h (struct target_ops): Update read_memory, write_memory,
12367 (read_inferior_memory, write_inferior_memory): Update.
12368 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12369 to unsigned char *.
12370 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12371 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12372 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12373 linux-s390-low.c, linux-sh-low.c: Update for changes in
12374 read_inferior_memory and the_low_target->breakpoint.
12376 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12378 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12379 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12380 * configure.srv: Add powerpc64-*-linux*.
12381 * linux-ppc64-low.c: New file.
12383 2005-05-23 Orjan Friberg <orjanf@axis.com>
12385 * linux-cris-low.c: New file with support for CRIS.
12386 * linux-crisv32-low.c: Ditto for CRISv32.
12387 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12388 (clean): Add reg-cris.c and reg-crisv32.c.
12389 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12390 reg-crisv32.o, and reg-crisv32.c to make rules.
12391 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12392 recognized targets.
12394 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12396 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12397 of sizeof (PTRACE_XFER_TYPE).
12398 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12400 2005-05-12 Orjan Friberg <orjanf@axis.com>
12402 * target.h (struct target_ops): Add insert_watchpoint,
12403 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12404 pointers for hardware watchpoint support.
12405 * linux-low.h (struct linux_target_ops): Ditto.
12406 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12407 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12408 to linux_target_ops.
12409 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12411 * server.c (main): Recognize 'Z' and 'z' packets.
12413 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12415 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12416 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12417 (the_low_target): Add new members.
12419 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12421 * proc-service.c (ps_lgetregs): Search all_processes instead of
12424 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12426 * server.c (start_inferior): Change return type to int.
12427 (attach_inferior): Change sigptr to int *.
12428 (handle_v_cont, handle_v_requests): Change signal to int *.
12429 (main): Change signal to int.
12431 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12433 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12434 * configure.srv: Add m32r*-*-linux*.
12435 * linux-m32r-low.c: New file.
12437 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12439 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12441 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12443 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12444 Take unsigned long arguments for PIDs.
12445 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12446 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12447 (wait_for_sigstop, linux_resume_one_process)
12448 (regsets_fetch_inferior_registers, linux_send_signal)
12449 (linux_read_auxv): Likewise. Update the types of variables holding
12450 PIDs. Update format string specifiers.
12451 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12452 * remote-utils.c (prepare_resume_reply): Likewise.
12453 * server.c (cont_thread, general_thread, step_thread)
12454 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12456 (handle_query): Update format specifiers.
12457 (handle_v_cont, main): Use strtoul for thread IDs.
12458 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12459 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12460 (general_thread, step_thread, thread_from_wait)
12461 (old_thread_from_wait): Update.
12462 * target.h (struct thread_resume): Use unsigned long for THREAD.
12463 (struct target_ops): Use unsigned long for arguments to attach and
12466 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12468 * acinclude.m4: Include bfd/bfd.m4 directly.
12469 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12470 <agriffis@toolchain.org>.
12471 * aclocal.m4, configure: Regenerated.
12473 2005-01-07 Andrew Cagney <cagney@gnu.org>
12475 * configure.ac: Rename configure.in, require autoconf 2.59.
12476 * configure: Re-generate.
12478 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12480 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12481 LIBS when finished.
12482 * aclocal.m4: Regenerated.
12483 * configure: Regenerated.
12485 2004-11-21 Andreas Schwab <schwab@suse.de>
12487 * linux-m68k-low.c (m68k_num_gregs): Define.
12488 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12489 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12490 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12491 (m68k_breakpoint_at): New. Add to the_low_target.
12493 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12494 srv_linux_thread_db to yes.
12496 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12498 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12499 (ARCH_SET_FS): Likewise.
12500 (ARCH_GET_FS): Likewise.
12501 (ARCH_GET_GS): Likewise.
12503 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12505 * linux-i386-low.c (ps_get_thread_area): New.
12506 * linux-x86-64-low.c (ps_get_thread_area): New.
12507 * linux-low.c: Include <sys/syscall.h>.
12508 (linux_kill_one_process): Don't kill the first thread here.
12509 (linux_kill): Kill the first thread here.
12510 (kill_lwp): New function.
12511 (send_sigstop, linux_send_signal): Use it.
12512 * proc-service.c: Clean up #ifdefs.
12513 (fpregset_info): Delete.
12514 (ps_lgetregs): Update and enable implementation.
12515 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12517 * remote-utils.c (struct sym_cache, symbol_cache): New.
12518 (input_interrupt): Print a clearer message.
12519 (async_io_enabled): New variable.
12520 (enable_async_io, disable_async_io): Use it. Update comments.
12521 (look_up_one_symbol): Use the symbol cache.
12522 * thread-db.c (thread_db_look_up_symbols): New function.
12523 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12525 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12527 * configure.in: Test for -rdynamic.
12528 * configure: Regenerated.
12529 * Makefile (INTERNAL_LDFLAGS): New.
12530 (gdbserver, gdbreplay): Use it.
12532 2004-09-02 Andrew Cagney <cagney@gnu.org>
12534 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12536 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12538 * linux-low.c (linux_wait): Clear all_processes list also.
12540 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12542 * linux-low.c: Include <errno.h>. Remove extern declaration of
12545 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12547 * gdbreplay.c, server.h, utils.c: Update copyright years.
12549 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12551 * server.c (main): Print child status or termination signal from
12552 variable 'signal', not 'sig'.
12554 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12556 * linux-low.c (linux_read_memory): Change return type to
12557 int. Check for and return error from ptrace().
12558 * target.c (read_inferior_memory): Change return type to int. Pass
12559 back return status from the_target->read_memory().
12560 * target.h (struct target_ops): Adapt *read_memory() prototype.
12562 (read_inferior_memory): Adapt prototype.
12563 * server.c (main): Return an error packet if
12564 read_inferior_memory() returns an error.
12566 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12568 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12569 Unify with other clean targets.
12571 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12573 * server.c (handle_v_cont): Call set_desired_inferior.
12575 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12577 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12579 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12581 * linux-low.c (linux_wait): Unblock async I/O.
12582 (linux_resume): Block and enable async I/O.
12583 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12584 * server.h (block_async_io, unblock_async_io): Add prototypes.
12586 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12588 * remote-utils.c (remote_open): Print a status notice after
12589 opening a TCP port.
12590 * server.c (attach_inferior): Print a status notice after
12593 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12595 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12597 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12599 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12601 * server.c, target.h: Update copyright years.
12603 2004-02-25 Roland McGrath <roland@redhat.com>
12605 * target.h (struct target_ops): New member `read_auxv'.
12606 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12607 * linux-low.c (linux_read_auxv): New function.
12608 (linux_target_ops): Initialize `read_auxv' member to that.
12610 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12612 Committed by Jim Blandy <jimb@redhat.com>.
12614 * linux-s390-low.c (s390_num_regs): Update.
12615 (s390_regmap): Remove control registers. Use __s390x__ predefine
12616 instead of GPR_SIZE to distiguish s390 and s390x targets.
12618 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12620 * linux-low.c: Update copyright year.
12621 (check_removed_breakpoint): Clear pending_is_breakpoint.
12622 (linux_set_resume_request, linux_queue_one_thread)
12623 (resume_status_pending_p): New functions.
12624 (linux_continue_one_thread): Use process->resume.
12625 (linux_resume): Only resume threads if there are no pending events.
12626 * linux-low.h (struct process_info): Add resume request
12629 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12631 * regcache.c (new_register_cache): Clear the allocated register
12632 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12634 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12636 * linux-low.c (linux_resume): Take a struct thread_resume *
12638 (linux_wait): Update call.
12639 (resume_ptr): New static variable.
12640 (linux_continue_one_thread): Renamed from
12641 linux_continue_one_process. Use resume_ptr.
12642 (linux_resume): Use linux_continue_one_thread.
12643 * server.c (handle_v_cont, handle_v_requests): New functions.
12644 (myresume): New function.
12645 (main): Handle 'v' case.
12646 * target.h (struct thread_resume): New type.
12647 (struct target_ops): Change argument of "resume" to struct
12649 (myresume): Delete macro.
12651 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12653 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12654 (uninstall): Support DESTDIR.
12656 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12658 * configure.srv: Add xscale*linux copy of arm*linux entry.
12660 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12662 * linux-arm-low.c (arm_reinsert_addr): New function.
12663 (the_low_target): Add arm_reinsert_addr.
12665 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12667 * mem-break.c: Remove whitespace at end of file.
12669 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12671 * configure.in: Check whether we need to prototype strerror.
12672 * server.h: Optionally prototype strerror.
12673 * gdbreplay.c (perror_with_name): Use strerror.
12674 * linux-low.c (linux_attach_lwp): Use strerror.
12675 * utils.c (perror_with_name): Use strerror.
12676 * config.in, configure: Regenerated.
12678 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12680 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12681 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12683 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12685 * Makefile.in (SFILES): Update.
12686 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12687 low-sun3.c: Remove files.
12689 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12691 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12692 (linux_detach_one_process, linux_detach): New functions.
12693 (linux_target_ops): Add linux_detach.
12694 * server.c (main): Handle 'D' packet.
12695 * target.h (struct target_ops): Add "detach" member.
12696 (detach_inferior): Define.
12698 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12700 From Kelley Cook <kelleycook@wideopenwest.com>:
12701 * configure.srv: Accept i[34567]86 variants.
12703 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12705 * linux-low.c (linux_wait_for_event): Correct comment typos.
12706 (linux_resume_one_process): Call check_removed_breakpoint.
12707 (linux_send_signal): New function.
12708 (linux_target_ops): Add linux_send_signal.
12709 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12711 * target.h (struct target_ops): Add send_signal.
12713 2003-05-29 Jim Blandy <jimb@redhat.com>
12715 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12716 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12717 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12718 away part of the register's value.
12720 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12722 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12723 (linux_wait_for_event, linux_init_signals): Likewise.
12725 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12727 * configure.in: Check for stdlib.h.
12728 * configure: Regenerated.
12729 * config.in: Regenerated.
12731 2003-01-04 Andreas Schwab <schwab@suse.de>
12733 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12735 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12737 * Makefile.in: Remove obsolete code.
12739 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12741 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12742 defined(PT_FPR0_HI).
12744 2002-11-17 Stuart Hughes <seh@zee2.com>
12746 * linux-arm-low.c (arm_num_regs): Increase.
12747 (arm_regmap): Include status register.
12749 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12751 * linux-low.c (register_addr): Remove incorrect -1 check.
12753 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12755 * linux-low.c (linux_create_inferior): Call setpgid. Return
12757 (unstopped_p, linux_signal_pid): Remove.
12758 (linux_target_ops): Remove linux_signal_pid.
12759 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12760 global instead of target method.
12761 * target.h (struct target_ops): Remove signal_pid. Update comment
12762 for create_inferior.
12763 * server.c (signal_pid): New variable.
12764 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12765 gdbserver. Set the child to be the foreground process group.
12766 (attach_inferior): Set signal_pid.
12768 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12770 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12772 2002-08-20 Jim Blandy <jimb@redhat.com>
12774 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12777 2002-08-01 Andrew Cagney <cagney@redhat.com>
12779 * Makefile.in: Make chill references obsolete.
12781 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12783 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12784 * configure: Regenerate.
12785 * config.in: Regenerate.
12787 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12789 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12790 (perror_with_name, remote_close, remote_open, expect, play): Static.
12792 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12794 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12795 byte offsets instead of an array of indexes.
12796 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12798 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12800 * regcache.c: Add comment.
12802 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12804 * thread-db.c: New file.
12805 * proc-service.c: New file.
12806 * acinclude.m4: New file.
12807 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12808 proc-service.o, and thread-db.o.
12809 (linux-low.o): Add USE_THREAD_DB.
12810 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12811 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12812 * aclocal.m4: Regenerated.
12813 * config.in: Regenerated.
12814 * configure: Regenerated.
12815 * configure.in: Check for proc_service.h, sys/procfs.h,
12816 thread_db.h, and linux/elf.h headrs.
12817 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12818 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12819 Check for -lthread_db and thread support.
12820 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12821 PowerPC, and SuperH.
12822 * i387-fp.c: Constify arguments.
12823 * i387-fp.h: Likewise.
12824 * inferiors.c: (struct thread_info): Renamed from
12825 `struct inferior_info'. Remove PID member. Use generic inferior
12826 list header. All uses updated.
12827 (inferiors, signal_pid): Removed.
12828 (all_threads): New variable.
12829 (get_thread): Define.
12830 (add_inferior_to_list): New function.
12831 (for_each_inferior): New function.
12832 (change_inferior_id): New function.
12833 (add_inferior): Removed.
12834 (remove_inferior): New function.
12835 (add_thread): New function.
12836 (free_one_thread): New function.
12837 (remove_thread): New function.
12838 (clear_inferiors): Use for_each_inferior and free_one_thread.
12839 (find_inferior): New function.
12840 (find_inferior_id): New function.
12841 (inferior_target_data): Update argument type.
12842 (set_inferior_target_data): Likewise.
12843 (inferior_regcache_data): Likewise.
12844 (set_inferior_regcache_data): Likewise.
12845 * linux-low.c (linux_bp_reinsert): Remove.
12846 (all_processes, stopping_threads, using_thrads)
12847 (struct pending_signals, debug_threads, pid_of): New.
12848 (inferior_pid): Replace with macro.
12849 (struct inferior_linux_data): Remove.
12850 (get_stop_pc, add_process): New functions.
12851 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12852 Use add_process and add_thread.
12853 (linux_attach_lwp): New function, based on old linux_attach. Use
12854 add_process and add_thread. Set stop_expected for new threads.
12855 (linux_attach): New function.
12856 (linux_kill_one_process): New function.
12857 (linux_kill): Kill all LWPs.
12858 (linux_thread_alive): Use find_inferior_id.
12859 (check_removed_breakpoints, status_pending_p): New functions.
12860 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12861 Update. Use WNOHANG. Wait for cloned processes also. Update process
12862 struct for the found process.
12863 (linux_wait_for_event): New function.
12864 (linux_wait): Use it. Support LWPs.
12865 (send_sigstop, wait_for_sigstop, stop_all_processes)
12866 (linux_resume_one_process, linux_continue_one_process): New functions.
12867 (linux_resume): Support LWPs.
12868 (REGISTER_RAW_SIZE): Remove.
12869 (fetch_register): Use register_size instead. Call supply_register.
12870 (usr_store_inferior_registers): Likewise. Call collect_register.
12871 Fix recursive case.
12872 (regsets_fetch_inferior_registers): Improve error message.
12873 (regsets_store_inferior_registers): Add debugging.
12874 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12875 (unstopped_p, linux_signal_pid): New functions.
12876 (linux_target_ops): Add linux_signal_pid.
12877 (linux_init_signals): New function.
12878 (initialize_low): Call it. Initialize using_threads.
12879 * regcache.c (inferior_regcache_data): Add valid
12881 (get_regcache): Fetch registers lazily. Add fetch argument
12882 and update all callers.
12883 (regcache_invalidate_one, regcache_invalidate): New
12885 (new_register_cache): Renamed from create_register_cache.
12886 Return the new regcache.
12887 (free_register_cache): Change argument to a void *.
12888 (registers_to_string, registers_from_string): Call get_regcache
12889 with fetch flag set.
12890 (register_data): Make static. Pass fetch flag to get_regcache.
12891 (supply_register): Call get_regcache with fetch flag clear.
12892 (collect_register): Call get_regcache with fetch flag set.
12893 (collect_register_as_string): New function.
12894 * regcache.h: Update.
12895 * remote-utils.c (putpkt): Flush after debug output and use
12897 Handle input interrupts while waiting for an ACK.
12898 (input_interrupt): Use signal_pid method.
12899 (getpkt): Flush after debug output and use stderr.
12900 (outreg): Use collect_register_as_string.
12901 (new_thread_notify, dead_thread_notify): New functions.
12902 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12903 and general_thread.
12904 (look_up_one_symbol): Flush after debug output.
12905 * server.c (step_thread, server_waiting): New variables.
12906 (start_inferior): Don't use signal_pid. Update call to mywait.
12907 (attach_inferior): Update call to mywait.
12908 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12909 (main): Don't fetch/store registers explicitly. Use
12910 set_desired_inferior. Support proposed ``Hs'' packet. Update
12912 * server.h: Update.
12913 (struct inferior_list, struct_inferior_list_entry): New.
12914 * target.c (set_desired_inferior): New.
12915 (write_inferior_memory): Constify.
12916 (mywait): New function.
12917 * target.h: Update.
12918 (struct target_ops): New signal_pid method.
12919 (mywait): Removed macro, added prototype.
12921 * linux-low.h (regset_func): Removed.
12922 (regset_fill_func, regset_store_func): New.
12923 (enum regset_type): New.
12924 (struct regset_info): Add type field. Use new operation types.
12925 (struct linux_target_ops): stop_pc renamed to get_pc.
12926 Add decr_pc_after_break and breakpoint_at.
12927 (get_process, get_thread_proess, get_process_thread)
12928 (strut process_info, all_processes, linux_attach_lwp)
12929 (thread_db_init): New.
12931 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12932 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12933 (the_low_target): Add new members.
12934 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12935 (i386_store_fpxregset): Constify.
12936 (target_regsets): Add new kind identifier.
12937 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12938 (i386_set_pc): Add debugging.
12939 (i386_breakpoint_at): New function.
12940 (the_low_target): Add new members.
12941 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12942 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12943 (mips_breakpoint_at): New.
12944 (the_low_target): Add new members.
12945 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12946 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12947 (the_low_target): Add new members.
12948 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12949 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12950 (the_low_target): Add new members.
12951 * linux-x86-64-low.c (target_regsets): Add new kind
12954 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12956 From Martin Pool <mbp@samba.org>:
12957 * server.c (gdbserver_usage): New function.
12960 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12962 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12963 stop_at -> stop_pc.
12965 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12967 * Makefile.in: Remove obsolete code.
12969 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12971 * linux-low.c (regsets_fetch_inferior_registers),
12972 (regsets_store_inferior_registers): Removed cast to int from
12974 * regcache.h: Added declaration of struct inferior_info.
12976 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12978 * inferiors.c (struct inferior_info): Add regcache_data.
12979 (add_inferior): Call create_register_cache.
12980 (clear_inferiors): Call free_register_cache.
12981 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12982 * regcache.c (struct inferior_regcache_data): New.
12983 (registers): Remove.
12984 (get_regcache): New function.
12985 (create_register_cache, free_register_cache): New functions.
12986 (set_register_cache): Don't initialize the register cache here.
12987 (registers_to_string, registers_from_string, register_data): Call
12989 * regcache.h: Add prototypes.
12990 * server.h: Likewise.
12992 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12994 * mem-break.c: New file.
12995 * mem-break.h: New file.
12996 * Makefile.in: Add mem-break.o rule; update server.h
12998 * inferiors.c (struct inferior_info): Add target_data
13000 (clear_inferiors): Free target_data member if set.
13001 (inferior_target_data, set_inferior_target_data): New functions.
13002 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13003 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13004 * linux-low.c (linux_bp_reinsert): New variable.
13005 (struct inferior_linux_data): New.
13006 (linux_create_inferior): Use set_inferior_target_data.
13007 (linux_attach): Likewise. Call add_inferior.
13008 (linux_wait_for_one_inferior): New function.
13009 (linux_wait): Call it.
13010 (linux_write_memory): Add const.
13011 (initialize_low): Call set_breakpoint_data.
13012 * linux-low.h (struct linux_target_ops): Add breakpoint
13014 * server.c (attach_inferior): Remove extra add_inferior
13016 * server.h: Include mem-break.h. Update inferior.c
13018 * target.c (read_inferior_memory)
13019 (write_inferior_memory): New functions.
13020 * target.h (read_inferior_memory)
13021 (write_inferior_memory): Change macros to prototypes.
13022 (struct target_ops): Update comments. Add const to write_memory
13025 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13027 * linux-low.c (usr_store_inferior_registers): Support
13028 registers which are allowed to fail to store.
13029 * linux-low.h (linux_target_ops): Likewise.
13030 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13031 (ppc_cannot_store_register): FPSCR may not be storable.
13033 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13035 * server.h: Include <string.h> if HAVE_STRING_H.
13036 * ChangeLog: Correct paths in last ChangeLog entry.
13038 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13040 * linux-low.h: Remove obsolete prototypes.
13041 (struct linux_target_ops): New.
13042 (extern the_low_target): New.
13043 * linux-low.c (num_regs, regmap): Remove declarations.
13044 (register_addr): Use the_low_target explicitly.
13045 (fetch_register): Likewise.
13046 (usr_fetch_inferior_registers): Likewise.
13047 (usr_store_inferior_registers): Likewise.
13048 * linux-arm-low.c (num_regs): Remove.
13049 (arm_num_regs): Define.
13050 (arm_regmap): Renamed from regmap, made static.
13051 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13053 (arm_cannot_store_register): Renamed from cannot_store_register,
13055 (the_low_target): New.
13056 * linux-i386-low.c (num_regs): Remove.
13057 (i386_num_regs): Define.
13058 (i386_regmap): Renamed from regmap, made static.
13059 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13061 (i386_cannot_store_register): Renamed from cannot_store_register,
13063 (the_low_target): New.
13064 * linux-ia64-low.c (num_regs): Remove.
13065 (ia64_num_regs): Define.
13066 (ia64_regmap): Renamed from regmap, made static.
13067 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13069 (ia64_cannot_store_register): Renamed from cannot_store_register,
13071 (the_low_target): New.
13072 * linux-m68k-low.c (num_regs): Remove.
13073 (m68k_num_regs): Define.
13074 (m68k_regmap): Renamed from regmap, made static.
13075 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13077 (m68k_cannot_store_register): Renamed from cannot_store_register,
13079 (the_low_target): New.
13080 * linux-mips-low.c (num_regs): Remove.
13081 (mips_num_regs): Define.
13082 (mips_regmap): Renamed from regmap, made static.
13083 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13085 (mips_cannot_store_register): Renamed from cannot_store_register,
13087 (the_low_target): New.
13088 * linux-ppc-low.c (num_regs): Remove.
13089 (ppc_num_regs): Define.
13090 (ppc_regmap): Renamed from regmap, made static.
13091 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13093 (ppc_cannot_store_register): Renamed from cannot_store_register,
13095 (the_low_target): New.
13096 * linux-s390-low.c (num_regs): Remove.
13097 (s390_num_regs): Define.
13098 (s390_regmap): Renamed from regmap, made static.
13099 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13101 (s390_cannot_store_register): Renamed from cannot_store_register,
13103 (the_low_target): New.
13104 * linux-sh-low.c (num_regs): Remove.
13105 (sh_num_regs): Define.
13106 (sh_regmap): Renamed from regmap, made static.
13107 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13109 (sh_cannot_store_register): Renamed from cannot_store_register,
13111 (the_low_target): New.
13112 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13113 (the_low_target): New.
13115 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13117 * Makefile.in: Add stamp-h target.
13118 * configure.in: Create stamp-h.
13119 * configure: Regenerated.
13121 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13123 * inferiors.c: New file.
13124 * target.c: New file.
13125 * target.h: New file.
13126 * Makefile.in: Add target.o and inferiors.o. Update
13128 * linux-low.c (inferior_pid): New static variable,
13129 moved from server.c.
13130 (linux_create_inferior): Renamed from create_inferior.
13131 Call add_inferior. Return 0 on success instead of a PID.
13132 (linux_attach): Renamed from myattach.
13133 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13134 (linux_thread_alive): Renamed from mythread_alive.
13135 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13137 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13138 (regsets_store_inferior_registers): Correct error message.
13139 Add missing ``return 0''.
13140 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13141 (linux_store_registers): Renamed from store_inferior_registers.
13142 (linux_read_memory): Renamed from read_inferior_memory.
13143 (linux_write_memory): Renamed from write_inferior_memory.
13144 (linux_target_ops): New structure.
13145 (initialize_low): Call set_target_ops ().
13146 * remote-utils.c (unhexify): New function.
13147 (hexify): New function.
13148 (input_interrupt): Send signals to ``signal_pid''.
13149 * server.c (inferior_pid): Remove.
13150 (start_inferior): Update create_inferior call.
13151 (attach_inferior): Call add_inferior.
13152 (handle_query): New function.
13153 (main): Call handle_query for `q' packets.
13154 * server.h: Include "target.h". Remove obsolete prototypes.
13155 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13157 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13159 * Makefile.in: Add WARN_CFLAGS. Update configury
13161 * configure.in: Check for <string.h>
13162 * configure: Regenerate.
13163 * config.in: Regenerate.
13164 * gdbreplay.c: Include needed system headers.
13165 (remote_open): Remove strchr prototype.
13166 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13167 * regcache.c (supply_register): Change buf argument to const void *.
13168 (supply_register_by_name): Likewise.
13169 (collect_register): Change buf argument to void *.
13170 (collect_register_by_name): Likewise.
13171 * regcache.h: Add missing prototypes.
13172 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13173 * server.c (handle_query): New function.
13174 (attached): New static variable, moved out of main.
13175 (main): Quiet longjmp clobber warnings.
13176 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13177 * utils.c (error): Remove NORETURN.