1 2016-01-08 Yao Qi <yao.qi@linaro.org>
3 * remote-utils.c (getpkt): If c is '\003', call target hook
6 2016-01-06 Yao Qi <yao.qi@linaro.org>
8 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
10 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
11 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
12 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
13 (thumb2_breakpoint): Declare.
14 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
16 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
17 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
18 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
20 2016-01-01 Joel Brobecker <brobecker@adacore.com>
22 * gdbreplay.c (gdbreplay_version): Change copyright year in
24 * server.c (gdbserver_version): Likewise.
26 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
28 * server.c (crc32_table): Delete.
29 (crc32): Use libiberty's xcrc32 function.
31 2015-12-22 Joel Brobecker <brobecker@adacore.com>
33 * lynx-low.c (lynx_delete_thread_callback): New function.
34 (lynx_mourn): Properly delete our process and all of its
35 threads. Remove call to clear_inferiors.
37 2015-12-22 Joel Brobecker <brobecker@adacore.com>
39 * target.c (thread_search_callback): Add check that
40 the thread_stopped target callback is not NULL before
43 2015-12-21 Yao Qi <yao.qi@linaro.org>
45 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
48 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
50 * server.c (handle_query): Call target_supports_software_single_step.
52 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
54 * linux-low.c (single_step): New function.
55 (linux_resume_one_lwp_throw): Call single_step.
56 (start_step_over): Likewise.
58 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
60 * Makefile.in (SFILES): Append arch/arm-linux.c,
61 arch/arm-get-next-pcs.c.
62 (arm-linux.o): New rule.
63 (arm-get-next-pcs.o): New rule.
64 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
66 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
67 to linux-aarch32-low.c.
68 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
69 (arm_breakpoint_len, thumb_breakpoint): Likewise.
70 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
71 (thumb2_breakpoint_len): Likewise.
72 (arm_is_thumb_mode): Make non-static.
73 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
74 from linux-aarch32-low.c.
75 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
76 (arm_breakpoint_len, thumb_breakpoint): Likewise.
77 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
78 (thumb2_breakpoint_len): Likewise.
79 (arm_is_thumb_mode): New declaration.
80 * linux-arm-low.c: Include arch/arm-linux.h
81 aarch/arm-get-next-pcs.h, sys/syscall.h.
82 (get_next_pcs_ops): New struct.
83 (get_next_pcs_addr_bits_remove): New function.
84 (get_next_pcs_is_thumb): New function.
85 (get_next_pcs_read_memory_unsigned_integer): Likewise.
86 (arm_sigreturn_next_pc): Likewise.
87 (get_next_pcs_syscall_next_pc): Likewise.
88 (arm_gdbserver_get_next_pcs): Likewise.
89 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
91 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
92 * server.h: Include gdb_vecs.h.
94 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
96 * Makefile.in (SFILES): Append common/common-regcache.c.
97 (OBS): Append common-regcache.o.
98 (common-regcache.o): New rule.
99 * regcache.c (init_register_cache): Initialize cache to
101 (regcache_raw_read_unsigned): New function.
102 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
103 register_status enum.
105 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
107 * linux-aarch64-low.c (the_low_targets): Rename
108 breakpoint_reinsert_addr to get_next_pcs.
109 * linux-arm-low.c (the_low_targets): Likewise.
110 * linux-bfin-low.c (the_low_targets): Likewise.
111 * linux-cris-low.c (the_low_targets): Likewise.
112 * linux-crisv32-low.c (the_low_targets): Likewise.
113 * linux-low.c (can_software_single_step): Likewise.
114 (install_software_single_step_breakpoints): New function.
115 (start_step_over): Use install_software_single_step_breakpoints.
116 * linux-low.h: New CORE_ADDR vector.
117 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
119 * linux-mips-low.c (the_low_targets): Likewise.
120 * linux-nios2-low.c (the_low_targets): Likewise.
121 * linux-sparc-low.c (the_low_targets): Likewise.
123 2015-12-17 Pedro Alves <palves@redhat.com>
125 * linux-low.c (linux_kill_one_lwp): Remove references to
127 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
129 (linux_init_signals): Delete.
130 (initialize_low): Adjust.
131 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
133 2015-12-16 Pedro Alves <palves@redhat.com>
135 * configure.ac (compiler warning flags): When testing a
136 -Wno-foo option, check whether -Wfoo works instead.
137 * configure: Regenerate.
139 2015-12-11 Don Breazeal <donb@codesourcery.com>
141 * server.c (process_serial_event): Don't exit from gdbserver
142 in remote mode if there are still active inferiors.
144 2015-12-11 Yao Qi <yao.qi@linaro.org>
146 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
147 arm_breakpoint_at if the process is 32-bit.
149 2015-12-11 Yao Qi <yao.qi@linaro.org>
151 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
154 2015-12-07 Yao Qi <yao.qi@linaro.org>
156 * configure.srv: Append arm.o to srv_tgtobj for
157 aarch64*-*-linux* target.
158 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
159 from linux-arm-low.c.
160 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
161 (arm_breakpoint_len, thumb_breakpoint): Likewise.
162 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
163 (thumb2_breakpoint_len): Likewise.
164 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
165 (arm_breakpoint_kinds): Likewise.
166 (arm_breakpoint_kind_from_pc): Likewise.
167 (arm_sw_breakpoint_from_kind): Likewise.
168 (arm_breakpoint_kind_from_current_state): Likewise.
169 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
170 (arm_sw_breakpoint_from_kind): Declare.
171 (arm_breakpoint_kind_from_current_state): Declare.
172 (arm_breakpoint_at): Declare.
173 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
174 arm_sw_breakpoint_from_kind if process is 32-bit.
175 (aarch64_breakpoint_kind_from_pc): New function.
176 (aarch64_breakpoint_kind_from_current_state): New function.
177 (the_low_target): Initialize fields breakpoint_kind_from_pc
178 and breakpoint_kind_from_current_state.
179 * linux-arm-low.c (arm_breakpoint_kinds): Move to
181 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
182 (arm_breakpoint, arm_breakpoint_len): Likewise.
183 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
184 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
185 (arm_is_thumb_mode): Likewise.
186 (arm_breakpoint_at): Likewise.
187 (arm_breakpoint_kind_from_pc): Likewise.
188 (arm_sw_breakpoint_from_kind): Likewise.
189 (arm_breakpoint_kind_from_current_state): Likewise.
192 2015-08-04 Yao Qi <yao.qi@linaro.org>
194 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
195 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
196 * server.c (extended_protocol): Remove "static".
197 * server.h (extended_protocol): Declare it.
199 2015-12-04 Josh Stone <jistone@redhat.com>
201 * target.h (struct target_ops) <arch_setup>: Rename to ...
202 (struct target_ops) <post_create_inferior>: ... this.
203 (target_arch_setup): Rename to ...
204 (target_post_create_inferior): ... this, calling post_create_inferior.
205 * server.c (start_inferior): Update target_arch_setup calls to
206 target_post_create_inferior.
207 * linux-low.c (linux_low_ptrace_options): Forward declare.
208 (linux_arch_setup): Update its comment for general use.
209 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
210 (struct linux_target_ops): Use linux_post_create_inferior.
211 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
212 to post_create_inferior.
213 * nto-low.c (struct nto_target_ops): Likewise.
214 * spu-low.c (struct spu_target_ops): Likewise.
215 * win32-low.c (struct win32_target_ops): Likewise.
217 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
219 * linux-arm-low.c: Remove duplicate arch/arm.h include.
221 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
223 * linux-arm-low.c (arm_reinsert_addr): Remove function.
224 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
225 * linux-cris-low.c (cris_reinsert_addr> Remove function.
226 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
227 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
228 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
229 * linux-mips-low.c (mips_reinsert_addr): Remove function.
230 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
231 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
232 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
233 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
234 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
236 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
238 * linux-low.c (linux_look_up_symbols): Don't call
239 linux_supports_traceclone.
240 * linux-low.h (thread_db_init): Remove use_events argument.
241 * thread-db.c (thread_db_use_event): Remove global variable.
242 (struct thread_db) <td_thr_event_enable_p>: Remove field.
243 (struct thread_db) <td_create_bp>: Remove field.
244 (thread_db_create_event): Remove function.
245 (thread_db_enable_reporting): Likewise.
246 (find_one_thread): Don't check for thread_db_use_events.
247 (attach_thread): Likewise.
248 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
249 (try_thread_db_load_1): Don't check for thread_db_use_events.
250 (thread_db_init): Remove use_events argument and thread events
252 (remove_thread_event_breakpoints): Remove function.
253 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
255 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
257 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
259 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
260 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
261 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
262 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
263 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
265 * linux-crisv32-low.c (cris_supports_hardware_single_step):
267 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
268 * linux-low.c (can_hardware_single_step): Use
269 supports_hardware_single_step.
270 (can_software_single_step): New function.
271 (start_step_over): Call can_software_single_step.
272 (linux_supports_hardware_single_step): New function.
273 (struct target_ops) <supports_software_single_step>: Initialize.
274 * linux-low.h (struct linux_target_ops)
275 <supports_hardware_single_step>: Initialize.
276 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
277 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
278 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
279 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
280 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
281 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
282 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
283 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
284 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
285 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
287 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
288 (struct linux_target_ops) <tile_supports_hardware_single_step>:
290 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
291 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
292 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
294 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
295 * target.h (struct target_ops): <supports_software_single_step>:
297 (target_supports_software_single_step): New macro.
299 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
301 * linux-low.c (linux_wait_1): Fix pc advance condition.
302 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
303 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
305 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
307 * linux-arm-low.c (arm_is_thumb_mode): New function.
308 (arm_breakpoint_at): Use arm_is_thumb_mode.
309 (arm_breakpoint_kind_from_current_state): New function.
310 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
312 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
313 (linux_breakpoint_kind_from_current_state): New function.
314 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
315 * linux-low.h (struct linux_target_ops)
316 <breakpoint_kind_from_current_state>: New field.
317 * target.h (struct target_ops): Likewise.
318 (target_breakpoint_kind_from_current_state): New macro.
320 2015-11-30 Pedro Alves <palves@redhat.com>
322 * linux-low.c (linux_resume): Wake up the event loop before
325 2015-11-30 Pedro Alves <palves@redhat.com>
327 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
329 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
331 * target.c (struct thread_search): New structure.
332 (thread_search_callback): New function.
333 (prev_general_thread): New global.
334 (prepare_to_access_memory, done_accessing_memory): New functions.
335 * target.h (prepare_to_access_memory, done_accessing_memory):
336 Replace macros with function declarations.
338 2015-11-30 Pedro Alves <palves@redhat.com>
341 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
342 report TARGET_WAITKIND_NO_RESUMED.
343 * remote-utils.c (prepare_resume_reply): Handle
344 TARGET_WAITKIND_NO_RESUMED.
345 * server.c (report_no_resumed): New global.
346 (handle_query) <qSupported>: Handle "no-resumed+". Report
347 "no-resumed+" support.
348 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
349 return error if the client doesn't support no-resumed events.
350 (push_stop_notification): New function.
351 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
352 events if the client supports them.
354 2015-11-30 Pedro Alves <palves@redhat.com>
356 * linux-low.c (thread_still_has_status_pending_p): Don't check
358 (lwp_resumed): New function.
359 (status_pending_p_callback): Return early if the LWP is not
360 supposed to be resumed.
362 2015-11-30 Pedro Alves <palves@redhat.com>
364 * linux-low.c (handle_extended_wait): Assert that the LWP's
365 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
366 thread create events, leave the new child's status pending.
367 (linux_low_filter_event): If GDB wants to hear about thread exit
368 events, leave the LWP marked dead and don't delete it.
369 (linux_wait_for_event_filtered): Don't check for thread exit.
370 (filter_exit_event): New function.
371 (linux_wait_1): Use it, when returning an exit event.
372 (linux_resume_one_lwp_throw): Assert that the LWP's
373 waitstatus is TARGET_WAITKIND_IGNORE.
374 * remote-utils.c (prepare_resume_reply): Handle
375 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
376 * server.c (report_thread_events): New global.
377 (handle_general_set): Handle QThreadEvents.
378 (handle_query) <qSupported>: Handle and report QThreadEvents+;
379 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
380 TARGET_WAITKIND_THREAD_EXITED.
381 * server.h (report_thread_events): Declare.
383 2015-11-30 Pedro Alves <palves@redhat.com>
385 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
386 the thread's last_resume_kind was resume_stop.
388 2015-11-30 Pedro Alves <palves@redhat.com>
390 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
393 2015-11-30 Pedro Alves <palves@redhat.com>
395 * server.c (handle_v_requests): Handle vCtrlC.
397 2015-11-30 Pedro Alves <palves@redhat.com>
399 * gdbthread.h (find_any_thread_of_pid): Declare.
400 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
402 * server.c (handle_query): If current_thread is NULL, look for
403 another thread of the selected process.
405 2015-11-26 Daniel Colascione <dancol@dancol.org>
406 Simon Marchi <simon.marchi@ericsson.com>
408 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
409 * server.c (handle_qxfer_threads_worker): Refactor to include thread
411 * target.h (struct target_ops) <thread_name>: New field.
412 (target_thread_name): New macro.
414 2015-11-23 Joel Brobecker <brobecker@adacore.com>
416 * regcache.h (regcache_invalidate_pid): Add declaration.
417 * regcache.c (regcache_invalidate_pid): New function, extracted
418 from regcache_invalidate.
419 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
420 Add trivial documentation comment.
421 * lynx-low.c: Use regcache_invalidate_pid instead of
424 2015-11-23 Joel Brobecker <brobecker@adacore.com>
426 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
427 and Elf64_auxv_t if the target is Android.
429 2015-11-22 Doug Evans <xdje42@gmail.com>
431 * target.h: #include <sys/types.h>.
433 2015-11-19 Pedro Alves <palves@redhat.com>
435 * linux-low.c (linux_process_qsupported): Change prototype.
437 * linux-low.h (struct linux_target_ops) <process_qsupported>:
439 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
440 and adjust to loop over all features.
441 * server.c (handle_query) <qSupported>: Adjust to call
442 target_process_qsupported once, passing it a vector of unprocessed
444 * target.h (struct target_ops) <process_qsupported>: Change
446 (target_process_qsupported): Adjust.
448 2015-11-19 Pedro Alves <palves@redhat.com>
450 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
452 * configure: Regenerate.
454 2015-11-19 Pedro Alves <palves@redhat.com>
456 * configure: Regenerate.
458 2015-11-19 Yao Qi <yao.qi@linaro.org>
460 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
463 2015-11-19 Yao Qi <yao.qi@linaro.org>
465 * linux-aarch64-low.c (enum aarch64_operand_type): New.
466 (struct aarch64_operand): Move enum out.
468 2015-11-19 Yao Qi <yao.qi@linaro.org>
470 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
471 struct user_fpsimd_state *.
472 (aarch64_store_fpregset): Likewise.
474 2015-11-19 Yao Qi <yao.qi@linaro.org>
476 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
477 struct user_pt_regs *.
478 (aarch64_store_gregset): Likewise.
480 2015-11-18 Pedro Alves <palves@redhat.com>
482 * Makefile.in (all_object_files): Add $IPA_OBJS.
484 2015-11-17 Pedro Alves <palves@redhat.com>
486 * win32-low.c (win32_resume): Use gdb_signal_from_host,
487 GDB_SIGNAL_0 and gdb_signal_to_string.
489 2015-11-17 Pedro Alves <palves@redhat.com>
491 * win32-low.c (handle_output_debug_string): Remove parameter.
492 (win32_kill): Remove our_status local and adjust call to
493 handle_output_debug_string.
494 (get_child_debug_event): Adjust call to
495 handle_output_debug_string.
497 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
499 * linux-mips-low.c (mips_fill_gregset): Add cast.
500 (mips_store_gregset): Likewise.
501 (mips_fill_fpregset): Likewise.
502 (mips_store_fpregset): Likewise.
504 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
506 * linux-mips-low.c (mips_add_watchpoint): Rename private to
509 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
511 * linux-mips-low.c (mips_linux_new_thread): Change type of
512 watch_type to enum target_hw_bp_type.
514 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
516 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
517 Change return type to arm_hwbp_type.
519 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
521 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
522 (arm_store_gregset): Likewise.
523 * linux-arm-low.c (arm_get_hwcap): Likewise.
524 (arm_read_description): Likewise.
526 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
528 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
530 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
532 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
533 (ppc_fill_vsxregset): Likewise.
534 (ppc_store_vsxregset): Likewise.
535 (ppc_fill_vrregset): Likewise.
536 (ppc_store_vrregset): Likewise.
537 (ppc_fill_evrregset): Likewise.
538 (ppc_store_evrregset): Likewise.
540 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
542 * linux-ppc-low.c (ppc_usrregs_info): Remove
544 (ppc_arch_setup): Move lower in file.
546 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
548 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
549 (ps_pdwrite): Likewise.
551 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
553 * linux-arm-low.c (arm_new_thread): Move pointer dereference
554 to after assert checks.
556 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
558 * proc-service.c (ps_pdread): Add/adjust casts.
559 (ps_pdwrite): Add/adjust casts.
561 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
563 * server.c (handle_search_memory_1): Cast return value of
566 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
568 * server.c (write_qxfer_response): Change type of data to
571 2015-10-29 Pedro Alves <palves@redhat.com>
573 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
575 2015-10-29 Pedro Alves <palves@redhat.com>
577 * tracepoint.c (clear_installed_tracepoints): Add casts.
579 2015-10-29 Pedro Alves <palves@redhat.com>
581 * server.c (handle_v_cont, process_serial_event): Add enum
582 gdb_signal casts to signal parsing code.
584 2015-10-29 Pedro Alves <palves@redhat.com>
586 * linux-low.h (NULL_REGSET): Define.
587 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
588 * linux-arm-low.c (arm_regsets): Likewise.
589 * linux-crisv32-low.c (cris_regsets): Likewise.
590 * linux-m68k-low.c (m68k_regsets): Likewise.
591 * linux-mips-low.c (mips_regsets): Likewise.
592 * linux-nios2-low.c (nios2_regsets): Likewise.
593 * linux-ppc-low.c (ppc_regsets): Likewise.
594 * linux-s390-low.c (s390_regsets): Likewise.
595 * linux-sh-low.c (sh_regsets): Likewise.
596 * linux-sparc-low.c (sparc_regsets): Likewise.
597 * linux-tic6x-low.c (tic6x_regsets): Likewise.
598 * linux-tile-low.c (tile_regsets): Likewise.
599 * linux-x86-low.c (x86_regsets): Likewise.
600 * linux-xtensa-low.c (xtensa_regsets): Likewise.
602 2015-10-29 Pedro Alves <palves@redhat.com>
604 * linux-low.h (NULL_REGSET): Define.
605 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
606 * linux-arm-low.c (arm_regsets): Likewise.
607 * linux-crisv32-low.c (cris_regsets): Likewise.
608 * linux-m68k-low.c (m68k_regsets): Likewise.
609 * linux-mips-low.c (mips_regsets): Likewise.
610 * linux-nios2-low.c (nios2_regsets): Likewise.
611 * linux-ppc-low.c (ppc_regsets): Likewise.
612 * linux-s390-low.c (s390_regsets): Likewise.
613 * linux-sh-low.c (sh_regsets): Likewise.
614 * linux-sparc-low.c (sparc_regsets): Likewise.
615 * linux-tic6x-low.c (tic6x_regsets): Likewise.
616 * linux-tile-low.c (tile_regsets): Likewise.
617 * linux-x86-low.c (x86_regsets): Likewise.
618 * linux-xtensa-low.c (xtensa_regsets): Likewise.
620 2015-10-26 Doug Evans <dje@google.com>
622 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
624 2015-10-26 Doug Evans <dje@google.com>
626 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
628 2015-10-26 Doug Evans <dje@google.com>
630 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
632 (attach_thread, find_new_threads_callback): Ditto.
634 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
636 * mem-break.h (set_breakpoint_data): Remove.
638 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
640 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
641 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
642 (initialize_low): Remove set_breakpoint_data call.
643 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
644 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
645 (initialize_low): Remove set_breakpoint_data call.
646 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
647 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
648 (initialize_low): Remove set_breakpoint_data call.
650 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
652 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
653 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
654 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
655 * target.h (target_breakpoint_kind_from_pc): New macro.
657 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
659 * linux-low.c (default_breakpoint_kind_from_pc): New function.
660 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
661 the default breakpoint kind.
663 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
665 * linux-arm-low.c (arm_supports_z_point_type): Add software
668 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
670 * linux-arm-low.c: Refactor breakpoint definitions.
671 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
672 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
674 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
676 * Makefile.in: Add arm.c/o.
677 * configure.srv: Likewise.
678 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
679 (arm_breakpoint_kind_from_pc): New function.
680 (arm_sw_breakpoint_from_kind): Return proper kind.
681 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
683 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
685 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
687 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
688 (struct raw_breakpoint) <size>: Remove.
689 (struct raw_breakpoint) <kind>: Add.
690 (bp_size): New function.
691 (bp_opcode): Likewise.
692 (find_raw_breakpoint_at): Adjust for kind.
693 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
694 (remove_memory_breakpoint): Adjust for kind call bp_size.
695 (set_raw_breakpoint_at): Adjust for kind.
696 (set_breakpoint): Likewise.
697 (set_breakpoint_at): Call breakpoint_kind_from_pc.
698 (delete_raw_breakpoint): Adjust for kind.
699 (delete_breakpoint): Likewise.
700 (find_gdb_breakpoint): Likewise.
701 (set_gdb_breakpoint_1): Likewise.
702 (set_gdb_breakpoint): Likewise.
703 (delete_gdb_breakpoint_1): Likewise.
704 (delete_gdb_breakpoint): Likewise.
705 (uninsert_raw_breakpoint): Likewise.
706 (reinsert_raw_breakpoint): Likewise.
707 (set_breakpoint_data): Remove.
708 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
709 (check_mem_read): Adjust for kind call bp_size.
710 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
711 (clone_one_breakpoint): Adjust for kind.
712 * mem-break.h (set_gdb_breakpoint): Likewise.
713 (delete_gdb_breakpoint): Likewise.
714 * server.c (process_serial_event): Likewise.
716 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
718 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
719 (struct linux_target_ops) <breakpoint>: Remove.
720 (struct linux_target_ops) <breakpoint_len>: Remove.
721 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
722 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
723 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
724 (arm_sw_breakpoint_from_kind): New function.
725 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
726 (struct linux_target_ops) <breakpoint>: Remove.
727 (struct linux_target_ops) <breakpoint_len>: Remove.
728 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
729 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
730 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
731 (struct linux_target_ops) <breakpoint>: Remove.
732 (struct linux_target_ops) <breakpoint_len>: Remove.
733 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
734 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
735 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
736 (struct linux_target_ops) <breakpoint>: Remove.
737 (struct linux_target_ops) <breakpoint_len>: Remove.
738 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
739 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
740 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
741 and sw_breakpoint_from_kind to increment the pc.
742 (linux_breakpoint_kind_from_pc): New function.
743 (linux_sw_breakpoint_from_kind): New function.
744 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
745 (initialize_low): Call breakpoint_kind_from_pc and
746 sw_breakpoint_from_kind to replace breakpoint_data/len.
747 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
749 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
750 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
751 (struct linux_target_ops) <breakpoint>: Remove.
752 (struct linux_target_ops) <breakpoint_len>: Remove.
753 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
754 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
755 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
756 (struct linux_target_ops) <breakpoint>: Remove.
757 (struct linux_target_ops) <breakpoint_len>: Remove.
758 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
759 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
760 * linux-mips-low.c (mips_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-nios2-low.c (nios2_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.
770 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
771 (struct linux_target_ops) <breakpoint>: Remove.
772 (struct linux_target_ops) <breakpoint_len>: Remove.
773 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
774 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
775 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
776 (struct linux_target_ops) <breakpoint>: Remove.
777 (struct linux_target_ops) <breakpoint_len>: Remove.
778 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
779 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
780 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
781 (struct linux_target_ops) <breakpoint>: Remove.
782 (struct linux_target_ops) <breakpoint_len>: Remove.
783 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
784 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
785 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
786 (struct linux_target_ops) <breakpoint>: Remove.
787 (struct linux_target_ops) <breakpoint_len>: Remove.
788 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
789 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
790 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
791 (struct linux_target_ops) <breakpoint>: Remove.
792 (struct linux_target_ops) <breakpoint_len>: Remove.
793 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
794 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
795 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
796 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
797 (struct linux_target_ops) <breakpoint>: Remove.
798 (struct linux_target_ops) <breakpoint_len>: Remove.
799 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
800 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
801 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
802 (struct linux_target_ops) <breakpoint>: Remove.
803 (struct linux_target_ops) <breakpoint_len>: Remove.
804 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
805 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
807 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
809 * linux-cris-low.c (cris_get_pc): Remove void arg.
811 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
813 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
816 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
818 * inferiors.c (thread_pid_matches_callback): New function.
819 (find_thread_process): New function.
820 (remove_thread): Reset current_thread.
821 (remove_process): Assert threads have been removed first.
823 2015-10-15 Yao Qi <yao.qi@linaro.org>
825 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
827 (aarch64_remove_point): Likewise.
828 * regcache.c (regcache_register_size): New function.
830 2015-10-12 Yao Qi <yao.qi@linaro.org>
832 * linux-aarch64-low.c: Update all callers as emit_load_store
833 is renamed to aarch64_emit_load_store.
835 2015-10-12 Yao Qi <yao.qi@linaro.org>
837 * linux-aarch64-low.c: Update all callers of function renaming
838 from emit_insn to aarch64_emit_insn.
840 2015-10-12 Yao Qi <yao.qi@linaro.org>
842 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
844 (struct aarch64_memory_operand): Likewise.
846 (emit_insn): Move to arch/aarch64-insn.c.
847 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
848 (emit_load_store): Move to arch/aarch64-insn.c.
849 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
850 (can_encode_int32): Remove.
852 2015-10-12 Yao Qi <yao.qi@linaro.org>
854 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
855 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
856 (aarch64_relocate_instruction): Likewise.
857 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
858 (struct aarch64_insn_visitor): Likewise.
860 2015-10-12 Yao Qi <yao.qi@linaro.org>
862 * linux-aarch64-low.c (struct aarch64_insn_data): New.
863 (struct aarch64_insn_visitor): New.
864 (struct aarch64_insn_relocation_data): New.
865 (aarch64_ftrace_insn_reloc_b): New function.
866 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
867 (aarch64_ftrace_insn_reloc_cb): Likewise.
868 (aarch64_ftrace_insn_reloc_tb): Likewise.
869 (aarch64_ftrace_insn_reloc_adr): Likewise.
870 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
871 (aarch64_ftrace_insn_reloc_others): Likewise.
873 (aarch64_relocate_instruction): Use visitor.
875 2015-10-12 Yao Qi <yao.qi@linaro.org>
877 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
878 int. Add argument buf.
879 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
880 aarch64_relocate_instruction.
882 2015-10-12 Yao Qi <yao.qi@linaro.org>
884 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
885 argument insn. Remove local variable insn. Don't call
887 (aarch64_install_fast_tracepoint_jump_pad): Call
890 2015-09-30 Yao Qi <yao.qi@linaro.org>
892 * linux-aarch64-low.c (emit_movk): Shorten a long line.
893 (emit_load_store_pair): Likewise.
895 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
897 * dll.c (match_dll): Add cast(s).
898 (unloaded_dll): Likewise.
899 * linux-low.c (second_thread_of_pid_p): Likewise.
900 (delete_lwp_callback): Likewise.
901 (count_events_callback): Likewise.
902 (select_event_lwp_callback): Likewise.
903 (linux_set_resume_request): Likewise.
904 * server.c (accumulate_file_name_length): Likewise.
905 (emit_dll_description): Likewise.
906 (handle_qxfer_threads_worker): Likewise.
907 (visit_actioned_threads): Likewise.
908 * thread-db.c (any_thread_of): Likewise.
909 * tracepoint.c (same_process_p): Likewise.
910 (match_blocktype): Likewise.
911 (build_traceframe_info_xml): Likewise.
913 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
915 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
917 (gdb_unparse_agent_expr): Likewise.
918 * hostio.c (require_data): Likewise.
919 (handle_pread): Likewise.
920 * linux-low.c (disable_regset): Likewise.
921 (fetch_register): Likewise.
922 (store_register): Likewise.
923 (get_dynamic): Likewise.
924 (linux_qxfer_libraries_svr4): Likewise.
925 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
926 (set_fast_tracepoint_jump): Likewise.
927 (uninsert_fast_tracepoint_jumps_at): Likewise.
928 (reinsert_fast_tracepoint_jumps_at): Likewise.
929 (validate_inserted_breakpoint): Likewise.
930 (clone_agent_expr): Likewise.
931 * regcache.c (init_register_cache): Likewise.
932 * remote-utils.c (putpkt_binary_1): Likewise.
933 (decode_M_packet): Likewise.
934 (decode_X_packet): Likewise.
935 (look_up_one_symbol): Likewise.
936 (relocate_instruction): Likewise.
937 (monitor_output): Likewise.
938 * server.c (handle_search_memory): Likewise.
939 (handle_qxfer_exec_file): Likewise.
940 (handle_qxfer_libraries): Likewise.
941 (handle_qxfer): Likewise.
942 (handle_query): Likewise.
943 (handle_v_cont): Likewise.
944 (handle_v_run): Likewise.
945 (captured_main): Likewise.
946 * target.c (write_inferior_memory): Likewise.
947 * thread-db.c (try_thread_db_load_from_dir): Likewise.
948 * tracepoint.c (init_trace_buffer): Likewise.
949 (add_tracepoint_action): Likewise.
950 (add_traceframe): Likewise.
951 (add_traceframe_block): Likewise.
952 (cmd_qtdpsrc): Likewise.
953 (cmd_qtdv): Likewise.
954 (cmd_qtstatus): Likewise.
955 (response_source): Likewise.
956 (response_tsv): Likewise.
957 (cmd_qtnotes): Likewise.
958 (gdb_collect): Likewise.
959 (initialize_tracepoint): Likewise.
961 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
963 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
964 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
965 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
967 (enum aarch64_condition_codes): New enum.
968 (w0): New static global.
971 (struct aarch64_memory_operand) <type>: New
972 MEMORY_OPERAND_POSTINDEX type.
973 (postindex_memory_operand): New helper function.
974 (emit_ret): New function.
975 (emit_load_store_pair): New function, factored out of emit_stp
976 with support for MEMORY_OPERAND_POSTINDEX.
977 (emit_stp): Rewrite using emit_load_store_pair.
978 (emit_ldp): New function.
979 (emit_load_store): Likewise.
980 (emit_ldr): Mention post-index instruction in comment.
981 (emit_ldrh): New function.
982 (emit_ldrb): New function.
983 (emit_ldrsw): Mention post-index instruction in comment.
984 (emit_str): Likewise.
985 (emit_subs): New function.
986 (emit_cmp): Likewise.
987 (emit_and): Likewise.
988 (emit_orr): Likewise.
989 (emit_orn): Likewise.
990 (emit_eor): Likewise.
991 (emit_mvn): Likewise.
992 (emit_lslv): Likewise.
993 (emit_lsrv): Likewise.
994 (emit_asrv): Likewise.
995 (emit_mul): Likewise.
996 (emit_sbfm): Likewise.
997 (emit_sbfx): Likewise.
998 (emit_ubfm): Likewise.
999 (emit_ubfx): Likewise.
1000 (emit_csinc): Likewise.
1001 (emit_cset): Likewise.
1002 (emit_nop): Likewise.
1003 (emit_ops_insns): New helper function.
1004 (emit_pop): Likewise.
1005 (emit_push): Likewise.
1006 (aarch64_emit_prologue): New function.
1007 (aarch64_emit_epilogue): Likewise.
1008 (aarch64_emit_add): Likewise.
1009 (aarch64_emit_sub): Likewise.
1010 (aarch64_emit_mul): Likewise.
1011 (aarch64_emit_lsh): Likewise.
1012 (aarch64_emit_rsh_signed): Likewise.
1013 (aarch64_emit_rsh_unsigned): Likewise.
1014 (aarch64_emit_ext): Likewise.
1015 (aarch64_emit_log_not): Likewise.
1016 (aarch64_emit_bit_and): Likewise.
1017 (aarch64_emit_bit_or): Likewise.
1018 (aarch64_emit_bit_xor): Likewise.
1019 (aarch64_emit_bit_not): Likewise.
1020 (aarch64_emit_equal): Likewise.
1021 (aarch64_emit_less_signed): Likewise.
1022 (aarch64_emit_less_unsigned): Likewise.
1023 (aarch64_emit_ref): Likewise.
1024 (aarch64_emit_if_goto): Likewise.
1025 (aarch64_emit_goto): Likewise.
1026 (aarch64_write_goto_address): Likewise.
1027 (aarch64_emit_const): Likewise.
1028 (aarch64_emit_call): Likewise.
1029 (aarch64_emit_reg): Likewise.
1030 (aarch64_emit_pop): Likewise.
1031 (aarch64_emit_stack_flush): Likewise.
1032 (aarch64_emit_zero_ext): Likewise.
1033 (aarch64_emit_swap): Likewise.
1034 (aarch64_emit_stack_adjust): Likewise.
1035 (aarch64_emit_int_call_1): Likewise.
1036 (aarch64_emit_void_call_2): Likewise.
1037 (aarch64_emit_eq_goto): Likewise.
1038 (aarch64_emit_ne_goto): Likewise.
1039 (aarch64_emit_lt_goto): Likewise.
1040 (aarch64_emit_le_goto): Likewise.
1041 (aarch64_emit_gt_goto): Likewise.
1042 (aarch64_emit_ge_got): Likewise.
1043 (aarch64_emit_ops_impl): New static global variable.
1044 (aarch64_emit_ops): New target function, return
1045 &aarch64_emit_ops_impl.
1046 (struct linux_target_ops): Install it.
1048 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1050 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1051 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1053 * linux-aarch64-ipa.c: New file.
1054 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1056 (aarch64_get_thread_area): New target method.
1057 (extract_signed_bitfield): New helper function.
1058 (aarch64_decode_ldr_literal): New function.
1059 (enum aarch64_opcodes): New enum.
1060 (struct aarch64_register): New struct.
1061 (struct aarch64_operand): New struct.
1062 (x0): New static global.
1071 (aarch64_register): New helper function.
1072 (register_operand): Likewise.
1073 (immediate_operand): Likewise.
1074 (struct aarch64_memory_operand): New struct.
1075 (offset_memory_operand): New helper function.
1076 (preindex_memory_operand): Likewise.
1077 (enum aarch64_system_control_registers): New enum.
1078 (ENCODE): New macro.
1079 (emit_insn): New helper function.
1080 (emit_b): New function.
1081 (emit_bcond): Likewise.
1082 (emit_cb): Likewise.
1083 (emit_tb): Likewise.
1084 (emit_blr): Likewise.
1085 (emit_stp): Likewise.
1086 (emit_ldp_q_offset): Likewise.
1087 (emit_stp_q_offset): Likewise.
1088 (emit_load_store): Likewise.
1089 (emit_ldr): Likewise.
1090 (emit_ldrsw): Likewise.
1091 (emit_str): Likewise.
1092 (emit_ldaxr): Likewise.
1093 (emit_stxr): Likewise.
1094 (emit_stlr): Likewise.
1095 (emit_data_processing_reg): Likewise.
1096 (emit_data_processing): Likewise.
1097 (emit_add): Likewise.
1098 (emit_sub): Likewise.
1099 (emit_mov): Likewise.
1100 (emit_movk): Likewise.
1101 (emit_mov_addr): Likewise.
1102 (emit_mrs): Likewise.
1103 (emit_msr): Likewise.
1104 (emit_sevl): Likewise.
1105 (emit_wfe): Likewise.
1106 (append_insns): Likewise.
1107 (can_encode_int32_in): New helper function.
1108 (aarch64_relocate_instruction): New function.
1109 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1110 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1111 (struct linux_target_ops): Install aarch64_get_thread_area,
1112 aarch64_install_fast_tracepoint_jump_pad and
1113 aarch64_get_min_fast_tracepoint_insn_len.
1115 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1117 * Makefile.in (aarch64-insn.o): New rule.
1118 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1120 2015-09-21 Yao Qi <yao.qi@linaro.org>
1122 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1124 2015-09-21 Yao Qi <yao.qi@linaro.org>
1126 * tracepoint.c (max_jump_pad_size): Remove.
1128 2015-09-18 Yao Qi <yao.qi@linaro.org>
1130 * linux-aarch64-low.c: Don't include sys/uio.h.
1131 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1133 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1135 * tracepoint.c (eval_result_type): Change prototype.
1136 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1138 2015-09-15 Pedro Alves <palves@redhat.com>
1140 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1141 Check whether to report exec events instead of checking whether
1142 multiprocess is enabled.
1144 2015-09-15 Pedro Alves <palves@redhat.com>
1147 * remote-utils.c (prepare_resume_reply): Merge
1148 TARGET_WAITKIND_VFORK_DONE switch case with the
1149 TARGET_WAITKIND_FORKED case.
1151 2015-09-15 Yao Qi <yao.qi@linaro.org>
1153 * server.c (handle_query): Check string comparison using
1154 "else if" instead of "if".
1156 2015-09-15 Yao Qi <yao.qi@linaro.org>
1158 * server.c (vCont_supported): New global variable.
1159 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1160 matches. Append ";vContSupported+" to own_buf.
1161 (handle_v_requests): Append ";s;S" to own_buf if target supports
1162 hardware single step or vCont_supported is false.
1163 (capture_main): Set vCont_supported to zero.
1165 2015-09-15 Yao Qi <yao.qi@linaro.org>
1167 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1169 (linux_supports_hardware_single_step): ... New function.
1170 (linux_target_ops): Update.
1171 * lynx-low.c (lynx_target_ops): Set field
1172 supports_hardware_single_step to target_can_do_hardware_single_step.
1173 * nto-low.c (nto_target_ops): Likewise.
1174 * spu-low.c (spu_target_ops): Likewise.
1175 * win32-low.c (win32_target_ops): Likewise.
1176 * target.c (target_can_do_hardware_single_step): New function.
1177 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1178 Remove. <supports_hardware_single_step>: New field.
1179 (target_supports_conditional_breakpoints): Remove.
1180 (target_supports_hardware_single_step): New macro.
1181 (target_can_do_hardware_single_step): Declare.
1182 * server.c (handle_query): Use target_supports_hardware_single_step
1183 instead of target_supports_conditional_breakpoints.
1185 2015-09-15 Yao Qi <yao.qi@linaro.org>
1187 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1189 (struct linux_target_ops the_low_target): Install
1190 aarch64_linux_siginfo_fixup.
1192 2015-09-11 Don Breazeal <donb@codesourcery.com>
1193 Luis Machado <lgustavo@codesourcery.com>
1195 * linux-low.c (linux_mourn): Static declaration.
1196 (linux_arch_setup): Move in front of
1197 handle_extended_wait.
1198 (linux_arch_setup_thread): New function.
1199 (handle_extended_wait): Handle exec events. Call
1200 linux_arch_setup_thread. Make event_lwp argument a
1201 pointer-to-a-pointer.
1202 (check_zombie_leaders): Do not check stopped threads.
1203 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1204 (linux_low_filter_event): Add lwp and thread for exec'ing
1205 non-leader thread if leader thread has been deleted.
1206 Refactor code into linux_arch_setup_thread and call it.
1207 Pass child lwp pointer by reference to handle_extended_wait.
1208 (linux_wait_for_event_filtered): Update comment.
1209 (linux_wait_1): Prevent clobbering exec event status.
1210 (linux_supports_exec_events): New function.
1211 (linux_target_ops) <supports_exec_events>: Initialize new member.
1212 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1214 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1215 * server.c (report_exec_events): New global variable.
1216 (handle_query): Handle qSupported query for exec-events feature.
1217 (captured_main): Initialize report_exec_events.
1218 * server.h (report_exec_events): Declare new global variable.
1219 * target.h (struct target_ops) <supports_exec_events>: New
1221 (target_supports_exec_events): New macro.
1222 * win32-low.c (win32_target_ops) <supports_exec_events>:
1223 Initialize new member.
1225 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1227 * linux-low.c (linux_low_enable_btrace): Remove.
1228 (linux_target_ops): Replace linux_low_enable_btrace with
1229 linux_enable_btrace.
1231 2015-09-03 Yao Qi <yao.qi@linaro.org>
1233 * linux-aarch64-low.c (aarch64_insert_point): Call
1234 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1237 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1239 * linux-low.c (check_stopped_by_breakpoint): Use
1240 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1242 2015-08-27 Pedro Alves <palves@redhat.com>
1244 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1246 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1248 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1249 the XNEW-family equivalent.
1250 (compile_bytecodes): Likewise.
1251 * dll.c (loaded_dll): Likewise.
1252 * event-loop.c (append_callback_event): Likewise.
1253 (create_file_handler): Likewise.
1254 (create_file_event): Likewise.
1255 * hostio.c (handle_open): Likewise.
1256 * inferiors.c (add_thread): Likewise.
1257 (add_process): Likewise.
1258 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1259 * linux-arm-low.c (arm_new_process): Likewise.
1260 (arm_new_thread): Likewise.
1261 * linux-low.c (add_to_pid_list): Likewise.
1262 (linux_add_process): Likewise.
1263 (handle_extended_wait): Likewise.
1264 (add_lwp): Likewise.
1265 (enqueue_one_deferred_signal): Likewise.
1266 (enqueue_pending_signal): Likewise.
1267 (linux_resume_one_lwp_throw): Likewise.
1268 (linux_resume_one_thread): Likewise.
1269 (linux_read_memory): Likewise.
1270 (linux_write_memory): Likewise.
1271 * linux-mips-low.c (mips_linux_new_process): Likewise.
1272 (mips_linux_new_thread): Likewise.
1273 (mips_add_watchpoint): Likewise.
1274 * linux-x86-low.c (initialize_low_arch): Likewise.
1275 * lynx-low.c (lynx_add_process): Likewise.
1276 * mem-break.c (set_raw_breakpoint_at): Likewise.
1277 (set_breakpoint): Likewise.
1278 (add_condition_to_breakpoint): Likewise.
1279 (add_commands_to_breakpoint): Likewise.
1280 (clone_agent_expr): Likewise.
1281 (clone_one_breakpoint): Likewise.
1282 * regcache.c (new_register_cache): Likewise.
1283 * remote-utils.c (look_up_one_symbol): Likewise.
1284 * server.c (queue_stop_reply): Likewise.
1285 (start_inferior): Likewise.
1286 (queue_stop_reply_callback): Likewise.
1287 (handle_target_event): Likewise.
1288 * spu-low.c (fetch_ppc_memory): Likewise.
1289 (store_ppc_memory): Likewise.
1290 * target.c (set_target_ops): Likewise.
1291 * thread-db.c (thread_db_load_search): Likewise.
1292 (try_thread_db_load_1): Likewise.
1293 * tracepoint.c (add_tracepoint): Likewise.
1294 (add_tracepoint_action): Likewise.
1295 (create_trace_state_variable): Likewise.
1296 (cmd_qtdpsrc): Likewise.
1297 (cmd_qtro): Likewise.
1298 (add_while_stepping_state): Likewise.
1299 * win32-low.c (child_add_thread): Likewise.
1300 (get_image_name): Likewise.
1302 2015-08-25 Yao Qi <yao.qi@linaro.org>
1304 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1306 2015-08-25 Yao Qi <yao.qi@linaro.org>
1308 * Makefile.in (aarch64-linux.o): New rule.
1309 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1311 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1312 (aarch64_init_debug_reg_state): Make it extern.
1313 (aarch64_linux_prepare_to_resume): Remove.
1315 2015-08-25 Yao Qi <yao.qi@linaro.org>
1317 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1318 lwp_arch_private_info and ptid_of_lwp.
1320 2015-08-25 Yao Qi <yao.qi@linaro.org>
1322 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1323 Find proc_info by find_process_pid. All callers updated.
1325 2015-08-25 Yao Qi <yao.qi@linaro.org>
1327 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1329 (debug_reg_change_callback): Remove.
1330 (aarch64_notify_debug_reg_change): Remove.
1332 2015-08-25 Yao Qi <yao.qi@linaro.org>
1334 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1335 Call current_lwp_ptid.
1337 2015-08-25 Yao Qi <yao.qi@linaro.org>
1339 * linux-aarch64-low.c (debug_reg_change_callback): Use
1342 2015-08-25 Yao Qi <yao.qi@linaro.org>
1344 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1346 2015-08-25 Yao Qi <yao.qi@linaro.org>
1348 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1350 2015-08-25 Yao Qi <yao.qi@linaro.org>
1352 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1355 2015-08-25 Yao Qi <yao.qi@linaro.org>
1357 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1359 (debug_reg_change_callback): Remove argument entry and add argument
1360 lwp. Remove local variable thread. Don't print thread id in the
1361 debugging output. Don't check whether pid of thread equals to pid.
1362 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1363 iterate_over_lwps instead find_inferior.
1365 2015-08-24 Pedro Alves <palves@redhat.com>
1367 * inferiors.c (get_first_process): New function.
1368 * inferiors.h (get_first_process): New declaration.
1369 * remote-utils.c (read_ptid): Default to the first process in the
1370 list, instead of to the current thread's process.
1372 2015-08-24 Pedro Alves <palves@redhat.com>
1374 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1375 * event-loop.c: Likewise.
1376 * remote-utils.c: Likewise.
1377 * tracepoint.c: Likewise.
1379 2015-08-24 Pedro Alves <palves@redhat.com>
1381 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1384 2015-08-21 Pedro Alves <palves@redhat.com>
1386 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1387 instead of literal 1.
1389 2015-08-21 Pedro Alves <palves@redhat.com>
1391 * tdesc.c (default_description): Explicitly zero-initialize.
1393 2015-08-21 Pedro Alves <palves@redhat.com>
1396 * inferiors.c (remove_thread): Discard any pending stop reply for
1398 * server.c (remove_all_on_match_pid): Rename to ...
1399 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1401 (discard_queued_stop_replies): Change parameter to a ptid. Now
1403 (handle_v_kill, kill_inferior_callback, captured_main)
1404 (process_serial_event): Adjust.
1405 * server.h (discard_queued_stop_replies): Declare.
1407 2015-08-21 Pedro Alves <palves@redhat.com>
1409 * linux-low.c (wait_for_sigstop): Always switch to no thread
1410 selected if the previously current thread dies.
1411 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1412 process instead of the current thread's.
1413 * remote-utils.c (input_interrupt): Don't check if there's no
1415 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1416 current thread to the general thread fails, error out.
1417 (handle_qxfer_auxv, handle_qxfer_libraries)
1418 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1419 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1420 (handle_query): Check if there's a thread selected instead of
1421 checking whether there's any thread in the thread list.
1422 (handle_qxfer_threads, handle_qxfer_btrace)
1423 (handle_qxfer_btrace_conf): Don't error out early if there's no
1424 thread in the thread list.
1425 (handle_v_cont, myresume): Don't set the current thread to the
1427 (process_serial_event) <Hg handling>: Also set thread_id if the
1428 previous general thread is still alive.
1429 (process_serial_event) <g/G handling>: If setting the current
1430 thread to the general thread fails, error out.
1431 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1432 thread's lwp instead of the current thread's.
1433 * target.c (set_desired_thread): If the desired thread was not
1434 found, leave the current thread pointing to NULL. Return an int
1435 (boolean) indicating success.
1436 * target.h (set_desired_thread): Change return type to int.
1438 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1440 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1441 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1443 (ps_get_thread_area): New function.
1445 2015-08-19 Gary Benson <gbenson@redhat.com>
1447 * hostio.c (handle_pread): Do not attempt to read more data
1448 than hostio_reply_with_data can fit in a packet.
1450 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1452 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1454 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1456 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1458 2015-08-06 Pedro Alves <palves@redhat.com>
1460 * tracepoint.c (expr_eval_result): Now an int.
1462 2015-08-06 Pedro Alves <palves@redhat.com>
1464 * gdbthread.h (struct regcache): Forward declare.
1465 (struct thread_info) <regcache_data>: Now a struct regcache
1467 * inferiors.c (inferior_regcache_data)
1468 (set_inferior_regcache_data): Now work with struct regcache
1470 * inferiors.h (struct regcache): Forward declare.
1471 (inferior_regcache_data, set_inferior_regcache_data): Now work
1472 with struct regcache pointers.
1473 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1474 (free_register_cache_thread): Remove struct regcache pointer
1477 2015-08-06 Pedro Alves <palves@redhat.com>
1479 * server.c (captured_main): On error, print the exception message
1480 to stderr, and if run_once is set, throw a quit.
1482 2015-08-06 Pedro Alves <palves@redhat.com>
1484 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1487 2015-08-06 Pedro Alves <palves@redhat.com>
1489 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1490 reading beyond the passed in buffer length.
1492 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1494 * tracepoint.c (symbol_list) <required>: Remove.
1496 2015-08-06 Pedro Alves <palves@redhat.com>
1498 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1499 count if stopping and suspending threads.
1500 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1501 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1502 (linux_detach): Complete an ongoing step-over.
1503 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1505 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1506 (linux_wait_1): If passing a signal to the inferior after
1507 finishing a step-over, unsuspend and re-resume all lwps. If we
1508 see a single-step event but the thread should be continuing, don't
1509 pass the trap to gdb.
1510 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1511 internal_error instead of gdb_assert.
1512 (enqueue_pending_signal): New function.
1513 (check_ptrace_stopped_lwp_gone): Add debug output.
1514 (start_step_over): Use internal_error instead of gdb_assert.
1515 (complete_ongoing_step_over): New function.
1516 (linux_resume_one_thread): Don't resume a suspended thread.
1517 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1520 2015-08-06 Pedro Alves <palves@redhat.com>
1522 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1523 (linux_thread_alive): Use lwp_is_marked_dead.
1524 (extended_event_reported): Delete.
1525 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1526 instead of extended_event_reported.
1527 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1529 (lwp_is_marked_dead): New function.
1530 (lwp_running): Use lwp_is_marked_dead.
1531 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1534 2015-08-06 Pedro Alves <palves@redhat.com>
1536 * linux-low.c (linux_wait_1): Move fork event output out of the
1537 !report_to_gdb check. Pass event_child->waitstatus to
1538 target_waitstatus_to_string instead of ourstatus.
1540 2015-08-04 Yao Qi <yao.qi@linaro.org>
1542 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1543 if current_thread is 32 bit.
1545 2015-08-04 Yao Qi <yao.qi@linaro.org>
1547 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1548 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1549 * server.c (extended_protocol): Remove "static".
1550 * server.h (extended_protocol): Declare it.
1552 2015-08-04 Yao Qi <yao.qi@linaro.org>
1554 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1555 both aarch64 and aarch32.
1556 (aarch64_set_pc): Likewise.
1558 2015-08-04 Yao Qi <yao.qi@linaro.org>
1560 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1561 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1562 arm-with-neon.xml to srv_xmlfiles.
1563 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1564 (is_64bit_tdesc): New function.
1565 (aarch64_linux_read_description): New function.
1566 (aarch64_arch_setup): Call aarch64_linux_read_description.
1567 (regs_info): Rename to regs_info_aarch64.
1568 (aarch64_regs_info): Return right regs_info.
1569 (initialize_low_arch): Call initialize_low_arch_aarch32.
1571 2015-08-04 Yao Qi <yao.qi@linaro.org>
1573 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1574 * linux-aarch32-low.c: New file.
1575 * linux-aarch32-low.h: New file.
1576 * linux-arm-low.c (arm_fill_gregset): Move it to
1577 linux-aarch32-low.c.
1578 (arm_store_gregset): Likewise.
1579 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1580 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1581 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1582 (regs_info): Rename to regs_info_arm.
1583 (arm_regs_info): Return regs_info_aarch32 if
1584 have_ptrace_getregset is 1 and target description is
1585 arm_with_neon or arm_with_vfpv3.
1586 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1587 Call initialize_low_arch_aarch32 instead.
1589 2015-08-04 Yao Qi <yao.qi@linaro.org>
1591 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1592 * linux-low.c: ... here.
1593 * linux-low.h (have_ptrace_getregset): Declare it.
1595 2015-08-04 Pedro Alves <palves@redhat.com>
1597 * thread-db.c (struct thread_db): Use new typedefs.
1598 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1600 (disable_thread_event_reporting): Cast result of dlsym to
1601 destination function pointer type.
1602 (thread_db_mourn): Use td_ta_delete_ftype.
1604 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1606 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1608 (CDX_BREAKPOINT): Define for R2.
1609 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1610 (the_low_target): Add comments.
1612 2015-07-30 Yao Qi <yao.qi@linaro.org>
1614 * linux-arm-low.c (arm_hwcap): Remove it.
1615 (arm_read_description): New local variable arm_hwcap. Don't
1616 set arm_hwcap to zero.
1618 2015-07-30 Yao Qi <yao.qi@linaro.org>
1620 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1621 Use regcache->tdesc instead.
1622 (arm_store_wmmxregset): Likewise.
1623 (arm_fill_vfpregset): Likewise.
1624 (arm_store_vfpregset): Likewise.
1626 2015-07-30 Yao Qi <yao.qi@linaro.org>
1628 * linux-arm-low.c: Include arch/arm.h.
1629 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1630 (arm_store_gregset): Likewise.
1632 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1634 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1635 ptrace's 4th parameter.
1637 2015-07-27 Yao Qi <yao.qi@linaro.org>
1639 * configure.srv (case aarch64*-*-linux*): Don't set
1642 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1644 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1646 * linux-arm-low.c: Likewise.
1647 * linux-cris-low.c: Likewise.
1648 * linux-crisv32-low.c: Likewise.
1649 * linux-low.c: Likewise.
1650 * linux-m68k-low.c: Likewise.
1651 * linux-mips-low.c: Likewise.
1652 * linux-nios2-low.c: Likewise.
1653 * linux-s390-low.c: Likewise.
1654 * linux-sparc-low.c: Likewise.
1655 * linux-tic6x-low.c: Likewise.
1656 * linux-tile-low.c: Likewise.
1657 * linux-x86-low.c: Likewise.
1659 2015-07-24 Pedro Alves <palves@redhat.com>
1661 * config.in: Regenerate.
1662 * configure: Regenerate.
1664 2015-07-24 Pedro Alves <palves@redhat.com>
1666 * acinclude.m4: Include ../ptrace.m4.
1667 * configure.ac: Call GDB_AC_PTRACE.
1668 * config.in, configure: Regenerate.
1670 2015-07-24 Yao Qi <yao.qi@linaro.org>
1672 * linux-low.c (linux_create_inferior): Remove setting to
1673 proc->priv->new_inferior.
1674 (linux_attach): Likewise.
1675 (linux_low_filter_event): Likewise.
1676 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1678 2015-07-24 Yao Qi <yao.qi@linaro.org>
1680 * linux-low.c (linux_arch_setup): New function.
1681 (linux_low_filter_event): If proc->tdesc is NULL and
1682 proc->attached is true, call the_low_target.arch_setup.
1683 Otherwise, keep status pending, and return.
1684 (linux_resume_one_lwp_throw): Don't call get_pc if
1685 thread->while_stepping isn't NULL. Don't call
1686 get_thread_regcache if proc->tdesc is NULL.
1687 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1688 (linux_target_ops): Install arch_setup.
1689 * server.c (start_inferior): Call the_target->arch_setup.
1690 * target.h (struct target_ops) <arch_setup>: New field.
1691 (target_arch_setup): New marco.
1692 * lynx-low.c (lynx_target_ops): Update.
1693 * nto-low.c (nto_target_ops): Update.
1694 * spu-low.c (spu_target_ops): Update.
1695 * win32-low.c (win32_target_ops): Update.
1697 2015-07-24 Yao Qi <yao.qi@linaro.org>
1699 * linux-low.c (linux_add_process): Don't set
1700 proc->priv->new_inferior.
1701 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1702 (linux_attach): Likewise.
1704 2015-07-24 Yao Qi <yao.qi@linaro.org>
1706 * server.c (start_inferior): Code refactor.
1708 2015-07-24 Yao Qi <yao.qi@linaro.org>
1710 * server.c (process_serial_event): Set general_thread.
1712 2015-07-21 Yao Qi <yao.qi@linaro.org>
1714 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1715 aarch64_linux_get_debug_reg_capacity.
1717 2015-07-17 Yao Qi <yao.qi@linaro.org>
1719 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1720 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1721 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1722 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1723 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1724 (AARCH64_HWP_ALIGNMENT): Likewise.
1725 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1726 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1727 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1728 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1729 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1730 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1731 (struct aarch64_debug_reg_state): Likewise.
1732 (struct arch_lwp_info): Likewise.
1733 (aarch64_align_watchpoint): Likewise.
1734 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1735 (aarch64_watchpoint_length): Likewise.
1736 (aarch64_point_encode_ctrl_reg): Likewise
1737 (aarch64_point_is_aligned): Likewise.
1738 (aarch64_align_watchpoint): Likewise.
1739 (aarch64_linux_set_debug_regs):
1740 (aarch64_dr_state_insert_one_point): Likewise.
1741 (aarch64_dr_state_remove_one_point): Likewise.
1742 (aarch64_handle_breakpoint): Likewise.
1743 (aarch64_handle_aligned_watchpoint): Likewise.
1744 (aarch64_handle_unaligned_watchpoint): Likewise.
1745 (aarch64_handle_watchpoint): Likewise.
1747 2015-07-17 Yao Qi <yao.qi@linaro.org>
1749 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1750 and don't aarch64_get_debug_reg_state. All callers update.
1751 (aarch64_handle_aligned_watchpoint): Likewise.
1752 (aarch64_handle_unaligned_watchpoint): Likewise.
1753 (aarch64_handle_watchpoint): Likewise.
1754 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1755 (aarch64_remove_point): Likewise.
1757 2015-07-17 Yao Qi <yao.qi@linaro.org>
1759 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1761 (aarch64_handle_unaligned_watchpoint): Likewise.
1763 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1765 Revert the previous 3 commits:
1766 Move gdb_regex* to common/
1767 Move linux_find_memory_regions_full & co.
1768 gdbserver build-id attribute generator
1770 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1771 Jan Kratochvil <jan.kratochvil@redhat.com>
1773 gdbserver build-id attribute generator.
1774 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1775 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1776 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1778 (get_dynamic): Use find_pdhr to traverse program headers.
1779 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1780 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1781 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1782 (get_hex_build_id): New.
1783 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1784 to reply XML document.
1786 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1787 Jan Kratochvil <jan.kratochvil@redhat.com>
1789 * target.c: Include target/target-utils.h and fcntl.h.
1790 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1791 (target_fileio_read_stralloc): New functions.
1793 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1795 * Makefile.in (OBS): Add gdb_regex.o.
1797 * config.in: Rebuilt.
1798 * configure: Rebuilt.
1800 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1801 Jan Kratochvil <jan.kratochvil@redhat.com>
1803 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1804 * Makefile.in (OBS): Add target-utils.o.
1805 (linux-maps.o, target-utils.o): New.
1806 * configure.srv (srv_linux_obj): Add linux-maps.o.
1808 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1810 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1812 (the_low_target): Install it.
1814 2015-07-14 Pedro Alves <palves@redhat.com>
1816 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1817 Instead, ignore ECHILD, and throw an error for other errnos.
1819 2015-07-10 Pedro Alves <palves@redhat.com>
1821 * event-loop.c (struct callback_event) <data>: Change type to
1822 gdb_client_data instance instead of gdb_client_data pointer.
1823 (append_callback_event): Adjust.
1825 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1827 * linux-aarch64-low.c: Add comments for each linux_target_ops
1828 method. Remove comments already covered in target_ops and
1829 linux_target_ops definitions.
1830 (the_low_target): Add comments for each unimplemented method.
1832 2015-07-09 Yao Qi <yao.qi@linaro.org>
1834 * linux-aarch64-low.c (aarch64_regmap): Remove.
1835 (aarch64_usrregs_info): Remove.
1836 (regs_info): Set field usrregs to NULL.
1838 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1840 * linux-low.c: Include "rsp-low.h"
1841 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1842 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1843 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1844 (handle_btrace_enable_pt): New.
1845 (handle_btrace_general_set): Support "pt".
1846 (handle_btrace_conf_general_set): Support "pt:size".
1848 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1850 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1853 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1855 * linux-aarch64-low.c: Remove comment about endianness.
1856 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1857 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1860 2015-06-24 Gary Benson <gbenson@redhat.com>
1862 * linux-i386-ipa.c (stdint.h): Do not include.
1863 * lynx-i386-low.c (stdint.h): Likewise.
1864 * lynx-ppc-low.c (stdint.h): Likewise.
1865 * mem-break.c (stdint.h): Likewise.
1866 * thread-db.c (stdint.h): Likewise.
1867 * tracepoint.c (stdint.h): Likewise.
1868 * win32-low.c (stdint.h): Likewise.
1870 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1872 * server.c (write_qxfer_response): Update call to
1873 remote_escape_output.
1875 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1876 Jan Kratochvil <jan.kratochvil@redhat.com>
1878 Merge multiple hex conversions.
1879 * gdbreplay.c (tohex): Rename to 'fromhex'.
1880 (logchar): Use fromhex.
1882 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1884 * server.c (handle_qxfer_libraries): Set `version' attribute for
1887 2015-06-10 Gary Benson <gbenson@redhat.com>
1889 * target.h (struct target_ops) <multifs_open>: New field.
1890 <multifs_unlink>: Likewise.
1891 <multifs_readlink>: Likewise.
1892 * linux-low.c (nat/linux-namespaces.h): New include.
1893 (linux_target_ops): Initialize the_target->multifs_open,
1894 the_target->multifs_unlink and the_target->multifs_readlink.
1895 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1896 * hostio.c (hostio_fs_pid): New static variable.
1897 (hostio_handle_new_gdb_connection): New function.
1898 (handle_setfs): Likewise.
1899 (handle_open): Use the_target->multifs_open as appropriate.
1900 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1901 (handle_readlink): Use the_target->multifs_readlink as
1903 (handle_vFile): Handle vFile:setfs packets.
1904 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1905 after target_handle_new_gdb_connection.
1907 2015-06-10 Gary Benson <gbenson@redhat.com>
1909 * configure.ac (AC_CHECK_FUNCS): Add setns.
1910 * config.in: Regenerate.
1911 * configure: Likewise.
1912 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1913 (linux-namespaces.o): New rule.
1914 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1916 2015-06-09 Gary Benson <gbenson@redhat.com>
1918 * hostio.c (handle_open): Process mode argument with
1919 fileio_to_host_mode.
1921 2015-06-01 Yao Qi <yao.qi@linaro.org>
1923 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1924 * linux-x86-low.c: Likewise.
1926 2015-05-28 Don Breazeal <donb@codesourcery.com>
1928 * linux-low.c (handle_extended_wait): Initialize
1929 thread_info.last_resume_kind for new fork children.
1931 2015-05-15 Pedro Alves <palves@redhat.com>
1933 * target.h (target_handle_new_gdb_connection): Rewrite using if
1934 wrapped in do/while.
1936 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1938 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1939 * configure, config.in: Regenerate.
1940 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1943 2015-05-12 Don Breazeal <donb@codesourcery.com>
1945 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1946 PTRACE_EVENT_VFORK_DONE.
1947 (linux_low_ptrace_options, extended_event_reported): Add vfork
1949 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1950 and "vforkdone" for RSP 'T' Stop Reply Packet.
1951 * server.h (report_vfork_events): Declare
1954 2015-05-12 Don Breazeal <donb@codesourcery.com>
1956 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1957 (the_low_target) <new_fork>: Initialize new member.
1958 * linux-arm-low.c (arm_new_fork): New function.
1959 (the_low_target) <new_fork>: Initialize new member.
1960 * linux-low.c (handle_extended_wait): Call new target function
1962 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1963 * linux-mips-low.c (mips_add_watchpoint): New function
1964 extracted from mips_insert_point.
1965 (the_low_target) <new_fork>: Initialize new member.
1966 (mips_linux_new_fork): New function.
1967 (mips_insert_point): Call mips_add_watchpoint.
1968 * linux-x86-low.c (x86_linux_new_fork): New function.
1969 (the_low_target) <new_fork>: Initialize new member.
1971 2015-05-12 Don Breazeal <donb@codesourcery.com>
1973 * linux-low.c (handle_extended_wait): Implement return value,
1974 rename argument 'event_child' to 'event_lwp', handle
1975 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1976 (linux_low_ptrace_options): New function.
1977 (linux_low_filter_event): Call linux_low_ptrace_options,
1978 use different argument fo linux_enable_event_reporting,
1979 use return value from handle_extended_wait.
1980 (extended_event_reported): New function.
1981 (linux_wait_1): Call extended_event_reported and set
1982 status to report fork events.
1983 (linux_write_memory): Add pid to debug message.
1984 (reset_lwp_ptrace_options_callback): New function.
1985 (linux_handle_new_gdb_connection): New function.
1986 (linux_target_ops): Initialize new structure member.
1987 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1988 * lynx-low.c: Initialize new structure member.
1989 * remote-utils.c (prepare_resume_reply): Implement stop reason
1990 "fork" for "T" stop message.
1991 * server.c (handle_query): Call handle_new_gdb_connection.
1992 * server.h (report_fork_events): Declare global flag.
1993 * target.h (struct target_ops) <handle_new_gdb_connection>:
1995 (target_handle_new_gdb_connection): New macro.
1996 * win32-low.c: Initialize new structure member.
1998 2015-05-12 Don Breazeal <donb@codesourcery.com>
2000 * mem-break.c (APPEND_TO_LIST): Define macro.
2001 (clone_agent_expr): New function.
2002 (clone_one_breakpoint): New function.
2003 (clone_all_breakpoints): New function.
2004 * mem-break.h: Declare new functions.
2006 2015-05-12 Don Breazeal <donb@codesourcery.com>
2008 * linux-low.c (linux_supports_fork_events): New function.
2009 (linux_supports_vfork_events): New function.
2010 (linux_target_ops): Initialize new structure members.
2011 (initialize_low): Call linux_check_ptrace_features.
2012 * lynx-low.c (lynx_target_ops): Initialize new structure
2014 * server.c (report_fork_events, report_vfork_events):
2016 (handle_query): Add new features to qSupported packet and
2018 (captured_main): Initialize new global variables.
2019 * target.h (struct target_ops) <supports_fork_events>:
2021 <supports_vfork_events>: New member.
2022 (target_supports_fork_events): New macro.
2023 (target_supports_vfork_events): New macro.
2024 * win32-low.c (win32_target_ops): Initialize new structure
2027 2015-05-12 Gary Benson <gbenson@redhat.com>
2029 * server.c (handle_qxfer_exec_file): Use current process
2032 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2034 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2035 Remove HAVE_PTRACE_GETREGS conditionals.
2036 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2037 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2039 2015-05-08 Yao Qi <yao.qi@linaro.org>
2041 * linux-low.c (linux_supports_conditional_breakpoints): New
2043 (linux_target_ops): Install new target method.
2044 * lynx-low.c (lynx_target_ops): Install NULL hook for
2045 supports_conditional_breakpoints.
2046 * nto-low.c (nto_target_ops): Likewise.
2047 * spu-low.c (spu_target_ops): Likewise.
2048 * win32-low.c (win32_target_ops): Likewise.
2049 * server.c (handle_query): Check
2050 target_supports_conditional_breakpoints.
2051 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2053 (target_supports_conditional_breakpoints): New macro.
2055 2015-05-06 Pedro Alves <palves@redhat.com>
2058 * server.c (start_inferior): If the process exits, mourn it.
2060 2015-04-21 Gary Benson <gbenson@redhat.com>
2062 * hostio.c (fileio_open_flags_to_host): Factored out to
2063 fileio_to_host_openflags in common/fileio.c. Single use
2066 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2068 * linux-xtensa-low.c (xtensa_fill_gregset)
2069 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2072 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2074 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2075 (regs_info): Replace usrregs pointer with NULL.
2077 2015-04-17 Gary Benson <gbenson@redhat.com>
2079 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2080 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2081 * server.c (handle_qxfer_exec_file): New function.
2082 (qxfer_packets): Add exec-file entry.
2083 (handle_query): Report qXfer:exec-file:read as supported packet.
2085 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2087 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2089 2015-04-09 Gary Benson <gbenson@redhat.com>
2091 * hostio-errno.c (errno_to_fileio_error): Remove function.
2092 Update caller to use remote_fileio_to_fio_error.
2094 2015-04-09 Yao Qi <yao.qi@linaro.org>
2096 * linux-low.c (linux_insert_point): Call
2097 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2098 (linux_remove_point): Call remove_memory_breakpoint if type is
2100 * linux-x86-low.c (x86_insert_point): Don't call
2101 insert_memory_breakpoint.
2102 (x86_remove_point): Don't call remove_memory_breakpoint.
2104 2015-04-01 Pedro Alves <palves@redhat.com>
2105 Cleber Rosa <crosa@redhat.com>
2107 * server.c (gdbserver_usage): Reorganize and extend the usage
2110 2015-03-24 Pedro Alves <palves@redhat.com>
2112 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2113 output. Also dump TRAP_TRACE.
2114 (linux_low_filter_event): In debug output, distinguish a
2115 resume_stop SIGSTOP from a delayed SIGSTOP.
2117 2015-03-24 Gary Benson <gbenson@redhat.com>
2119 * linux-x86-low.c (x86_linux_new_thread): Moved to
2121 (x86_linux_prepare_to_resume): Likewise.
2123 2015-03-24 Gary Benson <gbenson@redhat.com>
2125 * Makefile.in (x86-linux-dregs.o): New rule.
2126 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2127 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2128 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2129 (x86_linux_dr_get): Likewise.
2130 (x86_linux_dr_set): Likewise.
2131 (update_debug_registers_callback): Likewise.
2132 (x86_linux_dr_set_addr): Likewise.
2133 (x86_linux_dr_get_addr): Likewise.
2134 (x86_linux_dr_set_control): Likewise.
2135 (x86_linux_dr_get_control): Likewise.
2136 (x86_linux_dr_get_status): Likewise.
2137 (x86_linux_update_debug_registers): Likewise.
2139 2015-03-24 Gary Benson <gbenson@redhat.com>
2141 * linux-x86-low.c (x86_linux_update_debug_registers):
2142 New function, factored out from...
2143 (x86_linux_prepare_to_resume): ...this.
2145 2015-03-24 Gary Benson <gbenson@redhat.com>
2147 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2148 (x86_linux_dr_set): Likewise.
2149 (update_debug_registers_callback): Likewise.
2150 (x86_linux_dr_set_addr): Likewise.
2151 (x86_linux_dr_get_addr): Likewise.
2152 (x86_linux_dr_set_control): Likewise.
2153 (x86_linux_dr_get_control): Likewise.
2154 (x86_linux_dr_get_status): Likewise.
2155 (x86_linux_prepare_to_resume): Likewise.
2157 2015-03-24 Gary Benson <gbenson@redhat.com>
2159 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2160 Use perror_with_name. Pass string through gettext.
2161 (x86_linux_dr_set): Likewise.
2163 2015-03-24 Gary Benson <gbenson@redhat.com>
2165 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2166 (x86_linux_dr_set_addr): ...this.
2167 (x86_dr_low_get_addr): Rename to...
2168 (x86_linux_dr_get_addr): ...this.
2169 (x86_dr_low_set_control): Rename to...
2170 (x86_linux_dr_set_control): ...this.
2171 (x86_dr_low_get_control): Rename to...
2172 (x86_linux_dr_get_control): ...this.
2173 (x86_dr_low_get_status): Rename to...
2174 (x86_linux_dr_get_status): ...this.
2175 (x86_dr_low): Update with new function names.
2177 2015-03-24 Gary Benson <gbenson@redhat.com>
2179 * Makefile.in (x86-linux.o): New rule.
2180 * configure.srv: Add x86-linux.o to relevant targets.
2181 * linux-low.c (lwp_set_arch_private_info): New function.
2182 (lwp_arch_private_info): Likewise.
2183 * linux-x86-low.c: Include nat/x86-linux.h.
2184 (arch_lwp_info): Removed structure.
2185 (update_debug_registers_callback):
2186 Use lwp_set_debug_registers_changed.
2187 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2188 and lwp_set_debug_registers_changed.
2189 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2191 2015-03-24 Gary Benson <gbenson@redhat.com>
2193 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2194 * linux-arm-low.c (arm_new_thread): Likewise.
2195 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2196 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2197 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2198 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2200 2015-03-24 Gary Benson <gbenson@redhat.com>
2202 * linux-low.c (ptid_of_lwp): New function.
2203 (lwp_is_stopped): Likewise.
2204 (lwp_stop_reason): Likewise.
2205 * linux-x86-low.c (update_debug_registers_callback):
2207 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2210 2015-03-24 Gary Benson <gbenson@redhat.com>
2212 * linux-low.h (linux_stop_lwp): Remove declaration.
2214 2015-03-24 Gary Benson <gbenson@redhat.com>
2216 * linux-low.h: Include nat/linux-nat.h.
2217 * linux-low.c (iterate_over_lwps_args): New structure.
2218 (iterate_over_lwps_filter): New function.
2219 (iterate_over_lwps): Likewise.
2220 * linux-x86-low.c (update_debug_registers_callback):
2221 Update signature to what iterate_over_lwps expects.
2222 Remove PID check that iterate_over_lwps now performs.
2223 (x86_dr_low_set_addr): Use iterate_over_lwps.
2224 (x86_dr_low_set_control): Likewise.
2226 2015-03-24 Gary Benson <gbenson@redhat.com>
2228 * linux-x86-low.c (x86_debug_reg_state): New function.
2229 (x86_linux_prepare_to_resume): Use the above.
2231 2015-03-24 Gary Benson <gbenson@redhat.com>
2233 * linux-low.c (current_lwp_ptid): New function.
2234 * linux-x86-low.c: Include nat/linux-nat.h.
2235 (x86_dr_low_get_addr): Use current_lwp_ptid.
2236 (x86_dr_low_get_control): Likewise.
2237 (x86_dr_low_get_status): Likewise.
2239 2015-03-20 Pedro Alves <palves@redhat.com>
2241 * tracepoint.c (cmd_qtstatus): Make "str" const.
2243 2015-03-20 Pedro Alves <palves@redhat.com>
2245 * server.c (handle_general_set): Make "req_str" const.
2247 2015-03-19 Pedro Alves <palves@redhat.com>
2249 * linux-low.c (linux_resume_one_lwp): Rename to ...
2250 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2251 instead call perror_with_name.
2252 (check_ptrace_stopped_lwp_gone): New function.
2253 (linux_resume_one_lwp): Reimplement as wrapper around
2254 linux_resume_one_lwp_throw that swallows errors if the LWP is
2257 2015-03-19 Pedro Alves <palves@redhat.com>
2259 * linux-low.c (count_events_callback, select_event_lwp_callback):
2260 No longer check whether the thread has resume_stop as last resume
2263 2015-03-19 Pedro Alves <palves@redhat.com>
2265 * linux-low.c (count_events_callback, select_event_lwp_callback):
2266 Use the lwp's status_pending_p field, not the thread's.
2268 2015-03-19 Pedro Alves <palves@redhat.com>
2270 * linux-low.c (select_event_lwp_callback): Update comments to
2271 no longer mention SIGTRAP.
2273 2015-03-18 Gary Benson <gbenson@redhat.com>
2275 * server.c (handle_query): Do not report vFile:fstat as supported.
2277 2015-03-11 Gary Benson <gbenson@redhat.com>
2279 * hostio.c (sys/types.h): New include.
2280 (sys/stat.h): Likewise.
2281 (common-remote-fileio.h): Likewise.
2282 (handle_fstat): New function.
2283 (handle_vFile): Handle vFile:fstat packets.
2285 2015-03-11 Gary Benson <gbenson@redhat.com>
2287 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2288 struct stat.st_blocks and struct stat.st_blksize.
2289 * configure: Regenerate.
2290 * config.in: Likewise.
2291 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2292 (OBS): Add common-remote-fileio.o.
2293 (common-remote-fileio.o): New rule.
2295 2015-03-09 Pedro Alves <palves@redhat.com>
2297 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2298 'struct sockaddr' pointer in 'accept' call.
2300 2015-03-09 Pedro Alves <palves@redhat.com>
2303 2015-03-07 Pedro Alves <palves@redhat.com>
2304 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2305 or <winsock2.h> here. Instead include "gdb_socket.h".
2306 (remote_open): Use union gdb_sockaddr_u.
2307 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2308 or <winsock2.h> here. Instead include "gdb_socket.h".
2309 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2310 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2312 (init_named_socket, gdb_agent_helper_thread): Use union
2315 2015-03-07 Pedro Alves <palves@redhat.com>
2317 * configure.ac (build_warnings): Move
2318 -Wdeclaration-after-statement to the C-specific set.
2319 * configure: Regenerate.
2321 2015-03-07 Pedro Alves <palves@redhat.com>
2323 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2324 or <winsock2.h> here. Instead include "gdb_socket.h".
2325 (remote_open): Use union gdb_sockaddr_u.
2326 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2327 or <winsock2.h> here. Instead include "gdb_socket.h".
2328 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2329 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2331 (init_named_socket, gdb_agent_helper_thread): Use union
2334 2015-03-07 Pedro Alves <palves@redhat.com>
2336 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2339 2015-03-06 Yao Qi <yao.qi@linaro.org>
2341 * linux-aarch64-low.c (aarch64_insert_point): Use
2342 show_debug_regs as a boolean.
2343 (aarch64_remove_point): Likewise.
2345 2015-03-05 Pedro Alves <palves@redhat.com>
2347 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2348 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2349 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2350 * nto-low.c (nto_target_ops): Likewise.
2351 * spu-low.c (spu_target_ops): Likewise.
2352 * win32-low.c (win32_target_ops): Likewise.
2354 2015-03-04 Pedro Alves <palves@redhat.com>
2356 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2357 Decide whether a breakpoint triggered based on the SIGTRAP's
2359 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2360 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2361 (linux_low_filter_event): Check for breakpoints before checking
2363 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2365 (linux_stopped_by_sw_breakpoint)
2366 (linux_supports_stopped_by_sw_breakpoint)
2367 (linux_stopped_by_hw_breakpoint)
2368 (linux_supports_stopped_by_hw_breakpoint): New functions.
2369 (linux_target_ops): Install new target methods.
2371 2015-03-04 Pedro Alves <palves@redhat.com>
2373 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2374 * server.c (swbreak_feature, hwbreak_feature): New globals.
2375 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2376 (captured_main): Clear swbreak_feature and hwbreak_feature.
2377 * server.h (swbreak_feature, hwbreak_feature): Declare.
2378 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2379 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2380 supports_stopped_by_hw_breakpoint>: New fields.
2381 (target_supports_stopped_by_sw_breakpoint)
2382 (target_stopped_by_sw_breakpoint)
2383 (target_supports_stopped_by_hw_breakpoint)
2384 (target_stopped_by_hw_breakpoint): Declare.
2386 2015-03-04 Pedro Alves <palves@redhat.com>
2388 enum lwp_stop_reason -> enum target_stop_reason
2389 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2390 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2391 (linux_wait_1, stuck_in_jump_pad_callback)
2392 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2393 (linux_stopped_by_watchpoint):
2394 * linux-low.h (enum lwp_stop_reason): Delete.
2395 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2396 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2398 2015-03-04 Yao Qi <yao.qi@linaro.org>
2400 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2402 2015-03-03 Gary Benson <gbenson@redhat.com>
2404 * hostio.c (handle_vFile): Fix prefix lengths.
2406 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2408 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2411 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2413 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2414 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2415 (clean): Add "rm -f" for above C files.
2416 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2417 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2418 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2419 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2420 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2421 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2422 (init_registers_s390x_vx_linux64)
2423 (init_registers_s390x_tevx_linux64)
2424 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2425 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2427 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2428 (s390_store_vxrs_high): New functions.
2429 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2431 (s390_arch_setup): Add logic for selecting one of the new target
2432 descriptions. Activate the new vector regsets if applicable.
2433 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2434 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2435 and init_registers_s390x_tevx_linux64.
2437 2015-03-01 Pedro Alves <palves@redhat.com>
2439 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2442 2015-02-27 Pedro Alves <palves@redhat.com>
2444 * linux-x86-low.c (u_debugreg_offset): New function.
2445 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2447 2015-02-27 Pedro Alves <palves@redhat.com>
2449 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2450 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2451 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2452 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2453 (ps_lsetfpregs, ps_getpid)
2454 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2455 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2456 (ps_lsetxregs, ps_plog): Declare.
2458 2015-02-27 Pedro Alves <palves@redhat.com>
2460 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2461 IP_AGENT_EXPORT_FUNC.
2462 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2463 IP_AGENT_EXPORT_FUNC.
2464 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2465 (IP_AGENT_EXPORT): Delete.
2466 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2467 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2468 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2469 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2470 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2471 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2472 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2473 (traceframe_read_count, traceframe_write_count)
2474 (traceframes_created, trace_state_variables, get_raw_reg)
2475 (get_trace_state_variable_value, set_trace_state_variable_value)
2476 (ust_loaded, helper_thread_id, cmd_buf): Use
2477 IPA_SYM_EXPORTED_NAME.
2478 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2479 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2480 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2481 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2482 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2483 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2484 EXTERN_C_PUSH/EXTERN_C_POP.
2485 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2486 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2487 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2488 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2489 (traceframe_write_count, traceframe_read_count)
2490 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2491 (about_to_request_buffer_space, get_trace_state_variable_value)
2492 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2493 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2494 EXTERN_C_PUSH/EXTERN_C_POP.
2495 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2496 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2497 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2498 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2499 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2500 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2501 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2502 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2504 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2505 (IP_AGENT_EXPORT_VAR_DECL): Define.
2507 (gdb_agent_get_raw_reg): Declare.
2509 2015-02-27 Tom Tromey <tromey@redhat.com>
2510 Pedro Alves <palves@redhat.com>
2512 Rename symbols whose names are reserved C++ keywords throughout.
2514 2015-02-27 Pedro Alves <palves@redhat.com>
2516 * Makefile.in (COMPILER): New, get it from autoconf.
2517 (CXX): Get from autoconf instead.
2518 (COMPILE.pre): Use COMPILER.
2519 (CC-LD): Rename to ...
2520 (CC_LD): ... this. Use COMPILER.
2521 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2522 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2523 * acinclude.m4: Include build-with-cxx.m4.
2524 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2525 Disable -Werror by default if building in C++ mode.
2526 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2527 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2528 the C++ compiler. Save/restore CXXFLAGS too.
2529 * configure: Regenerate.
2531 2015-02-27 Pedro Alves <palves@redhat.com>
2533 * acinclude.m4: Include libiberty.m4.
2534 * configure.ac: Call libiberty_INIT.
2535 * config.in, configure: Regenerate.
2537 2015-02-26 Pedro Alves <palves@redhat.com>
2539 * linux-low.c (linux_wait_1): When incrementing the PC past a
2540 program breakpoint always use the_low_target.breakpoint_len as
2541 increment, rather than the maximum between that and
2542 the_low_target.decr_pc_after_break.
2544 2015-02-23 Pedro Alves <palves@redhat.com>
2546 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2547 thread was doing a step-over; always adjust the PC if
2548 we stepped over a permanent breakpoint.
2549 (linux_wait_1): If we stepped over breakpoint that was on top of a
2550 permanent breakpoint, manually advance the PC past it.
2552 2015-02-23 Pedro Alves <palves@redhat.com>
2554 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2556 (x86_fill_gregset, x86_store_gregset): Use it when handling
2559 2015-02-20 Pedro Alves <palves@redhat.com>
2561 * thread-db.c: Include "nat/linux-procfs.h".
2562 (thread_db_init): Skip listing new threads if the kernel supports
2563 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2565 2015-02-20 Pedro Alves <palves@redhat.com>
2567 * linux-low.c (status_pending_p_callback): Use ptid_match.
2569 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2571 PR breakpoints/16812
2572 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2573 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2574 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2576 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2578 PR breakpoints/15956
2579 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2581 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2583 * linux-low.c (linux_low_btrace_conf): Print size.
2584 * server.c (handle_btrace_conf_general_set): New.
2585 (hanle_general_set): Call handle_btrace_conf_general_set.
2586 (handle_query): Report Qbtrace-conf:bts:size as supported.
2588 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2590 * linux-low.c (linux_low_enable_btrace): Update parameters.
2591 (linux_low_btrace_conf): New.
2592 (linux_target_ops)<to_btrace_conf>: Initialize.
2593 * server.c (current_btrace_conf): New.
2594 (handle_btrace_enable): Rename to ...
2595 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2596 to target_enable_btrace. Update comment. Update users.
2597 (handle_qxfer_btrace_conf): New.
2598 (qxfer_packets): Add btrace-conf entry.
2599 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2600 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2601 (target_ops)<read_btrace_conf>: New.
2602 (target_enable_btrace): Update parameters.
2603 (target_read_btrace_conf): New.
2605 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2607 * server.c (handle_btrace_general_set): Remove call to
2608 target_supports_btrace.
2609 (supported_btrace_packets): New.
2610 (handle_query): Call supported_btrace_packets.
2611 * target.h: include btrace-common.h.
2612 (btrace_target_info): Removed.
2613 (supports_btrace, target_supports_btrace): Update parameters.
2615 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2617 * Makefile.in (SFILES): Add common/btrace-common.c.
2618 (OBS): Add common/btrace-common.o.
2619 (btrace-common.o): Add build rules.
2620 * linux-low: Include btrace-common.h.
2621 (linux_low_read_btrace): Use struct btrace_data. Call
2622 btrace_data_init and btrace_data_fini.
2624 2015-02-06 Pedro Alves <palves@redhat.com>
2626 * thread-db.c (find_new_threads_callback): Add debug output.
2628 2015-02-04 Pedro Alves <palves@redhat.com>
2630 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2631 (resume_stopped_resumed_lwps): New function.
2632 (linux_wait_for_event_filtered): Use it.
2634 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2636 * Makefile.in (SFILES): Add linux-personality.c.
2637 (linux-personality.o): New rule.
2638 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2639 list of objects to be built.
2640 * linux-low.c: Include nat/linux-personality.h.
2641 (linux_create_inferior): Remove code to disable address space
2642 randomization (moved to ../nat/linux-personality.c). Create
2643 cleanup to disable address space randomization.
2645 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2647 * Makefile.in (posix-strerror.o): New rule.
2648 (mingw-strerror.o): Likewise.
2649 * configure: Regenerated.
2650 * configure.ac: Source file ../common/common.host. Initialize new
2651 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2653 2015-01-14 Yao Qi <yao@codesourcery.com>
2655 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2656 (ppc-linux.o): New rule.
2657 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2658 * configure.ac: AC_CHECK_FUNCS(getauxval).
2659 * config.in: Re-generated.
2660 * configure: Re-generated.
2661 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2662 ppc64_64bit_inferior_p
2664 2015-01-14 Yao Qi <yao@codesourcery.com>
2666 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2667 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2668 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2669 (PT_ORIG_R3, PT_TRAP): Likewise.
2670 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2671 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2672 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2674 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2676 * i387-fp.c (i387_cache_to_xsave): In look over
2677 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2678 zmmh_low_space field by use of zmmh_high_space.
2680 2015-01-09 Pedro Alves <palves@redhat.com>
2682 * linux-low.c (step_over_bkpt): Move higher up in the file.
2683 (handle_extended_wait): Don't store the stop_pc here.
2684 (get_stop_pc): Adjust comments and rename to ...
2685 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2686 stopped for a software breakpoint or hardware breakpoint.
2687 (thread_still_has_status_pending_p): New function.
2688 (status_pending_p_callback): Use
2689 thread_still_has_status_pending_p. If the event is no longer
2690 interesting, resume the LWP.
2691 (handle_tracepoints): Add assert.
2692 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2693 (wstatus_maybe_breakpoint): New function.
2694 (cancel_breakpoint): Delete function.
2695 (check_stopped_by_watchpoint): New function, factored out from
2696 linux_low_filter_event.
2697 (lp_status_maybe_breakpoint): Delete function.
2698 (linux_low_filter_event): Remove filter_ptid argument.
2699 Leave thread group exits pending here. Store the LWP's stop PC.
2700 Always leave events pending.
2701 (linux_wait_for_event_filtered): Pull all events out of the
2702 kernel, and leave them all pending.
2703 (count_events_callback, select_event_lwp_callback): Consider all
2705 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2706 (select_event_lwp): Only give preference to the stepping LWP in
2707 all-stop mode. Adjust comments.
2708 (ignore_event): New function.
2709 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2710 references to cancel_breakpoints. Adjust to renames. Also give
2711 equal priority to all LWPs that have had events in non-stop mode.
2712 If reporting a software breakpoint event, unadjust the LWP's PC.
2713 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2714 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2716 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2717 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2718 (linux_stopped_by_watchpoint): Adjust.
2719 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2720 * linux-low.h (enum lwp_stop_reason): New.
2721 (struct lwp_info) <stop_pc>: Adjust comment.
2722 <stopped_by_watchpoint>: Delete field.
2723 <stop_reason>: New field.
2724 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2725 * mem-break.c (software_breakpoint_inserted_here)
2726 (hardware_breakpoint_inserted_here): New function.
2727 * mem-break.h (software_breakpoint_inserted_here)
2728 (hardware_breakpoint_inserted_here): Declare.
2729 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2730 (cancel_breakpoints): Delete.
2731 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2732 (upload_fast_traceframes): Remove references to
2735 2015-01-09 Pedro Alves <palves@redhat.com>
2737 * thread-db.c (find_new_threads_callback): Ignore thread if the
2738 kernel thread ID is -1.
2740 2015-01-09 Pedro Alves <palves@redhat.com>
2742 * linux-low.c (linux_attach_fail_reason_string): Move to
2743 nat/linux-ptrace.c, and rename.
2744 (linux_attach_lwp): Update comment.
2745 (attach_proc_task_lwp_callback): New function.
2746 (linux_attach): Adjust to rename and use
2747 linux_proc_attach_tgid_threads.
2748 (linux_attach_fail_reason_string): Delete declaration.
2750 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2752 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2753 * server.c (gdbserver_version): Likewise.
2755 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2757 * remote-utils.c: Include ctype.h.
2758 (input_interrupt): Explicitly handle the case when the char
2759 received is the NUL byte. Improve the printing of non-ASCII
2762 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2764 * linux-low.c (linux_low_filter_event): Update call to
2765 linux_enable_event_reporting following the addition of
2766 a new parameter to that function.
2768 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2771 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2772 (AARCH64_FPCR_REGNO): Likewise.
2773 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2774 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2775 (aarch64_store_fpregset): Likewise.
2777 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2779 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2780 Remove FIXME comment about assumption about N.
2782 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2784 * configure.ac: If large-file support is disabled in GDBserver,
2785 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2786 * configure: Regenerate.
2788 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2790 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2791 warning upon ENODATA from ptrace.
2792 * linux-s390-low.c (s390_store_tdb): New.
2793 (s390_regsets): Add regset for NT_S390_TDB.
2795 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2797 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2798 without a fill_function.
2799 * linux-s390-low.c (s390_fill_last_break): Remove.
2800 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2801 (s390_arch_setup): Use regset's size instead of fill_function for
2804 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2806 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2807 the regset's store function when ptrace returned an error.
2808 * regcache.c (get_thread_regcache): Invalidate register cache
2809 before fetching inferior's registers.
2811 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2813 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2814 while-loop as for-loop.
2815 (regsets_store_inferior_registers): Likewise.
2817 2014-11-28 Yao Qi <yao@codesourcery.com>
2819 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2820 * config.in, configure: Re-generate.
2821 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2824 2014-11-21 Yao Qi <yao@codesourcery.com>
2826 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2827 (AC_CHECK_HEADERS): Remove malloc.h.
2828 * configure: Re-generated.
2829 * config.in: Re-generated.
2830 * server.h: Don't include alloca.h and malloc.h.
2831 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2832 Don't include malloc.h.
2834 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2836 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2837 corresponding ERRNO check in same block.
2839 2014-11-12 Pedro Alves <palves@redhat.com>
2841 * server.c (cont_thread): Update comment.
2842 (start_inferior, attach_inferior): No longer clear cont_thread.
2843 (handle_v_cont): No longer set cont_thread.
2844 (captured_main): Clear cont_thread each time a GDB connects.
2846 2014-11-12 Pedro Alves <palves@redhat.com>
2848 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2849 thread, and don't resume all threads if the Hc thread has exited.
2851 2014-11-12 Pedro Alves <palves@redhat.com>
2853 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2854 the process group instead of to a specific LWP.
2856 2014-10-15 Pedro Alves <palves@redhat.com>
2859 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2861 (arm_set_thread_context): Delete.
2862 (the_low_target): Adjust.
2863 * win32-i386-low.c (debug_registers_changed)
2864 (debug_registers_used): Delete.
2865 (update_debug_registers_callback): New function.
2866 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2867 needing to update their debug registers.
2868 (win32_get_current_dr): New function.
2869 (x86_dr_low_get_addr, x86_dr_low_get_control)
2870 (x86_dr_low_get_status): Fetch the debug register from the thread
2872 (i386_initial_stuff): Adjust.
2873 (i386_get_thread_context): Remove current_event parameter. Don't
2874 clear debug_registers_changed nor copy DR values to
2876 (i386_set_thread_context): Delete.
2877 (i386_prepare_to_resume): New function.
2878 (i386_thread_added): Mark the thread as needing to update irs
2880 (the_low_target): Remove i386_set_thread_context and install
2881 i386_prepare_to_resume.
2882 * win32-low.c (win32_get_thread_context): Adjust.
2883 (win32_set_thread_context): Use SetThreadContext
2885 (win32_prepare_to_resume): New function.
2886 (win32_require_context): New function, factored out from ...
2887 (thread_rec): ... this.
2888 (continue_one_thread): Call win32_prepare_to_resume on each thread
2889 we're about to continue.
2890 (win32_resume): Call win32_prepare_to_resume on the event thread.
2891 * win32-low.h (struct win32_thread_info)
2892 <debug_registers_changed>: New field.
2893 (struct win32_target_ops): Change prototype of set_thread_context,
2894 delete set_thread_context and add prepare_to_resume.
2895 (win32_require_context): New declaration.
2897 2014-10-08 Gary Benson <gbenson@redhat.com>
2899 * server.h: Do not include common-exceptions.h.
2901 2014-10-08 Gary Benson <gbenson@redhat.com>
2903 * server.h: Do not include cleanups.h.
2905 2014-09-30 James Hogan <james.hogan@imgtec.com>
2907 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2910 2014-09-23 Yao Qi <yao@codesourcery.com>
2912 * linux-low.c (lp_status_maybe_breakpoint): New function.
2913 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2914 (count_events_callback): Likewise.
2915 (select_event_lwp_callback): Likewise.
2916 (cancel_breakpoints_callback): Likewise.
2918 2014-09-19 Don Breazeal <donb@codesourcery.com>
2920 * linux-low.c (handle_extended_wait): Call
2921 linux_ptrace_get_extended_event.
2922 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2923 linux_is_extended_waitstatus.
2925 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2927 * Makefile.in (CPPFLAGS): Define.
2928 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2929 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2931 2014-09-16 Gary Benson <gbenson@redhat.com>
2933 * inferiors.h (current_inferior): Renamed as...
2934 (current_thread): New variable. All uses updated.
2935 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2936 (maybe_move_out_of_jump_pad): Likewise.
2937 (cancel_breakpoint): Likewise.
2938 (linux_low_filter_event): Likewise.
2939 (wait_for_sigstop): Likewise.
2940 (linux_resume_one_lwp): Likewise.
2941 (need_step_over_p): Likewise.
2942 (start_step_over): Likewise.
2943 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2944 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2945 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2946 and save_inferior as saved_thread.
2947 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2949 (regcache_invalidate_thread): Likewise.
2950 * remote-utils.c (prepare_resume_reply): Likewise.
2951 * thread-db.c (thread_db_get_tls_address): Likewise.
2952 (disable_thread_event_reporting): Likewise.
2953 (remove_thread_event_breakpoints): Likewise.
2954 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2956 * target.h (set_desired_inferior): Renamed as...
2957 (set_desired_thread): New declaration. All uses updated.
2958 * server.c (myresume): Updated comment to reference thread instead
2960 (handle_serial_event): Likewise.
2961 (handle_target_event): Likewise.
2963 2014-09-12 Tom Tromey <tromey@redhat.com>
2964 Gary Benson <gbenson@redhat.com>
2966 * regcache.h: Include common-regcache.h.
2967 (regcache_read_pc): Don't declare.
2968 * regcache.c (get_thread_regcache_for_ptid): New function.
2970 2014-09-11 Tom Tromey <tromey@redhat.com>
2971 Gary Benson <gbenson@redhat.com>
2973 * symbol.c: New file.
2974 * Makefile.in (SFILES): Add symbol.c.
2975 (OBS): Add symbol.o.
2977 2014-09-11 Gary Benson <gbenson@redhat.com>
2979 * target.c (target_stop_ptid, target_continue_ptid): New
2982 2014-09-11 Tom Tromey <tromey@redhat.com>
2983 Gary Benson <gbenson@redhat.com>
2985 * target.h: Include target/target.h.
2986 * target.c (target_read_memory, target_read_uint32)
2987 (target_write_memory): New functions.
2989 2014-09-11 Gary Benson <gbenson@redhat.com>
2991 * server.h (debug_hw_points): Don't declare.
2992 * server.c (debug_hw_points): Don't define. Replace all uses
2993 with show_debug_regs.
2994 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2995 all uses with show_debug_regs.
2997 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2999 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3000 endianness into account.
3001 (ppc_supply_ptrace_register): Likewise.
3003 2014-09-03 James Hogan <james.hogan@imgtec.com>
3005 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3006 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3008 2014-09-03 Gary Benson <gbenson@redhat.com>
3010 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3011 ALL_DEBUG_ADDRESS_REGISTERS.
3013 2014-09-02 Gary Benson <gbenson@redhat.com>
3015 * i386-low.h: Renamed as...
3016 * x86-low.h: New file. All type, function and variable name
3017 prefixes changed from "i386_" to "x86_". All references updated.
3018 * i386-low.c: Renamed as...
3019 * x86-low.c: New file. All type, function and variable name
3020 prefixes changed from "i386_" to "x86_". All references updated.
3022 2014-09-02 Gary Benson <gbenson@redhat.com>
3024 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3025 (x86_linux_new_thread): Likewise.
3027 2014-08-29 Gary Benson <gbenson@redhat.com>
3029 * server.h (setjmp.h): Do not include.
3030 (toplevel): Do not declare.
3031 (common-exceptions.h): Include.
3032 (cleanups.h): Likewise.
3033 * server.c (toplevel): Do not define.
3034 (exit_code): New static global.
3035 (detach_or_kill_for_exit_cleanup): New function.
3036 (main): New function. Original main renamed to...
3037 (captured_main): New function.
3038 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3040 2014-08-29 Gary Benson <gbenson@redhat.com>
3042 * Makefile.in (SFILES): Add common/common-exceptions.c.
3043 (OBS): Add common-exceptions.o.
3044 (common-exceptions.o): New rule.
3045 * utils.c (prepare_to_throw_exception): New function.
3047 2014-08-29 Gary Benson <gbenson@redhat.com>
3049 * config.in: Regenerate.
3050 * configure: Likewise.
3052 2014-08-29 Gary Benson <gbenson@redhat.com>
3054 * Makefile.in (SFILES): Add common/cleanups.c.
3056 (cleanups.o): New rule.
3058 2014-08-29 Gary Benson <gbenson@redhat.com>
3060 * utils.c (internal_vwarning): New function.
3062 2014-08-28 Gary Benson <gbenson@redhat.com>
3064 * utils.h (fatal): Remove declaration.
3065 * utils.c (fatal): Remove function.
3067 2014-08-28 Gary Benson <gbenson@redhat.com>
3069 * tracepoint.c (gdb_agent_init): Replace fatal with
3071 (initialize_tracepoint): Likewise.
3073 2014-08-28 Gary Benson <gbenson@redhat.com>
3075 * remote-utils.c (remote_prepare): Replace fatal with error.
3077 2014-08-28 Gary Benson <gbenson@redhat.com>
3079 * linux-low.c (linux_async): Replace fatal with warning.
3081 (linux_start_non_stop): Return -1 if linux_async failed.
3083 2014-08-28 Gary Benson <gbenson@redhat.com>
3085 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3087 (i386_dr_low_get_addr): Remove vague comment.
3088 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3091 2014-08-28 Gary Benson <gbenson@redhat.com>
3093 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3094 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3096 (linux_resume_one_lwp): Likewise.
3097 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3099 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3100 with internal_error.
3101 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3102 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3103 (find_register_by_name): Replace fatal with internal_error.
3104 (find_regno): Likewise.
3105 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3106 * thread-db.c (thread_db_create_event): Likewise.
3107 (thread_db_load_search): Likewise.
3108 (try_thread_db_load_1): Likewise.
3109 * tracepoint.c (get_jump_space_head): Replace fatal with
3111 (claim_trampoline_space): Likewise.
3112 (have_fast_tracepoint_trampoline_buffer): Likewise.
3113 (cmd_qtstart): Likewise.
3114 (stop_tracing): Likewise.
3115 (fast_tracepoint_collecting): Likewise.
3116 (target_malloc): Likewise.
3117 (download_tracepoint): Likewise.
3118 (download_trace_state_variables): Replace check with gdb_assert.
3119 (upload_fast_traceframes): Replace fatal with internal_error.
3121 2014-08-19 Tom Tromey <tromey@redhat.com>
3122 Gary Benson <gbenson@redhat.com>
3124 * Makefile.in (SFILES): Add common/common-debug.c.
3125 (OBS): Add common-debug.o.
3126 (common-debug.o): New rule.
3127 * debug.h (debug_printf): Don't declare.
3128 * debug.c (debug_printf): Renamed and rewritten as...
3129 (debug_vprintf): New function.
3131 2014-08-19 Gary Benson <gbenson@redhat.com>
3133 * utils.h: Do not include print-utils.h.
3135 2014-08-19 Tom Tromey <tromey@redhat.com>
3136 Gary Benson <gbenson@redhat.com>
3138 * server.h: Add static assertion.
3139 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3141 2014-08-19 Tom Tromey <tromey@redhat.com>
3142 Gary Benson <gbenson@redhat.com>
3144 * Makefile.in (SFILES): Add common/errors.c.
3145 (OBS): Add errors.o.
3146 (IPA_OBS): Add errors-ipa.o.
3147 (errors.o): New rule.
3148 (errors-ipa.o): Likewise.
3149 * utils.h (perror_with_name, error, warning): Don't declare.
3150 * utils.c (warning): Renamed and rewritten as...
3151 (vwarning): New function.
3152 (error): Renamed and rewritten as...
3153 (verror): New function.
3154 (internal_error): Renamed and rewritten as...
3155 (internal_verror): New function.
3157 2014-08-07 Gary Benson <gbenson@redhat.com>
3159 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3160 * configure: Regenerate.
3161 * config.in: Likewise.
3162 * server.h: Do not include errno.h.
3163 * event-loop.c: Likewise.
3164 * hostio-errno.c: Likewise.
3165 * linux-low.c: Likewise.
3166 * remote-utils.c: Likewise.
3167 * spu-low.c: Likewise.
3168 * utils.c: Likewise.
3169 * gdbreplay.c: Unconditionally include errno.h.
3171 2014-08-07 Gary Benson <gbenson@redhat.com>
3173 * server.h: Do not include string.h.
3174 * event-loop.c: Likewise.
3175 * linux-low.c: Likewise.
3176 * regcache.c: Likewise.
3177 * remote-utils.c: Likewise.
3178 * spu-low.c: Likewise.
3179 * utils.c: Likewise.
3181 2014-08-07 Gary Benson <gbenson@redhat.com>
3183 * server.h: Do not include gdb_assert.h.
3185 2014-08-07 Gary Benson <gbenson@redhat.com>
3187 * server.h: Do not include common-utils.h.
3189 2014-08-07 Gary Benson <gbenson@redhat.com>
3191 * server.h: Do not include ptid.h.
3192 * notif.h: Likewise.
3194 2014-08-07 Gary Benson <gbenson@redhat.com>
3196 * server.h: Do not include gdb_locale.h.
3198 2014-08-07 Gary Benson <gbenson@redhat.com>
3200 * server.h: Do not include gdb/signals.h.
3201 * win32-low.c: Likewise.
3203 2014-08-07 Gary Benson <gbenson@redhat.com>
3205 * server.h: Do not include pathmax.h.
3207 2014-08-07 Gary Benson <gbenson@redhat.com>
3209 * server.h: Do not include libiberty.h.
3210 * linux-bfin-low.c: Likewise.
3212 2014-08-07 Gary Benson <gbenson@redhat.com>
3214 * server.h: Do not include ansidecl.h.
3216 2014-08-07 Gary Benson <gbenson@redhat.com>
3218 * linux-x86-low.c: Do not include stddef.h.
3219 * lynx-ppc-low.c: Likewise.
3220 * tracepoint.c: Likewise.
3222 2014-08-07 Gary Benson <gbenson@redhat.com>
3224 * server.h: Do not include stdarg.h.
3225 * nto-low.c: Likewise.
3227 2014-08-07 Gary Benson <gbenson@redhat.com>
3229 * server.h: Do not include stdlib.h.
3230 * inferiors.c: Likewise.
3231 * linux-low.c: Likewise.
3232 * regcache.c: Likewise.
3233 * spu-low.c: Likewise.
3234 * tracepoint.c: Likewise.
3235 * utils.c: Likewise.
3237 2014-08-07 Gary Benson <gbenson@redhat.com>
3239 * server.h: Do not include stdio.h.
3240 * linux-low.c: Likewise.
3241 * remote-utils.c: Likewise.
3242 * spu-low.c: Likewise.
3243 * utils.c: Likewise.
3244 * wincecompat.c: Likewise.
3246 2014-08-06 Gary Benson <gbenson@redhat.com>
3248 * regcache.c (init_register_cache): Move conditionals inside if.
3250 2014-08-06 Gary Benson <gbenson@redhat.com>
3252 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3254 2014-07-31 Gary Benson <gbenson@redhat.com>
3256 * ax.h: Do not include server.h.
3257 * gdbthread.h: Likewise.
3258 * lynx-low.h: Likewise.
3259 * notif.h: Likewise.
3261 2014-07-30 Gary Benson <gbenson@redhat.com>
3263 * server.h: Include common-defs.h.
3264 Do not include config.h or build-gnulib-gdbserver/config.h.
3266 2014-07-30 Gary Benson <gbenson@redhat.com>
3268 * hostio-errno.c: Move server.h to top of includes list.
3269 * inferiors.c: Likewise.
3270 * linux-x86-low.c: Likewise.
3271 * notif.c: Include server.h.
3273 2014-07-24 Tom Tromey <tromey@redhat.com>
3274 Gary Benson <gbenson@redhat.com>
3276 * server.h (CORE_ADDR): Now unsigned.
3278 2014-07-16 Pedro Alves <palves@redhat.com>
3280 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3282 2014-07-15 Pedro Alves <palves@redhat.com>
3284 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3287 2014-07-11 Pedro Alves <palves@redhat.com>
3289 * linux-low.c (kill_wait_lwp): New function, based on
3290 kill_one_lwp_callback, but use my_waitpid directly.
3291 (kill_one_lwp_callback, linux_kill): Use it.
3293 2014-06-23 Pedro Alves <palves@redhat.com>
3295 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3296 before setting DR0..DR3.
3298 2014-06-20 Gary Benson <gbenson@redhat.com>
3300 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3301 * configure: Regenerated.
3302 * config.in: Likewise.
3304 2014-06-20 Gary Benson <gbenson@redhat.com>
3306 * Makefile.in (SFILES): Update locations for files moved
3308 (object file files): Reordered.
3310 2014-06-20 Gary Benson <gbenson@redhat.com>
3312 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3313 (i386_dr_low_set_addr): Likewise.
3314 (i386_dr_low_get_addr): Likewise.
3315 (i386_dr_low_can_set_control): Likewise.
3316 (i386_dr_low_set_control): Likewise.
3317 (i386_dr_low_get_control): Likewise.
3318 (i386_dr_low_get_status): Likewise.
3319 (i386_get_debug_register_length): Likewise.
3320 * linux-x86-low.c (i386_dr_low_set_addr):
3321 Changed signature. Made static.
3322 (i386_dr_low_get_addr): Likewise.
3323 (i386_dr_low_set_control): Likewise.
3324 (i386_dr_low_get_control): Likewise.
3325 (i386_dr_low_get_status): Likewise.
3326 (i386_dr_low): New global variable.
3327 * win32-i386-low.c (i386_dr_low_set_addr):
3328 Changed signature. Made static.
3329 (i386_dr_low_get_addr): Likewise.
3330 (i386_dr_low_set_control): Likewise.
3331 (i386_dr_low_get_control): Likewise.
3332 (i386_dr_low_get_status): Likewise.
3333 (i386_dr_low): New global variable.
3335 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3337 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3338 * Makefile.in (AR, AR_FLAGS): Define.
3339 * configure: Regenerate.
3341 2014-06-19 Gary Benson <gbenson@redhat.com>
3343 * Makefile.in (i386-dregs.o): New rule.
3344 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3345 * i386-low.c (target.h): Remove include.
3346 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3347 (DR_CONTROL_SHIFT): Likewise.
3348 (DR_CONTROL_SIZE): Likewise.
3349 (DR_RW_EXECUTE): Likewise.
3350 (DR_RW_WRITE): Likewise.
3351 (DR_RW_READ): Likewise.
3352 (DR_RW_IORW): Likewise.
3353 (DR_LEN_1): Likewise.
3354 (DR_LEN_2): Likewise.
3355 (DR_LEN_4): Likewise.
3356 (DR_LEN_8): Likewise.
3357 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3358 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3359 (DR_ENABLE_SIZE): Likewise.
3360 (DR_LOCAL_SLOWDOWN): Likewise.
3361 (DR_GLOBAL_SLOWDOWN): Likewise.
3362 (DR_CONTROL_RESERVED): Likewise.
3363 (I386_DR_CONTROL_MASK): Likewise.
3364 (I386_DR_VACANT): Likewise.
3365 (I386_DR_LOCAL_ENABLE): Likewise.
3366 (I386_DR_GLOBAL_ENABLE): Likewise.
3367 (I386_DR_DISABLE): Likewise.
3368 (I386_DR_SET_RW_LEN): Likewise.
3369 (I386_DR_GET_RW_LEN): Likewise.
3370 (I386_DR_WATCH_HIT): Likewise.
3371 (i386_wp_op_t): Likewise.
3372 (i386_show_dr): Likewise.
3373 (i386_length_and_rw_bits): Likewise.
3374 (i386_insert_aligned_watchpoint): Likewise.
3375 (i386_remove_aligned_watchpoint): Likewise.
3376 (i386_handle_nonaligned_watchpoint): Likewise.
3377 i386_update_inferior_debug_regs(): Likewise.
3378 (i386_dr_insert_watchpoint): Likewise.
3379 (i386_dr_remove_watchpoint): Likewise.
3380 (i386_dr_region_ok_for_watchpoint): Likewise.
3381 (i386_dr_stopped_data_address): Likewise.
3382 (i386_dr_stopped_by_watchpoint): Likewise.
3384 2014-06-19 Gary Benson <gbenson@redhat.com>
3386 * i386-low.c (i386_dr_show): Renamed to
3387 i386_show_dr and made static. All uses updated.
3388 (i386_dr_length_and_rw_bits): Renamed to
3389 i386_length_and_rw_bits and made static.
3391 (i386_dr_insert_aligned_watchpoint): Renamed to
3392 i386_insert_aligned_watchpoint and made static.
3394 (i386_dr_remove_aligned_watchpoint): Renamed to
3395 i386_remove_aligned_watchpoint and made static.
3397 (i386_dr_update_inferior_debug_regs): Renamed to
3398 i386_update_inferior_debug_regs and made static.
3401 2014-06-18 Gary Benson <gbenson@redhat.com>
3403 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3404 (i386_dr_low_can_set_control): Likewise.
3405 (i386_get_debug_register_length): Likewise.
3406 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3407 (i386_dr_low_can_set_control): Likewise.
3408 (i386_get_debug_register_length): Likewise.
3410 2014-06-17 Gary Benson <gbenson@redhat.com>
3412 * i386-low.h (i386-dregs.h): New include.
3413 (DR_FIRSTADDR): Now in i386-dregs.h.
3414 (DR_LASTADDR): Likewise.
3415 (DR_NADDR): Likewise.
3416 (DR_STATUS): Likewise.
3417 (DR_CONTROL): Likewise.
3418 (i386_debug_reg_state): Likewise.
3419 (i386_dr_insert_watchpoint): Likewise.
3420 (i386_dr_remove_watchpoint): Likewise.
3421 (i386_dr_region_ok_for_watchpoint): Likewise.
3422 (i386_dr_stopped_data_address): Likewise.
3423 (i386_dr_stopped_by_watchpoint): Likewise.
3424 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3426 2014-06-18 Gary Benson <gbenson@redhat.com>
3428 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3429 i386_dr_insert_watchpoint.
3430 (i386_low_remove_watchpoint): Renamed to
3431 i386_dr_remove_watchpoint.
3432 (i386_low_region_ok_for_watchpoint): Renamed to
3433 i386_dr_region_ok_for_watchpoint.
3434 (i386_low_stopped_data_address): Renamed to
3435 i386_dr_stopped_data_address.
3436 (i386_low_stopped_by_watchpoint): Renamed to
3437 i386_dr_stopped_by_watchpoint.
3438 * i386-low.c (i386_show_dr): Renamed to
3439 i386_dr_show and made nonstatic. All uses updated.
3440 (i386_length_and_rw_bits): Renamed to
3441 i386_dr_length_and_rw_bits and made nonstatic.
3443 (i386_insert_aligned_watchpoint): Renamed to
3444 i386_dr_insert_aligned_watchpoint and made nonstatic.
3446 (i386_remove_aligned_watchpoint): Renamed to
3447 i386_dr_remove_aligned_watchpoint and made nonstatic.
3449 (i386_update_inferior_debug_regs): Renamed to
3450 i386_dr_update_inferior_debug_regs and made nonstatic.
3452 (i386_low_insert_watchpoint): Renamed to
3453 i386_dr_insert_watchpoint. All uses updated.
3454 (i386_low_remove_watchpoint): Renamed to
3455 i386_dr_remove_watchpoint. All uses updated.
3456 (i386_low_region_ok_for_watchpoint): Renamed to
3457 i386_dr_region_ok_for_watchpoint. All uses updated.
3458 (i386_low_stopped_data_address): Renamed to
3459 i386_dr_stopped_data_address. All uses updated.
3460 (i386_low_stopped_by_watchpoint): Renamed to
3461 i386_dr_stopped_by_watchpoint. All uses updated.
3463 2014-06-18 Gary Benson <gbenson@redhat.com>
3465 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3466 (i386_dr_low_can_set_control): Likewise.
3467 (i386_insert_aligned_watchpoint): New check.
3469 2014-06-18 Gary Benson <gbenson@redhat.com>
3471 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3474 2014-06-18 Gary Benson <gbenson@redhat.com>
3476 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3477 instead of fatal and error.
3478 (i386_handle_nonaligned_watchpoint): Likewise.
3480 2014-06-18 Gary Benson <gbenson@redhat.com>
3482 * i386-low.c (i386_get_debug_register_length): New macro.
3483 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3484 (i386_show_dr): Use debug_printf instead of fprintf. Use
3485 phex to format values.
3487 2014-06-18 Gary Benson <gbenson@redhat.com>
3489 * i386-low.h: Comment changes.
3490 * i386-low.c: Likewise.
3492 2014-06-18 Gary Benson <gbenson@redhat.com>
3494 * i386-low.c: Whitespace changes.
3496 2014-06-12 Tom Tromey <tromey@redhat.com>
3498 * utils.c (freeargv): Remove.
3500 2014-06-12 Tom Tromey <tromey@redhat.com>
3502 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3503 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3504 (parse_debug_format_options): Likewise.
3505 (gdbserver_usage): Likewise.
3506 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3507 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3508 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3510 ($(LIBGNU)): Depend on libiberty.
3511 (all-lib): Recurse into all subdirs.
3512 (install-only): Invoke "install" target in subdirs.
3513 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3515 * configure: Rebuild.
3516 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3517 for vasprintf, vsnprintf, or gettimeofday.
3518 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3521 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3523 * development.sh: Delete.
3524 * Makefile.in (config.status): Adjust dependency on development.sh.
3525 * configure.ac: Adjust development.sh source call.
3526 * configure: Regenerate.
3528 2014-06-02 Pedro Alves <palves@redhat.com>
3530 * ax.c (gdb_free_agent_expr): New function.
3531 * ax.h (gdb_free_agent_expr): New declaration.
3532 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3534 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3536 (clear_breakpoint_conditions_and_commands): New function.
3537 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3538 (clear_breakpoint_conditions_and_commands): New declaration.
3540 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3542 * linux-aarch64-low.c (asm/ptrace.h): Include.
3544 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3546 Fix TLS access for -static -pthread.
3547 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3548 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3549 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3551 2014-05-20 Pedro Alves <palves@redhat.com>
3553 * linux-aarch64-low.c (aarch64_insert_point)
3554 (aarch64_remove_point): No longer check whether the type is
3555 supported here. Adjust to new interface.
3556 (the_low_target): Install aarch64_supports_z_point_type as
3557 supports_z_point_type method.
3558 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3559 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3560 instead of a Z packet char. Adjust.
3561 (arm_supports_z_point_type): New function.
3562 (arm_insert_point, arm_remove_point): Adjust to new interface.
3563 (the_low_target): Install arm_supports_z_point_type.
3564 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3565 (cris_insert_point, cris_remove_point): Adjust to new interface.
3566 Don't check whether the type is supported here.
3567 (the_low_target): Install cris_supports_z_point_type.
3568 * linux-low.c (linux_supports_z_point_type): New function.
3569 (linux_insert_point, linux_remove_point): Adjust to new interface.
3570 * linux-low.h (struct linux_target_ops) <insert_point,
3571 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3572 raw_breakpoint pointer parameter.
3573 <supports_z_point_type>: New method.
3574 * linux-mips-low.c (mips_supports_z_point_type): New function.
3575 (mips_insert_point, mips_remove_point): Adjust to new interface.
3576 Use mips_supports_z_point_type.
3577 (the_low_target): Install mips_supports_z_point_type.
3578 * linux-ppc-low.c (the_low_target): Install NULL as
3579 supports_z_point_type method.
3580 * linux-s390-low.c (the_low_target): Install NULL as
3581 supports_z_point_type method.
3582 * linux-sparc-low.c (the_low_target): Install NULL as
3583 supports_z_point_type method.
3584 * linux-x86-low.c (x86_supports_z_point_type): New function.
3585 (x86_insert_point): Adjust to new insert_point interface. Use
3586 insert_memory_breakpoint. Adjust to new
3587 i386_low_insert_watchpoint interface.
3588 (x86_remove_point): Adjust to remove_point interface. Use
3589 remove_memory_breakpoint. Adjust to new
3590 i386_low_remove_watchpoint interface.
3591 (the_low_target): Install x86_supports_z_point_type.
3592 * lynx-low.c (lynx_target_ops): Install NULL as
3593 supports_z_point_type callback.
3594 * nto-low.c (nto_supports_z_point_type): New.
3595 (nto_insert_point, nto_remove_point): Adjust to new interface.
3596 (nto_target_ops): Install nto_supports_z_point_type.
3597 * mem-break.c: Adjust intro comment.
3598 (struct raw_breakpoint) <raw_type, size>: New fields.
3599 <inserted>: Update comment.
3600 <shlib_disabled>: Delete field.
3601 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3602 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3603 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3604 (raw_bkpt_type_to_target_hw_bp_type): New function.
3605 (find_enabled_raw_code_breakpoint_at): New function.
3606 (find_raw_breakpoint_at): New type and size parameters. Use them.
3607 (insert_memory_breakpoint): New function, based off
3608 set_raw_breakpoint_at.
3609 (remove_memory_breakpoint): New function.
3610 (set_raw_breakpoint_at): Reimplement.
3611 (set_breakpoint): New, based on set_breakpoint_at.
3612 (set_breakpoint_at): Reimplement.
3613 (delete_raw_breakpoint): Go through the_target->remove_point
3614 instead of assuming memory breakpoints.
3615 (find_gdb_breakpoint_at): Delete.
3616 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3617 (find_gdb_breakpoint): New function.
3618 (set_gdb_breakpoint_at): Delete.
3619 (z_type_supported): New function.
3620 (set_gdb_breakpoint_1): New function, loosely based off
3621 set_gdb_breakpoint_at.
3622 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3623 (delete_gdb_breakpoint_at): Delete.
3624 (delete_gdb_breakpoint_1): New function, loosely based off
3625 delete_gdb_breakpoint_at.
3626 (delete_gdb_breakpoint): New function.
3627 (clear_gdb_breakpoint_conditions): Rename to ...
3628 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3630 (add_condition_to_breakpoint): Make static.
3631 (add_breakpoint_condition): Take a struct breakpoint pointer
3632 instead of an address. Adjust.
3633 (gdb_condition_true_at_breakpoint): Rename to ...
3634 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3636 (gdb_condition_true_at_breakpoint): Reimplement.
3637 (add_breakpoint_commands): Take a struct breakpoint pointer
3638 instead of an address. Adjust.
3639 (gdb_no_commands_at_breakpoint): Rename to ...
3640 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3641 parameter. Return true if no breakpoint was found. Change debug
3643 (gdb_no_commands_at_breakpoint): Reimplement.
3644 (run_breakpoint_commands): Rename to ...
3645 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3646 and change return type to boolean.
3647 (run_breakpoint_commands): New function.
3648 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3649 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3650 breakpoint. Go through the_target->remove_point instead of
3651 assuming memory breakpoint.
3652 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3653 software and hardware breakpoints.
3654 (reinsert_raw_breakpoint): Go through the_target->insert_point
3655 instead of assuming memory breakpoint.
3656 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3657 software and hardware breakpoints.
3658 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3659 Check both software and hardware breakpoints.
3660 (validate_inserted_breakpoint): Assert the breakpoint is a
3661 software breakpoint. Set the inserted flag to -1 instead of
3662 setting shlib_disabled.
3663 (delete_disabled_breakpoints): Adjust.
3664 (validate_breakpoints): Only validate software breakpoints.
3665 Adjust to inserted flag change.
3666 (check_mem_read, check_mem_write): Skip breakpoint types other
3667 than software breakpoints. Adjust to inserted flag change.
3668 * mem-break.h (enum raw_bkpt_type): New enum.
3669 (raw_breakpoint, struct process_info): Forward declare.
3670 (Z_packet_to_target_hw_bp_type): Delete declaration.
3671 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3672 (set_gdb_breakpoint, delete_gdb_breakpoint)
3673 (clear_breakpoint_conditions): New declarations.
3674 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3675 (breakpoint_inserted_here): Update comment.
3676 (add_breakpoint_condition, add_breakpoint_commands): Replace
3677 address parameter with a breakpoint pointer parameter.
3678 (gdb_breakpoint_here): Update comment.
3679 (delete_gdb_breakpoint_at): Delete.
3680 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3681 * server.c (process_point_options): Take a struct breakpoint
3682 pointer instead of an address. Adjust.
3683 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3684 delete_gdb_breakpoint.
3685 * spu-low.c (spu_target_ops): Install NULL as
3686 supports_z_point_type method.
3687 * target.h: Include mem-break.h.
3688 (struct target_ops) <prepare_to_access_memory>: Update comment.
3689 <supports_z_point_type>: New field.
3690 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3691 instead of a char. Also take a raw breakpoint pointer.
3692 * win32-arm-low.c (the_low_target): Install NULL as
3693 supports_z_point_type.
3694 * win32-i386-low.c (i386_supports_z_point_type): New function.
3695 (i386_insert_point, i386_remove_point): Adjust to new interface.
3696 (the_low_target): Install i386_supports_z_point_type.
3697 * win32-low.c (win32_supports_z_point_type): New function.
3698 (win32_insert_point, win32_remove_point): Adjust to new interface.
3699 (win32_target_ops): Install win32_supports_z_point_type.
3700 * win32-low.h (struct win32_target_ops):
3701 <supports_z_point_type>: New method.
3702 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3703 instead of a char. Also take a raw breakpoint pointer.
3705 2014-05-20 Pedro Alves <palves@redhat.com>
3707 * mem-break.h: Include break-common.h.
3708 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3709 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3710 (Z_packet_to_target_hw_bp_type): New declaration.
3711 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3712 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3713 (Z_PACKET_ACCESS_WP): Delete macros.
3714 (Z_packet_to_hw_type): Delete function.
3715 * i386-low.h: Don't include break-common.h here.
3716 (Z_packet_to_hw_type): Delete declaration.
3717 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3718 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3719 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3720 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3721 * linux-aarch64-low.c: Don't include break-common.h here.
3722 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3723 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3724 (Z_packet_to_target_hw_bp_type): Delete function.
3725 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3727 (mips_insert_point, mips_remove_point): Use
3728 Z_packet_to_target_hw_bp_type.
3730 2014-05-20 Pedro Alves <palves@redhat.com>
3732 * linux-aarch64-low.c: Include break-common.h.
3733 (enum target_point_type): Delete.
3734 (Z_packet_to_point_type): Rename to ...
3735 (Z_packet_to_target_hw_bp_type): ... this, and return a
3736 target_hw_bp_type instead.
3737 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3738 instead of an enum target_point_type.
3739 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3741 (aarch64_dr_state_insert_one_point)
3742 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3743 (aarch64_handle_aligned_watchpoint)
3744 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3745 Take an enum target_hw_bp_type instead of an enum
3747 (aarch64_supports_z_point_type): New function.
3748 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3749 use Z_packet_to_target_hw_bp_type.
3751 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3753 * configure.ac: Only use -Werror by default when DEVELOPMENT
3755 * configure: Regenerate.
3757 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3759 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3760 * linux-x86-low.c (X86_64_USER_REGS): New.
3761 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3763 2014-04-28 Yao Qi <yao@codesourcery.com>
3765 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3768 2014-04-25 Pedro Alves <palves@redhat.com>
3771 * linux-low.c (linux_attach_fail_reason_string): New function.
3772 (linux_attach_lwp): Delete.
3773 (linux_attach_lwp_1): Rename to ...
3774 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3775 argument. Remove "initial" parameter. Return int instead of
3776 void. Don't error or warn here.
3777 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3778 failure to attach to the tgid. Call warning when failing to
3780 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3781 argument. Remove "initial" parameter. Return int instead of
3782 void. Don't error or warn here.
3783 (linux_attach_fail_reason_string): New declaration.
3784 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3785 interface change. Use linux_attach_fail_reason_string.
3787 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3788 Walfred Tedeschi <walfred.tedeschi@intel.com>
3790 * Makefile.in: Added rules to handle new files
3791 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3792 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3793 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3794 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3795 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3796 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3798 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3799 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3800 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3801 i386/x32-avx512.xml.
3802 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3803 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3804 i386/x32-avx512-linux.xml.
3805 * i387-fp.c (num_avx512_k_registers): New constant for number
3807 (num_avx512_zmmh_low_registers): New constant for number of
3808 lower ZMM registers (0-15).
3809 (num_avx512_zmmh_high_registers): New constant for number of
3810 higher ZMM registers (16-31).
3811 (num_avx512_ymmh_registers): New contant for number of higher
3812 YMM registers (ymm16-31 added by avx521 on x86_64).
3813 (num_avx512_xmm_registers): New constant for number of higher
3814 XMM registers (xmm16-31 added by AVX512 on x86_64).
3815 (struct i387_xsave): Add space for AVX512 registers.
3816 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3817 Add code to handle AVX512 registers.
3818 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3819 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3820 prototypei from generated file.
3821 (tdesc_amd64_avx512_linux): Likewise.
3822 (init_registers_x32_avx512_linux): Likewise.
3823 (tdesc_x32_avx512_linux): Likewise.
3824 (init_registers_i386_avx512_linux): Likewise.
3825 (tdesc_i386_avx512_linux): Likewise.
3826 (x86_64_regmap): Add AVX512 registers.
3827 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3829 (initialize_low_arch): Add code to initialize AVX512 registers.
3831 2014-04-23 Pedro Alves <palves@redhat.com>
3833 * mem-break.c (find_gdb_breakpoint_at): Make static.
3834 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3836 2014-04-23 Pedro Alves <palves@redhat.com>
3838 * i386-low.c: Don't include break-common.h here.
3839 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3840 prototype to take target_hw_bp_type as argument instead of a Z
3842 * i386-low.h: Include break-common.h here.
3843 (Z_packet_to_hw_type): Declare.
3844 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3846 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3847 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3848 (x86_remove_point): Convert the packet number to a
3849 target_hw_bp_type before calling i386_low_remove_watchpoint.
3850 * win32-i386-low.c (i386_insert_point): Convert the packet number
3851 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3852 (i386_remove_point): Convert the packet number to a
3853 target_hw_bp_type before calling i386_low_remove_watchpoint.
3855 2014-04-23 Pedro Alves <palves@redhat.com>
3857 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3859 2014-04-10 Pedro Alves <palves@redhat.com>
3861 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3862 Check if the condition or command is NULL before checking if the
3863 breakpoint is known. On success, return true.
3864 * mem-break.h (add_breakpoint_condition): Document return.
3865 (add_breakpoint_commands): Add describing comment.
3866 * server.c (skip_to_semicolon): New function.
3867 (process_point_options): Use it.
3869 2014-04-09 Pedro Alves <palves@redhat.com>
3871 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3874 2014-02-27 Pedro Alves <palves@redhat.com>
3877 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3879 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3881 (last_thread_of_process_p): Take a PID argument instead of a
3883 (linux_wait_for_lwp): Delete.
3884 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3886 (linux_low_filter_event): New function, party factored out from
3887 linux_wait_for_event.
3888 (linux_wait_for_event): Rename to ...
3889 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3890 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3891 sigsuspend. Check for zombie leaders.
3892 (linux_wait_for_event): Reimplement as wrapper around
3893 linux_wait_for_event_filtered.
3894 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3895 a normal or signal exit is seen, it's the whole process exiting.
3896 (wait_for_sigstop): No longer a for_each_inferior callback.
3897 Rewrite on top of linux_wait_for_event_filtered.
3898 (stop_all_lwps): Call wait_for_sigstop directly.
3899 * server.c (resume, handle_target_event): Handle
3900 TARGET_WAITKIND_NO_RESUMED.
3902 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3904 * win32-low.c (psapi_get_dll_name,
3905 * win32_CreateToolhelp32Snapshot): Delete.
3906 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3907 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3909 (handle_load_dll): Add function description.
3910 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3912 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3914 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3916 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3917 base address when calling win32_add_one_solib.
3918 (handle_load_dll): Delete local variable load_addr.
3919 Remove 0x1000 offset applied to DLL base address when calling
3920 win32_add_one_solib.
3921 (handle_unload_dll): Add comment.
3923 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3925 * win32-low.c (win32_add_all_dlls): Renames
3926 win32_ensure_ntdll_loaded. Rewrite function documentation.
3927 Adjust implementation to always load all DLLs.
3928 Add 0x1000 offset to DLL base address when calling
3929 win32_add_one_solib.
3930 (child_initialization_done): New static global.
3931 (do_initial_child_stuff): Set child_initialization_done to
3932 zero during child initialization, and 1 after. Replace call
3933 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3935 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3936 (handle_unload_dll): Add function documentation.
3937 (get_child_debug_event): Ignore load and unload DLL events
3938 during child initialization.
3940 2014-02-20 Doug Evans <dje@google.com>
3942 Remove global all_lwps.
3943 * inferiors.h (ptid_of): Move here from linux-low.h.
3944 (pid_of, lwpid_of): Ditto.
3945 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3946 parameter is a struct thread_info * now.
3947 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3948 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3949 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3951 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3952 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3953 * linux-arm-low.c (update_registers_callback): Update, "entry"
3954 parameter is a struct thread_info * now.
3955 Fetch lwpid from current_inferior directly.
3956 (arm_insert_point): Pass &all_threads to find_inferior instead of
3958 (arm_remove_point): Ditto.
3959 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3960 (arm_prepare_to_resume): Fetch pid from thread.
3961 (arm_read_description): Fetch lwpid from current_inferior directly.
3962 * linux-low.c (all_lwps): Delete.
3963 (delete_lwp): Delete call to remove_inferior.
3964 (handle_extended_wait): Fetch lwpid from thread.
3965 (add_lwp): Don't set lwp->entry.id. Remove call to
3966 add_inferior_to_list.
3967 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3968 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3969 (kill_one_lwp_callback): Ditto.
3970 (linux_kill): Don't dereference NULL pointer.
3971 Fetch ptid,lwpid from thread.
3972 (get_detach_signal): Fetch ptid from thread.
3973 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3974 Simplify call to regcache_invalidate_thread.
3975 (delete_lwp_callback): Update, "entry" parameter is a
3976 struct thread_info * now. Fetch pid from thread.
3977 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3978 (status_pending_p_callback): Update, "entry" parameter is a
3979 struct thread_info * now. Fetch ptid from thread.
3980 (find_lwp_pid): Update, "entry" parameter is a
3981 struct thread_info * now.
3982 (linux_wait_for_lwp): Fetch pid from thread.
3983 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3984 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3985 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3986 (dequeue_one_deferred_signal): Ditto.
3987 (cancel_breakpoint): Fetch ptid from current_inferior.
3988 (linux_wait_for_event): Pass &all_threads to find_inferior,
3989 not &all_lwps. Fetch ptid, lwpid from thread.
3990 (count_events_callback): Update, "entry" parameter is a
3991 struct thread_info * now.
3992 (select_singlestep_lwp_callback): Ditto.
3993 (select_event_lwp_callback): Ditto.
3994 (cancel_breakpoints_callback): Ditto.
3995 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3997 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3998 (unsuspend_one_lwp): Update, "entry" parameter is a
3999 struct thread_info * now.
4000 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4002 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4003 Fetch lwpid from thread, not lwp.
4004 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4005 Pass &all_threads to find_inferior, not &all_lwps.
4006 (send_sigstop): Fetch lwpid from thread, not lwp.
4007 (send_sigstop_callback): Update, "entry" parameter is a
4008 struct thread_info * now.
4009 (suspend_and_send_sigstop_callback): Ditto.
4010 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4011 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4012 struct thread_info * now.
4013 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4015 (lwp_running): Update, "entry" parameter is a
4016 struct thread_info * now.
4017 (stop_all_lwps): Fetch ptid from thread.
4018 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4019 (linux_resume_one_lwp): Fetch lwpid from thread.
4020 (linux_set_resume_request): Update, "entry" parameter is a
4021 struct thread_info * now. Fetch pid, lwpid from thread.
4022 (resume_status_pending_p): Update, "entry" parameter is a
4023 struct thread_info * now.
4024 (need_step_over_p): Ditto. Fetch lwpid from thread.
4025 (start_step_over): Fetch lwpid from thread.
4026 (linux_resume_one_thread): Update, "entry" parameter is a
4027 struct thread_info * now. Fetch lwpid from thread.
4028 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4029 (proceed_one_lwp): Update, "entry" parameter is a
4030 struct thread_info * now. Fetch lwpid from thread.
4031 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4032 struct thread_info * now.
4033 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4034 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4035 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4037 (regsets_store_inferior_registers): Ditto.
4038 (fetch_register, store_register): Ditto.
4039 (linux_read_memory, linux_write_memory): Ditto.
4040 (linux_request_interrupt): Ditto.
4041 (linux_read_auxv): Ditto.
4042 (linux_xfer_siginfo): Ditto.
4043 (linux_qxfer_spu): Ditto.
4044 (linux_qxfer_libraries_svr4): Ditto.
4045 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4046 moved to inferiors.h.
4048 (get_thread_lwp): Update.
4049 (struct lwp_info): Delete member "entry". Simplify comment for
4052 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4053 current_inferior directly.
4054 (update_watch_registers_callback): Update, "entry" parameter is a
4055 struct thread_info * now. Fetch pid from thread.
4056 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4057 (mips_insert_point): Fetch lwpid from current_inferior.
4058 Pass &all_threads to find_inferior, not &all_lwps.
4059 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4060 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4062 (mips_stopped_data_address): Ditto.
4063 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4065 * linux-tile-low.c (tile_arch_setup): Ditto.
4066 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4067 (update_debug_registers_callback): Update, "entry" parameter is a
4068 struct thread_info * now. Fetch pid from thread.
4069 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4070 Pass &all_threads to find_inferior, not &all_lwps.
4071 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4072 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4073 Pass &all_threads to find_inferior, not &all_lwps.
4074 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4075 (i386_dr_low_get_status): Ditto.
4076 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4077 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4078 (x86_linux_read_description): Ditto.
4079 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4081 2014-02-20 Doug Evans <dje@google.com>
4083 * inferiors.c (get_first_inferior): Fix buglet.
4085 2014-02-19 Doug Evans <dje@google.com>
4087 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4088 * inferiors.c (add_thread): Change result type to struct thread_info *.
4089 All callers updated.
4090 (add_lwp): Call add_thread here instead of in callers.
4091 All callers updated.
4092 * linux-low.h (get_lwp_thread): Rewrite.
4093 (struct lwp_info): New member "thread".
4095 2014-02-19 Doug Evans <dje@google.com>
4097 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4098 All callers updated.
4100 2014-02-19 Doug Evans <dje@google.com>
4102 * inferiors.c (add_thread): Fix whitespace.
4104 2014-02-19 Doug Evans <dje@google.com>
4106 * dll.c (clear_dlls): Replace accessing list implemention details
4108 * gdbthread.h (get_first_thread): Declare.
4109 * inferiors.c (for_each_inferior_with_data): New function.
4110 (get_first_thread): New function.
4111 (find_thread_ptid): Simplify.
4112 (get_first_inferior): New function.
4113 (clear_list): Delete.
4114 (one_inferior_p): New function.
4115 (clear_inferior_list): New function.
4116 (clear_inferiors): Update.
4117 * inferiors.h (for_each_inferior_with_data): Declare.
4118 (clear_inferior_list): Declare.
4119 (one_inferior_p): Declare.
4120 (get_first_inferior): Declare.
4121 * linux-low.c (linux_wait_for_event): Replace accessing list
4122 implemention details with API function.
4123 * server.c (target_running): Ditto.
4124 (accumulate_file_name_length): New function.
4125 (emit_dll_description): New function.
4126 (handle_qxfer_libraries): Replace accessing list implemention
4127 details with API function.
4128 (handle_qxfer_threads_worker): New function.
4129 (handle_qxfer_threads_proper): Replace accessing list implemention
4130 details with API function.
4131 (handle_query): Ditto.
4132 (visit_actioned_threads_callback_ftype): New typedef.
4133 (visit_actioned_threads_data): New struct.
4134 (visit_actioned_threads): Rewrite to be find_inferior callback.
4135 (resume): Call find_inferior.
4136 (handle_status): Replace accessing list implemention
4137 details with API function.
4138 (process_serial_event): Replace accessing list implemention details
4140 * target.c (set_desired_inferior): Replace accessing list implemention
4141 details with API function.
4142 * tracepoint.c (same_process_p): New function.
4143 (gdb_agent_about_to_close): Replace accessing list implemention
4144 details with API function.
4145 * win32-low.c (child_delete_thread): Replace accessing list
4146 implemention details with API function.
4147 (match_dll_by_basename): New function.
4148 (dll_is_loaded_by_basename): New function.
4149 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4150 details call to dll_is_loaded_by_basename.
4152 2014-02-19 Doug Evans <dje@google.com>
4154 * dll.h (struct dll_info): Add comment.
4155 * gdbthread.h (struct thread_info): Add comment.
4156 (current_ptid): Simplify.
4157 * inferiors.c (add_process): Update.
4158 (remove_process): Update.
4159 * inferiors.h (struct process_info): Rename member "head" to "entry".
4160 * linux-low.c (delete_lwp): Update.
4162 (last_thread_of_process_p): Update.
4163 (kill_one_lwp_callback, linux_kill): Update.
4164 (status_pending_p_callback): Update.
4165 (wait_for_sigstop): Update. Simplify read of ptid.
4166 (start_step_over): Update.
4167 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4168 (get_lwp_thread): Update.
4169 (struct lwp_info): Rename member "head" to "entry".
4170 * regcache.h (inferior_list_entry): Delete.
4171 * server.c (kill_inferior_callback): Update.
4172 (detach_or_kill_inferior_callback): Update.
4173 (print_started_pid): Update.
4174 (print_attached_pid): Update.
4175 (process_serial_event): Simplify read of ptid.
4176 * thread-db.c (thread_db_create_event): Update.
4177 (thread_db_get_tls_address): Update.
4178 * win32-low.c (current_inferior_ptid): Simplify.
4180 2014-02-19 Tom Tromey <tromey@redhat.com>
4182 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4184 (target_supports_btrace): Update.
4186 2014-02-14 Yao Qi <yao@codesourcery.com>
4188 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4189 (rsp-low-ipa.o): New target.
4191 2014-02-12 Tom Tromey <tromey@redhat.com>
4193 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4194 convert_ascii_to_int.
4195 * regcache.c (registers_to_string): Likewise.
4196 * remote-utils.c (decode_M_packet): Likewise.
4197 * server.c (process_serial_event): Likewise.
4199 2014-02-12 Tom Tromey <tromey@redhat.com>
4201 * server.c (handle_query, handle_v_run): Use hex2bin, not
4203 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4205 2014-02-12 Tom Tromey <tromey@redhat.com>
4207 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4208 convert_int_to_ascii.
4209 * regcache.c (registers_to_string, collect_register_as_string):
4211 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4213 * server.c (process_serial_event): Likewise.
4214 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4215 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4217 2014-02-12 Tom Tromey <tromey@redhat.com>
4219 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4220 bin2hex, not hexify.
4221 * tracepoint.c (cmd_qtstatus): Likewise.
4223 2014-02-12 Tom Tromey <tromey@redhat.com>
4225 * remote-utils.c (monitor_output): Pass explicit length to
4228 2014-02-12 Tom Tromey <tromey@redhat.com>
4230 * tracepoint.c: Include rsp-low.h.
4231 * server.c: Include rsp-low.h.
4232 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4233 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4235 * remote-utils.c: Include rsp-low.h.
4236 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4237 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4238 (convert_int_to_ascii, convert_ascii_to_int): Move to
4240 * regcache.c: Include rsp-low.h.
4241 * ax.c: Include rsp-low.h.
4242 * Makefile.in (SFILES): Add common/rsp-low.c.
4243 (OBS): Add rsp-low.o.
4244 (rsp-low.o): New target.
4246 2014-02-12 Tom Tromey <tromey@redhat.com>
4248 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4249 Include print-utils.h.
4250 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4251 (plongest, thirty_two, phex_nz): Remove.
4252 * Makefile.in (SFILES): Add common/print-utils.c.
4253 (OBS): Add print-utils.o.
4254 (print-utils-ipa.o): New target.
4255 (print-utils.o): New target.
4256 (IPA_OBJS): Add print-utils-ipa.o.
4258 2014-02-06 Tom Tromey <tromey@redhat.com>
4260 * Makefile.in (SFILES): Fix indentation.
4262 2014-02-05 Doug Evans <dje@google.com>
4264 * linux-low.c (linux_wait_for_event): Improve comment.
4265 (linux_wait_1): Keep current_inferior in sync with event_child.
4267 2014-01-22 Doug Evans <dje@google.com>
4269 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4271 2014-01-22 Doug Evans <dje@google.com>
4273 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4274 * configure: Regenerate.
4275 * config.in: Regenerate.
4276 * Makefile.in (SFILES): Add debug.c.
4278 * debug.c: New file.
4279 * debug.h: New file.
4280 * linux-aarch64-low.c (*): Update all debugging printfs to use
4281 debug_printf instead of fprintf.
4282 * linux-arm-low.c (*): Ditto.
4283 * linux-cris-low.c (*): Ditto.
4284 * linux-crisv32-low.c (*): Ditto.
4285 * linux-m32r-low.c (*): Ditto.
4286 * linux-sparc-low.c (*): Ditto.
4287 * linux-x86.c (*): Ditto.
4288 * linux-low.c (*): Ditto.
4289 (linux_wait_1): Add calls to debug_enter, debug_exit.
4290 (linux_wait): Remove redundant debugging printf.
4291 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4292 (linux_resume, unstop_all_lwps): Ditto.
4293 * mem-break.c (*): Update all debugging printfs to use
4294 debug_printf instead of fprintf.
4295 * remote-utils.c (*): Ditto.
4296 * thread-db.c (*): Ditto.
4297 * server.c #include <ctype.h>, "gdb_vecs.h".
4298 (debug_threads): Moved to debug.c.
4299 (*): Update all debugging printfs to use debug_printf instead of
4301 (start_inferior): Replace call to fflush with call to debug_flush.
4302 (monitor_show_help): Mention set debug-format.
4303 (parse_debug_format_options): New function.
4304 (handle_monitor_command): Handle "monitor set debug-format".
4305 (gdbserver_usage): Mention --debug-format.
4306 (main): Parse --debug-format.
4307 * server.h (debug_threads): Declaration moved to debug.h.
4309 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4310 trace_debug_1 that uses debug_printf.
4311 (tracepoint_look_up_symbols): Update all debugging printfs to use
4312 debug_printf instead of fprintf.
4314 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4316 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4319 2014-01-17 Pedro Alves <palves@redhat.com>
4322 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4323 defined after including gdb_proc_service.h.
4325 2014-01-16 Doug Evans <dje@google.com>
4327 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4328 (match_dll): Use it.
4330 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4332 * target.h (target_ops) <read_btrace>: Change parameters and
4333 return type to allow error reporting.
4334 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4335 trace reading errors on.
4336 * linux-low.c (linux_low_read_btrace): Pass trace reading
4338 (linux_low_disable_btrace): New.
4340 2014-01-15 Doug Evans <dje@google.com>
4342 * inferiors.c (thread_id_to_gdb_id): Delete.
4343 * inferiors.h (thread_id_to_gdb_id): Delete.
4345 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4347 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4348 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4351 2014-01-08 Pedro Alves <palves@redhat.com>
4353 * server.c (handle_status): Don't discard previous queued stop
4354 replies or thread's pending status here.
4355 (main) <disconnection>: Do it here instead.
4357 2014-01-08 Pedro Alves <palves@redhat.com>
4359 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4360 * server.c (visit_actioned_threads, handle_pending_status): New
4362 (handle_v_cont): Factor out parts to ...
4363 (resume): ... this new function. If in all-stop, and a thread
4364 being resumed has a pending status, report it without actually
4366 (myresume): Adjust to use the new 'resume' function.
4367 (clear_pending_status_callback, set_pending_status_callback)
4368 (find_status_pending_thread_callback): New functions.
4369 (handle_status): Handle the case of multiple threads having
4370 interesting statuses to report. Report threads' real last signal
4371 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4372 with an interesting thread to report the status for, instead of
4373 always reporting the status of the first thread.
4375 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4377 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4378 * gdbreplay.c (gdbreplay_version): Likewise.
4380 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4382 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4383 iov.iov_len with the real length in use.
4385 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4387 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4388 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4389 for all targets that use win32-low.c.
4390 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4391 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4393 2013-12-13 Pedro Alves <palves@redhat.com>
4395 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4396 if equal to TARGET_WAITKIND_LOADED.
4397 * win32-low.c (cached_status): New static global.
4398 (win32_wait): Add declaration.
4399 (do_initial_child_stuff): Flush all initial pending debug events
4400 up to the initial breakpoint.
4401 (win32_wait): If CACHED_STATUS was set, return that instead
4402 of doing a real wait. Remove the code resuming the execution
4403 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4404 during the initial phase. Also remove the code changing
4405 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4406 TARGET_WAITKIND_STOPPED.
4408 2013-12-11 Yao Qi <yao@codesourcery.com>
4410 * notif.c (handle_notif_ack): Return 0 if no notification
4413 2013-11-20 Doug Evans <dje@google.com>
4415 * linux-low.c (linux_set_resume_request): Fix comment.
4417 2013-11-20 Doug Evans <dje@google.com>
4419 * linux-low.c (resume_status_pending_p): Tweak comment.
4421 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4423 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4424 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4425 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4426 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4427 (srv_amd64_regobj): Add amd64-mpx.o.
4428 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4429 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4430 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4431 * i387-fp.c (num_pl_bnd_register) Added constant.
4432 (num_pl_bnd_cfg_registers) Added constant.
4433 (struct i387_xsave) Added reserved area and MPX fields.
4434 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4435 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4437 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4438 (init_registers_amd64_mpx_linux): Declare new function.
4439 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4440 (x86_64_regmap): Add MPX registers.
4441 (x86_linux_read_description): Add MPX case.
4442 (initialize_low_arch): Initialize MPX targets.
4444 2013-11-18 Tom Tromey <tromey@redhat.com>
4446 * configure: Rebuild.
4447 * configure.ac: Don't check for stdlib.h.
4448 * gdbreplay.c: Unconditionally include stdlib.h.
4450 2013-11-18 Tom Tromey <tromey@redhat.com>
4452 * config.in: Rebuild.
4453 * configure: Rebuild.
4454 * configure.ac: Don't use AC_HEADER_DIRENT.
4456 2013-11-18 Tom Tromey <tromey@redhat.com>
4458 * server.h: Don't check HAVE_STRING_H.
4459 * gdbreplay.c: Don't check HAVE_STRING_H.
4460 * configure: Rebuild.
4462 2013-11-18 Tom Tromey <tromey@redhat.com>
4464 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4467 2013-11-08 Tom Tromey <tromey@redhat.com>
4469 * configure, config.in: Rebuild.
4470 * configure.ac: Remove unused configury.
4472 2013-11-08 Tom Tromey <tromey@redhat.com>
4474 * acinclude.m4: Include common.m4, codeset.m4.
4475 * configure, config.in: Rebuild.
4476 * configure.ac: Use GDB_AC_COMMON.
4478 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4480 * linux-s390-low.c (HWCAP_S390_TE): New define.
4481 (s390_arch_setup): Consider the TE field in the HWCAP for
4482 determining 'have_regset_tdb'.
4484 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4487 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4490 2013-10-02 Pedro Alves <palves@redhat.com>
4492 * server.c (process_serial_event): Don't output "GDBserver
4493 exiting" if GDB is connected through stdio.
4494 * target.c (mywait): Likewise, be silent if GDB is connected
4497 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4499 * lynx-low.c (lynx_add_threads_after_attach): New function.
4500 (lynx_attach): Remove call to add_thread. Add call to
4501 lynx_add_threads_after_attach instead.
4503 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4505 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4506 * config.in, configure: Regenerated.
4508 2013-09-18 Yao Qi <yao@codesourcery.com>
4511 * server.c (start_inferior): Clear 'resume_info'.
4513 2013-09-16 Jiong Wang <jiwang@tilera.com>
4515 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4518 2013-09-16 Jiong Wang <jiwang@tilera.com>
4520 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4521 linux-tile-low.o to srv_tgtobj.
4523 2013-09-16 Will Newton <will.newton@linaro.org>
4525 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4528 2013-09-06 Pedro Alves <palves@redhat.com>
4530 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4531 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4532 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4533 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4534 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4535 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4537 2013-09-06 Pedro Alves <palves@redhat.com>
4539 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4540 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4542 2013-09-06 Pedro Alves <palves@redhat.com>
4544 * linux-amd64-ipa.c: Include tracepoint.h.
4545 * linux-i386-ipa.c: Include tracepoint.h.
4547 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4549 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4550 (ps_get_thread_area): New function.
4552 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4554 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4555 (initialize_low_arch): Call init_registers_crisv32 rather than
4556 init_register_crisv32.
4558 2013-09-05 Pedro Alves <palves@redhat.com>
4560 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4562 * hostio.h: ... this new file.
4563 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4564 win32-low.c: Include hostio.h.
4566 2013-09-05 Pedro Alves <palves@redhat.com>
4568 * server.h (gdb_client_data, handler_func, callback_handler_func)
4569 (delete_file_handler, add_file_handler, append_callback_event)
4570 (delete_callback_event, start_event_loop, initialize_event_loop):
4571 Move to event-loop.h and include it.
4572 * event-loop.h: New file.
4574 2013-09-05 Pedro Alves <palves@redhat.com>
4576 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4577 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4578 (loaded_dll, unloaded_dll): Move to ...
4579 * dll.h: ... this new file.
4580 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4582 2013-09-05 Pedro Alves <palves@redhat.com>
4584 * server.h (current_process, get_thread_process, all_processes)
4585 (add_inferior_to_list, for_each_inferior, current_inferior)
4586 (remove_inferior, add_process, remove_process, find_process_pid)
4587 (have_started_inferiors_p, have_attached_inferiors_p)
4588 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4589 (clear_inferiors, find_inferior, find_inferior_id)
4590 (inferior_target_data, set_inferior_target_data)
4591 (inferior_regcache_data, set_inferior_regcache_data): Move to
4592 inferiors.h, and include it.
4593 * inferiors.h: New file.
4595 2013-09-05 Pedro Alves <palves@redhat.com>
4597 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4601 2013-09-05 Pedro Alves <palves@redhat.com>
4603 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4605 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4606 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4607 (handle_tracepoint_general_set, handle_tracepoint_query)
4608 (tracepoint_finished_step, tracepoint_was_hit)
4609 (release_while_stepping_state_list, current_traceframe)
4610 (in_readonly_region, traceframe_read_mem)
4611 (fetch_traceframe_registers, traceframe_read_sdata)
4612 (traceframe_read_info, struct fast_tpoint_collect_status)
4613 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4614 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4615 (supply_fast_tracepoint_registers)
4616 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4617 (ipa_tdesc, claim_trampoline_space)
4618 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4619 (agent_mem_read, agent_get_trace_state_variable_value)
4620 (agent_set_trace_state_variable_value, agent_tsv_read)
4621 (agent_mem_read_string, get_raw_reg_func_addr)
4622 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4623 * tracepoint.h: ... this new file.
4625 2013-09-05 Pedro Alves <palves@redhat.com>
4627 * server.h (perror_with_name, error, fatal, warning, paddress)
4628 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4630 * utils.h: New file.
4632 2013-09-05 Pedro Alves <palves@redhat.com>
4634 * server.h (remote_debug, noack_mode, transport_is_reliable)
4635 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4636 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4637 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4638 (write_enn, initialize_async_io, enable_async_io)
4639 (disable_async_io, check_remote_input_interrupt_request)
4640 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4641 (dead_thread_notify, prepare_resume_reply)
4642 (decode_address_to_semicolon, decode_address, decode_m_packet)
4643 (decode_M_packet, decode_X_packet, decode_xfer_write)
4644 (decode_search_memory_packet, unhexify, hexify)
4645 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4646 (look_up_one_symbol, relocate_instruction)
4647 (monitor_output): Move to remote-utils.h, and include it.
4648 * remote-utils.h: New file.
4650 2013-09-05 Pedro Alves <palves@redhat.com>
4652 * server.h (_): Delete.
4654 2013-09-02 Pedro Alves <palves@redhat.com>
4656 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4657 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4659 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4661 2013-09-02 Pierre Muller <muller@sourceware.org>
4663 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4664 or WriteProcessMemory complete successfully and handle
4665 ERROR_PARTIAL_COPY error.
4667 2013-09-02 Pedro Alves <palves@redhat.com>
4669 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4670 error instead of EIO.
4672 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4675 * linux-low.c: Include filestuff.h.
4676 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4677 * lynx-low.c: Include filestuff.h.
4678 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4679 * server.c: Include filestuff.h.
4680 (main): Call notice_open_fds.
4681 * spu-low.c: Include filestuff.h.
4682 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4684 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4686 * Makefile.in: Explain why ../target and ../nat are not
4687 listed as include file search paths.
4688 (linux-waitpid.o): New object file rule.
4689 * configure.srv (srv_native_linux_obj): New variable.
4690 Replace all occurrences of linux native object files with
4691 $srv_native_linux_obj.
4692 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4693 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4694 (linux_enable_event_reporting): Remove declaration.
4695 (my_waitpid): Moved to common/linux-waitpid.c.
4696 (linux_wait_for_event): Pass ptid when calling
4697 linux_enable_event_reporting.
4698 (linux_supports_tracefork_flag): Remove.
4699 (linux_enable_event_reporting): Likewise.
4700 (linux_tracefork_grandchild): Remove.
4701 (STACK_SIZE): Moved to common/linux-ptrace.c.
4702 (linux_tracefork_child): Remove.
4703 (linux_test_for_tracefork): Remove.
4704 (linux_look_up_symbols): Call linux_supports_traceclone.
4705 (initialize_low): Remove call to linux_test_for_tracefork.
4706 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4707 common/linux-ptrace.h.
4708 (PTRACE_TYPE_ARG4): Likewise.
4709 Include linux-ptrace.h.
4711 2013-08-21 Pedro Alves <palves@redhat.com>
4713 * config.in: Renegerate.
4715 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4717 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4718 (SFILES): Remove $(srcdir)/common/target-common.c and
4719 add $(srcdir)/target/waitstatus.c.
4720 (OBS): Remove target-common.o and add waitstatus.o.
4721 (server_h): Remove $(srcdir)/../common/target-common.h and
4722 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4723 and $(srcdir)/../target/waitstatus.h.
4724 (target-common.o): Remove.
4725 (waitstatus.o): New target object file.
4726 * target.h: Do not include target-common.h and
4727 include target/resume.h, target/wait.h and
4728 target/waitstatus.h.
4730 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4732 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4733 to PTRACE_TYPE_ARG3.
4734 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4735 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4737 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4738 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4740 2013-07-27 Jie Zhang <jie@codesourcery.com>
4741 Daniel Jacobowitz <dan@codesourcery.com>
4742 Yao Qi <yao@codesourcery.com>
4744 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4745 (mips-linux-watch.o): New rule.
4746 (mips_linux_watch_h): New variable.
4747 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4749 * linux-mips-low.c: Include mips-linux-watch.h.
4750 (struct arch_process_info, struct arch_lwp_info): New.
4751 (update_watch_registers_callback): New function.
4752 (mips_linux_new_process, mips_linux_new_thread) New functions.
4753 (mips_linux_prepare_to_resume, mips_insert_point): New
4755 (mips_remove_point, mips_stopped_by_watchpoint): New
4757 (rsp_bp_type_to_target_hw_bp_type): New function.
4758 (mips_stopped_data_address): New function.
4759 (the_low_target): Add watchpoint support functions.
4761 2013-07-27 Yao Qi <yao@codesourcery.com>
4763 * i386-low.c: Include break-common.h.
4764 (enum target_hw_bp_type): Remove.
4766 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4768 * Makefile.in (SFILES): /common/target-common.c.
4769 (OBS): Add target-common.o.
4770 (server_h): Add $(srcdir)/../common/target-common.h.
4771 (target-common.o): New target.
4772 * server.c (queue_stop_reply_callback): Free
4773 status string after use.
4774 * target.c (target_waitstatus_to_string): Remove.
4775 * target.h: Include target-common.h.
4776 (resume_kind): Likewise.
4777 (target_waitkind): Likewise.
4778 (target_waitstatus): Likewise.
4779 (TARGET_WNOHANG): Likewise.
4781 2013-07-04 Yao Qi <yao@codesourcery.com>
4783 * Makefile.in (host_alias): Use @host_noncanonical@.
4784 (target_alias): Use @target_noncanonical@.
4785 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4786 ACX_NONCANONICAL_HOST.
4787 * configure: Regenerated.
4790 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4792 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4793 * configure: Rebuild.
4794 * Makefile.in (version_host, version_target): Get from configure.
4795 (version.c): Use $(version_host) and $(version_target).
4797 2013-07-03 Pedro Alves <palves@redhat.com>
4799 * Makefile.in (config.status): Depend on development.sh.
4800 * acinclude.m4: Include libmcheck.m4.
4801 * configure: Regenerate.
4803 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4805 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4806 attribute inside the parentheses.
4807 (winapi_DebugSetProcessKillOnExit): Ditto.
4808 (winapi_DebugBreakProcess): Ditto.
4809 (winapi_GenerateConsoleCtrlEvent): Ditto.
4811 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4813 * notif.h (notif_event): Add a dummy member to avoid compiler
4816 2013-07-01 Pedro Alves <palves@redhat.com>
4818 * hostio.c (HOSTIO_PATH_MAX): Define.
4819 (require_filename, handle_open, handle_unlink, handle_readlink):
4822 2013-07-01 Pedro Alves <palves@redhat.com>
4824 * server.h: Include "pathmax.h".
4825 * linux-low.c: Don't include sys/param.h.
4826 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4828 * win32-low.c: Don't include sys/param.h.
4829 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4831 2013-07-01 Pedro Alves <palves@redhat.com>
4833 * event-loop.c: Don't check HAVE_UNISTD_H before including
4835 * gdbreplay.c: Likewise.
4836 * remote-utils.c: Likewise.
4837 * server.c: Likewise.
4838 * configure.ac: Don't check for unistd.h.
4839 * configure: Regenerate.
4841 2013-06-28 Tom Tromey <tromey@redhat.com>
4843 * Makefile.in (version.c): Use version.in, not
4846 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4848 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4849 * configure: Rebuild.
4850 * Makefile.in (version_host, version_target): Get from configure.
4851 (version.c): Use $(version_host) and $(version_target).
4853 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4855 Fix trace-status to output user name without trailing colon.
4856 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4858 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4860 Fix trace-status to output proper start-time and stop-time.
4861 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4862 output start time and stop time in hex as gdb expects.
4864 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4866 * tracepoint.c (build_traceframe_info_xml): Output trace state
4867 variables present in the trace buffer.
4869 2013-06-24 Tom Tromey <tromey@redhat.com>
4871 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4873 (version.o): Remove.
4874 * gdbreplay.c: Include version.h.
4875 (version, host_name): Don't declare.
4876 * server.h: Include version.h.
4877 (version, host_name): Don't declare.
4879 2013-06-12 Pedro Alves <palves@redhat.com>
4881 * linux-x86-low.c (linux_is_elf64): Delete global.
4882 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4883 with local linux_pid_exe_is_elf_64_file use.
4885 2013-06-11 Pedro Alves <palves@redhat.com>
4887 * linux-low.c (regset_disabled, disable_regset): New functions.
4888 (regsets_fetch_inferior_registers)
4889 (regsets_store_inferior_registers): Use them.
4890 (initialize_regsets_info); Don't allocate the disabled_regsets
4892 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4895 2013-06-11 Pedro Alves <palves@redhat.com>
4897 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4900 2013-06-11 Pedro Alves <palves@redhat.com>
4902 * linux-x86-low.c (initialize_low_arch): Call
4903 init_registers_x32_avx_linux.
4905 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4907 Fix compatibility with Android Bionic.
4908 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4911 2013-06-07 Pedro Alves <palves@redhat.com>
4914 * Makefile.in (OBS): Add tdesc.o.
4915 (IPA_OBJS): Add tdesc-ipa.o.
4916 (tdesc-ipa.o): New rule.
4917 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4919 * linux-low.c (new_inferior): Delete.
4920 (disabled_regsets, num_regsets): Delete.
4921 (linux_add_process): Adjust to set the new per-process
4923 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4924 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4925 was a stop. When calling arch_setup, switch the current inferior
4926 to the thread that got an event.
4927 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4928 (regsets_fetch_inferior_registers)
4929 (regsets_store_inferior_registers): New regsets_info parameter.
4931 (linux_register_in_regsets): New regs_info parameter. Adjust to
4933 (register_addr, fetch_register, store_register): New usrregs_info
4934 parameter. Adjust to use it.
4935 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4936 parameter regs_info. Adjust to use it.
4937 (linux_fetch_registers): Get the current inferior's regs_info, and
4939 (linux_store_registers): Ditto.
4940 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4941 (initialize_low): Don't initialize the target_regsets here. Call
4942 initialize_low_arch.
4943 * linux-low.h (target_regsets): Delete declaration.
4944 (struct regsets_info): New.
4945 (struct usrregs_info): New.
4946 (struct regs_info): New.
4947 (struct process_info_private) <new_inferior>: New field.
4948 (struct linux_target_ops): Delete the num_regs, regmap, and
4949 regset_bitmap fields. New field regs_info.
4950 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4951 * i387-fp.c (num_xmm_registers): Delete.
4952 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4953 calls to new interface.
4954 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4955 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4956 Infer the number of xmm registers from the regcache's target
4958 * i387-fp.h (num_xmm_registers): Delete.
4959 * inferiors.c (add_thread): Don't install the thread's regcache
4961 * proc-service.c (gregset_info): Fetch the current inferior's
4962 regs_info. Adjust to use it.
4963 * regcache.c: Include tdesc.h.
4964 (register_bytes, reg_defs, num_registers)
4965 (gdbserver_expedite_regs): Delete.
4966 (get_thread_regcache): If the thread doesn't have a regcache yet,
4967 create one, instead of aborting gdbserver.
4968 (regcache_invalidate_one): Rename to ...
4969 (regcache_invalidate_thread): ... this.
4970 (regcache_invalidate_one): New.
4971 (regcache_invalidate): Only invalidate registers of the current
4973 (init_register_cache): Add target_desc parameter, and use it.
4974 (new_register_cache): Ditto. Assert the target description has a
4975 non zero registers_size.
4976 (regcache_cpy): Add assertions. Adjust.
4977 (realloc_register_cache, set_register_cache): Delete.
4978 (registers_to_string, registers_from_string): Adjust.
4979 (find_register_by_name, find_regno, find_register_by_number)
4980 (register_cache_size): Add target_desc parameter, and use it.
4981 (free_register_cache_thread, free_register_cache_thread_one)
4982 (regcache_release, register_cache_size): New.
4983 (register_size): Add target_desc parameter, and use it.
4984 (register_data, supply_register, supply_register_zeroed)
4985 (supply_regblock, supply_register_by_name, collect_register)
4986 (collect_register_as_string, collect_register_by_name): Adjust.
4987 * regcache.h (struct target_desc): Forward declare.
4988 (struct regcache) <tdesc>: New field.
4989 (init_register_cache, new_register_cache): Add target_desc
4991 (regcache_invalidate_thread): Declare.
4992 (regcache_invalidate_one): Delete declaration.
4993 (regcache_release): Declare.
4994 (find_register_by_number, register_cache_size, register_size)
4995 (find_regno): Add target_desc parameter.
4996 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4998 * remote-utils.c: Include tdesc.h.
4999 (outreg, prepare_resume_reply): Adjust.
5000 * server.c: Include tdesc.h.
5001 (gdbserver_xmltarget): Delete declaration.
5002 (get_features_xml, process_serial_event): Adjust.
5003 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5005 (struct process_info) <tdesc>: New field.
5006 (ipa_tdesc): Declare.
5007 * tdesc.c: New file.
5008 * tdesc.h: New file.
5009 * tracepoint.c: Include tdesc.h.
5010 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5011 (get_context_regcache): Adjust to pass ipa_tdesc down.
5012 (do_action_at_tracepoint): Adjust to get the register cache size
5013 from the context regcache's description.
5014 (traceframe_walk_blocks): Adjust to get the register cache size
5015 from the current trace frame's description.
5016 (traceframe_get_pc): Adjust to get current trace frame's
5017 description and pass it down.
5018 (gdb_collect): Adjust to get the register cache size from the
5020 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5021 (gdbserver_xmltarget): Delete.
5022 (initialize_low_tracepoint): Set the ipa's target description.
5023 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5024 (initialize_low_tracepoint): Set the ipa's target description.
5025 * linux-x86-low.c: Include tdesc.h.
5026 [__x86_64__] (is_64bit_tdesc): New.
5027 (ps_get_thread_area, x86_get_thread_area): Use it.
5028 (i386_cannot_store_register): Rename to ...
5029 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5030 (i386_cannot_fetch_register): Rename to ...
5031 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5032 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5034 (target_regsets): Rename to ...
5035 (x86_regsets): ... this.
5036 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5038 (x86_siginfo_fixup): Use is_64bit_tdesc.
5039 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5040 (tdesc_x32_avx_linux, tdesc_x32_linux)
5041 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5043 (x86_linux_update_xmltarget): Delete.
5044 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5045 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5046 (AMD64_LINUX_USER64_CS): New.
5047 (x86_linux_read_description): New, based on
5048 x86_linux_update_xmltarget.
5049 (same_process_callback): New.
5050 (x86_arch_setup_process_callback): New.
5051 (x86_linux_update_xmltarget): New.
5052 (x86_regsets_info): New.
5053 (amd64_linux_regs_info): New.
5054 (i386_linux_usrregs_info): New.
5055 (i386_linux_regs_info): New.
5056 (x86_linux_regs_info): New.
5057 (x86_arch_setup): Reimplement.
5058 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5059 (x86_emit_ops): Ditto.
5060 (the_low_target): Adjust. Install x86_linux_regs_info,
5061 x86_cannot_fetch_register, and x86_cannot_store_register.
5062 (initialize_low_arch): New.
5063 * linux-ia64-low.c (tdesc_ia64): Declare.
5064 (ia64_fetch_register): Adjust.
5065 (ia64_usrregs_info, regs_info): New globals.
5066 (ia64_regs_info): New function.
5067 (the_low_target): Adjust.
5068 (initialize_low_arch): New function.
5069 * linux-sparc-low.c (tdesc_sparc64): Declare.
5070 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5072 (sparc_arch_setup): New function.
5073 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5074 (the_low_target): Adjust.
5075 (initialize_low_arch): New function.
5076 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5077 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5078 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5079 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5080 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5081 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5082 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5083 (tdesc_powerpc_isa205_vsx64l): Declare.
5084 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5085 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5086 (ppc_set_pc, ppc_get_hwcap): Adjust.
5087 (ppc_usrregs_info): Forward declare.
5088 (!__powerpc64__) ppc_regmap_adjusted: New global.
5089 (ppc_arch_setup): Adjust to the current process'es target
5091 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5092 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5093 (ppc_store_evrregset): Adjust.
5094 (target_regsets): Rename to ...
5095 (ppc_regsets): ... this, and make static.
5096 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5097 (ppc_regs_info): New function.
5098 (the_low_target): Adjust.
5099 (initialize_low_arch): New function.
5100 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5101 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5102 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5103 (tdesc_s390x_linux64v2): Declare.
5104 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5105 (s390_fill_gregset, s390_store_last_break): Adjust.
5106 (target_regsets): Rename to ...
5107 (s390_regsets): ... this, and make static.
5108 (s390_get_pc, s390_set_pc): Adjust.
5109 (s390_get_hwcap): New target_desc parameter, and use it.
5110 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5111 (s390_arch_setup): Adjust to set the current process'es target
5112 description. Don't adjust the regmap.
5113 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5114 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5115 (regs_info_3264): New globals.
5116 (s390_regs_info): New function.
5117 (the_low_target): Adjust.
5118 (initialize_low_arch): New function.
5119 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5120 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5121 [__mips64] (init_registers_mips_linux)
5122 (init_registers_mips_dsp_linux): Delete defines.
5123 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5124 (have_dsp): New global.
5125 (mips_read_description): New, based on mips_arch_setup.
5126 (mips_arch_setup): Reimplement.
5127 (get_usrregs_info): New function.
5128 (mips_cannot_fetch_register, mips_cannot_store_register)
5129 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5130 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5131 (target_regsets): Rename to ...
5132 (mips_regsets): ... this, and make static.
5133 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5134 (dsp_regs_info, regs_info): New globals.
5135 (mips_regs_info): New function.
5136 (the_low_target): Adjust.
5137 (initialize_low_arch): New function.
5138 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5139 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5141 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5142 (arm_read_description): New, with bits factored from
5144 (arm_arch_setup): Reimplement.
5145 (target_regsets): Rename to ...
5146 (arm_regsets): ... this, and make static.
5147 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5148 (arm_regs_info): New function.
5149 (the_low_target): Adjust.
5150 (initialize_low_arch): New function.
5151 * linux-m68k-low.c (tdesc_m68k): Declare.
5152 (target_regsets): Rename to ...
5153 (m68k_regsets): ... this, and make static.
5154 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5155 (m68k_regs_info): New function.
5156 (m68k_arch_setup): New function.
5157 (the_low_target): Adjust.
5158 (initialize_low_arch): New function.
5159 * linux-sh-low.c (tdesc_sharch): Declare.
5160 (target_regsets): Rename to ...
5161 (sh_regsets): ... this, and make static.
5162 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5163 (sh_regs_info, sh_arch_setup): New functions.
5164 (the_low_target): Adjust.
5165 (initialize_low_arch): New function.
5166 * linux-bfin-low.c (tdesc_bfin): Declare.
5167 (bfin_arch_setup): New function.
5168 (bfin_usrregs_info, regs_info): New globals.
5169 (bfin_regs_info): New function.
5170 (the_low_target): Adjust.
5171 (initialize_low_arch): New function.
5172 * linux-cris-low.c (tdesc_cris): Declare.
5173 (cris_arch_setup): New function.
5174 (cris_usrregs_info, regs_info): New globals.
5175 (cris_regs_info): New function.
5176 (the_low_target): Adjust.
5177 (initialize_low_arch): New function.
5178 * linux-cris-low.c (tdesc_crisv32): Declare.
5179 (cris_arch_setup): New function.
5180 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5181 (cris_regs_info): New function.
5182 (the_low_target): Adjust.
5183 (initialize_low_arch): New function.
5184 * linux-m32r-low.c (tdesc_m32r): Declare.
5185 (m32r_arch_setup): New function.
5186 (m32r_usrregs_info, regs_info): New globals.
5187 (m32r_regs_info): Adjust.
5188 (initialize_low_arch): New function.
5189 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5190 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5191 (tic6x_usrregs_info): Forward declare.
5192 (tic6x_read_description): New function, based on ...
5193 (tic6x_arch_setup): ... this. Reimplement.
5194 (target_regsets): Rename to ...
5195 (tic6x_regsets): ... this, and make static.
5196 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5197 (tic6x_regs_info): New function.
5198 (the_low_target): Adjust.
5199 (initialize_low_arch): New function.
5200 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5201 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5202 (target_regsets): Rename to ...
5203 (xtensa_regsets): ... this, and make static.
5204 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5206 (xtensa_arch_setup, xtensa_regs_info): New functions.
5207 (the_low_target): Adjust.
5208 (initialize_low_arch): New function.
5209 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5210 (nios2_arch_setup): Set the current process'es tdesc.
5211 (target_regsets): Rename to ...
5212 (nios2_regsets): ... this.
5213 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5214 (nios2_regs_info): New function.
5215 (the_low_target): Adjust.
5216 (initialize_low_arch): New function.
5217 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5218 (aarch64_arch_setup): Set the current process'es tdesc.
5219 (target_regsets): Rename to ...
5220 (aarch64_regsets): ... this.
5221 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5222 (aarch64_regs_info): New function.
5223 (the_low_target): Adjust.
5224 (initialize_low_arch): New function.
5225 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5227 (target_regsets): Rename to ...
5228 (tile_regsets): ... this.
5229 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5230 (tile_regs_info): New function.
5231 (tile_arch_setup): Set the current process'es tdesc.
5232 (the_low_target): Adjust.
5233 (initialize_low_arch): New function.
5234 * spu-low.c (tdesc_spu): Declare.
5235 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5236 * win32-arm-low.c (tdesc_arm): Declare.
5237 (arm_arch_setup): New function.
5238 (the_low_target): Install arm_arch_setup instead of
5240 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5241 (init_windows_x86): Rename to ...
5242 (i386_arch_setup): ... this. Set `win32_tdesc'.
5243 (the_low_target): Adjust.
5244 * win32-low.c (win32_tdesc): New global.
5245 (child_add_thread): Don't create the thread cache here.
5246 (do_initial_child_stuff): Set the new process'es tdesc.
5247 * win32-low.h (struct target_desc): Forward declare.
5248 (win32_tdesc): Declare.
5249 * lynx-i386-low.c (tdesc_i386): Declare global.
5250 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5251 * lynx-low.c (lynx_tdesc): New global.
5252 (lynx_add_process): Set the new process'es tdesc.
5253 * lynx-low.h (struct target_desc): Forward declare.
5254 (lynx_tdesc): Declare global.
5255 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5256 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5257 * nto-low.c (nto_tdesc): New global.
5258 (do_attach): Set the new process'es tdesc.
5259 * nto-low.h (struct target_desc): Forward declare.
5260 (nto_tdesc): Declare.
5261 * nto-x86-low.c (tdesc_i386): Declare.
5262 (nto_x86_arch_setup): Set `nto_tdesc'.
5264 2013-06-04 Gary Benson <gbenson@redhat.com>
5266 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5267 to qSupported response when appropriate.
5268 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5269 with nonzero-length annex.
5270 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5271 arguments supplied in annex.
5273 2013-05-31 Doug Evans <dje@google.com>
5276 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5277 64 bits in 64-cross-32 environment.
5279 2013-05-28 Pedro Alves <palves@redhat.com>
5281 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5282 (aarch64-without-fpu.c): Delete rule.
5283 * configure.srv (aarch64*-*-linux*): Remove references to
5284 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5285 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5288 2013-05-24 Pedro Alves <palves@redhat.com>
5290 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5291 instead of strchr/decode_address. Error if the range isn't split
5292 with a ','. Don't assume there's be a ':' in the action.
5294 2013-05-23 Yao Qi <yao@codesourcery.com>
5295 Pedro Alves <palves@redhat.com>
5297 * linux-low.c (lwp_in_step_range): New function.
5298 (linux_wait_1): If the thread was range stepping and stopped
5299 outside the stepping range, report the stop to GDB. Otherwise,
5300 continue stepping. Add range stepping debug output.
5301 (linux_set_resume_request): Copy the step range from the resume
5303 (linux_supports_range_stepping): New.
5304 (linux_target_ops) <supports_range_stepping>: Set to
5305 linux_supports_range_stepping.
5306 * linux-low.h (struct linux_target_ops)
5307 <supports_range_stepping>: New field.
5308 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5309 * linux-x86-low.c (x86_supports_range_stepping): New.
5310 (the_low_target) <supports_range_stepping>: Set to
5311 x86_supports_range_stepping.
5312 * server.c (handle_v_cont): Handle 'r' action.
5313 (handle_v_requests): Append ";r" if the target supports range
5315 * target.h (struct thread_resume) <step_range_start,
5316 step_range_end>: New fields.
5317 (struct target_ops) <supports_range_stepping>:
5319 (target_supports_range_stepping): New macro.
5321 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5323 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5324 confusion in comment.
5326 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5328 * lynx-low.c (struct process_info_private): New type.
5329 (lynx_add_process): New function.
5330 (lynx_create_inferior, lynx_attach): Replace calls to
5331 add_process by calls to lynx_add_process.
5332 (lynx_resume): If PTID is null, then try using
5333 current_process()->private->last_wait_event_ptid.
5335 (lynx_clear_inferiors): Delete. The contents of that function
5336 has been inlined in lynx_mourn;
5337 (lynx_wait_1): Save the ptid in the process's private data.
5338 (lynx_mourn): Free the process' private data. Replace call
5339 to lynx_clear_inferiors by call to clear_inferiors.
5341 2013-05-17 Yao Qi <yao@codesourcery.com>
5343 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5346 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5348 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5349 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5350 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5351 PT_TEXT_END_ADDR guards. Update comments.
5352 (linux_target_op) <read_offsets>: Conditionally define to
5353 linux_read_offsets if the target is UCLIBC and if it defines
5354 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5356 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5357 Andrew Jenner <andrew@codesourcery.com>
5359 * Makefile.in (SFILES): Add linux-nios2-low.c.
5360 (clean): Add action to delete nios2-linux.c.
5361 (nios2-linux.c): New rule.
5362 * configure.srv: Add nios2*-*-linux*.
5363 * linux-nios2-low.c: New.
5365 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5367 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5369 2013-04-25 Hui Zhu <hui@codesourcery.com>
5372 * ax.c (ax_printf): Add fflush.
5374 2013-04-22 Tom Tromey <tromey@redhat.com>
5376 * Makefile.in (SFILES): Add filestuff.c.
5377 (OBS): Add filestuff.o.
5378 (filestuff.o): New target.
5379 * config.in, configure: Rebuild.
5380 * configure.ac: Check for fdwalk, pipe2.
5382 2013-04-17 Pedro Alves <palves@redhat.com>
5384 * configure.ac (USE_THREAD_DB): Delete variable.
5385 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5386 Don't AC_SUBST USE_THREAD_DB.
5387 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5388 * config.in, configure: Regenerate.
5390 2013-04-16 Pedro Alves <palves@redhat.com>
5392 * linux-low.h (struct lwp_info) <thread_known>: Move under
5393 the USE_THREAD_DB #ifdef.
5395 2013-04-16 Pedro Alves <palves@redhat.com>
5397 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5398 (linux-low.o): Delete rule.
5399 * linux-low.h: Always include "gdb_thread_db.h" instead of
5400 conditionally including thread_db.h.
5401 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5404 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5406 * Makefile.in (install-only): Fix make install regression.
5408 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5410 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5411 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5413 * gdbserver.1: Remove.
5415 2013-03-22 Pedro Alves <palves@redhat.com>
5417 * linux-low.c (handle_extended_wait): Don't call
5418 linux_enable_event_reporting.
5420 2013-03-15 Tony Theodore <tonyt@logyst.com>
5423 * Makefile.in (SHELL): Use @SHELL@.
5425 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5427 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5430 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5432 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5433 Remove extraneous NULL element.
5435 2013-03-13 Yao Qi <yao@codesourcery.com>
5437 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5438 'V' block in trace frame.
5440 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5442 * target.h (struct target_ops): Add btrace ops.
5443 (target_supports_btrace): New macro.
5444 (target_enable_btrace): New macro.
5445 (target_disable_btrace): New macro.
5446 (target_read_btrace): New macro.
5447 * gdbthread.h (struct thread_info): Add btrace field.
5448 * server.c: Include btrace-common.h.
5449 (handle_btrace_general_set): New function.
5450 (handle_btrace_enable): New function.
5451 (handle_btrace_disable): New function.
5452 (handle_general_set): Call handle_btrace_general_set.
5453 (handle_qxfer_btrace): New function.
5454 (struct qxfer qxfer_packets[]): Add btrace entry.
5455 * inferiors.c (remove_thread): Disable btrace.
5456 * linux-low: Include linux-btrace.h.
5457 (linux_low_enable_btrace): New function.
5458 (linux_low_read_btrace): New function.
5459 (linux_target_ops): Add btrace ops.
5460 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5461 Add srv_linux_btrace=yes.
5462 (x86_64-*-linux*): Add linux-btrace.o.
5463 Add srv_linux_btrace=yes.
5464 * configure.ac: Define HAVE_LINUX_BTRACE.
5465 * config.in: Regenerated.
5466 * configure: Regenerated.
5468 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5470 * server.c (handle_qxfer): Preserve error message if -3 is
5472 (qxfer): Document the -3 return value.
5474 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5476 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5477 (linux_btrace_h): New variable.
5478 (linux-btrace.o): New rule.
5480 2013-03-08 Stan Shebs <stan@codesourcery.com>
5481 Hafiz Abid Qadeer <abidh@codesourcery.com>
5483 * tracepoint.c (trace_buffer_size): New global.
5484 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5485 (init_trace_buffer): Change to one-argument function. Allocate
5486 trace buffer memory.
5487 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5488 handle QTBuffer:size packet.
5489 (cmd_bigqtbuffer_size): New function.
5490 (initialize_tracepoint): Call init_trace_buffer with
5491 DEFAULT_TRACE_BUFFER_SIZE.
5492 * server.c (handle_query): Add QTBuffer:size in the
5495 2013-03-07 Yao Qi <yao@codesourcery.com>
5497 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5498 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5500 (cmd_qtsp): Adjust condition. Do post increment.
5501 Set cur_action and cur_step_action back to 0.
5503 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5506 * linux-low.c (linux_write_memory): Return early success if LEN is
5509 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5511 * configure.srv: Add x86_64-*-cygwin* as target.
5513 2013-02-28 Tom Tromey <tromey@redhat.com>
5515 * configure.ac: Invoke AC_SYS_LARGEFILE.
5516 * configure, config.in: Rebuild.
5518 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5520 * win32-low.c: Throughout, fix format strings and casts of
5521 printf-like functions to avoid type related warnings on all
5523 (get_child_debug_event): Print dwDebugEventCode as hex since
5524 that's how it's usually documented.
5526 2013-02-28 Yao Qi <yao@codesourcery.com>
5528 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5531 2013-02-27 Jiong Wang <jiwang@tilera.com>
5533 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5534 (reg-tilegx32.c): New rule.
5535 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5536 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5537 different register info initializer according to elf class.
5538 (init_registers_tilgx32): New function. The tilegx32 register info
5540 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5541 (tile_store_gregset): Likewise.
5543 2013-02-27 Yao Qi <yao@codesourcery.com>
5545 * server.c (process_point_options): Print debug message when
5546 debug_threads is true.
5548 2013-02-26 Yao Qi <yao@codesourcery.com>
5550 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5552 2013-02-19 Pedro Alves <palves@redhat.com>
5553 Kai Tietz <ktietz@redhat.com>
5557 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5558 instead of strtoul to extract address from packet.
5559 (process_serial_event) <'z'>: Likewise.
5561 2013-02-18 Yao Qi <yao@codesourcery.com>
5563 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5565 2013-02-14 Pedro Alves <palves@redhat.com>
5569 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5570 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5572 2013-02-14 Pedro Alves <palves@redhat.com>
5574 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5576 2013-02-14 Pedro Alves <palves@redhat.com>
5578 * tracepoint.c (save_string): Delete.
5579 (add_tracepoint_action): Use savestring instead of save_string.
5581 2013-02-12 Pedro Alves <palves@redhat.com>
5583 * linux-xtensa-low.c: Ditto.
5584 * xtensa-xtregs.c: Ditto.
5586 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5588 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5591 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5593 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5594 aarch64_num_wp_regs and aarch64_num_bp_regs to
5595 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5597 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5599 * linux-aarch64-low.c (ps_get_thread_area): Replace
5600 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5602 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5603 Marcus Shawcroft <marcus.shawcroft@arm.com>
5604 Nigel Stephens <nigel.stephens@arm.com>
5605 Yufeng Zhang <yufeng.zhang@arm.com>
5607 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5608 (aarch64.c, aarch64-without-fpu.c): New targets.
5609 * configure.srv (aarch64*-*-linux*): New.
5610 * linux-aarch64-low.c: New file.
5612 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5614 * linux-low.c (handle_extended_wait, linux_create_inferior)
5615 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5616 (dequeue_one_deferred_signal, linux_resume_one_thread)
5617 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5618 (linux_tracefork_grandchild, linux_test_for_tracefork)
5619 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5620 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5621 where the argument is 0.
5623 2013-01-25 Yao Qi <yao@codesourcery.com>
5625 * event-loop.c: Include "queue.h".
5626 (gdb_event_p): New typedef.
5627 (struct gdb_event) <next_event>: Remove.
5628 (event_queue): Change to QUEUE(gdb_event_p).
5629 (async_queue_event): Remove.
5630 (gdb_event_xfree): New.
5631 (initialize_event_loop): New.
5632 (process_event): Use API from QUEUE.
5633 (wait_for_event): Likewise.
5634 * server.c (main): Call initialize_event_loop.
5635 * server.h (initialize_event_loop): Declare.
5637 2013-01-18 Yao Qi <yao@codesourcery.com>
5639 * ax.h (struct eval_agent_expr_context): New.
5640 (gdb_eval_agent_expr): Update declaration.
5641 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5642 TFRAME. Add new argument CTX.
5643 * server.h (struct eval_agent_expr_context): Declare.
5644 (agent_mem_read, agent_tsv_read): Update declaration.
5645 (agent_mem_read_string): Likewise.
5646 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5647 (add_traceframe_block): Add new argument TPOINT.
5648 Increase TPOINT->traceframe_usage.
5649 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5650 eval_tracepoint_agent_expr.
5651 (condition_true_at_tracepoint): Likewise.
5652 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5653 (agent_mem_read_string, agent_tsv_read): Likewise.
5655 2013-01-16 Yao Qi <yao@codesourcery.com>
5657 * linux-low.c (linux_resume_one_lwp): Don't check
5658 'lwp->bp_reinsert != 0'.
5660 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5661 Pedro Alves <palves@redhat.com>
5663 * lynx-low.c (ptrace_request_to_str): Define a temporary
5664 macro and use it to simplify this function's implementation.
5666 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5668 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5671 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5673 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5675 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5677 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5679 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5681 * lynx-low.c (lynx_resume): Use the resume_info parameter
5682 to determine the ptid for the lynx_ptrace call, unless
5683 it is equal to minus_one_ptid, in which case we use the
5684 ptid of the current_inferior.
5685 (lynx_wait_1): After having received a thread create/exit
5686 event, resume the inferior's execution using the signaling
5687 thread's ptid, rather than the old ptid.
5689 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5691 * lynx-low.c (lynx_resume): Delete variable ret.
5693 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5695 * gdbreplay.c (gdbreplay_version): Update copyright year.
5696 * server.c (gdbserver_version): Likewise.
5698 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5700 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5703 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5705 * lynx-low.c (ptrace_request_to_str): Add handling for
5708 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5710 * lynx-low.c (lynx_attach): Delete variable new_process.
5712 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5714 * lynx-low.c (lynx_create_inferior): Delete variable
5717 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5719 * lynx-low.c (ptrace_request_to_str): Do not handle
5720 PTRACE_GETTHREADLIST if this macro does not exist.
5722 2012-12-15 Yao Qi <yao@codesourcery.com>
5724 * Makefile.in (OBS): Add notif.o.
5725 * notif.c, notif.h: New.
5726 * server.c: Include "notif.h".
5727 (struct vstop_notif) <next>: Remove.
5729 (queue_stop_reply): Update.
5730 (push_event, send_next_stop_reply): Remove.
5731 (discard_queued_stop_replies): Update.
5732 (notif_stop): New variable.
5733 (handle_v_stopped): Remove.
5734 (handle_v_requests): Don't call handle_v_stopped. Call
5735 handle_ack_notif instead.
5736 (queue_stop_reply_callback): Call notif_event_enque instead
5737 of queue_stop_reply.
5738 (handle_status): Don't call send_next_stop_reply, call
5739 notif_write_event instead.
5740 (kill_inferior_callback): Likewise.
5741 (detach_or_kill_inferior_callback): Likewise.
5742 (main): Call initialize_notif.
5743 (process_serial_event): Call QUEUE_is_empty.
5744 (handle_target_event): Call notif_push instead of push event.
5745 * server.h (push_event): Remove declaration.
5747 2012-12-10 Tom Tromey <tromey@redhat.com>
5749 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5750 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5753 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5754 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5755 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5756 (amd64-linux-ipa.o, ax.o): Rewrite.
5757 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5758 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5759 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5760 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5761 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5762 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5763 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5764 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5765 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5766 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5767 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5768 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5769 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5770 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5771 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5772 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5773 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5774 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5775 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5776 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5777 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5778 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5779 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5780 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5781 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5782 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5783 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5784 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5785 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5786 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5787 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5788 (reg-tilegx.o): Remove.
5789 (all_object_files): New macro.
5790 Include .deps files.
5791 * aclocal.m4, configure: Rebuild.
5792 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5793 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5794 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5796 2012-12-05 Tom Tromey <tromey@redhat.com>
5799 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5801 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5803 * configure.ac: Check for linux/perf_event.h.
5804 * config.in: Regenerated.
5805 * configure: Regenerated.
5807 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5809 * hostio.c (handle_readlink): Decrease buffer size
5810 parameter passed to readlink by one byte.
5812 2012-11-26 Yao Qi <yao@codesourcery.com>
5814 * configure.ac (build_warnings): Append '-Wempty-body'.
5815 * configure: Regenerated.
5816 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5819 2012-11-15 Pierre Muller <muller@sourceware.org>
5821 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5822 * config.in: Regenerate.
5823 * configure: Regenerate.
5824 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5825 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5826 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5827 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5829 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5830 instead of <sys/wait.h> header.
5831 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5833 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5835 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5836 (various make rules): Remove -DGDBSERVER
5838 2012-11-09 Yao Qi <yao@codesourcery.com>
5840 * spu-low.c (current_ptid): Move it to ..
5841 * gdbthread.h: ... here. New.
5842 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5843 * server.c (myresume, process_serial_event): Likewise.
5844 * thread-db.c (thread_db_find_new_threads): Likewise.
5845 * tracepoint.c (run_inferior_command): Likewise.
5847 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5849 * server.c (handle_search_memory_1): Include access length in
5852 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5854 * linux-crisv32-low.c: Fix compile errors.
5856 2012-09-04 Yao Qi <yao@codesourcery.com>
5858 * tracepoint.c (cmd_qtsv): Adjust debug message.
5859 Don't check CUR_TPOINT.
5861 2012-08-28 Yao Qi <yao@codesourcery.com>
5863 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5864 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5865 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5866 Remove declarations of xmalloc, xreallloc, xstrdup and
5868 * Makefile.in (libiberty_h): New.
5869 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5870 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5872 2012-08-23 Yao Qi <yao@codesourcery.com>
5874 * server.h: Remove declaration of 'xsnprintf'.
5876 2012-08-22 Keith Seitz <keiths@redhat.com>
5878 * server.h: Include build-gnulib-gbserver/config.h.
5879 * gdbreplay.c: Likewise.
5881 2012-08-08 Doug Evans <dje@google.com>
5883 * Makefile.in (SFILES): Add gdb_vecs.c.
5884 (OBS): Add gdb_vecs.o.
5885 (gdb_vecs_h, host_defs_h): New variables.
5886 (thread-db.o): Add $(gdb_vecs_h) dependency.
5887 (gdb_vecs.o): New rule.
5888 * thread-db.c: #include "gdb_vecs.h".
5889 (thread_db_load_search): Use a vector to iterate over path elements.
5890 Handle text appearing after "$pdir".
5892 * configure.ac: Add check for strstr.
5893 * config.in: Regenerate.
5894 * configure: Regenerate.
5896 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5898 * hostio.c (handle_pread): If pread fails, fall back to attempting
5900 (handle_pwrite): Likewise for pwrite.
5902 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5904 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5905 between unsupported TYPE and unimplementable ADDR/LEN combination.
5906 (arm_insert_point): Act on new return value.
5908 2012-07-31 Pedro Alves <palves@redhat.com>
5910 * server.c (process_point_options): Only skip tokens if we find
5911 one that is unrecognized. Don't treat 'X' specially while
5912 skipping unrecognized tokens.
5914 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5916 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5917 to 4-byte-align HW breakpoint addresses for Thumb.
5919 2012-07-27 Yao Qi <yao@codesourcery.com>
5923 * server.h: Declare gdb_agent_about_to_close.
5924 * target.c (kill_inferior): Include "agent.h".
5925 New. Send command 'kill'.
5926 * target.h (kill_inferior): Removed macro.
5927 * tracepoint.c (gdb_agent_about_to_close): New.
5928 (gdb_agent_helper_thread): Handle command 'close'.
5929 Wait endlessly until the inferior stops.
5930 Install gdb_agent_remove_socket to atexit hook.
5931 (agent_socket_name): New static variable.
5932 (gdb_agent_socket_init): Replace local variable 'name' with
5933 'agent_socket_name'.
5934 (gdb_agent_remove_socket): New.
5936 2012-07-27 Yao Qi <yao@codesourcery.com>
5938 * server.c (process_point_options): Stop at 'X' when parsing.
5940 2012-07-19 Michael Eager <eager@eagercon.com>
5942 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5944 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5945 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5946 hardware breakpoint.
5948 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5950 * gdbserver/linux-low.c (initialize_low): Call
5951 linux_ptrace_init_warnings.
5953 2012-07-02 Doug Evans <dje@google.com>
5955 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5958 2012-07-02 Stan Shebs <stan@codesourcery.com>
5960 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5961 (ax.o): Add it to build rule.
5963 (OBS): Add format.o.
5964 (IPA_OBS): Add format.o.
5965 * server.c (handle_query): Claim support for breakpoint commands.
5966 (process_point_options): Add command case.
5967 (process_serial_event): Leave running if there are printfs in
5969 * mem-break.h (any_persistent_commands): Declare.
5970 (add_breakpoint_commands): Declare.
5971 (gdb_no_commands_at_breakpoint): Declare.
5972 (run_breakpoint_commands): Declare.
5973 * mem-break.c (struct point_command_list): New struct.
5974 (struct breakpoint): New field command_list.
5975 (any_persistent_commands): New function.
5976 (add_commands_to_breakpoint): New function.
5977 (add_breakpoint_commands): New function.
5978 (gdb_no_commands_at_breakpoint): New function.
5979 (run_breakpoint_commands): New function.
5980 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5982 * ax.c: Include format.h.
5983 (ax_printf): New function.
5984 (gdb_eval_agent_expr): Add printf opcode.
5986 2012-06-13 Yao Qi <yao@codesourcery.com>
5988 * server.c (start_inferior): Remove duplicated writes to fields
5989 'last_resume_kind' and 'last_status' of 'current_inferior'.
5991 2012-06-12 Yao Qi <yao@codesourcery.com>
5992 Pedro Alves <palves@redhat.com>
5994 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5996 * server.c (handle_v_cont): Extend comment.
5998 2012-06-11 Yao Qi <yao@codesourcery.com>
6000 * linux-low.c (linux_attach): Add 'static'.
6002 2012-06-06 Yao Qi <yao@codesourcery.com>
6004 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6006 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6008 Fix gcc -flto compilation warning.
6009 * server.c (main): Make variable multi_mode and attach volatile.
6011 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6013 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6014 if the platform doesn't know about it.
6016 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6018 * Makefile.in (SFILES): Add linux-tile-low.c.
6019 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6020 * configure.srv: Handle tilegx-*-linux*.
6021 * linux-tile-low.c: New file.
6023 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6025 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6027 2012-05-24 Pedro Alves <palves@redhat.com>
6031 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6033 2012-05-24 Pedro Alves <palves@redhat.com>
6037 Replace target_signal with gdb_signal throughout.
6039 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6041 * linux-low.c (linux_store_registers): Avoid the copying sequence
6042 when no data has been retrieved by ptrace.
6044 2012-05-22 Will Deacon <will.deacon@arm.com>
6046 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6047 Include asm/ptrace.h.
6048 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6051 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6053 * linux-low.c (linux_store_registers): Don't re-retrieve data
6054 with ptrace that has already been obtained from /proc. Always
6055 copy any data retrieved with ptrace to the buffer supplied.
6057 2012-05-11 Yao Qi <yao@codesourcery.com>
6058 Pedro Alves <palves@redhat.com>
6060 * linux-low.c (enum stopping_threads_kind): New.
6061 (stopping_threads): Change type to `enum stopping_threads_kind'.
6062 (handle_extended_wait): If stopping and suspending threads, leave
6063 the new_lwp suspended too.
6064 (linux_wait_for_event): Adjust.
6065 (stop_all_lwps): Set `stopping_threads' to
6066 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6067 whether we're suspending threads or just stopping them. Assert no
6070 2012-04-29 Yao Qi <yao@codesourcery.com>
6072 * server.h: Move some code to ...
6073 * gdbthread.h: ... here. New.
6074 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6075 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6076 (nto-low.o, win32-low.o): Likewise.
6077 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6078 * regcache.c, remote-utils.c, server.c: Likewise.
6079 * target.c, tracepoint.c, win32-low.c: Likewise.
6081 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6083 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6084 (PTRACE_ARG4_TYPE): Likewise.
6085 (PTRACE_XFER_TYPE): Likewise.
6086 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6087 ptrace to PTRACE_ARG3_TYPE.
6088 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6089 (PTRACE_ARG4_TYPE): Likewise.
6090 (PTRACE_XFER_TYPE): Likewise.
6091 (linux_detach_one_lwp): Cast fourth argument of
6092 ptrace to long then PTRACE_ARG4_TYPE.
6093 (regsets_fetch_inferior_registers): Cast third argument of
6094 ptrace to long then PTRACE_ARG3_TYPE.
6095 (regsets_store_inferior_registers): Likewise.
6097 2012-04-20 Pedro Alves <palves@redhat.com>
6099 * configure: Regenerate.
6101 2012-04-19 Pedro Alves <palves@redhat.com>
6103 * Makefile.in (GNULIB_BUILDDIR): New.
6104 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6105 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6106 (all, install-only, uninstall, clean-info, all-lib, clean): No
6107 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6108 (maintainer-clean realclean distclean): Use subdir_do.
6110 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6111 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6112 * acinclude.m4: Include acx_configure_dir.m4.
6113 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6114 calls. Call AC_PROG_RANLIB. Configure gnulib using
6117 (GNULIB_STDINT_H): Adjust.
6118 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6119 * gdbreplay.c: Include build-gnulib/config.h.
6120 * server.h: Likewise.
6121 * aclocal.m4: Regenerate.
6122 * config.in: Regenerate.
6123 * configure: Regenerate.
6125 2012-04-19 Pedro Alves <palves@redhat.com>
6127 * Makefile.in (LIBGNU, INCGNU): Adjust.
6128 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6129 (all, install-only, uninstall, clean-info, all-lib, clean)
6130 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6131 * configure.ac: Adjust AC_OUTPUT output.
6132 * aclocal.m4: Regenerate.
6133 * configure: Regenerate.
6135 2012-04-19 Pedro Alves <palves@redhat.com>
6137 * Makefile.in (generated_files): New.
6138 (server_h): Remove the explicit dependency on config.h, and depend
6139 on $generated_files.
6141 2012-04-19 Pedro Alves <palves@redhat.com>
6143 * Makefile.in (INCGNU): Add -Ignulib.
6145 2012-04-19 Pedro Alves <palves@redhat.com>
6147 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6148 (INCGNU): ... this, and spell out -I here.
6149 (GNULIB_LIB): Rename to ...
6151 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6153 2012-04-19 Pedro Alves <palves@redhat.com>
6155 * config.in: Regenerate.
6157 2012-04-19 Pedro Alves <palves@redhat.com>
6159 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6160 * server.h (memmem): Remove declaration.
6161 * config.in: Regenerate.
6162 * configure: Regenerate.
6164 2012-04-19 Yao Qi <yao@codesourcery.com>
6166 * Makefile.in (SFILES): Add common/vec.c.
6170 2012-04-19 Yao Qi <yao@codesourcery.com>
6172 * remote-utils.c (prepare_resume_reply): Replace with macro
6173 target_core_of_thread.
6174 * server.c (handle_qxfer_threads_proper): Likewise.
6175 * target.h (traget_core_of_thread): New macro.
6177 2012-04-18 Pedro Alves <palves@redhat.com>
6179 * aclocal.m4: Regenerate.
6180 * configure: Regenerate.
6182 2012-04-16 Yao Qi <yao@codesourcery.com>
6184 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6185 duplicated on address.
6187 2012-04-16 Yao Qi <yao@codesourcery.com>
6189 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6190 (struct tracepoint_action_ops) <send>: New field.
6191 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6192 (agent_expr_send, x_tracepoint_action_send): New.
6193 (l_tracepoint_action_send): New.
6194 (cmd_qtdp): Download and install tracepoint
6195 according to `use_agent'.
6196 (run_inferior_command): Add one more parameter `len'.
6198 (tracepoint_send_agent): New.
6199 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6201 2012-04-16 Yao Qi <yao@codesourcery.com>
6203 * tracepoint.c (download_tracepoints): Moved to ...
6204 (cmd_qtstart): ... here.
6206 2012-04-14 Yao Qi <yao@codesourcery.com>
6208 * tracepoint.c: Include inttypes.h.
6209 (struct collect_memory_action): Use sized types.
6210 (struct tracepoint): Likewise.
6211 (cmd_qtdp, stop_tracing): Update print specifiers.
6212 (cmd_qtp, response_tracepoint): Likewise.
6213 (collect_data_at_tracepoint): Likewise.
6214 (collect_data_at_step): Likewise.
6216 2012-04-14 Yao Qi <yao@codesourcery.com>
6218 Import gnulib module inttypes.
6219 * aclocal.m4, config.in, configure: Regenerated.
6221 2012-04-14 Yao Qi <yao@codesourcery.com>
6223 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6224 Makefile and config.status at last.
6226 2012-04-13 Yao Qi <yao@codesourcery.com>
6228 * tracepoint.c: Include stdint.h unconditionally.
6230 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6232 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6233 on BFD_HAVE_SYS_PROCFS_TYPE.
6234 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6235 * configure: Regenerate.
6236 * config.in: Likewise.
6238 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6240 * Makefile.in (clean): Also remove x32.c x32-linux.c
6241 x32-avx.c x32-avx-linux.c.
6242 (x32.o): New target.
6244 (x32-linux.o): Likewise.
6245 (x32-linux.c): Likewise.
6246 (x32-avx.o): Likewise.
6247 (x32-avx.c): Likewise.
6248 (x32-avx-linux.o): Likewise.
6249 (x32-avx-linux.c): Likewise.
6251 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6252 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6253 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6254 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6255 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6256 i386/x32-avx-linux.xml.
6258 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6259 (init_registers_x32_avx_linux): Likwise.
6260 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6261 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6263 2012-04-13 Pedro Alves <palves@redhat.com>
6265 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6266 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6267 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6268 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6271 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6273 * linux-x86-low.c (compat_x32_clock_t): New.
6274 (compat_x32_siginfo_t): Likewise.
6275 (compat_x32_siginfo_from_siginfo): Likewise.
6276 (siginfo_from_compat_x32_siginfo): Likewise.
6277 (linux_is_elf64): Likewise.
6278 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6279 and siginfo_from_compat_x32_siginfo for x32.
6280 (x86_arch_setup): Set linux_is_elf64.
6282 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6285 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6287 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6288 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6289 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6290 compatible with process.
6292 2012-04-12 Yao Qi <yao@codesourcery.com>
6294 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6295 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6296 (install-only, install-info, clean): Handle sub dir gnulib.
6297 (all-lib, am--refresh): New targets.
6298 (memmem.o): Remove target.
6299 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6300 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6301 (AC_REPLACE_FUNCS): Remove memmem.
6302 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6303 (AC_OUTPUT): Generate Makefile in gnulib/.
6304 * aclocal.m4, config.in, configure: Regenerated.
6306 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6308 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6310 2012-04-05 Pedro Alves <palves@redhat.com>
6312 -Werror=strict-aliasing
6314 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6317 2012-04-04 Pedro Alves <palves@redhat.com>
6319 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6320 (sparc_store_gregset_from_stack, sparc_store_gregset)
6321 (sparc_breakpoint_at): Fix formatting.
6323 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6325 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6327 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6328 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6329 * config.in: Regenerate.
6330 * configure: Likewise.
6332 2012-03-29 Pedro Alves <palves@redhat.com>
6334 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6335 Correct ptrace arguments.
6337 2012-03-28 Pedro Alves <palves@redhat.com>
6339 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6340 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6341 (IA64_FR1_REGNUM): New defines.
6342 (ia64_fetch_register): New.
6343 (the_low_target): Install it.
6344 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6346 * linux-low.c (linux_fetch_registers): Try the
6347 the_low_target.fetch_register hook first.
6349 * linux-arm-low.c (the_low_target): Adjust.
6350 * linux-bfin-low.c (the_low_target): Adjust.
6351 * linux-cris-low.c (the_low_target): Adjust.
6352 * linux-crisv32-low.c (the_low_target): Adjust.
6353 * linux-m32r-low.c (the_low_target): Adjust.
6354 * linux-m68k-low.c (the_low_target): Adjust.
6355 * linux-mips-low.c (the_low_target): Adjust.
6356 * linux-ppc-low.c (the_low_target): Adjust.
6357 * linux-s390-low.c (the_low_target): Adjust.
6358 * linux-sh-low.c (the_low_target): Adjust.
6359 * linux-sparc-low.c (the_low_target): Adjust.
6360 * linux-tic6x-low.c (the_low_target): Adjust.
6361 * linux-x86-low.c (the_low_target): Adjust.
6362 * linux-xtensa-low.c (the_low_target): Adjust.
6364 2012-03-26 Pedro Alves <palves@redhat.com>
6366 * server.c (handle_qxfer_libraries): Don't bail early if
6367 the_target->qxfer_libraries_svr4 is not NULL.
6369 2012-03-26 Pedro Alves <palves@redhat.com>
6371 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6373 2012-03-23 Pedro Alves <palves@redhat.com>
6375 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6376 "library-list-svr4" element's start tag when the the DSO list is
6379 2012-03-23 Pedro Alves <palves@redhat.com>
6381 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6382 a variable whose type size is the same as the inferior's pointer
6385 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6387 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6389 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6390 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6391 * linux-low.h: Include <signal.h>.
6392 (struct siginfo): Remove forward declaration.
6393 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6396 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6398 * .gitignore: Ignore more files.
6400 2012-03-19 Pedro Alves <palves@redhat.com>
6401 Jan Kratochvil <jan.kratochvil@redhat.com>
6403 * server.c (cont_thread, general_thread): Add describing comments.
6404 (start_inferior): Clear `cont_thread'.
6405 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6408 2012-03-15 Yao Qi <yao@codesourcery.com>
6410 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6412 (cmd_qtdp): ... here.
6414 2012-03-15 Yao Qi <yao@codesourcery.com>
6416 * tracepoint.c (struct tracepoint_action_ops): New.
6417 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6418 (m_tracepoint_action_download): New.
6419 (r_tracepoint_action_download): New.
6420 (x_tracepoint_action_download): New.
6421 (l_tracepoint_action_download): New.
6422 (add_tracepoint_action): Install `action->ops' according type.
6423 (download_tracepoint_1): Move code `download' function pointer
6424 of various tracepoint_action_ops.
6426 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6428 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6429 linux_ptrace_attach_warnings.
6431 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6433 * Makefile.in (linux-ptrace.o): New.
6434 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6435 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6436 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6437 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6438 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6440 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6442 2012-03-08 Yao Qi <yao@codesourcery.com>
6443 Pedro Alves <palves@redhat.com>
6445 Fix PR server/13392.
6446 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6448 * tracepoint.c (remove_tracepoint): New.
6449 (cmd_qtdp): Call remove_tracepoint when failed to install.
6451 2012-03-07 Pedro Alves <palves@redhat.com>
6453 * linux-low.c (get_detach_signal): New.
6454 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6455 Pass on pending signals to PTRACE_DETACH. Check the result of the
6457 * server.c (program_signals, program_signals_p): New.
6458 (handle_general_set): Handle QProgramSignals.
6459 * server.h (program_signals, program_signals_p): Declare.
6461 2012-03-05 Pedro Alves <palves@redhat.com>
6462 Jan Kratochvil <jan.kratochvil@redhat.com>
6464 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6467 2012-03-03 Yao Qi <yao@codesourcery.com>
6469 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6470 agent_look_up_symbols.
6472 2012-03-03 Yao Qi <yao@codesourcery.com>
6474 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6475 (linux-x86-low.o): Likewise.
6476 * server.h: Remove in_process_agent_loaded.
6477 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6481 2012-03-03 Yao Qi <yao@codesourcery.com>
6483 * tracepoint.c (gdb_agent_capability): New global.
6484 (in_process_agent_loaded_ust): Renamed to
6485 `in_process_agent_supports_ust'.
6487 (in_process_agent_supports_ust): Call agent_capability_check.
6488 (clear_installed_tracepoints): Assert that agent supports
6491 2012-03-03 Yao Qi <yao@codesourcery.com>
6493 * linux-low.c (linux_supports_agent): New.
6494 (linux_target_ops): Initialize field `supports_agent' with
6495 linux_supports_agent.
6496 * target.h (struct target_ops) <supports_agent>: New.
6497 (target_supports_agent): New macro.
6498 * server.c (handle_general_set): Handle packet 'QAgent'.
6499 (handle_query): Send `QAgent+'.
6500 * Makefile.in (server.o): Depends on agent.h.
6502 2012-03-03 Yao Qi <yao@codesourcery.com>
6504 * Makefile.in (OBS): Add agent.o.
6505 Add new rule for agent.o.
6506 Track dependence of tracepoint.c on agent.h.
6507 * tracepoint.c (run_inferior_command_1):
6508 (run_inferior_command): Call agent_run_command.
6509 (gdb_ust_connect_sync_socket): Deleted. Move it to
6511 (resume_thread, stop_thread): Likewise.
6512 (gdb_ust_socket_init): Renamed to ...
6513 (gdb_agent_socket_init): ... New.
6514 (gdb_ust_thread): Renamed to ...
6515 (gdb_agent_helper_thread): ... New.
6516 (gdb_ust_init): Move some code to ...
6517 (gdb_agent_init): ... here. New.
6518 [HAVE_UST]: Call gdb_ust_init.
6519 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6520 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6521 * config.in, configure: Regenerated.
6523 2012-03-02 Pedro Alves <palves@redhat.com>
6525 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6526 * linux-low.c (struct simple_pid_list): New.
6527 (stopped_pids): New a struct simple_pid_list pointer.
6528 (add_to_pid_list, pull_pid_from_list): New.
6529 (handle_extended_wait): Don't assume the first signal new children
6530 report is SIGSTOP. Adjust call to pull_pid_from_list.
6531 (linux_wait_for_lwp): Adjust.
6533 2012-03-02 Yao Qi <yao@codesourcery.com>
6535 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6538 2012-03-02 Yao Qi <yao@codesourcery.com>
6540 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6541 `stop_pc' and `tpoint'. Update caller.
6543 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6545 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6546 * linux-low.c (use_linux_regsets): New macro.
6547 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6548 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6549 (linux_register_in_regsets): New function.
6550 (usr_fetch_inferior_registers): Skip registers covered by
6552 (usr_store_inferior_registers): Likewise.
6553 (usr_fetch_inferior_registers): New macro.
6554 (usr_store_inferior_registers): Likewise.
6555 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6556 (linux_store_registers): Likewise.
6557 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6559 (init_registers_mips64_dsp_linux): Likewise.
6560 (init_registers_mips_linux): New macro.
6561 (init_registers_mips_dsp_linux): Likewise.
6562 (mips_dsp_num_regs): Likewise.
6563 (DSP_BASE, DSP_CONTROL): New fallback macros.
6564 (mips_base_regs): New macro.
6565 (mips_regmap): Use it. Fix the size.
6566 (mips_dsp_regmap): New variable.
6567 (mips_dsp_regset_bitmap): Likewise.
6568 (mips_arch_setup): New function.
6569 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6571 (mips_cannot_store_register): Likewise.
6572 (the_low_target): Update .arch_setup, .num_regs and .regmap
6573 initializers. Add .regset_bitmap initializer.
6574 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6576 * linux-bfin-low.c (the_low_target): Likewise.
6577 * linux-cris-low.c (the_low_target): Likewise.
6578 * linux-crisv32-low.c (the_low_target): Likewise.
6579 * linux-ia64-low.c (the_low_target): Likewise.
6580 * linux-m32r-low.c (the_low_target): Likewise.
6581 * linux-m68k-low.c (the_low_target): Likewise.
6582 * linux-ppc-low.c (the_low_target): Likewise.
6583 * linux-s390-low.c (the_low_target): Likewise.
6584 * linux-sh-low.c (the_low_target): Likewise.
6585 * linux-sparc-low.c (the_low_target): Likewise.
6586 * linux-tic6x-low.c (the_low_target): Likewise.
6587 * linux-x86-low.c (the_low_target): Likewise.
6588 * linux-xtensa-low.c (the_low_target): Likewise.
6589 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6590 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6591 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6593 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6594 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6596 2012-02-29 Yao Qi <yao@codesourcery.com>
6597 Pedro Alves <palves@redhat.com>
6599 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6600 `step_over_finished' is true.
6602 2012-02-27 Pedro Alves <palves@redhat.com>
6604 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6605 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6607 2012-02-27 Pedro Alves <palves@redhat.com>
6610 * linux-low.c (pid_is_stopped): New.
6611 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6613 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6615 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6618 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6620 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6622 2012-02-24 Luis Machado <lgustavo@codesourcery>
6624 * server.c (handle_query): Advertise support for target-side
6625 breakpoint condition evaluation.
6626 (process_point_options): New function.
6627 (process_serial_event): When inserting a breakpoint, check for
6628 a target-side condition that should be evaluated.
6630 * mem-break.c: Include regcache.h and ax.h.
6631 (point_cond_list_t): New data structure.
6632 (breakpoint) <cond_list>: New field.
6633 (find_gdb_breakpoint_at): Make non-static.
6634 (delete_gdb_breakpoint_at): Clear any target-side
6636 (clear_gdb_breakpoint_conditions): New function.
6637 (add_condition_to_breakpoint): Likewise.
6638 (add_breakpoint_condition): Likewise.
6639 (gdb_condition_true_at_breakpoint): Likewise.
6640 (gdb_breakpoint_here): Return result directly instead
6641 of going through a local variable.
6643 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6644 (clear_gdb_breakpoint_conditions): Likewise.
6645 (add_breakpoint_condition): Likewise.
6646 (gdb_condition_true_at_breakpoint): Likewise.
6648 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6649 (need_step_over_p): Take target-side breakpoint condition into
6652 2012-02-24 Luis Machado <lgustavo@codesourcery>
6654 * server.h: Include tracepoint.h.
6655 (agent_mem_read, agent_get_trace_state_variable_value,
6656 agent_set_trace_state_variable_value,
6657 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6658 get_set_tsv_func_addr): New prototypes.
6660 * ax.h: New include file.
6661 * ax.c: New source file.
6663 * tracepoint.c: Include ax.h.
6664 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6665 agent_expr, eval_result_type): Move to ax.h.
6666 (parse_agent_expr): Rename to ...
6667 (gdb_parse_agent_expr): ... this, make it non-static and move
6669 (unparse_agent_expr) Rename to ...
6670 (gdb_unparse_agent_expr): ... this, make it non-static and move
6672 (eval_agent_expr): Rename to ...
6673 (eval_tracepoint_agent_expr): ... this.
6674 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6675 forward declarations.
6676 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6677 (agent_get_trace_state_variable_value): New function.
6678 (agent_set_trace_state_variable_value): New function.
6679 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6680 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6681 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6682 (condition_true_at_tracepoint): Likewise.
6683 (parse_agent_expr): Rename to ...
6684 (gdb_parse_agent_expr): ... this and move to ax.c.
6685 (unparse_agent_expr): Rename to ...
6686 (gdb_unparse_agent_expr): ... this and move to ax.c.
6687 (gdb_agent_op_name): Move to ax.c.
6688 (eval_agent_expr): Rename to ...
6689 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6691 (eval_tracepoint_agent_expr): New function.
6692 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6694 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6696 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6697 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6698 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6699 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6700 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6701 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6702 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6703 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6704 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6705 (compile_bytecodes): Remove forward declaration.
6706 (is_goto_target): Move to ax.c.
6707 (compile_bytecodes): Move to ax.c and call
6708 agent_get_trace_state_variable_value (...) and
6709 agent_set_trace_state_variable_value (...).
6711 * Makefile.in: Update ax.c and IPA dependencies.
6713 2012-02-24 Pedro Alves <palves@redhat.com>
6715 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6716 (cmd_bigqtbuffer_circular): ... this. Only handle
6717 'QTBuffer:circular:'.
6718 (handle_tracepoint_general_set): Adjust.
6720 2012-02-16 Yao Qi <yao@codesourcery.com>
6722 * inferiors.c: Move code to ...
6723 * dll.c: .... here. New.
6724 * server.h: Declare clear_dlls.
6725 * Makefile.in (SFILES): Add dll.c.
6729 2012-02-11 Yao Qi <yao@codesourcery.com>
6731 * server.c: (handle_monitor_command): Add a new parameter
6733 (handle_query): Update caller.
6735 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6737 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6738 * configure, config.in: Regenerate.
6739 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6742 2012-02-02 Pedro Alves <palves@redhat.com>
6744 Try SIGKILL first, then PTRACE_KILL.
6745 * linux-low.c (linux_kill_one_lwp): New.
6746 (linux_kill_one_lwp): Rename to ...
6747 (kill_one_lwp_callback): ... this. Use the new
6750 2012-02-02 Pedro Alves <palves@redhat.com>
6752 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6755 2012-01-27 Pedro Alves <palves@redhat.com>
6757 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6758 (elf_64_file_p): Make static.
6759 (linux_pid_exe_is_elf_64_file): New.
6760 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6761 Delete declarations.
6762 (linux_pid_exe_is_elf_64_file): Declare.
6763 * linux-x86-low.c (x86_arch_setup): Use
6764 linux_pid_exe_is_elf_64_file.
6766 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6768 * linux-low.c (linux_wait_for_event_1): Rename to ...
6769 (linux_wait_for_event): ... here and merge it with former
6770 linux_wait_for_event - new variable wait_ptid, use it.
6771 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6773 2012-01-23 Pedro Alves <palves@redhat.com>
6775 * server.c (main): Avoid yet another case of infinite loop while
6776 detaching/killing after a longjmp.
6778 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6781 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6783 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6785 * hostio.c (handle_readlink): New function.
6786 (handle_vFile): Call it to handle "vFile:readlink" packets.
6788 2012-01-20 Pedro Alves <palves@redhat.com>
6789 Ulrich Weigand <ulrich.weigand@linaro.org>
6791 * server.c (handle_v_requests): Only support vAttach and vRun to
6792 start multiple processes when in extended protocol mode.
6794 2012-01-17 Pedro Alves <palves@redhat.com>
6796 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6797 memalign plus mprotect to allocate the scratch buffer.
6799 2012-01-13 Pedro Alves <palves@redhat.com>
6801 * server.c (attach_inferior): Clear `cont_thread'.
6803 2012-01-13 Pedro Alves <palves@redhat.com>
6805 * server.c (main): Avoid infinite loop while detaching/killing
6808 2012-01-09 Doug Evans <dje@google.com>
6810 * server.c (start_inferior): Set last_ptid in --wrapper case.
6812 2012-01-06 Yao Qi <yao@codesourcery.com>
6814 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6816 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6818 2012-01-04 Yao Qi <yao@codesourcery.com>
6820 * tracepoint.c (cmd_qtdp): Print debug message
6821 for static tracepoint.
6823 2012-01-04 Yao Qi <yao@codesourcery.com>
6825 * tracepoint.c (trace_vdebug): Differentiate debug message
6826 between gdbserver and IPA.
6828 2012-01-03 Yao Qi <yao@codesourcery.com>
6830 * tracepoint.c (tracepoint_was_hit): Don't collect for
6833 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6835 * terminal.h: Reformat copyright header.
6837 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6839 * server.c (gdbserver_version): Update copyright year.
6840 * gdbreplay.c (gdbreplay_version): Likewise.
6842 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6844 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6847 2011-12-18 Hui Zhu <teawater@gmail.com>
6848 * linux-low.c (linux_create_inferior): Save return value to ret.
6850 2011-12-18 Hui Zhu <teawater@gmail.com>
6852 * linux-low.c (linux_create_inferior): Save return value to ret.
6854 2011-12-16 Doug Evans <dje@google.com>
6856 * linux-low.c (linux_create_inferior): If stdio connection,
6857 redirect stdin from /dev/null, stdout to stderr.
6858 * remote-utils.c (remote_is_stdio): New static global.
6859 (remote_connection_is_stdio): New function.
6860 (remote_prepare): Handle stdio connection.
6861 (remote_open): Ditto.
6862 (remote_close): Don't close stdin for stdio connections.
6863 (read_prim,write_prim): New functions. Replace all calls to
6864 read/write to these.
6865 * server.c (main): Watch for "-" argument. Move call to
6866 remote_prepare before start_inferior.
6867 * server.h (STDIO_CONNECTION_NAME): New macro.
6868 (remote_connection_is_stdio): Declare.
6870 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6871 in debugging output.
6873 2011-12-15 Yao Qi <yao@codesourcery.com>
6875 * tracepoint.c: Include sys/syscall.h.
6876 (gdb_ust_thread): Remove preprocessor conditional.
6878 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6880 * linux-low.c (linux_detach_one_lwp): Call
6881 the_low_target.prepare_to_resume before detaching.
6883 2011-12-14 Yao Qi <yao@codesourcery.com>
6885 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6888 2011-12-14 Yao Qi <yao@codesourcery.com>
6890 * i386-low.c (i386_low_stopped_data_address): Initialize local
6893 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6897 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6898 DR_CONTROL unless necessary. Extend comments.
6899 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6900 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6902 2011-12-13 Yao Qi <yao@codesourcery.com>
6904 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6906 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6908 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6910 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6911 Print new debug message for such case.
6913 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6915 Fix overlapping memcpy.
6916 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6917 the read_inferior_memory transfer.
6918 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6919 write_inferior_memory transfer.
6920 (set_fast_tracepoint_jump): New variable buf. Use it for the
6921 read_inferior_memory and write_inferior_memory transfers.
6922 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6923 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6924 Use it for the write_inferior_memory transfer.
6925 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6928 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6930 * linux-low.c (fetch_register, store_register): Make code
6931 consistent, fix formatting.
6933 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6935 * linux-low.c (usr_store_inferior_registers): Factor out code
6936 to handle individual registers into...
6937 (store_register): ... this new function.
6939 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6941 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6942 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6943 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6944 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6945 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6946 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6947 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6948 (srv_xmlfiles): Add new XML files.
6950 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6952 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6953 (init_registers_s390_linux32v1): Add prototype.
6954 (init_registers_s390_linux32v2): Likewise.
6955 (init_registers_s390_linux64v1): Likewise.
6956 (init_registers_s390_linux64v2): Likewise.
6957 (init_registers_s390x_linux64v1): Likewise.
6958 (init_registers_s390x_linux64v2): Likewise.
6959 (s390_num_regs): Increment to 52.
6960 (s390_regmap): Add orig_r2 register.
6961 (s390_num_regs_3264): Increment to 68.
6962 (s390_regmap_3264): Add orig_r2 register.
6963 (s390_collect_ptrace_register): Handle orig_r2 register.
6964 (s390_supply_ptrace_register): Likewise.
6965 (s390_fill_last_break): New function.
6966 (s390_store_last_break): Likewise.
6967 (s390_fill_system_call): New function.
6968 (s390_store_system_call): Likewise.
6969 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6971 (s390_check_regset): New function.
6972 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6973 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6974 Update target_regsets for available register sets.
6976 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6977 Jan Kratochvil <jan.kratochvil@redhat.com>
6979 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6980 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6982 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6983 * linux-low.h (struct process_info_private): New member r_debug.
6984 * server.c (handle_qxfer_libraries): Call
6985 the_target->qxfer_libraries_svr4.
6986 (handle_qxfer_libraries_svr4): New function.
6987 (qxfer_packets): New entry "libraries-svr4".
6988 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6989 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6990 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6991 PACKET_qXfer_libraries_svr4.
6993 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6995 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6996 PSW address/mask between 8-byte and 16-byte formats.
6997 (s390_supply_ptrace_register): Likewise.
6998 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6999 basic addressing mode bit.
7001 2011-11-24 Stan Shebs <stan@codesourcery.com>
7003 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7005 2011-11-17 Stan Shebs <stan@codesourcery.com>
7007 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7008 (tracing_start_time): New global.
7009 (tracing_stop_time): New global.
7010 (tracing_user_name): New global.
7011 (tracing_notes): New global.
7012 (tracing_stop_note): New global.
7013 (cmd_qtstart): Set traceframe_usage, start_time.
7014 (stop_tracing): Set stop_time.
7015 (cmd_qtstatus): Report additional status.
7016 (cmd_qtp): New function.
7017 (handle_tracepoint_query): Call it.
7018 (cmd_qtnotes): New function.
7019 (handle_tracepoint_general_set): Call it.
7020 (get_timestamp): Rename from tsv_get_timestamp.
7022 2011-11-14 Stan Shebs <stan@codesourcery.com>
7023 Kwok Cheung Yeung <kcy@codesourcery.com>
7025 * linux-x86-low.c (small_jump_insn): New.
7026 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7027 trampoline and error message, build a trampoline and issue a small
7028 jump instruction to it.
7029 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7030 trampoline and error message.
7031 (x86_get_min_fast_tracepoint_insn_len): New.
7032 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7033 * linux-low.h (struct linux_target_ops): Add arguments to
7034 install_fast_tracepoint_jump_pad operation, add new operation.
7035 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7037 (linux_get_min_fast_tracepoint_insn_len): New function.
7038 (linux_target_op): Add new operation.
7039 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7040 (gdb_trampoline_buffer_end): Ditto.
7041 (gdb_trampoline_buffer_error): Ditto.
7042 (struct ipa_sym_addresses): Add fields for new IPA variables.
7043 (symbol_list): Add entries for new IPA variables.
7044 (struct tracepoint): Add fields to hold the address range of the
7045 trampoline used by the tracepoint.
7046 (trampoline_buffer_head): New static variable.
7047 (trampoline_buffer_tail): Ditto.
7048 (claim_trampoline_space): New function.
7049 (have_fast_tracepoint_trampoline_buffer): New function.
7050 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7052 (install_fast_tracepoint): Ditto, also add error buffer argument.
7053 (cmd_qtminftpilen): New function.
7054 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7055 (fast_tracepoint_from_trampoline_address): New function.
7056 (fast_tracepoint_collecting): Handle trampoline as part of jump
7058 (set_trampoline_buffer_space): New function.
7059 (initialize_tracepoint): Initialize new IPA variables.
7060 * target.h (struct target_ops): Add arguments to
7061 install_fast_tracepoint_jump_pad operation, add new
7062 get_min_fast_tracepoint_insn_len operation.
7063 (target_get_min_fast_tracepoint_insn_len): New.
7064 (install_fast_tracepoint_jump_pad): Add arguments.
7065 * server.h (IPA_BUFSIZ): Define.
7066 * linux-i386-ipa.c: Include extra header files.
7067 (initialize_fast_tracepoint_trampoline_buffer): New function.
7068 (initialize_low_tracepoint): Call it.
7069 * server.h (set_trampoline_buffer_space): Declare.
7070 (claim_trampoline_space): Ditto.
7071 (have_fast_tracepoint_trampoline_buffer): Ditto.
7073 2011-11-14 Yao Qi <yao@codesourcery.com>
7075 * server.c (handle_query): Handle InstallInTrace for qSupported.
7076 * tracepoint.c (add_tracepoint): Sort list.
7077 (install_tracepoint, download_tracepoint): New.
7078 (cmd_qtdp): Call them to install and download tracepoints.
7079 (sort_tracepoints): Removed.
7080 (cmd_qtstart): Update.
7082 2011-11-14 Yao Qi <yao@codesourcery.com>
7084 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7085 * mem-break.h: Declare.
7086 * tracepoint.c (cmd_qtstart): Move some code to ...
7087 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7089 (download_tracepoints): Move some code to ...
7090 (download_tracepoint_1): ... here. New.
7092 2011-11-08 Yao Qi <yao@codesourcery.com>
7094 * remote-utils.c (relocate_instruction): A comment fix.
7096 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7098 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7099 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7100 dr_status_mirror and dr_control_mirror from debug_reg_state.
7101 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7102 (i386_initial_stuff): Remove use of deleted globals.
7103 (i386_get_thread_context, i386_set_thread_context,
7104 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7105 from debug_reg_state.
7107 2011-11-05 Yao Qi <yao@codesourcery.com>
7109 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7110 address as TPOINT's.
7112 2011-11-02 Stan Shebs <stan@codesourcery.com>
7114 * tracepoint.c (agent_mem_read_string): New function.
7115 (eval_agent_expr): Call it for tracenz.
7116 * server.c (handle_query): Report support for tracenz.
7118 2011-11-02 Yao Qi <yao@codesourcery.com>
7120 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7122 2011-11-02 Yao Qi <yao@codesourcery.com>
7124 * target.h: Fix a typo in comment.
7126 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7128 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7129 clobber the breakpoints' shadows with fast tracepoint jumps.
7130 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7131 * target.c (write_inferior_memory): Also pass MYADDR down to
7134 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7136 * configure.ac: Check support for personality routine.
7137 * configure: Regenerate.
7138 * config.in: Likewise.
7139 * linux-low.c: Include <sys/personality.h>.
7140 Define ADDR_NO_RANDOMIZE if necessary.
7141 (linux_create_inferior): Disable address space randomization when
7142 forking inferior, if requested.
7143 (linux_supports_disable_randomization): New function.
7144 (linux_target_ops): Install it.
7145 * server.h (disable_randomization): Declare.
7146 * server.c (disable_randomization): New global variable.
7147 (handle_general_set): Handle QDisableRandomization.
7148 (handle_query): Likewise for qSupported.
7149 (main): Support --disable-randomization and --no-disable-randomization
7150 command line arguments.
7151 * target.h (struct target_ops): Add supports_disable_randomization.
7152 (target_supports_disable_randomization): New macro.
7154 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7156 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7158 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7159 [!PT_GETDSBT] (target_loadmap): New definition.
7160 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7161 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7162 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7163 and PT_GETDSBT to LINUX_LOADMAP.
7164 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7165 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7167 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7169 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7170 (arm_linux_hwbp_cap): New static variable.
7171 (arm_linux_get_hwbp_cap): Replace by ...
7172 (arm_linux_init_hwbp_cap): ... this new function.
7173 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7174 (arm_linux_get_hw_watchpoint_count): Likewise.
7175 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7176 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7177 (arm_prepare_to_resume): Use perror_with_name instead of error.
7179 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7181 * linux-arm-low.c: Include <signal.h>.
7182 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7183 (struct arm_linux_hwbp_cap): New data type.
7184 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7185 (struct arm_linux_hw_breakpoint): New data type.
7186 (MAX_BPTS, MAX_WPTS): Define.
7187 (struct arch_process_info, struct arch_lwp_info): New data types.
7188 (arm_linux_get_hwbp_cap): New function.
7189 (arm_linux_get_hw_breakpoint_count): Likewise.
7190 (arm_linux_get_hw_watchpoint_count): Likewise.
7191 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7192 (arm_hwbp_control_initialize): Likewise.
7193 (arm_hwbp_control_is_enabled): Likewise.
7194 (arm_hwbp_control_is_initialized): Likewise.
7195 (arm_hwbp_control_disable): Likewise.
7196 (arm_linux_hw_breakpoint_equal): Likewise.
7197 (arm_linux_hw_point_initialize): Likewise.
7198 (struct update_registers_data): New data structure.
7199 (update_registers_callback: New function.
7200 (arm_insert_point): Likewise.
7201 (arm_remove_point): Likewise.
7202 (arm_stopped_by_watchpoint): Likewise.
7203 (arm_stopped_data_address): Likewise.
7204 (arm_new_process): Likewise.
7205 (arm_new_thread): Likewise.
7206 (arm_prepare_to_resume): Likewise.
7207 (the_low_target): Register arm_insert_point, arm_remove_point,
7208 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7209 arm_new_thread, and arm_prepare_to_resume.
7211 2011-09-15 Stan Shebs <stan@codesourcery.com>
7213 * server.h (struct emit_ops): Add compare-goto fields.
7214 * tracepoint.c (gdb_agent_op_sizes): New table.
7215 (emit_eq_goto): New function.
7216 (emit_ne_goto): New function.
7217 (emit_lt_goto): New function.
7218 (emit_le_goto): New function.
7219 (emit_gt_goto): New function.
7220 (emit_ge_goto): New function.
7221 (is_goto_target): New function.
7222 (compile_bytecodes): Recognize special cases of compare-goto
7223 combinations and call specialized emitters for them.
7224 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7225 (amd64_emit_ne_goto): New function.
7226 (amd64_emit_lt_goto): New function.
7227 (amd64_emit_le_goto): New function.
7228 (amd64_emit_gt_goto): New function.
7229 (amd64_emit_ge_goto): New function.
7230 (amd64_emit_ops): Add the new functions.
7231 (i386_emit_eq_goto): New function.
7232 (i386_emit_ne_goto): New function.
7233 (i386_emit_lt_goto): New function.
7234 (i386_emit_le_goto): New function.
7235 (i386_emit_gt_goto): New function.
7236 (i386_emit_ge_goto): New function.
7237 (i386_emit_ops): Add the new functions.
7239 2011-09-08 Stan Shebs <stan@codesourcery.com>
7241 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7242 (i386_emit_epilogue): Restore %ebx.
7244 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7246 * server.c (step_thread): Remove definition.
7247 (process_serial_event): Don't handle Hs.
7248 * server.h (step_thread): Remove declaration.
7249 * target.c (set_desired_inferior): Remove use of step_thread.
7251 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7253 * linux-low.c: Include linux-procfs.h.
7254 (linux_attach_lwp_1): Update comments.
7255 (linux_attach): Scan for existing threads when attaching to a
7256 process that is the tgid.
7257 * Makefile.in: Update dependencies.
7259 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7261 * configure.srv: Add linux-procfs.o dependencies.
7263 2011-08-14 Yao Qi <yao@codesourcery.com>
7265 * target.h (struct target_ops): Fix indent.
7266 * win32-low.c (win32_target_ops): Fix comment.
7268 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7269 Yao Qi <yao@codesourcery.com>
7271 * Makefile.in (clean): Remove tic6x-*.c files.
7272 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7273 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7274 (tic6x-c64xp-linux.c): Likewise.
7275 * configure.srv: Add support for tic6x-*-uclinux.
7276 * linux-tic6x-low.c: New.
7277 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7279 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7280 Yao Qi <yao@codesourcery.com>
7282 * target.h (struct target_ops): Add read_loadmap.
7283 * linux-low.c (struct target_loadseg): New type.
7284 (struct target_loadmap): New type.
7285 (linux_read_loadmap): New function.
7286 (linux_target_ops): Add linux_read_loadmap.
7287 * server.c (handle_query): Support qXfer:fdpic:read packet.
7288 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7291 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7293 * win32-low.c: Include <stdint.h>.
7295 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7297 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7298 to the inferior here.
7299 (i386_remove_aligned_watchpoint): Ditto.
7300 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7301 fit part of the watchpoint in the debug registers.
7302 (i386_update_inferior_debug_regs): New.
7303 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7304 registers, and only update the inferior on success.
7305 (i386_low_remove_watchpoint): Ditto.
7307 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7309 * linux-low.c (compare_ints, unique, list_threads, show_process,
7310 linux_core_of_thread): Delete.
7311 (linux_target_ops): Change linux_core_of_thread to
7312 linux_common_core_of_thread.
7313 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7314 * utils.c (malloc_failure): Change type of argument.
7315 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7316 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7317 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7318 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7319 (IPA_OBJS): Add common-utils-ipa.o.
7320 (ptid_h, linux_osdata_h): New macros.
7321 (server_h): Add common/common-utils.h, common/xml-utils.h,
7322 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7324 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7325 ptid.o, buffer.o): New rules.
7326 (linux-low.o): Add common/linux-osdata.h as a dependency.
7327 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7328 * configure.ac: Add AC_HEADER_DIRENT check.
7329 * config.in: Regenerate.
7330 * configure: Regenerate.
7331 * remote-utils.c (xml_escape_text): Delete.
7332 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7333 buffer_xml_printf): Move to common/buffer.c.
7334 * server.c (main): Remove call to initialize_inferiors.
7335 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7336 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7337 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7338 internal_error, gdb_assert, gdb_assert_fail): Delete.
7339 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7340 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7342 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7343 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7344 initialize_inferiors): Delete.
7346 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7348 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7351 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7353 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7355 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7357 2011-05-26 Yao Qi <yao@codesourcery.com>
7359 * Makefile.in (thread-db.o): Track dependence to
7360 common/gdb_thread_db.h.
7361 * thread-db.c: include gdb_thread_db.h from right place.
7363 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7365 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7366 __FILE__ and __LINE__ to internal_error.
7368 2011-05-13 Doug Evans <dje@google.com>
7370 * thread-db.c (try_thread_db_load_from_sdir): New function.
7371 (try_thread_db_load_from_dir): New function.
7372 (thread_db_load_search): Handle $sdir, ignore $pdir.
7373 Remove trying of system directories if search of
7374 libthread-db-search-path fails, that is now done via $sdir.
7376 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7378 * server.c (handle_query): Add EnableDisableTracepoints to the list
7379 of supported features.
7380 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7382 (cmd_qtenable_disable): New.
7383 (cmd_qtstart): Install tracepoints even if disabled.
7384 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7385 receiving a QTEnable or QTDisable packet.
7386 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7387 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7389 (gdb_probe): Skip data collection if static tracepoint is disabled.
7391 2011-05-10 Doug Evans <dje@google.com>
7393 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7395 2011-05-04 Doug Evans <dje@google.com>
7397 * linux-low.c (linux_join): Skip process lookup.
7398 * spu-low.c (spu_join): Ditto.
7399 * server.c (join_inferiors_callback): Delete.
7400 (process_serial_event): For 'D' packet (detach) call join_inferior
7403 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7405 * README: Don't mention xscale*-*-linux*.
7406 * configure.srv (xscale*-*-linux*): Don't handle target.
7408 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7410 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7412 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7413 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7414 (i386_emit_void_call_2): Likewise.
7416 2011-04-26 Yao Qi <yao@codesourcery.com>
7418 * linux-low.c: Move common macros to linux-ptrace.h.
7419 Include linux-ptrace.h.
7420 * Makefile.in (linux_ptrace_h): New.
7421 (linux-low.o): Depends on linux-ptrace.h.
7423 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7425 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7426 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7427 (remote_prepare): New function with most of the TCP code from ...
7428 (remote_open): ... here. Detect PORT here unconditionally. Move also
7429 setting transport_is_reliable.
7430 * server.c (run_once): New variable.
7431 (gdbserver_usage): Document it.
7432 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7433 the first run if RUN_ONCE.
7434 * server.h (run_once, remote_prepare): New declarations.
7436 2011-04-19 Tom Tromey <tromey@redhat.com>
7438 * win32-low.c (handle_load_dll): Remove duplicate "the".
7440 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7442 Remove support for old Cygwin 1.5 versions.
7443 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7444 function to avoid warning.
7445 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7448 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7450 * gdbserver/server.h (Macro _): Define it if not available.
7452 2011-03-14 Michael Snyder <msnyder@vmware.com>
7454 * hostio.c (handle_close): Remove unnecessary null test.
7456 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7458 * Makefile.in (maintainer-clean realclean distclean): Remove
7459 "make ... subdir_do" command.
7461 2011-03-10 Michael Snyder <msnyder@vmware.com>
7463 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7465 * server.c (handle_v_run): Free alloced buffer on early return.
7467 2011-03-09 Yao Qi <yao@codesourcery.com>
7470 2011-03-04 Yao Qi <yao@codesourcery.com>
7472 * Makefile.in: Remove GNU make feature --directory.
7474 2011-03-05 Yao Qi <yao@codesourcery.com>
7476 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7477 (subdir_do): New make target. Copied from gdb/Makefile.
7478 (maintainer-clean, realclean, distclean, clean): Call corresponding
7479 make targets in common/Makefile.
7481 2011-02-11 Yao Qi <yao@codesourcery.com>
7483 * configure.ac: Call AC_PROG_RANLIB.
7484 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7485 * configure: Regenerate.
7487 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7489 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7491 2011-03-06 Yao Qi <yao@codesourcery.com>
7493 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7495 2011-03-05 Yao Qi <yao@codesourcery.com>
7497 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7498 (subdir_do): New make target. Copied from gdb/Makefile.
7499 (maintainer-clean, realclean, distclean, clean): Call corresponding
7500 make targets in common/Makefile.
7502 2011-03-04 Yao Qi <yao@codesourcery.com>
7504 * Makefile.in: Remove GNU make feature --directory.
7506 2011-03-04 Michael Snyder <msnyder@vmware.com>
7508 * server.c (queue_stop_reply): Call xmalloc not malloc.
7510 2011-03-02 Michael Snyder <msnyder@vmware.com>
7512 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7514 2011-02-28 Michael Snyder <msnyder@vmware.com>
7516 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7517 (cmd_qtframe): Ditto.
7518 (cmd_qtbuffer): Ditto.
7519 (cmd_bigqtbuffer): Ditto.
7521 * utils.c (decimal2str): Initialize 'width' to nine, then
7524 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7526 * hostio.c (require_data): Free *data, not data.
7528 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7530 * hostio.c (require_data): Use free, not xfree.
7532 2011-02-27 Michael Snyder <msnyder@vmware.com>
7534 * server.c (handle_query): Discard unused value.
7536 * hostio.c (require_data): Free malloc memory before returning
7539 2011-02-26 Michael Snyder <msnyder@vmware.com>
7541 * linux-low.c (list_threads): Call closedir for dirent.
7543 2011-02-27 Michael Snyder <msnyder@vmware.com>
7545 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7546 a case statement falls through.
7548 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7550 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7553 2011-02-26 Michael Snyder <msnyder@vmware.com>
7555 * utils.c (decimal2str): Eliminate dead code and dead param.
7556 (pulongest): Drop dead param from call to decimal2str.
7559 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7561 Revert the following patch (not approved yet):
7562 2011-02-21 Hui Zhu <teawater@gmail.com>
7563 * tracepoint.c (tp_printf): New function.
7564 (eval_agent_expr): Handle gdb_agent_op_printf.
7566 2011-02-21 Hui Zhu <teawater@gmail.com>
7568 * tracepoint.c (tp_printf): New function.
7569 (eval_agent_expr): Handle gdb_agent_op_printf.
7571 2011-02-18 Tom Tromey <tromey@redhat.com>
7573 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7574 (tracepoint.o): Likewise.
7575 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7576 (gdb_agent_op_names): Likewise.
7578 2011-02-18 Tom Tromey <tromey@redhat.com>
7580 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7581 gdb_agent_op_rot>: New constants.
7582 (gdb_agent_op_names): Add pick and roll.
7583 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7586 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7588 * aclocal.m4: Regenerated with aclocal-1.11.1.
7590 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7592 * server.c (handle_qxfer_traceframe_info): New.
7593 (qxfer_packets): Register "traceframe-info".
7594 (handle_query): Report support for qXfer:traceframe-info:read+.
7595 * tracepoint.c (match_blocktype): New.
7596 (traceframe_find_block_type): Rename to ...
7597 (traceframe_walk_blocks): ... this. Add callback filter argument,
7599 (traceframe_find_block_type): New, reimplemented on top of
7600 traceframe_walk_blocks.
7601 (build_traceframe_info_xml): New.
7602 (traceframe_read_info): New.
7603 * server.h (traceframe_read_info): Declare.
7605 2011-02-11 Yao Qi <yao@codesourcery.com>
7607 * configure.ac: Call AC_PROG_RANLIB.
7608 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7609 * configure: Regenerate.
7611 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7613 * server.c (gdb_read_memory): Change return semantics to allow
7615 (handle_search_memory_1): Adjust.
7616 (process_serial_event) <'m' packet>: Handle partial transfers.
7617 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7619 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7621 * regcache.c (init_register_cache): Initialize
7622 regcache->register_status.
7623 (free_register_cache): Release regcache->register_status.
7624 (regcache_cpy): Copy register_status.
7625 (registers_to_string): Print 'x's for unavailable registers.
7626 (supply_register): Mark the register's status valid or
7627 unavailable, depending on whether a buffer was passed in or not.
7628 (supply_register_zeroed): New.
7629 (supply_regblock): Mark the registers' status valid or
7630 unavailable, depending on whether a buffer was passed in or not.
7631 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7632 (struct regcache): New `register_status' field.
7633 (supply_register_zeroed): Declare.
7634 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7635 supply_register_zeroed, rather than passing a NULL buffer to
7637 * tracepoint.c (fetch_traceframe_registers): Update comment.
7639 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7641 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7644 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7646 * server.h (decode_xfer_write): Change prototype.
7647 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7648 and don't extract the annex here.
7649 * server.c (decode_xfer_read): Remove `annex' parameter,
7650 and don't extract the annex here.
7652 (struct qxfer): New.
7653 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7654 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7655 (handle_qxfer_statictrace): New functions, abstracted out from
7656 handle_query, and made to use the struct qxfer interface.
7657 (handle_threads_qxfer_proper): Rename to ...
7658 (handle_qxfer_threads_proper): ... this.
7659 (handle_threads_qxfer): Rename to ...
7660 (handle_qxfer_threads): ... this. Adjust.
7661 (qxfer_packets): New array.
7662 (handle_qxfer): New function.
7663 (handle_query): Use handle_qxfer.
7665 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7667 * gdbreplay.c: Shorten lines of >= 80 columns.
7668 * linux-low.c: Ditto.
7669 * linux-ppc-low.c: Ditto.
7670 * linux-s390-low.c: Ditto.
7671 * linux-sparc-low.c: Ditto.
7672 * linux-x86-low.c: Ditto.
7673 * linux-xtensa-low.c: Ditto.
7674 * mem-break.c: Ditto.
7676 * regcache.h: Ditto.
7677 * remote-utils.c: Ditto.
7680 * thread-db.c: Ditto.
7681 * tracepoint.c: Ditto.
7683 * win32-low.h: Ditto.
7685 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7687 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7690 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7692 * server.c (gdbserver_version): Update copyright year in version
7694 * gdbreplay.c (gdbreplay_version): Ditto.
7696 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7698 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7699 * linux-bfin-low.c: New file.
7700 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7701 PT_DATA_ADDR for BFIN targets.
7702 * Makefile.in (SFILES): Add linux-bfin-low.c.
7703 (clean): Remove reg-bfin.c.
7704 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7705 * README: Mention supported Blackfin targets.
7707 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7709 * .gitignore: New file.
7711 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7713 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7715 2010-10-22 Jie Zhang <jie@codesourcery.com>
7717 * Makefile.in: Add FLAGS_TO_PASS variable.
7718 (install): Remove dependency of install-only and recursively
7719 invoke make for install-only.
7721 2010-10-04 Doug Evans <dje@google.com>
7723 * Makefile.in (uninstall): Use $(DESTDIR).
7725 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7729 * linux-x86-low.c (compat_siginfo_from_siginfo)
7730 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7731 si_code is < 0. Check for si_code == SI_TIMER before checking for
7734 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7736 * lynx-i386-low.c: New file.
7737 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7739 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7741 * lynx-low.c (ptrace_request_to_str): Remove handling for
7742 request values that have been removed in LynxOS 5.x.
7744 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7746 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7749 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7751 * configure.ac: Add --enable-inprocess-agent option.
7752 * configure: Rebuilt.
7754 2010-09-06 Yao Qi <yao@codesourcery.com>
7756 * linux-low.c (linux_kill): Remove unused variable.
7757 (linux_stabilize_threads): Likewise.
7758 * server.c (start_inferior): Likewise.
7759 (queue_stop_reply_callback): Likewise.
7760 * tracepoint.c (do_action_at_tracepoint): Likewise.
7762 2010-09-06 Yao Qi <yao@codesourcery.com>
7764 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7767 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7769 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7771 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7773 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7776 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7778 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7779 gdbserver/lynx-ppc-low.c: New files.
7780 * Makefile.in (lynx_low_h): New variable.
7781 (lynx-low.o, lynx-ppc-low.o): New rules.
7782 * configure.ac: On LynxOS, link with -lnetinet.
7783 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7784 * configure: regenerate.
7786 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7788 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7789 * configure.ac: Add check for vasprintf and vsnprintf.
7790 * configure, config.in: Regenerate.
7791 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7793 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7795 * gdbreplay.c: Move include of alloca.h up, next to include of
7797 * server.h: Add include of malloc.h.
7798 * mem-break.c: Remove include of malloc.h.
7799 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7801 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7803 * Makefile.in (memmem.o): Build with -Wno-error.
7805 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7807 * utils.c (xsnprintf): Make non-static.
7808 * server.h: Add xsnprintf declaration.
7809 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7810 replace calls to snprintf by calls to xsnprintf throughout.
7812 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7814 * configure.ac: Add configure check for alloca.
7815 * configure, config.in: Regenerate.
7816 * server.h: Include alloca.h if it exists.
7817 * gdbreplay.c: Include alloca.h if it exists.
7819 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7821 * linux-low.c (__SIGRTMIN): Define if not already defined.
7822 (linux_create_inferior): Check for __ANDROID__ rather than
7824 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7825 are already deferred.
7826 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7827 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7828 stopped and already has a pending signal to report.
7829 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7830 a pending signal to report or is moving out of a jump pad.
7831 (linux_init_signals): Check for __ANDROID__ rather than
7834 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7836 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7837 debug_threads check. Avoid a linear search when not doing debug
7840 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7842 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7843 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7844 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7845 (process_event): Change local fd's type to gdb_fildes_t.
7846 (create_file_handler): Adjust prototype.
7847 (delete_file_handler): Adjust prototype.
7848 (handle_file_event): Adjust prototype. Use pfildes.
7849 (create_file_event): Adjsut prototype.
7850 * remote-utils.c (remote_desc, listen_desc): Change type to
7852 * server.h: New gdb_fildes_t typedef.
7853 [USE_WIN32API]: Include winsock2.h.
7854 (delete_file_handler, add_file_handler): Adjust prototypes.
7856 * utils.c (pfildes): New.
7858 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7860 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7861 * configure: Regenerate.
7863 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7865 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7866 (linux_done_accessing_memory): ... this.
7867 (linux_target_ops): Adjust.
7868 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7869 * nto-low.c (nto_target_ops): Adjust comment.
7870 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7871 * spu-low.c (spu_target_ops): Adjust comment.
7872 * target.h (target_ops): Rename unprepare_to_access_memory field
7873 to done_accessing_memory.
7874 (unprepare_to_access_memory): Rename to ...
7875 (done_accessing_memory): ... this.
7877 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7879 * linux-low.c (linux_prepare_to_access_memory): New.
7880 (linux_unprepare_to_access_memory): New.
7881 (linux_target_ops): Install them.
7882 * server.c (read_memory): Rename to ...
7883 (gdb_read_memory): ... this. Use
7884 prepare_to_access_memory/prepare_to_access_memory.
7885 (write_memory): Rename to ...
7886 (gdb_write_memory): ... this. Use
7887 prepare_to_access_memory/prepare_to_access_memory.
7888 (handle_search_memory_1): Adjust.
7889 (process_serial_event): Adjust.
7890 * target.h (struct target_ops): New fields
7891 prepare_to_access_memory and unprepare_to_access_memory.
7892 (prepare_to_access_memory, unprepare_to_access_memory): New.
7893 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7894 prepare_to_access_memory/prepare_to_access_memory.
7895 * nto-low.c (nto_target_ops): Adjust.
7896 * spu-low.c (spu_target_ops): Adjust.
7897 * win32-low.c (win32_target_ops): Adjust.
7899 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7901 * Makefile.in (WARN_CFLAGS): Get it from configure.
7902 (WERROR_CFLAGS): New.
7903 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7904 * configure.ac: Introduce --enable-werror, which adds -Werror to
7905 the compiler command line. Enabled by default. Disable with
7906 --disable-werror. Add -Wdeclaration-after-statement
7907 Wpointer-arith and -Wformat-nonliteral to warning flags.
7908 * configure: Regenerate.
7910 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7912 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7914 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7916 * gdbreplay.c (remote_error): New.
7918 (expect): Use gdbchar. Check for error reading from GDB.
7919 Clarify sync error output.
7920 (play): Check for errors writing to GDB.
7921 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7922 * remote-utils.c (getpkt): Check for errors writing to the remote
7925 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7927 * linux-low.c (linux_wait_1): Move non-debugging code out of
7928 `debug_threads' control.
7930 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7932 * linux-low.c (linux_wait_1): Don't set last_status here.
7933 * server.c (push_event, queue_stop_reply_callback): Assert we're
7934 not pushing a TARGET_WAITKIND_IGNORE event.
7935 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7936 (myresume, handle_target_event): Set the thread's last_resume_kind
7937 and last_status from the target returned status.
7939 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7943 * linux-x86-low.c (update_debug_registers_callback): New.
7944 (i386_dr_low_set_addr): Use it.
7945 (i386_dr_low_get_addr): New.
7946 (i386_dr_low_set_control): Use update_debug_registers_callback.
7947 (i386_dr_low_get_control): New.
7948 (i386_dr_low_get_status): Adjust.
7949 * linux-low.c (linux_stop_lwp): New.
7950 * linux-low.h (linux_stop_lwp): Declare.
7952 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7953 argument instead of a i386_debug_reg_state.
7954 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7955 a i386_debug_reg_state.
7956 (i386_insert_aligned_watchpoint): Adjust.
7957 (i386_remove_aligned_watchpoint): Adjust.
7958 (i386_low_stopped_data_address): Read the debug registers from the
7959 inferior instead of from the mirrors.
7960 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7961 (i386_dr_low_get_addr): Declare.
7962 (i386_dr_low_get_control): Declare.
7963 (i386_dr_low_get_status): Change prototype.
7965 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7966 (i386_dr_low_get_addr): New.
7967 (i386_dr_low_get_control): New.
7968 (i386_dr_low_get_status): Adjust prototype. Return
7970 (i386_initial_stuff): Clear dr_status_mirror and
7972 (i386_get_thread_context): Adjust.
7973 (i386_set_thread_context): Adjust.
7974 (i386_thread_added): Adjust.
7976 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7978 * linux-low.h (linux_thread_area): Delete declaration.
7980 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7982 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7983 after its termination.
7985 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7987 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7988 (gdb_wants_all_stopped): Delete.
7989 (linux_wait_1): Don't call them.
7990 * server.c (handle_v_cont): Tag all threads as want-stopped.
7991 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7992 stopped as "client-wants-stopped".
7994 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7996 * Makefile.in (signals_h): New.
7997 (server_h): Depend on it.
7998 (server.o): Don't depend on $(signals_def).
7999 (signals.o): Depend on $(signals_def).
8001 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8003 * Makefile.in (signals_def): New.
8004 (server_h): Append include/gdb/signals.h and signals_def.
8005 (server.o): Append signals_def.
8007 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8009 * server.c (handle_target_event): Use target_signal_to_host for
8010 resume_info.sig initialization.
8011 * target.h (struct thread_resume) <sig>: New comment.
8013 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8015 * server.c (handle_query): strcpy() the returned string from paddress()
8016 instead of sprintf().
8017 * utils.c (paddress): Return phex_nz().
8019 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8021 * server.c (handle_v_cont): Call mourn_inferior if process
8023 (myresume): Likewise.
8025 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8027 Static tracepoints, and integration with UST.
8029 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8030 * mem-break.c (uninsert_all_breakpoints)
8031 (reinsert_all_breakpoints): New.
8032 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8033 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8034 (gdb_agent_ust_loaded, helper_thread_id)
8035 (gdb_agent_helper_thread_id): New macros.
8036 (struct ipa_sym_addresses): Add addr_ust_loaded,
8037 addr_helper_thread_id, addr_cmd_buf.
8038 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8039 (in_process_agent_loaded_ust): New.
8040 (write_e_ust_not_loaded): New.
8041 (maybe_write_ipa_ust_not_loaded): New.
8042 (struct collect_static_trace_data_action): New.
8043 (enum tracepoint_type) <static_tracepoint>: New.
8044 (struct tracepoint) <handle>: Mention static tracepoints.
8045 (struct static_tracepoint_ctx): New.
8046 (CMD_BUF_SIZE): New.
8047 (add_tracepoint_action): Handle static tracepoint actions.
8048 (unprobe_marker_at): New.
8049 (clear_installed_tracepoints): Handle static tracepoints.
8050 (cmd_qtdp): Handle static tracepoints.
8051 (probe_marker_at): New.
8052 (cmd_qtstart): Handle static tracepoints.
8053 (response_tracepoint): Handle static tracepoints.
8054 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8055 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8056 (get_context_regcache): Handle static tracepoints.
8057 (do_action_at_tracepoint): Handle static tracepoint actions.
8058 (traceframe_find_block_type): Handle static trace data blocks.
8059 (traceframe_read_sdata): New.
8060 (download_tracepoints): Download static tracepoint actions.
8061 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8062 (GDB_PROBE_NAME): New.
8067 (ust_marker_to_static_tracepoint): New.
8069 (collect_ust_data_at_tracepoint): New.
8070 (gdb_ust_probe): New.
8071 (UNIX_PATH_MAX, SOCK_DIR): New.
8072 (gdb_ust_connect_sync_socket): New.
8073 (resume_thread, stop_thread): New.
8074 (run_inferior_command): New.
8075 (init_named_socket): New.
8076 (gdb_ust_socket_init): New.
8077 (cstr_to_hexstr): New.
8079 (first_marker, next_marker): New.
8080 (response_ust_marker): New.
8081 (cmd_qtfstm, cmd_qtsstm): New.
8082 (unprobe_marker_at, probe_marker_at): New.
8083 (cmd_qtstmat, gdb_ust_thread): New.
8084 (gdb_ust_init): New.
8085 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8086 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8088 (x86_64_st_collect_regmap): New.
8089 (X86_64_NUM_ST_COLLECT_GREGS): New.
8090 (AMD64_RIP_REGNUM): New.
8091 (supply_static_tracepoint_registers): New.
8092 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8094 (i386_st_collect_regmap): New.
8095 (i386_NUM_ST_COLLECT_GREGS): New.
8096 (supply_static_tracepoint_registers): New.
8097 * server.c (handle_query): Handle qXfer:statictrace:read.
8098 <qSupported>: Report support for StaticTracepoints, and
8099 qXfer:statictrace:read features.
8100 * server.h (traceframe_read_sdata)
8101 (supply_static_tracepoint_registers): Declare.
8102 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8103 (unpack_varlen_hex): Include in IPA build.
8104 * Makefile.in (ustlibs, ustinc): New.
8105 (IPA_OBJS): Add remote-utils-ipa.o.
8106 ($(IPA_LIB)): Link -ldl and -lpthread.
8108 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8109 * config.in, configure: Regenerate.
8111 2010-06-20 Ian Lance Taylor <iant@google.com>
8112 Pedro Alves <pedro@codesourcery.com>
8114 * linux-x86-low.c (always_true): Delete.
8115 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8116 trying to fool the compiler with always_true.
8118 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8120 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8121 conditions in gdbserver.
8123 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8125 * spu-low.c (spu_read_memory): Wrap around local store limit.
8126 (spu_write_memory): Likewise.
8128 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8130 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8131 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8133 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8135 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8136 uses with LONGEST uses.
8138 2010-06-14 Stan Shebs <stan@codesourcery.com>
8139 Pedro Alves <pedro@codesourcery.com>
8143 * linux-x86-low.c: Include limits.h.
8148 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8149 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8150 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8151 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8152 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8153 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8154 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8155 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8156 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8157 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8158 (amd64_emit_void_call_2): New.
8159 (amd64_emit_ops): New.
8160 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8161 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8162 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8163 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8164 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8165 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8166 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8167 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8168 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8169 (i386_emit_stack_adjust, i386_emit_int_call_1)
8170 (i386_emit_void_call_2): New.
8171 (i386_emit_ops): New.
8172 (x86_emit_ops): New.
8173 (the_low_target): Install x86_emit_ops.
8174 * server.h (struct emit_ops): New.
8175 (get_raw_reg_func_addr): Declare.
8176 (current_insn_ptr, emit_error): Declare.
8177 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8178 (set_trace_state_variable_value): New defines.
8179 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8180 addr_get_trace_state_variable_value and
8181 addr_set_trace_state_variable_value.
8182 (symbol_list): New fields for get_raw_reg,
8183 get_trace_state_variable_value and set_trace_state_variable_value.
8184 (condfn): New typedef.
8185 (struct tracepoint): New field `compiled_cond'.
8186 (do_action_at_tracepoint): Clear compiled_cond.
8187 (get_trace_state_variable_value, set_trace_state_variable_value):
8189 (condition_true_at_tracepoint): If there's a compiled condition,
8191 (current_insn_ptr, emit_error): New globals.
8192 (struct bytecode_address): New.
8193 (get_raw_reg_func_addr): New.
8194 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8195 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8196 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8197 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8198 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8199 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8200 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8201 (compile_tracepoint_condition, compile_bytecodes): New.
8202 * target.h (emit_ops): Forward declare.
8203 (struct target_ops): New field emit_ops.
8204 (target_emit_ops): New.
8205 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8206 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8207 * linux-low.c (linux_emit_ops): New.
8208 (linux_target_ops): Install it.
8209 * linux-low.h (struct linux_target_ops): New field emit_ops.
8211 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8213 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8214 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8216 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8217 Stan Shebs <stan@codesourcery.com>
8219 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8220 (all): Depend on $(extra_libraries).
8221 (install-only): Install the IPA.
8222 (IPA_OBJS, IPA_LIB): New.
8223 (clean): Remove the IPA lib.
8224 (IPAGENT_CFLAGS): New.
8225 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8226 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8227 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8228 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8229 * configure.ac: Check for atomic builtins support in the compiler.
8230 (IPA_DEPFILES, extra_libraries): Define.
8231 * configure.srv (ipa_obj): Add description.
8232 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8233 (i[34567]86-*-linux*): Set ipa_obj.
8234 (x86_64-*-linux*): Set ipa_obj.
8235 * linux-low.c (stabilizing_threads): New.
8236 (supports_fast_tracepoints): New.
8237 (linux_detach): Stabilize threads before detaching.
8238 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8239 the lwp is either not stabilizing, or is moving out of a jump pad.
8240 (linux_fast_tracepoint_collecting): New.
8241 (maybe_move_out_of_jump_pad): New.
8242 (enqueue_one_deferred_signal): New.
8243 (dequeue_one_deferred_signal): New.
8244 (linux_wait_for_event_1): If moving out of a jump pad, defer
8245 pending signals to later.
8246 (linux_stabilize_threads): New.
8247 (linux_wait_1): Check if threads need moving out of jump pads, and
8249 (stuck_in_jump_pad_callback): New.
8250 (move_out_of_jump_pad_callback): New.
8252 (linux_resume_one_lwp): Handle moving out of jump pads.
8253 (linux_set_resume_request): Dequeue deferred signals.
8254 (need_step_over_p): Also step over fast tracepoint jumps.
8255 (start_step_over): Also uninsert fast tracepoint jumps.
8256 (finish_step_over): Also reinsert fast tracepoint jumps.
8257 (linux_install_fast_tracepoint_jump): New.
8258 (linux_target_ops): Install linux_stabilize_threads and
8259 linux_install_fast_tracepoint_jump_pad.
8260 * linux-low.h (linux_target_ops) <get_thread_area,
8261 install_fast_tracepoint_jump_pad>: New fields.
8262 (struct lwp_info) <collecting_fast_tracepoint,
8263 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8264 (linux_get_thread_area): Declare.
8265 * linux-x86-low.c (jump_insn): New.
8266 (x86_get_thread_area): New.
8267 (append_insns): New.
8269 (amd64_install_fast_tracepoint_jump_pad): New.
8270 (i386_install_fast_tracepoint_jump_pad): New.
8271 (x86_install_fast_tracepoint_jump_pad): New.
8272 (the_low_target): Install x86_get_thread_area and
8273 x86_install_fast_tracepoint_jump_pad.
8274 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8275 (struct fast_tracepoint_jump): New.
8276 (fast_tracepoint_jump_insn): New.
8277 (fast_tracepoint_jump_shadow): New.
8278 (find_fast_tracepoint_jump_at): New.
8279 (fast_tracepoint_jump_here): New.
8280 (delete_fast_tracepoint_jump): New.
8281 (set_fast_tracepoint_jump): New.
8282 (uninsert_fast_tracepoint_jumps_at): New.
8283 (reinsert_fast_tracepoint_jumps_at): New.
8284 (set_breakpoint_at): Use write_inferior_memory.
8285 (uninsert_raw_breakpoint): Use write_inferior_memory.
8286 (check_mem_read): Mask out fast tracepoint jumps.
8287 (check_mem_write): Mask out fast tracepoint jumps.
8288 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8289 (set_fast_tracepoint_jump): Declare.
8290 (delete_fast_tracepoint_jump)
8291 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8292 (reinsert_fast_tracepoint_jumps_at): Declare.
8293 * regcache.c: Don't compile many functions when building the
8294 in-process agent library.
8295 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8296 the register buffer in the heap.
8297 (free_register_cache): If the register buffer isn't owned by the
8298 regcache, don't free it.
8299 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8300 pre-existing register caches.
8301 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8303 (convert_ascii_to_int): : Constify `from' parameter type.
8304 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8305 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8306 the needed buffer in-place.
8307 (relocate_instruction): New.
8308 * server.c (handle_query) <qSymbols>: If the target supports
8309 tracepoints, give it a chance of looking up symbols. Report
8310 support for fast tracepoints.
8311 (handle_status): Stabilize threads.
8312 (process_serial_event): Adjust.
8313 * server.h (struct fast_tracepoint_jump): Forward declare.
8314 (struct process_info) <fast_tracepoint_jumps>: New field.
8315 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8316 (decode_X_packet, decode_M_packet): Adjust.
8317 (relocate_instruction): Declare.
8318 (in_process_agent_loaded): Declare.
8319 (tracepoint_look_up_symbols): Declare.
8320 (struct fast_tpoint_collect_status): Declare.
8321 (fast_tracepoint_collecting): Declare.
8322 (force_unlock_trace_buffer): Declare.
8323 (handle_tracepoint_bkpts): Declare.
8324 (initialize_low_tracepoint)
8325 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8326 * target.h (struct target_ops) <stabilize_threads,
8327 install_fast_tracepoint_jump_pad>: New fields.
8328 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8329 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8330 [HAVE_STDINT_H]: Include stdint.h.
8331 (trace_debug_1): Rename to ...
8332 (trace_vdebug): ... this.
8333 (trace_debug): Rename to ...
8334 (trace_debug_1): ... this. Add `level' parameter.
8336 (ATTR_USED, ATTR_NOINLINE): New.
8337 (IP_AGENT_EXPORT): New.
8338 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8339 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8340 (about_to_request_buffer_space, trace_buffer_is_full)
8341 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8342 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8343 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8344 (traceframe_write_count, traceframes_created)
8345 (trace_state_variables)
8346 New renaming defines.
8347 (struct ipa_sym_addresses): New.
8348 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8350 (ipa_sym_addrs): New.
8351 (all_tracepoint_symbols_looked_up): New.
8352 (in_process_agent_loaded): New.
8353 (write_e_ipa_not_loaded): New.
8354 (maybe_write_ipa_not_loaded): New.
8355 (tracepoint_look_up_symbols): New.
8356 (debug_threads) [IN_PROCESS_AGENT]: New.
8357 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8358 (UNKNOWN_SIDE_EFFECTS): New.
8359 (stop_tracing): New.
8360 (flush_trace_buffer): New.
8361 (stop_tracing_bkpt): New.
8362 (flush_trace_buffer_bkpt): New.
8363 (read_inferior_integer): New.
8364 (read_inferior_uinteger): New.
8365 (read_inferior_data_pointer): New.
8366 (write_inferior_data_pointer): New.
8367 (write_inferior_integer): New.
8368 (write_inferior_uinteger): New.
8369 (struct collect_static_trace_data_action): Delete.
8370 (enum tracepoint_type): New.
8371 (struct tracepoint) <type>: New field `type'.
8372 <actions_str, step_actions, step_actions_str>: Only include in
8374 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8375 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8376 (tracepoints): Use IP_AGENT_EXPORT.
8377 (last_tracepoint): Don't include in the IPA.
8378 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8379 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8380 (alloced_trace_state_variables): New.
8381 (trace_state_variables): Use IP_AGENT_EXPORT.
8382 (traceframe_t): Delete unused variable.
8383 (circular_trace_buffer): Don't include in the IPA.
8384 (trace_buffer_start): Delete.
8385 (struct trace_buffer_control): New.
8386 (trace_buffer_free): Delete.
8387 (struct ipa_trace_buffer_control): New.
8388 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8389 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8391 (trace_buffer_ctrl): New.
8392 (TRACE_BUFFER_CTRL_CURR): New.
8393 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8394 Reimplement as macros.
8395 (trace_buffer_wrap): Delete.
8396 (traceframe_write_count, traceframe_read_count)
8397 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8398 (struct tracepoint_hit_ctx) <type>: New field.
8399 (struct fast_tracepoint_ctx): New.
8400 (memory_barrier): New.
8402 (record_tracepoint_error): Update atomically in the IPA.
8403 (clear_inferior_trace_buffer): New.
8404 (about_to_request_buffer_space): New.
8405 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8406 updating the same buffer.
8407 (add_tracepoint): Default the tracepoint's type to trap
8408 tracepoint, and orig_size to -1.
8409 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8411 (create_trace_state_variable): New parameter `gdb'. Handle it.
8412 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8413 (cmd_qtdp): Handle fast tracepoints.
8415 (max_jump_pad_size): New.
8416 (gdb_jump_pad_head): New.
8417 (get_jump_space_head): New.
8418 (claim_jump_space): New.
8419 (sort_tracepoints): New.
8420 (MAX_JUMP_SIZE): New.
8421 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8423 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8424 support. Upload fast traceframes, and delete internal IPA
8426 (stop_tracing_handler): New.
8427 (flush_trace_buffer_handler): New.
8428 (cmd_qtstop): Upload fast tracepoints.
8429 (response_tracepoint): Handle fast tracepoints.
8430 (tracepoint_finished_step): Upload fast traceframes. Set the
8431 tracepoint hit context's tracepoint type.
8432 (handle_tracepoint_bkpts): New.
8433 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8434 type. Add comment about fast tracepoints.
8435 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8436 non-existing action_str field.
8437 (get_context_regcache): Handle fast tracepoints.
8438 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8440 (fast_tracepoint_from_jump_pad_address): New.
8441 (fast_tracepoint_from_ipa_tpoint_address): New.
8442 (collecting_t): New.
8443 (force_unlock_trace_buffer): New.
8444 (fast_tracepoint_collecting): New.
8447 (write_inferior_data_ptr): New.
8448 (target_tp_heap): New.
8449 (target_malloc): New.
8450 (download_agent_expr): New.
8452 (download_tracepoints): New.
8453 (download_trace_state_variables): New.
8454 (upload_fast_traceframes): New.
8455 (IPA_FIRST_TRACEFRAME): New.
8456 (IPA_NEXT_TRACEFRAME_1): New.
8457 (IPA_NEXT_TRACEFRAME): New.
8458 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8459 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8460 (gdb_jump_pad_buffer_end): New.
8461 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8462 (initialize_tracepoint): Adjust.
8463 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8464 buffer. Initialize the low module.
8465 * utils.c (PREFIX, TOOLNAME): New.
8466 (malloc_failure): Use PREFIX.
8467 (error): In the IPA, an error causes an exit.
8468 (fatal, warning): Use PREFIX.
8469 (internal_error): Use TOOLNAME.
8470 (NUMCELLS): Increase to 10.
8471 * configure, config.in: Regenerate.
8473 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8475 * server.c (handle_query) <qSupported>: Do two passes over the
8476 qSupported string to avoid nesting strtok.
8478 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8480 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8482 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8484 * configure: Regenerate.
8485 * proc-service.list: New.
8487 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8489 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8492 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8494 * gdbreplay.c (remote_open): Check error return from socket() call by
8495 its equality to -1 not by it being negative.
8496 * remote-utils.c (remote_open): Likewise.
8498 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8500 * config.h: Regenerate.
8502 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8504 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8505 doesn't provide PTRACE_GET_THREAD_AREA.
8507 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8509 * linux-m68k-low.c: Include <asm/ptrace.h>
8510 (ps_get_thread_area): Implement.
8512 2010-05-03 Doug Evans <dje@google.com>
8514 * event-loop.c (struct callback_event): New struct.
8515 (callback_list): New global.
8516 (append_callback_event, delete_callback_event): New functions.
8517 (process_callback): New function.
8518 (start_event_loop): Call it.
8519 * remote-utils.c (NOT_SCHEDULED): Define.
8520 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8521 moved out of readchar.
8522 (readchar): Rewrite. Call reschedule before returning.
8523 (reset_readchar): New function.
8524 (remote_close): Call it.
8525 (process_remaining, reschedule): New functions.
8526 * server.h (callback_handler_func): New typedef.
8527 (append_callback_event, delete_callback_event): Declare.
8529 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8531 * proc-service.c (ps_pglobal_lookup): Use
8532 thread_db_look_up_one_symbol.
8533 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8534 parameter. Use it instead of all_symbols_looked_up.
8535 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8537 (all_symbols_looked_up): Don't declare.
8538 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8539 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8541 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8542 Set all_symbols_looked_up here.
8543 (thread_db_look_up_one_symbol): New.
8544 (thread_db_get_tls_address): Adjust.
8545 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8546 thread_db object on the heap, and tentatively set it in the
8548 (thread_db_init): Don't set all_symbols_looked_up here.
8549 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8551 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8553 * linux-low.c (linux_kill, linux_detach): Adjust.
8554 (status_pending_p_callback): Remove redundant statement. Check
8555 for !TARGET_WAITIKIND_IGNORE, instead of
8556 TARGET_WAITKIND_STOPPED.
8557 (handle_tracepoints): Make sure LWP is locked. Adjust.
8558 (linux_wait_for_event_1): Adjust.
8559 (linux_cancel_breakpoints): New.
8560 (unsuspend_one_lwp): New.
8561 (unsuspend_all_lwps): New.
8562 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8563 (send_sigstop_callback): Change return type to int, add new
8564 `except' parameter and handle it.
8565 (suspend_and_send_sigstop_callback): New.
8566 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8567 pass them down. If SUSPEND, also increment the lwp's suspend
8569 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8570 (need_step_over_p): Don't consider suspended LWPs.
8571 (start_step_over): Adjust.
8572 (proceed_one_lwp): Change return type to int, add new `except'
8573 parameter and handle it.
8574 (unsuspend_and_proceed_one_lwp): New.
8575 (proceed_all_lwps): Use find_inferior instead of
8577 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8578 also decrement the suspend count of LWPs. Pass `except' down,
8579 instead of hacking its suspend count.
8580 (linux_pause_all): Add `freeze' parameter. Adjust.
8581 (linux_unpause_all): New.
8582 (linux_target_ops): Install linux_unpause_all.
8583 * server.c (handle_status): Adjust.
8584 * target.h (struct target_ops): New fields `unpause_all' and
8585 `cancel_breakpoints'. Add new parameter to `pause_all'.
8586 (pause_all): Add new `freeze' parameter.
8588 (cancel_breakpoints): New.
8589 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8591 (cmd_qtstart): Pause threads.
8592 (stop_tracing): Pause threads, and cancel breakpoints.
8593 * win32-low.c (win32_target_ops): Adjust.
8595 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8597 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8598 the inferior right away from here...
8599 (linux_wait_1): ... to here, and adjust to check the thread's
8600 last_resume_kind instead of the lwp's step or stop_expected flags.
8602 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8604 * README: Use consistent `GDB' and `GDBserver' spellings.
8606 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8608 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8609 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8610 (linux_detach_one_lwp): Assume the lwp is stopped.
8611 (any_thread_of): Delete.
8612 (linux_detach): Stop all lwps here. Don't blindly delete all
8614 (delete_lwp_callback): New.
8615 (linux_mourn): Delete all lwps of the process that is gone.
8616 (linux_wait_1): Don't delete the last lwp of the process here.
8617 * mem-break.h (mark_breakpoints_out): Declare.
8618 * mem-break.c (mark_breakpoints_out): New.
8619 (free_all_breakpoints): Use it.
8620 * server.c (handle_target_event): If the process is gone, mark
8622 * thread-db.c (struct thread_db) <create_bp>: New field.
8623 (thread_db_enable_reporting): Fix prototype. Store a thread event
8624 breakpoint reference in the thread_db struct.
8625 (thread_db_load_search): Clear the thread_db object.
8626 (try_thread_db_load_1): Ditto.
8627 (switch_to_process): New.
8628 (disable_thread_event_reporting): Use it.
8629 (remove_thread_event_breakpoints): New.
8630 (thread_db_detach, thread_db_mourn): Use it.
8632 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8634 * linux-low.c (linux_enable_event_reporting): New.
8635 (linux_wait_for_event_1, handle_extended_wait): Use it.
8637 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8639 * linux-low.c (linux_kill_one_lwp, linux_kill)
8640 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8641 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8642 SIGSTOP even if the LWP is stopped.
8643 (send_sigstop_callback): New.
8644 (stop_all_lwps): Use send_sigstop_callback instead.
8645 (linux_resume_one_thread): Adjust.
8646 (proceed_one_lwp): Still proceed an LWP that the client has
8647 requested to stop, if we haven't reported it as stopped yet. Make
8648 sure that LWPs the client want stopped, have a pending SIGSTOP.
8650 2010-04-26 Doug Evans <dje@google.com>
8652 * server.c (handle_general_set): Make static.
8654 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8655 Print received char after testing for error/eof instead of before.
8656 (input_interrupt): Tweak comment.
8658 2010-04-23 Doug Evans <dje@google.com>
8660 * server.c (start_inferior): Print inferior argv if --debug.
8662 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8664 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8665 * nto-x86-low.c: Include server.h
8667 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8669 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8670 be consistent with other sources of this directory.
8671 (init_registers_amd64): Correct name of source file of this function
8674 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8676 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8679 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8681 * win32-i386-low.c: Add 64-bit support.
8682 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8683 (init_registers_amd64): Declare.
8684 (mappings): Add 64-bit version of array.
8685 (init_windows_x86): New function.
8686 (the_low_target): Change init_arch field to init_windows_x86.
8688 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8690 * win32-low.c: Adapt to support also 64-bit architecture.
8691 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8692 (get_image_name): Use SIZE_T type for local variable `done'.
8693 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8694 (toolhelp_get_dll_name): Idem.
8695 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8696 Use uintptr_t typecast to avoid warning.
8697 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8698 (handle_exception): Use phex_nz to avoid warning.
8699 (win32_wait): Remove unused local variable `process'.
8701 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8703 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8706 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8708 * configure.ac: Use `ws2_32' library for srv_mingw.
8709 * configure: Regenerate.
8710 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8711 * remote-utils.c: Likewise.
8713 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8715 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8716 if __x86_64__ is defined.
8718 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8720 * configure: Regenerate.
8722 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8724 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8725 * target.h (target_ops): New get_tib_address field.
8726 * win32-low.h (win32_thread_info): Add thread_local_base field.
8727 * win32-low.c (child_add_thread): Add tlb argument.
8728 Set thread_local_base field to TLB.
8729 (get_child_debug_event): Adapt to child_add_thread change.
8730 (win32_get_tib_address): New function.
8731 (win32_target_ops): Set get_tib_address field to
8732 win32_get_tib_address.
8733 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8735 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8737 * linux-low.c (linux_mourn): Also remove the process.
8738 * server.c (handle_target_event): Don't remove the process here.
8739 * nto-low.c (nto_mourn): New.
8740 (nto_target_ops): Install it.
8741 * spu-low.c (spu_mourn): New.
8742 (spu_target_ops): Install it.
8743 * win32-low.c (win32_mourn): New.
8744 (win32_target_ops): Install it.
8746 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8748 * server.h (buffer_xml_printf): Remove redundant `;'.
8750 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8752 * regcache.c (set_register_cache): Invalidate regcaches before
8753 changing the register cache layout.
8754 (regcache_invalidate_one): Allow a NULL regcache.
8755 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8756 regcaches before changing the register cache layout or the target
8759 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8761 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8762 variable warning on Linux/x86-64.
8764 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8766 GDBserver disconnected tracing support.
8768 * linux-low.c (linux_remove_process): Delete.
8769 (add_lwp): Don't set last_resume_kind here.
8770 (linux_kill): Use `mourn'.
8771 (linux_detach): Use `thread_db_detach', and `mourn'.
8773 (linux_attach_lwp_1): Adjust comment.
8774 (linux_attach): last_resume_kind moved the thread_info; adjust.
8775 (status_pending_p_callback): Adjust.
8776 (linux_wait_for_event_1): Adjust.
8777 (count_events_callback, select_singlestep_lwp_callback)
8778 (select_event_lwp_callback, cancel_breakpoints_callback)
8779 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8780 (proceed_one_lwp): Adjust.
8781 (linux_async): Add debug output.
8782 (linux_thread_stopped): New.
8783 (linux_pause_all): New.
8784 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8786 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8787 (thread_db_free): Delete declaration.
8788 (thread_db_detach, thread_db_mourn): Declare.
8789 * thread-db.c (thread_db_init): Use thread_db_mourn.
8790 (thread_db_free): Delete, split in two.
8791 (disable_thread_event_reporting): New.
8792 (thread_db_detach): New.
8793 (thread_db_mourn): New.
8795 * server.h (struct thread_info) <last_resume_kind>: New field.
8796 <attached>: Add comment.
8797 <gdb_detached>: New field.
8798 (handler_func): Change return type to int.
8799 (handle_serial_event, handle_target_event): Ditto.
8800 (gdb_connected): Declare.
8802 (disconnected_tracing): Declare.
8803 (stop_tracing): Declare.
8805 * server.c (handle_query) <qSupported>: Report support for
8806 disconnected tracing.
8807 (queue_stop_reply_callback): Account for running threads.
8808 (gdb_wants_thread_stopped): New.
8809 (gdb_wants_all_threads_stopped): New.
8810 (gdb_reattached_process): New.
8811 (handle_status): Clear the `gdb_detached' flag of all processes.
8812 In all-stop, stop all threads.
8813 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8814 (process_serial_event): If the remote connection breaks, or if an
8815 exit was forced with "monitor exit", force an event loop exit.
8816 Handle disconnected tracing on detach.
8817 (handle_serial_event): Adjust.
8818 (handle_target_event): If GDB isn't connected, forward events back
8819 to the inferior, unless the last process exited, in which case,
8820 exit gdbserver. Adjust interface.
8822 * remote-utils.c (remote_open): Don't block in accept. Instead
8823 register an event loop source on the listen socket file
8824 descriptor. Refactor bits into ...
8825 (listen_desc): ... this new global.
8826 (gdb_connected): ... this new function.
8827 (enable_async_notification): ... this new function.
8828 (handle_accept_event): ... this new function.
8829 (remote_close): Clear remote_desc.
8831 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8833 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8835 (mourn_inferior): Define.
8836 (target_process_qsupported): Avoid the dangling else problem.
8837 (thread_stopped): Define.
8838 (pause_all): Define.
8839 (target_waitstatus_to_string): Declare.
8840 * target.c (target_waitstatus_to_string): New.
8842 * tracepoint.c (tracing): Make extern.
8843 (disconnected_tracing): New.
8844 (stop_tracing): Make extern. Handle tracing stops due to GDB
8846 (cmd_qtdisconnected): New.
8847 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8848 (handle_tracepoint_general_set): Handle QTDisconnected.
8850 * event-loop.c (event_handler_func): Change return type to int.
8851 (process_event): Bail out if the event handler wants the event
8853 (handle_file_event): Ditto.
8854 (start_event_loop): Bail out if the event handler wants the event
8857 * nto-low.c (nto_target_ops): Adjust.
8858 * spu-low.c (spu_wait): Don't remove the process here.
8859 (spu_target_ops): Adjust.
8860 * win32-low.c (win32_wait): Don't remove the process here.
8861 (win32_target_ops): Adjust.
8863 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8865 * regcache.c (realloc_register_cache): Invalidate inferior's
8866 regcache before recreating it.
8868 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8870 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8872 2010-04-09 Stan Shebs <stan@codesourcery.com>
8873 Pedro Alves <pedro@codesourcery.com>
8875 * server.h (LONGEST): New.
8876 (struct thread_info) <while_stepping>: New field.
8877 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8879 (initialize_tracepoint, handle_tracepoint_general_set)
8880 (handle_tracepoint_query, tracepoint_finished_step)
8881 (tracepoint_was_hit, release_while_stepping_state_list):
8882 (current_traceframe): Declare.
8883 * server.c (handle_general_set): Handle tracepoint packets.
8885 (write_memory): New.
8886 (handle_search_memory_1): Use read_memory.
8887 (handle_query): Report support for conditional tracepoints, trace
8888 state variables, and tracepoint sources. Handle tracepoint
8890 (main): Initialize the tracepoints module.
8891 (process_serial_event): Handle traceframe reads/writes.
8893 * linux-low.c (handle_tracepoints): New.
8894 (linux_wait_1): Call it.
8895 (linux_resume_one_lwp): Handle while-stepping.
8896 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8897 (linux_target_ops): Install them.
8898 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8900 * linux-x86-low.c (x86_supports_tracepoints): New.
8901 (the_low_target). Install it.
8903 * mem-break.h (delete_breakpoint): Declare.
8904 * mem-break.c (delete_breakpoint): Make external.
8906 * target.h (struct target_ops): Add `supports_tracepoints',
8907 `read_pc', and `write_pc' fields.
8908 (target_supports_tracepoints): Define.
8909 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8912 * regcache.h (struct regcache) <registers_owned>: New field.
8913 (init_register_cache, regcache_cpy): Declare.
8914 (regcache_read_pc, regcache_write_pc): Declare.
8915 (register_cache_size): Declare.
8916 (supply_regblock): Declare.
8917 * regcache.c (init_register_cache): New.
8918 (new_register_cache): Use it.
8919 (regcache_cpy): New.
8920 (register_cache_size): New.
8921 (supply_regblock): New.
8922 (regcache_read_pc, regcache_write_pc): New.
8924 * tracepoint.c: New.
8926 * Makefile.in (OBS): Add tracepoint.o.
8927 (tracepoint.o): New rule.
8929 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8931 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8933 (i386-mmx.c): Likewise.
8934 (i386-mmx-linux.o): Likewise.
8935 (i386-mmx-linux.c): Likewise.
8937 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8938 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8939 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8940 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8942 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8943 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8944 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8946 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8948 * Makefile.in (clean): Updated.
8950 (i386-avx.c): Likewise.
8951 (i386-avx-linux.o): Likewise.
8952 (i386-avx-linux.c): Likewise.
8953 (amd64-avx.o): Likewise.
8954 (amd64-avx.c): Likewise.
8955 (amd64-avx-linux.o): Likewise.
8956 (amd64-avx-linux.c): Likewise.
8958 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8959 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8960 (srv_amd64_regobj): Add amd64-avx.o.
8961 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8962 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8963 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8964 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8965 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8966 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8967 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8969 * i387-fp.c: Include "i386-xstate.h".
8971 (i387_cache_to_xsave): Likewise.
8972 (i387_xsave_to_cache): Likewise.
8973 (x86_xcr0): Likewise.
8975 * i387-fp.h (i387_cache_to_xsave): Likewise.
8976 (i387_xsave_to_cache): Likewise.
8977 (x86_xcr0): Likewise.
8979 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8980 * linux-crisv32-low.c (target_regsets): Likewise.
8981 * linux-m68k-low.c (target_regsets): Likewise.
8982 * linux-mips-low.c (target_regsets): Likewise.
8983 * linux-ppc-low.c (target_regsets): Likewise.
8984 * linux-s390-low.c (target_regsets): Likewise.
8985 * linux-sh-low.c (target_regsets): Likewise.
8986 * linux-sparc-low.c (target_regsets): Likewise.
8987 * linux-xtensa-low.c (target_regsets): Likewise.
8989 * linux-low.c: Include <sys/uio.h>.
8990 (regsets_fetch_inferior_registers): Support nt_type.
8991 (regsets_store_inferior_registers): Likewise.
8992 (linux_process_qsupported): New.
8993 (linux_target_ops): Add linux_process_qsupported.
8995 * linux-low.h (regset_info): Add nt_type.
8996 (linux_target_ops): Add process_qsupported.
8998 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9000 (init_registers_i386_avx_linux): New.
9001 (init_registers_amd64_avx_linux): Likewise.
9002 (xmltarget_i386_linux_no_xml): Likewise.
9003 (xmltarget_amd64_linux_no_xml): Likewise.
9004 (PTRACE_GETREGSET): Likewise.
9005 (PTRACE_SETREGSET): Likewise.
9006 (x86_fill_xstateregset): Likewise.
9007 (x86_store_xstateregset): Likewise.
9008 (use_xml): Likewise.
9009 (x86_linux_update_xmltarget): Likewise.
9010 (x86_linux_process_qsupported): Likewise.
9011 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9012 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9013 init_registers_i386_linux here. Call
9014 x86_linux_update_xmltarget.
9015 (the_low_target): Add x86_linux_process_qsupported.
9017 * server.c (handle_query): Call target_process_qsupported.
9019 * target.h (target_ops): Add process_qsupported.
9020 (target_process_qsupported): New.
9022 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9024 * inferiors.c (add_thread): Set last_status kind to
9025 TARGET_WAITKIND_IGNORE.
9026 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9027 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9028 (linux_wait_1): Move `thread' local definition to block that uses
9029 it. Don't NULL initialize `event_child'.
9030 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9031 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9032 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9034 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9036 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9037 an extended waitstatus, or by a watchpoint.
9038 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9039 thread was stepping or has been stopped by a watchpoint.
9041 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9043 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9044 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9045 of another, then delete the previous, and validate all
9047 (validate_inserted_breakpoint): New.
9048 (delete_disabled_breakpoints): New.
9049 (validate_breakpoints): New.
9050 (check_mem_read): Validate breakpoints before trusting their
9051 shadow. Delete disabled breakpoints.
9052 (check_mem_write): Validate breakpoints before trusting they
9053 should be inserted. Delete disabled breakpoints.
9054 * mem-break.h (validate_breakpoints):
9055 * server.c (handle_query): Validate breakpoints when we see a
9058 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9060 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9061 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9062 if we could tell there's a GDB breakpoint at stop_pc.
9063 (need_step_over_p): Don't do a step over if we find a GDB
9064 breakpoint at the resume PC.
9066 * mem-break.c (struct raw_breakpoint): New.
9067 (enum bkpt_type): New type `gdb_breakpoint'.
9068 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9069 fields. New field `raw'.
9070 (find_raw_breakpoint_at): New.
9071 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9073 (set_breakpoint_at): Adjust.
9074 (delete_raw_breakpoint): New.
9075 (release_breakpoint): New.
9076 (delete_breakpoint): Rename to...
9077 (delete_breakpoint_1): ... this. Add proc parameter. Use
9078 release_breakpoint. Return ENOENT.
9079 (delete_breakpoint): Reimplement.
9080 (find_breakpoint_at): Delete.
9081 (find_gdb_breakpoint_at): New.
9082 (delete_breakpoint_at): Delete.
9083 (set_gdb_breakpoint_at): New.
9084 (delete_gdb_breakpoint_at): New.
9085 (gdb_breakpoint_here): New.
9086 (set_reinsert_breakpoint): Use release_breakpoint.
9087 (uninsert_breakpoint): Rename to ...
9088 (uninsert_raw_breakpoint): ... this.
9089 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9090 (reinsert_raw_breakpoint): Change parameter type to
9092 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9094 (check_breakpoints): Adjust. Use release_breakpoint.
9095 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9096 (breakpoint_inserted_here): Ditto.
9097 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9098 Don't trust the breakpoint's shadow if it is not inserted.
9099 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9100 (delete_all_breakpoints): Adjust.
9101 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9102 use delete_breakpoint_1.
9104 * mem-break.h (breakpoints_supported): Delete declaration.
9105 (set_gdb_breakpoint_at): Declare.
9106 (gdb_breakpoint_here): Declare.
9107 (delete_breakpoint_at): Delete.
9108 (delete_gdb_breakpoint_at): Declare.
9110 * server.h (struct raw_breakpoint): Forward declare.
9111 (struct process_info): New field `raw_breakpoints'.
9113 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9116 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9118 * linux-low.c (status_pending_p_callback): Fix comment.
9119 (linux_wait_for_event_1): Move most of the internal breakpoint
9120 handling from here...
9121 (linux_wait_1): ... to here.
9122 (count_events_callback): New.
9123 (select_singlestep_lwp_callback): New.
9124 (select_event_lwp_callback): New.
9125 (cancel_breakpoints_callback): New.
9126 (select_event_lwp): New.
9127 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9128 priority to all LWPs that have had events that should be reported
9129 to the client. Cancel breakpoints when about to reporting the
9130 event to the client, not while stopping lwps. No longer cancel
9131 finished single-steps here.
9132 (cancel_finished_single_step): Delete.
9133 (cancel_finished_single_steps): Delete.
9135 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9137 * mem-break.c (enum bkpt_type): New.
9138 (struct breakpoint): New field `type'.
9139 (set_breakpoint_at): Change return type to struct breakpoint
9140 pointer. Set type to `other_breakpoint' by default.
9141 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9142 in the breakpoint list.
9143 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9144 (reinsert_breakpoint): Rename to ...
9145 (reinsert_raw_breakpoint): ... this.
9146 (reinsert_breakpoints_at): Adjust.
9147 * mem-break.h (struct breakpoint): Declare.
9148 (set_breakpoint_at): Change return type to struct breakpoint
9151 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9153 * server.c (handle_query): Assign, not compare.
9155 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9157 Teach linux gdbserver to step-over-breakpoints.
9159 * linux-low.c (can_hardware_single_step): New.
9160 (supports_breakpoints): New.
9161 (handle_extended_wait): If stopping threads, read the stop pc of
9164 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9165 low target doesn't support retrieving the PC.
9166 (add_lwp): Set last_resume_kind to resume_continue.
9167 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9168 (linux_attach): Don't clear stop_expected. Set the lwp's
9169 last_resume_kind to resume_stop.
9170 (linux_detach_one_lwp): Don't check for removed breakpoints.
9171 (check_removed_breakpoint): Delete.
9172 (status_pending_p): Rename to ...
9173 (status_pending_p_callback): ... this. Don't check for removed
9174 breakpoints. Don't consider threads that are stopped from GDB's
9176 (linux_wait_for_lwp): Always read the stop_pc here.
9177 (cancel_breakpoint): New.
9178 (step_over_bkpt): New global.
9179 (linux_wait_for_event_1): Implement stepping over breakpoints.
9180 (gdb_wants_lwp_stopped): New.
9181 (gdb_wants_all_stopped): New.
9182 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9183 single-step traps here. Store the thread's last reported target
9185 (send_sigstop): Don't clear stop_expected. Always set it,
9187 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9188 (cancel_finished_single_step): New.
9189 (cancel_finished_single_steps): New.
9190 (wait_for_sigstop): Don't cancel finished single-step traps here.
9191 (linux_resume_one_lwp): Don't check for removed breakpoints.
9192 Don't set `step' on non-hardware step archs.
9193 (linux_set_resume_request): Ignore resume_stop requests if already
9194 stopping or stopped. Set the lwp's last_resume_kind.
9195 (resume_status_pending_p): Don't check for removed breakpoints.
9196 (need_step_over_p): New.
9197 (start_step_over): New.
9198 (finish_step_over): New.
9199 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9200 requests. Clear the thread's last reported target waitstatus.
9201 Don't use the `suspended' flag. Don't consider pending breakpoints.
9202 (linux_resume): Start a step-over if necessary.
9203 (proceed_one_lwp): New.
9204 (proceed_all_lwps): New.
9205 (unstop_all_lwps): New.
9206 * linux-low.h (struct lwp_info): Rewrite comment for the
9207 `suspended' flag. Add the `stop_pc' field. Delete the
9208 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9209 Add `'last_resume_kind' and `need_step_over' fields.
9210 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9211 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9212 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9213 (set_raw_breakpoint_at): New.
9214 (set_breakpoint_at): Rewrite to use it.
9215 (reinsert_breakpoint_handler): Delete.
9216 (set_reinsert_breakpoint): New.
9217 (reinsert_breakpoint_by_bp): Delete.
9218 (delete_reinsert_breakpoints): New.
9219 (uninsert_breakpoint): Rewrite.
9220 (uninsert_breakpoints_at): New.
9221 (reinsert_breakpoint): Rewrite.
9222 (reinsert_breakpoints_at): New.
9223 (check_breakpoints): Rewrite.
9224 (breakpoint_here): New.
9225 (breakpoint_inserted_here): New.
9226 (check_mem_read): Adjust.
9227 * mem-break.h (breakpoints_supported, breakpoint_here)
9228 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9229 (reinsert_breakpoint_by_bp): Delete declaration.
9230 (delete_reinsert_breakpoints): Declare.
9231 (reinsert_breakpoint): Delete declaration.
9232 (reinsert_breakpoints_at): Declare.
9233 (uninsert_breakpoint): Delete declaration.
9234 (uninsert_breakpoints_at): Declare.
9235 (check_breakpoints): Adjust prototype.
9236 * server.h: Adjust include order.
9237 (struct thread_info): Declare here. Add a `last_status' field.
9239 2010-03-23 Michael Snyder <msnyder@vmware.com>
9241 * server.c (crc32): New function.
9242 (handle_query): Add handling for 'qCRC:' request.
9244 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9246 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9247 lwp had been stopped by a watchpoint.
9249 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9251 * server.h (internal_error): Declare.
9252 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9253 * utils.c (internal_error): New function.
9255 2010-03-15 Andreas Schwab <schwab@redhat.com>
9257 * configure.srv: Fix typo setting srv_regobj.
9259 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9261 * linux-low.c (fetch_register): Avoid passing a non string literal
9263 (usr_store_inferior_registers): Ditto.
9265 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9267 * linux-low.c (linux_write_memory): Bail out early if peeking
9270 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9272 * linux-low.h (struct lwp_info): New fields
9273 `stopped_by_watchpoint' and `stopped_data_address'.
9274 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9275 here, and cache them in the lwp object.
9276 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9278 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9280 (linux_stopped_by_watchpoint): Rewrite.
9281 (linux_stopped_data_address): Rewrite.
9283 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9285 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9286 switching the current inferior, not before.
9288 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9290 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9291 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9292 i386-linux.c and amd64-linux.c.
9293 (reg-i386.o): Removed.
9294 (reg-i386.c): Likewise.
9295 (reg-i386-linux.o): Likewise.
9296 (reg-i386-linux.c): Likewise.
9297 (reg-x86-64.o): Likewise.
9298 (reg-x86-64.c): Likewise.
9299 (reg-x86-64-linux.o): Likewise.
9300 (reg-x86-64-linux.c): Likewise.
9303 (i386-linux.o): Likewise.
9304 (i386-linux.c): Likewise.
9305 (amd64.o): Likewise.
9306 (amd64.c): Likewise.
9307 (amd64-linux.o): Likewise.
9308 (amd64-linux.c): Likewise.
9310 * configure.srv (srv_i386_regobj): New.
9311 (srv_i386_linux_regobj): Likewise.
9312 (srv_amd64_regobj): Likewise.
9313 (srv_amd64_linux_regobj): Likewise.
9314 (srv_i386_32bit_xmlfiles): Likewise.
9315 (srv_i386_64bit_xmlfiles): Likewise.
9316 (srv_i386_xmlfiles): Likewise.
9317 (srv_amd64_xmlfiles): Likewise.
9318 (srv_i386_linux_xmlfiles): Likewise.
9319 (srv_amd64_linux_xmlfiles): Likewise.
9320 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9321 srv_xmlfiles to $srv_i386_xmlfiles.
9322 (i[34567]86-*-mingw32ce*): Likewise.
9323 (i[34567]86-*-mingw*): Likewise.
9324 (i[34567]86-*-nto*): Likewise.
9325 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9326 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9327 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9328 (x86_64-*-linux*): Likewise.
9330 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9331 (init_registers_amd64_linux): New.
9332 (x86_arch_setup): Replace init_registers_x86_64_linux with
9333 init_registers_amd64_linux.
9335 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9337 * configure.ac: Check for libdl. If it is not available link against
9338 static libthread_db.
9339 * configure: Regenerate.
9341 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9345 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9346 handing a read watchpoint.
9347 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9349 2010-02-12 Doug Evans <dje@google.com>
9351 * linux-low.c (linux_supports_tracefork_flag): Document.
9352 (linux_look_up_symbols): Add comment.
9354 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9356 * regcache.c (supply_register): Clear regcache if buf is NULL.
9358 2010-02-02 Nicolas Roche <roche@sourceware.org>
9359 Joel Brobecker <brobecker@adacore.com>
9361 * inferiors.c (find_inferior): Add function documentation.
9362 (unloaded_dll): Handle the case where the unloaded dll has not
9363 been previously registered in the dll list.
9365 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9367 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9368 (thumb2_breakpoint): New.
9369 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9371 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9373 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9374 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9377 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9379 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9381 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9383 * linux-s390-low.c (s390_collect_ptrace_register)
9384 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9386 2010-01-21 Doug Evans <dje@google.com>
9388 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9389 (PTRACE_ARG4_TYPE): New macro.
9390 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9391 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9392 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9393 (usr_store_inferior_registers): Ditto.
9394 (linux_read_memory, linux_write_memory): Ditto.
9395 (linux_test_for_tracefork): Ditto.
9397 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9398 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9400 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9402 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9405 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9407 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9408 prototype to take a regcache. Adjust.
9410 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9412 * regcache.h (struct thread_info): Forward declare.
9413 (struct regcache): New.
9414 (new_register_cache): Adjust prototype.
9415 (get_thread_regcache): Declare.
9416 (free_register_cache): Adjust prototype.
9417 (registers_to_string, registers_from_string): Ditto.
9418 (supply_register, supply_register_by_name, collect_register)
9419 (collect_register_as_string, collect_register_by_name): Ditto.
9420 * regcache.c (struct inferior_regcache_data): Delete.
9421 (get_regcache): Rename to ...
9422 (get_thread_regcache): ... this. Adjust. Switch inferior before
9424 (regcache_invalidate_one): Adjust.
9425 (regcache_invalidate): Fix prototype.
9426 (new_register_cache): Return the new register cache.
9427 (free_register_cache): Change prototype.
9428 (realloc_register_cache): Adjust.
9429 (registers_to_string): Change prototype to take a regcache. Adjust.
9430 (registers_from_string): Ditto.
9431 (register_data): Ditto.
9432 (supply_register): Ditto.
9433 (supply_register_by_name): Ditto.
9434 (collect_register): Ditto.
9435 (collect_register_as_string): Ditto.
9436 (collect_register_by_name): Ditto.
9437 * server.c (process_serial_event): Adjust.
9438 * linux-low.h (regset_fill_func, regset_store_func): Change
9440 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9442 * linux-low.c (get_stop_pc): Adjust.
9443 (check_removed_breakpoint): Adjust.
9444 (linux_wait_for_event): Adjust.
9445 (linux_resume_one_lwp): Adjust.
9446 (fetch_register): Add regcache parameter. Adjust.
9447 (usr_store_inferior_registers): Ditto.
9448 (regsets_fetch_inferior_registers): Ditto.
9449 (regsets_store_inferior_registers): Ditto.
9450 (linux_fetch_registers, linux_store_registers): Ditto.
9451 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9453 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9455 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9456 prototype to take a regcache.
9457 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9458 * remote-utils.c (convert_ascii_to_int, outreg)
9459 (prepare_resume_reply): Change prototype to take a regcache.
9461 * target.h (struct target_ops) <fetch_registers, store_registers>:
9462 Change prototype to take a regcache.
9463 (fetch_inferior_registers, store_inferior_registers): Change
9464 prototype to take a regcache. Adjust.
9465 * proc-service.c (ps_lgetregs): Adjust.
9466 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9467 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9468 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9469 take a regcache. Adjust.
9470 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9471 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9472 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9473 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9474 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9475 (cris_cannot_fetch_register):
9476 (cris_breakpoint_at): Change prototype to take a regcache.
9478 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9479 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9480 to take a regcache. Adjust.
9481 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9483 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9484 take a regcache. Adjust.
9485 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9486 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9487 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9488 * linux-mips-low.c (mips_get_pc):
9489 (mips_set_pc): Change prototype to take a regcache. Adjust.
9490 (mips_reinsert_addr): Adjust.
9491 (mips_collect_register): Change prototype to take a regcache.
9493 (mips_supply_register):
9494 (mips_collect_register_32bit, mips_supply_register_32bit)
9495 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9496 (mips_store_fpregset): Ditto.
9497 * linux-ppc-low.c (ppc_supply_ptrace_register)
9498 (ppc_supply_ptrace_register): Ditto.
9499 (parse_spufs_run): Adjust.
9500 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9501 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9502 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9503 take a regcache. Adjust.
9504 * linux-s390-low.c (s390_collect_ptrace_register)
9505 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9506 (s390_set_pc): Change prototype to take a regcache. Adjust.
9507 (s390_arch_setup): Adjust.
9508 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9509 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9510 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9511 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9512 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9514 (sparc_breakpoint_at): Adjust.
9515 * linux-xtensa-low.c (xtensa_fill_gregset):
9516 (xtensa_store_gregset):
9517 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9518 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9519 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9520 prototype to take a regcache. Adjust.
9521 * win32-arm-low.c (arm_fetch_inferior_register)
9522 (arm_store_inferior_register): Change prototype to take a
9524 * win32-i386-low.c (i386_fetch_inferior_register)
9525 (i386_store_inferior_register): Change prototype to take a
9527 * win32-low.c (child_fetch_inferior_registers)
9528 (child_store_inferior_registers): Change prototype to take a
9530 (win32_wait): Adjust.
9531 (win32_fetch_inferior_registers): Change prototype to take a
9533 (win32_store_inferior_registers): Adjust.
9534 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9535 store_inferior_register>: Change prototype to take a regcache.
9537 2010-01-20 Doug Evans <dje@google.com>
9539 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9541 (linux_wait_for_event1, linux_init_signals): Ditto.
9542 (W_STOPCODE): Provide definition if missing.
9544 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9546 * linux-low.c (linux_core_of_thread): New.
9547 (compare_ints, show_process, list_threads): New.
9548 (linux_qxfer_osdata): Report threads and cores.
9549 (linux_target_op): Register linux_core_of_thread.
9550 * remote-utils.c (prepare_resume_reply): Report the core.
9551 (buffer_xml_printf): Support %d specifier.
9552 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9554 (handle_query): Handle qXfer:threads. Announce availability
9556 * target.h (struct target_ops): New field core_of_thread.
9558 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9560 * Makefile.in (clean): Remove new generated files.
9561 (reg-s390.o, reg-s390.c): Remove rules.
9562 (reg-s390x.o, reg-s390x.c): Likewise.
9563 (s390-linux32.o, s390-linux32.c): Add rules.
9564 (s390-linux64.o, s390-linux64.c): Likewise.
9565 (s390x-linux64.o, s390x-linux64.c): Likewise.
9566 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9567 * linux-s390-low.c: Include <elf.h>.
9568 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9569 (init_registers_s390): Remove prototype.
9570 (init_registers_s390x): Likewise.
9571 (init_registers_s390_linux32): Add prototype.
9572 (init_registers_s390_linux64): Likewise.
9573 (init_registers_s390x_linux64): Likewise.
9574 (s390_num_regs_3264): New define.
9575 (s390_regmap_3264): New global variable.
9576 (s390_cannot_fetch_register): Remove obsolete check.
9577 (s390_cannot_store_register): Likewise.
9578 (s390_collect_ptrace_register): Handle upper/lower register halves.
9579 (s390_supply_ptrace_register): Likewise.
9580 (s390_fill_gregset): Update to register number changes.
9581 (s390_get_hwcap): New routine.
9582 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9583 Install appropriate regmap and register set.
9585 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9587 * server.c (gdbserver_version): Update copyright year to 2010.
9588 * gdbreplay.c (gdbreplay_version): Likewise.
9590 2009-12-28 Doug Evans <dje@google.com>
9592 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9593 elf/external.h. Include <elf.h> instead but only if necessary.
9595 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9597 * linux-low.c (linux_remove_process): Remove `detaching'
9598 parameter. Don't release/detach from thread_db here.
9599 (linux_kill): Release/detach from thread_db here, ...
9600 (linux_detach): ... and here, before actually detaching.
9601 (linux_wait_1): ... and here, when a process exits.
9602 * thread-db.c (any_thread_of): New.
9603 (thread_db_free): Switch the current inferior to a thread of the
9606 2009-12-21 Doug Evans <dje@google.com>
9608 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9610 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9611 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9612 warning ifndef __NR_tkill. Move setting of errno there too.
9613 Delete unnecessary resetting of errno after syscall.
9614 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9616 * configure.ac: Check for dladdr.
9617 * config.in: Regenerate.
9618 * configure: Regenerate.
9619 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9620 (try_thread_db_load): Update.
9622 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9624 2009-12-18 Doug Evans <dje@google.com>
9626 * event-loop.c: Include unistd.h if it exists.
9628 * linux-low.c (my_waitpid): Move definition away from being in
9629 between linux_tracefork_child/linux_test_for_tracefork.
9631 * gdb_proc_service.h (psaddr_t): Fix type.
9632 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9633 signature to match glibc.
9635 2009-12-16 Doug Evans <dje@google.com>
9637 * linux-low.c (linux_read_memory): Fix argument to read.
9639 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9641 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9642 events, don't leave current_inferior pointing at null.
9644 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9646 * win32-low.c (LOG): Delete.
9647 (OUTMSG): Output to stderr.
9648 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9649 on compile time LOG macro.
9650 (win32_wait): Fix debug output.
9652 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9654 * win32-low.c (win32_add_one_solib): If the dll name is
9655 "ntdll.dll", prepend the system directory to the dll path.
9657 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9659 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9661 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9662 Vladimir Prus <vladimir@codesourcery.com>
9664 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9665 * configure.ac: Check for __mcoldfire__ and set
9666 gdb_cv_m68k_is_coldfire.
9667 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9668 reg-cf.o and reg-m68k.o.
9669 * configure: Regenerated.
9671 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9673 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9674 Pass it to thread_db_free.
9675 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9676 proper `detaching' argument to linux_remove_process.
9677 * linux-low.h (thread_db_free): Add `detaching' parameter.
9678 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9680 (thread_db_free): Add `detaching' parameter. Only
9681 call td_ta_clear_event if detaching from process.
9683 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9685 * thread-db.c (thread_db_free): Fix typo.
9687 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9690 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9692 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9694 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9695 with an i686 compiler.
9696 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9698 * configure: Rebuilt.
9700 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9704 * server.c (handle_search_memory_1): Correct read_addr initialization
9705 in loop for searching subsequent chunks.
9707 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9709 * configure.ac: New --with-libthread-db option.
9710 * thread-db.c: Allow direct dependence on libthread_db.
9711 (thread_db_free): Adjust.
9712 * config.in: Regenerate.
9713 * configure: Likewise.
9715 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9718 * thread-db.c (attach_thread): New function.
9719 (maybe_attach_thread): Return success/failure.
9720 (find_new_threads_callback): Adjust.
9721 (thread_db_find_new_threads): Loop until no new threads.
9723 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9725 * proc-service.c (ps_lgetregs): Formatting.
9727 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9729 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9730 * configure.ac: Adjust.
9731 * linux-low.h (struct process_info_private): Move members to struct
9733 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9734 * linux-low.c (linux_remove_process): Adjust.
9735 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9736 * server.c (handle_query): Move code ...
9737 (handle_monitor_command): ... here. New function.
9738 * target.h (struct target_ops): New member.
9739 * thread-db.c (struct thread_db): New.
9740 (libthread_db_search_path): New variable.
9741 (thread_db_create_event, thread_db_enable_reporting)
9742 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9743 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9744 (try_thread_db_load_1, dladdr_to_soname): New functions.
9745 (try_thread_db_load, thread_db_load_search): New functions.
9746 (thread_db_init): Search for libthread_db.
9747 (thread_db_free): New function.
9748 (thread_db_handle_monitor_command): Likewise.
9749 * config.in: Regenerate.
9750 * configure: Regenerate.
9752 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9754 * spu-low.c (spu_kill): Wait for inferior to terminate.
9755 Call clear_inferiors.
9756 (spu_detach): Call clear_inferiors.
9758 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9760 * aclocal.m4: Regenerate.
9761 * config.in: Likewise.
9762 * configure: Likewise.
9764 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9766 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9767 (parse_spufs_run): New function.
9768 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9769 (ppc_breakpoint_at): Handle SPU breakpoints.
9771 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9773 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9774 (SPUFS_MAGIC): Define.
9775 (spu_enumerate_spu_ids): New function.
9776 (linux_qxfer_spu): New function.
9777 (linux_target_ops): Install linux_qxfer_spu.
9779 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9781 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9782 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9783 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9784 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9785 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9786 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9787 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9788 (init_registers_powerpc_cell32l): Add prototype.
9789 (init_registers_powerpc_cell64l): Likewise.
9790 (ppc_arch_setup): Detect Cell/B.E. architecture.
9792 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9794 * Makefile.in (datarootdir): New variable.
9796 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9798 * linux-low.c (linux_write_memory): Update debugging output.
9799 * Makefile.in (clean): Add new descriptions.
9800 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9801 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9802 * configure.srv: Add new files for arm*-*-linux*.
9803 * linux-arm-low.c: Add new declarations.
9804 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9805 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9806 (HWCAP_VFPv3D16): New.
9807 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9808 instead of __IWMMXT__.
9809 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9810 (arm_arch_setup): New.
9811 (target_regsets): Remove #ifdef. Add VFP regset.
9812 (the_low_target): Use arm_arch_setup.
9814 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9816 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9817 the main thread again.
9819 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9821 Adding Neutrino gdbserver.
9822 * configure: Regenerated.
9823 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9824 * configure.srv (i[34567]86-*-nto*): New target.
9825 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9826 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9827 (nto_comctrl) [__QNX__]: New function.
9828 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9830 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9832 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9835 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9836 Pedro Alves <pedro@codesourcery.com>
9838 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9839 don't support CONTEXT_EXTENDED_REGISTERS.
9840 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9841 (the_low_target): Install them.
9842 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9843 failing with ERROR_PIPE_NOT_CONNECTED.
9845 2009-06-30 Doug Evans <dje@google.com>
9846 Pierre Muller <muller@ics.u-strasbg.fr>
9848 Add h/w watchpoint support to x86-linux, win32-i386.
9849 * Makefile.in (SFILES): Add i386-low.c
9850 (i386_low_h): Define.
9851 (i386-low.o): Add dependencies.
9852 (linux-x86-low.o): Add i386-low.h dependency.
9853 (win32-i386-low.o): Ditto.
9854 * i386-low.c: New file.
9855 * i386-low.h: New file.
9856 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9857 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9858 * linux-low.c (linux_add_process): Initialize arch_private.
9859 (linux_remove_process): Free arch_private.
9860 (add_lwp): Initialize arch_private.
9861 (delete_lwp): Free arch_private.
9862 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9864 * linux-low.h (process_info_private): New member arch_private.
9865 (lwp_info): New member arch_private.
9866 (linux_target_ops): New members new_process, new_thread,
9868 (ptid_of): New macro.
9869 * linux-x86-low.c: Include stddef.h, i386-low.h.
9870 (arch_process_info): New struct.
9871 (arch_lwp_info): New struct.
9872 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9873 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9874 (i386_dr_low_get_status): New function.
9875 (x86_insert_point, x86_remove_point): New functions.
9876 (x86_stopped_by_watchpoint): New function.
9877 (x86_stopped_data_address): New function.
9878 (x86_linux_new_process, x86_linux_new_thread): New functions.
9879 (x86_linux_prepare_to_resume): New function.
9880 (the_low_target): Add entries for insert_point, remove_point,
9881 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9883 * server.c (debug_hw_points): New global.
9884 (monitor_show_help): Document set debug-hw-points.
9885 (handle_query): Process "set debug-hw-points".
9886 * server.h (debug_hw_points): Declare.
9887 (paddress): Declare.
9888 * utils.c (NUMCELLS, CELLSIZE): New macros.
9889 (get_sell, xsnprintf, paddress): New functions.
9890 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9891 remove_point, stopped_by_watchpoint, stopped_data_address.
9892 * win32-i386-low.c: Include i386-low.h.
9893 (debug_reg_state): Replaces dr.
9894 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9895 (i386_dr_low_get_status): New function.
9896 (i386_insert_point, i386_remove_point): New functions.
9897 (i386_stopped_by_watchpoint): New function.
9898 (i386_stopped_data_address): New function.
9899 (i386_initial_stuff): Update.
9900 (get_thread_context,set_thread_context,i386_thread_added): Update.
9901 (the_low_target): Add entries for insert_point,
9902 remove_point, stopped_by_watchpoint, stopped_data_address.
9903 * win32-low.c (win32_insert_watchpoint): New function.
9904 (win32_remove_watchpoint): New function.
9905 (win32_stopped_by_watchpoint): New function.
9906 (win32_stopped_data_address): New function.
9907 (win32_target_ops): Add entries for insert_watchpoint,
9908 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9909 * win32-low.h (win32_target_ops): New members insert_point,
9910 remove_point, stopped_by_watchpoint, stopped_data_address.
9912 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9914 * server.c (process_serial_event): Re-return unsupported, not
9915 error, if the type isn't recognized. Re-allow supporting only
9916 insert or remove packets. Also call require_running for
9917 breakpoints. Add missing break statement to default case. Tidy.
9918 * target.h (struct target_ops): Rename insert_watchpoint to
9919 insert_point, and remove_watchpoint to remove_point.
9921 * linux-low.h (struct linux_target_ops): Likewise.
9922 * linux-low.c (linux_insert_watchpoint): Rename to ...
9923 (linux_insert_point): ... this. Adjust.
9924 (linux_remove_watchpoint): Rename to ...
9925 (linux_remove_point): ... this. Adjust.
9926 (linux_target_ops): Adjust.
9927 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9928 (cris_insert_point): ... this.
9929 (cris_remove_watchpoint): Rename to ...
9930 (cris_remove_point): ... this.
9931 (the_low_target): Adjust.
9933 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9935 * server.c (handle_v_kill): Pass signal_pid to
9936 kill_inferior if multi_process is zero.
9938 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9940 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9941 * target.h (target_ops): Comment for *_watchpoint to make it clear
9942 the functions can get types '0' and '1'.
9944 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9946 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9947 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9948 * regcache.c (get_regcache): Likewise.
9949 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9950 * win32-low.c (child_fetch_inferior_registers): Remove check for
9953 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9954 Pedro Alves <pedro@codesourcery.com>
9956 * target.h (struct target_ops) <supports_multi_process>: New
9958 (target_supports_multi_process): New.
9959 * server.c (handle_query): Even if GDB reports support, only
9960 enable multi-process if the target also supports it. Report
9961 multi-process support only if the target backend supports it.
9962 * linux-low.c (linux_supports_multi_process): New function.
9963 (linux_target_ops): Install it as target_supports_multi_process
9966 2009-05-24 Doug Evans <dje@google.com>
9968 Global renaming of find_thread_pid to find_thread_ptid.
9969 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9970 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9971 All callers updated.
9973 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9974 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9977 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9978 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9979 (linux_resume_one_lwp): Ditto.
9981 2009-05-23 Doug Evans <dje@google.com>
9983 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9984 from struct inferior_list_entry * to struct lwp_info *.
9985 All callers updated.
9987 2009-05-13 Doug Evans <dje@google.com>
9989 * linux-x86-low.c: Don't include assert.h.
9990 (x86_siginfo_fixup): Use fatal, not assert.
9991 (x86_arch_setup): Fix comment.
9993 2009-05-12 Doug Evans <dje@google.com>
9995 Biarch support for i386/amd64 gdbserver.
9996 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9997 Add linux-x86-low.c.
9998 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9999 (linux-x86-low.o): Add.
10000 * linux-x86-64-low.c: Delete.
10001 * linux-i386-low.c: Delete.
10002 * linux-x86-low.c: New file.
10003 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10005 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10007 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10008 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10009 (linux_child_pid_to_exec_file): New function.
10010 (elf_64_header_p, elf_64_file_p): New functions.
10011 (siginfo_fixup): New function.
10012 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10013 give target a chance to convert layout.
10014 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10015 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10017 2009-05-07 Doug Evans <dje@google.com>
10019 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10020 (regsets_store_inferior_registers): Ditto.
10022 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10026 * linux-low.c (must_set_ptrace_flags): Delete.
10027 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10029 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10030 `lwp->must_set_ptrace_flags' instead.
10031 (linux_wait_for_event_1): Set ptrace options here.
10032 (linux_wait_1): ... not here.
10034 2009-04-30 Doug Evans <dje@google.com>
10036 * inferiors.c (started_inferior_callback): New function.
10037 (attached_inferior_callback): New function.
10038 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10039 * server.c (print_started_pid, print_attached_pid): New functions.
10040 (detach_or_kill_for_exit): New function.
10041 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10042 * server.h (have_started_inferiors_p): Declare.
10043 (have_attached_inferiors_p): Declare.
10045 * inferiors.c (remove_process): Fix memory leak, free process.
10046 * linux-low.c (linux_remove_process): New function.
10047 (linux_kill): Call it instead of remove_process.
10048 (linux_detach, linux_wait_1): Ditto.
10050 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10052 * configure.srv: Add x86 Windows CE target.
10054 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10056 * inferiors.c (get_thread_process): Make global.
10057 * server.h (get_thread_process): Add prototype.
10058 * thread-db.c (find_one_thread): Use get_thread_process
10059 instead of current_process.
10060 (thread_db_get_tls_address): Do not crash if called when
10061 thread layer is not yet initialized.
10063 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10065 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10066 * spu-low.c (current_tid): Rename to ...
10067 (current_ptid): ... this.
10068 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10069 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10070 ptid_get_lwp (current_ptid) instead of current_tid.
10071 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10072 instead of current_tid. Use find_process_pid to verify pid
10073 argument is valid. Pass proper argument to remove_process.
10074 (spu_thread_alive): Compare current_ptid instead of current_tid.
10075 (spu_resume): Likewise.
10077 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10079 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10082 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10084 Implement the multiprocess extensions, and add linux multiprocess
10087 * server.h (ULONGEST): Declare.
10088 (struct ptid, ptid_t): New.
10089 (minus_one_ptid, null_ptid): Declare.
10090 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10091 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10092 (struct inferior_list_entry): Change `id' type from unsigned from
10094 (struct sym_cache, struct breakpoint, struct
10095 process_info_private): Forward declare.
10096 (struct process_info): Declare.
10097 (current_process): Declare.
10098 (all_processes): Declare.
10099 (initialize_inferiors): Declare.
10100 (add_thread): Adjust to use ptid_t.
10101 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10102 (add_process, remove_process, find_thread_pid): Declare.
10103 (find_inferior_id): Adjust to use ptid_t.
10104 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10105 (multi_process): Declare.
10106 (push_event): Adjust to use ptid_t.
10107 (read_ptid, write_ptid): Declare.
10108 (prepare_resume_reply): Adjust to use ptid_t.
10109 (clear_symbol_cache): Declare.
10110 * inferiors.c (all_processes): New.
10111 (null_ptid, minus_one_ptid): New.
10112 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10113 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10114 (add_thread): Change unsigned long to ptid. Remove gdb_id
10116 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10117 (gdb_id_to_thread): Rename to ...
10118 (find_thread_pid): ... this. Change unsigned long to ptid.
10119 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10120 (loaded_dll, pull_pid_from_list): Adjust.
10121 (add_process, remove_process, find_process_pid)
10122 (get_thread_process, current_process, initialize_inferiors): New.
10123 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10124 (struct target_waitstatus) <related_pid>: Ditto.
10125 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10126 return type to int.
10127 (struct target_ops) <join>: Add `pid' argument.
10128 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10129 (struct target_ops) <wait>: Add `ptid' field. Change return type
10131 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10132 (mywait): Add `ptid' argument. Change return type to ptid_t.
10133 (target_pid_to_str): Declare.
10134 * target.c (set_desired_inferior): Adjust to use ptids.
10135 (mywait): Add new `ptid' argument. Adjust.
10136 (target_pid_to_str): New.
10137 * mem-break.h (free_all_breakpoints): Declare.
10138 * mem-break.c (breakpoints): Delelete.
10139 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10140 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10141 to use per-process breakpoint list.
10142 (free_all_breakpoints): New.
10143 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10144 (symbol_cache, all_symbols_looked_up): Delete.
10146 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10148 (prepare_resume_reply): Change ptid argument's type from unsigned
10149 long to ptid_t. Adjust. Implement W;process and X;process.
10150 (free_sym_cache, clear_symbol_cache): New.
10151 (look_up_one_symbol): Adjust to per-process symbol cache. *
10152 * server.c (cont_thread, general_thread, step_thread): Change type
10154 (attached): Delete.
10155 (multi_process): New.
10156 (last_ptid): Change type to ptid_t.
10157 (struct vstop_notif) <ptid>: Change type to ptid_t.
10158 (queue_stop_reply, push_event): Change `ptid' argument's type to
10160 (discard_queued_stop_replies): Add `pid' argument.
10161 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10162 changes. Don't reference the `attached' global.
10163 (attach_inferior): Adjust to mywait interface changes.
10164 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10165 features. Handle and report "multiprocess+". Handle
10167 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10169 (handle_v_kill): New.
10170 (handle_v_stopped): Adjust to use target_pid_to_str.
10171 (handle_v_requests): Allow multiple attaches and runs when
10172 multiprocess extensions are in effect. Handle "vKill".
10173 (myresume): Adjust to use ptids.
10174 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10175 (handle_status): Adjust to discard_queued_stop_replies interface
10177 (first_thread_of, kill_inferior_callback)
10178 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10179 (main): Call initialize_inferiors. Adjust to use ptids, killing
10180 and detaching from all inferiors. Handle multiprocess packet
10182 * linux-low.h: Include gdb_proc_service.h.
10183 (struct process_info_private): New.
10184 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10185 <lwpid_of>: Use ptid_get_lwp.
10186 (get_lwp_thread): Adjust.
10187 (struct lwp_info): Add `dead' member.
10188 (find_lwp_pid): Declare.
10189 * linux-low.c (thread_db_active): Delete.
10190 (new_inferior): Adjust comment.
10191 (inferior_pid): Delete.
10192 (linux_add_process): New.
10193 (handle_extended_wait): Adjust.
10194 (add_lwp): Change unsigned long to ptid.
10195 (linux_create_inferior): Add process to processes table. Adjust
10196 to use ptids. Don't set new_inferior here.
10197 (linux_attach_lwp): Rename to ...
10198 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10199 it. Adjust to use ptids.
10200 (linux_attach_lwp): New.
10201 (linux_attach): Add process to processes table. Don't set
10203 (struct counter): New.
10204 (second_thread_of_pid_p, last_thread_of_process_p): New.
10205 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10206 multiple processes.
10207 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10208 processes. Remove process from process table.
10209 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10210 to multiple processes.
10211 (any_thread_of): New.
10212 (linux_detach): Add `pid' argument, and handle it. Remove process
10213 from processes table.
10214 (linux_join): Add `pid' argument. Handle it.
10215 (linux_thread_alive): Change unsighed long argument to ptid_t.
10216 Consider dead lwps as not being alive.
10217 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10218 threads we're not interested in.
10219 (same_lwp, find_lwp_pid): New.
10220 (linux_wait_for_lwp): Change `pid' argument's type from int to
10222 (linux_wait_for_event): Rename to ...
10223 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10224 from int to ptid_t. Adjust.
10225 (linux_wait_for_event): New.
10226 (linux_wait_1): Add `ptid' argument. Change return type to
10227 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10228 that exit from the process table.
10229 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10231 (mark_lwp_dead): New.
10232 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10233 stopping all threads, mark its main lwp as dead.
10234 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10236 (fetch_register, usr_store_inferior_registers)
10237 (regsets_fetch_inferior_registers)
10238 (regsets_store_inferior_registers, linux_read_memory)
10239 (linux_write_memory): Inline `inferior_pid'.
10240 (linux_look_up_symbols): Adjust to use per-process
10241 `thread_db_active'.
10242 (linux_request_interrupt): Adjust to use ptids.
10243 (linux_read_auxv): Inline `inferior_pid'.
10244 (initialize_low): Don't reference thread_db_active.
10245 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10246 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10247 (ps_getpid): Return the pid of the current inferior.
10248 * thread-db.c (proc_handle, thread_agent): Delete.
10249 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10251 (find_one_thread): Change argument type to ptid_t. Adjust to
10253 (maybe_attach_thread): Adjust to per-process data and ptids.
10254 (thread_db_find_new_threads): Ditto.
10255 (thread_db_init): Ditto.
10256 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10257 processes table. Adjust to use ptids.
10258 (spu_kill, spu_detach): Adjust interface. Remove process from
10260 (spu_join, spu_thread_alive): Adjust interface.
10261 (spu_wait): Adjust interface. Remove process from processes
10262 table. Adjust to use ptids.
10263 * win32-low.c (current_inferior_tid): Delete.
10264 (current_inferior_ptid): New.
10265 (debug_event_ptid): New.
10266 (thread_rec): Take a ptid. Adjust.
10267 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10268 (child_delete_thread): Ditto.
10269 (do_initial_child_stuff): Add `attached' argument. Add process to
10271 (child_fetch_inferior_registers, child_store_inferior_registers):
10273 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10274 (win32_attach): Pass 1 to do_initial_child_stuff.
10275 (win32_kill): Adjust interface. Remove process from processes
10277 (win32_detach): Ditto.
10278 (win32_join): Adjust interface.
10279 (win32_thread_alive): Take a ptid.
10280 (win32_resume): Adjust to use ptids.
10281 (get_child_debug_event): Ditto.
10282 (win32_wait): Adjust interface. Remove exiting process from
10285 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10287 Non-stop mode support.
10289 * server.h (non_stop): Declare.
10290 (gdb_client_data, handler_func): Declare.
10291 (delete_file_handler, add_file_handler, start_event_loop):
10293 (handle_serial_event, handle_target_event, push_event)
10294 (putpkt_notif): Declare.
10295 * target.h (enum resume_kind): New.
10296 (struct thread_resume): Replace `step' field by `kind' field.
10297 (TARGET_WNOHANG): Define.
10298 (struct target_ops) <wait>: Add `options' argument.
10299 <supports_non_stop, async, start_non_stop>: New fields.
10300 (target_supports_non_stop, target_async): New.
10301 (start_non_stop): Declare.
10302 (mywait): Add `options' argument.
10303 * target.c (mywait): Add `options' argument. Print child exit
10304 notifications here.
10305 (start_non_stop): New.
10306 * server.c (non_stop, own_buf, mem_buf): New globals.
10307 (struct vstop_notif): New.
10308 (notif_queue): New global.
10309 (queue_stop_reply, push_event, discard_queued_stop_replies)
10310 (send_next_stop_reply): New.
10311 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10313 (attach_inferior): In non-stop mode, don't wait for the target
10315 (handle_general_set): Handle QNonStop.
10316 (handle_query): When handling qC, return the current general
10317 thread, instead of the first thread of the list.
10318 (handle_query): If the backend supports non-stop mode, include
10319 QNonStop+ in the qSupported query response.
10320 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10322 (handle_v_attach, handle_v_run): Handle non-stop mode.
10323 (handle_v_stopped): New.
10324 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10325 (myresume): Adjust to use resume_kind. Handle non-stop.
10326 (queue_stop_reply_callback): New.
10327 (handle_status): Handle non-stop mode.
10328 (main): Clear non_stop flag on reconnection. Use the event-loop.
10329 Refactor serial protocol handling from here ...
10330 (process_serial_event): ... to this new function. When GDB
10331 selects any thread, select one here. In non-stop mode, wait until
10332 GDB acks all pending events before exiting.
10333 (handle_serial_event, handle_target_event): New.
10334 * remote-utils.c (remote_open): Install remote_desc in the event
10336 (remote_close): Remove remote_desc from the event loop.
10337 (putpkt_binary): Rename to...
10338 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10339 (putpkt_binary): New as wrapper around putpkt_binary_1.
10340 (putpkt_notif): New.
10341 (prepare_resume_reply): In non-stop mode, don't change the
10343 * event-loop.c: New.
10344 * Makefile.in (OBJ): Add event-loop.o.
10345 (event-loop.o): New rule.
10347 * linux-low.h (pid_of): Moved here.
10349 (get_lwp_thread): Use lwpid_of.
10350 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10351 * linux-low.c (pid_of): Delete.
10352 (inferior_pid): Use lwpid_of.
10353 (linux_event_pipe): New.
10354 (target_is_async_p): New.
10356 (handle_extended_wait): Use lwpid_of.
10357 (add_lwp): Don't set lwpid field.
10358 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10359 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10360 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10361 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10362 first. Adjust to linux_wait_for_event interface changes. Use
10364 (linux_detach): Don't delete the main lwp here.
10365 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10366 (status_pending_p): Don't consider explicitly suspended lwps.
10367 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10368 pointer. Add OPTIONS argument. Change return type to int. Use
10369 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10370 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10371 pointer. Add status pointer argument. Return a pid instead of a
10372 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10373 changes. In non-stop mode, don't switch to a random thread.
10374 (linux_wait): Rename to...
10375 (linux_wait_1): ... this. Add target_options argument, and handle
10376 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10377 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10378 clean exit and signal exit code. Don't stop all threads in
10379 non-stop mode. In all-stop mode, only stop all threads when
10380 reporting a stop to GDB. Handle explicit thread stop requests.
10381 (async_file_flush, async_file_mark): New.
10383 (send_sigstop): Use lwpid_of.
10384 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10385 interface changes. In non-stop mode, don't switch to a random
10387 (linux_resume_one_lwp): Use lwpid_of.
10388 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10389 (linux_resume_one_thread): ... this. Handle resume_stop. In
10390 non-stop mode, don't look for pending flag in all threads.
10391 (resume_status_pending_p): Don't consider explicitly suspended
10393 (my_waitpid): Reimplement. Emulate __WALL.
10394 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10396 (sigchld_handler, linux_supports_non_stop, linux_async)
10397 (linux_start_non_stop): New.
10398 (linux_target_ops): Register linux_supports_non_stop, linux_async
10399 and linux_start_non_stop.
10400 (initialize_low): Install SIGCHLD handler.
10401 * thread-db.c (thread_db_create_event, find_one_thread)
10402 (thread_db_get_tls_address): Use lwpid_of.
10403 * win32-low.c (win32_detach): Adjust to use resume_kind.
10404 (win32_wait): Add `options' argument.
10405 * spu-low.c (spu_resume): Adjust to use resume_kind.
10406 (spu_wait): Add `options' argument.
10408 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10410 Decouple target code from remote protocol.
10412 * target.h (enum target_waitkind): New.
10413 (struct target_waitstatus): New.
10414 (struct target_ops) <wait>: Return an unsigned long. Take a
10415 target_waitstatus pointer instead of a char pointer.
10416 (mywait): Likewise.
10417 * target.c (mywait): Change prototype to return an unsigned long.
10418 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10419 * server.h (thread_from_wait, old_thread_from_wait): Delete
10421 (prepare_resume_reply): Change prototype to take a
10423 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10424 (last_status, last_ptid): New.
10425 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10426 pid instead of a signal.
10427 (attach_inferior): Remove "status" and "signal" parameters.
10429 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10431 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10432 (handle_v_requests, myresume): Remove "status" and "signal"
10433 parameters. Adjust.
10434 (handle_status): New.
10435 (main): Delete local `status'. Adjust.
10436 * remote-utils.c: Include target.h.
10437 (prepare_resume_reply): Change prototype to take a
10438 target_waitstatus. Adjust.
10440 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10442 * spu-low.c (spu_wait): Adjust.
10443 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10445 (win32_wait): Adjust.
10447 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10449 * target.h (struct thread_resume): Delete leave_stopped member.
10450 (struct target_ops): Add a `n' argument to the `resume' callback.
10451 * server.c (start_inferior): Adjust.
10452 (handle_v_cont, myresume): Adjust.
10453 * linux-low.c (check_removed_breakpoint): Adjust to resume
10454 interface change, and to removed leave_stopped field.
10455 (resume_ptr): Delete.
10456 (struct thread_resume_array): New.
10457 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10458 resume interface change.
10459 (linux_continue_one_thread, linux_queue_one_thread)
10460 (resume_status_pending_p): Check if the resume field is NULL
10461 instead of checking the leave_stopped member.
10462 (linux_resume): Adjust to the target resume interface change.
10463 * spu-low.c (spu_resume): Adjust to the target resume interface
10465 * win32-low.c (win32_detach, win32_resume): Ditto.
10467 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10469 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10471 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10473 (linux_continue_one_thread): Only preserve the stepping flag if
10474 there's a pending breakpoint.
10476 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10478 * server.c (main): After the inferior having exited, call
10479 remote_close before exiting gdbserver.
10481 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10483 Fix size of FPSCR in Power 7 processors.
10484 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10485 (PPC_FEATURE_HAS_DFP): New #define.
10486 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10489 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10491 * server.c (handle_query) Whitespace and formatting.
10493 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10495 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10496 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10497 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10498 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10499 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10500 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10501 Makefile.in, configure.ac: Fix whitespace throughout.
10502 * configure: Regenerate.
10504 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10506 * inferiors.c (find_inferior): Make it safe for the callback
10507 function to delete the currently iterated inferior.
10509 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10511 * Makefile.in (linuw_low_h): Move higher.
10512 (thread-db.o): Depend on $(linux_low_h).
10514 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10516 Rename "process" to "lwp" throughout.
10518 * linux-low.c (all_processes): Rename to...
10519 (all_lwps): ... this.
10520 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10521 (add_process): Rename to ...
10522 (add_lwp): ... this. Adjust.
10523 (linux_create_inferior): Adjust.
10524 (linux_attach_lwp): Adjust.
10525 (linux_attach): Adjust.
10526 (linux_kill_one_process): Rename to ...
10527 (linux_kill_one_lwp): ... this. Adjust.
10528 (linux_kill): Adjust.
10529 (linux_detach_one_process): Rename to ...
10530 (linux_detach_one_lwp): ... this. Adjust.
10531 (linux_detach): Adjust.
10532 (check_removed_breakpoint): Adjust.
10533 (status_pending_p): Adjust.
10534 (linux_wait_for_process): Rename to ...
10535 (linux_wait_for_lwp): ... this. Adjust.
10536 (linux_wait_for_event): Adjust.
10537 (send_sigstop): Adjust.
10538 (wait_for_sigstop): Adjust.
10539 (stop_all_processes): Rename to ...
10540 (stop_all_lwps): ... this.
10541 (linux_resume_one_process): Rename to ...
10542 (linux_resume_one_lwp): ... this. Adjust.
10543 (linux_set_resume_request, linux_continue_one_thread)
10544 (linux_queue_one_thread, resume_status_pending_p)
10545 (usr_store_inferior_registers, regsets_store_inferior_registers)
10546 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10548 * linux-low.h (get_process): Rename to ...
10549 (get_lwp): ... this. Adjust.
10550 (get_thread_process): Rename to ...
10551 (get_thread_lwp): ... this. Adjust.
10552 (get_process_thread): Rename to ...
10553 (get_lwp_thread): ... this. Adjust.
10554 (struct process_info): Rename to ...
10555 (struct lwp_info): ... this.
10556 (all_processes): Rename to ...
10557 (all_lwps): ... this.
10558 * proc-service.c (ps_lgetregs): Adjust.
10559 * thread-db.c (thread_db_create_event, find_one_thread)
10560 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10562 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10564 * server.c (handle_query): Handle "qAttached".
10566 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10568 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10569 GPLv3, update license URL.
10571 2009-03-01 Doug Evans <dje@google.com>
10573 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10574 (server_h): Add gdb_signals.h.
10575 (signals.o): Update.
10576 * server.h (target_signal_from_host,target_signal_to_host_p)
10577 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10579 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10581 * remote-utils.c (getpkt): Also generate remote-debug
10582 information if noack_mode is set.
10584 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10586 * server.c (handle_query): Report qXfer:siginfo:read and
10587 qXfer:siginfo:write as supported and handle them.
10588 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10589 * linux-low.c (linux_xfer_siginfo): New.
10590 (linux_target_ops): Set it.
10592 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10594 * server.c (gdbserver_usage): Mention --remote-debug.
10595 (main): Accept '--remote-debug' switch.
10597 2009-01-18 Doug Evans <dje@google.com>
10599 * regcache.c (new_register_cache): No need to check result of xcalloc.
10600 * server.c (handle_search_memory): Back out calls to xmalloc,
10601 result is checked and error is returned to user upon failure.
10602 (handle_query): Ditto. Add more checks for result of malloc.
10603 (handle_v_cont): Check result of malloc, report error back to
10605 (handle_v_run): Ditto. Call freeargv.
10606 * server.h (freeargv): Declare.
10607 * utils.c (freeargv): New fn.
10609 2009-01-15 Doug Evans <dje@google.com>
10611 * gdbreplay.c (perror_with_name): Make arg const char *.
10612 * server.h (target_signal_to_name): Make return type const char *.
10613 * thread-db.c (thread_db_err_str): Make return type const char *.
10614 * utils.c (perror_with_name): Make arg const char *.
10616 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10618 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10619 when handling a EXIT_PROCESS_DEBUG_EVENT.
10621 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10623 * gdbreplay.c (gdbreplay_version): Update copyright year.
10624 * server.c (gdbserver_version): Likewise.
10626 2009-01-05 Doug Evans <dje@google.com>
10628 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10629 (handle_extended_wait): Improve comment.
10631 2008-12-13 Doug Evans <dje@google.com>
10633 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10634 * server.h (ATTR_MALLOC): New macro.
10635 (xmalloc,xcalloc,xstrdup): Declare.
10636 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10637 * inferiors.c: Ditto.
10638 * linux-low.c: Ditto.
10639 * mem-break.c: Ditto.
10640 * regcache.c: Ditto.
10641 * remote-utils.c: Ditto.
10644 * win32-low.c: Ditto.
10646 2008-12-12 Doug Evans <dje@google.com>
10648 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10649 in debugging printf.
10651 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10653 2008-12-09 Doug Evans <dje@google.com>
10655 * linux-low.h (struct process_info): Delete member tid, unused.
10656 * thread-db.c (find_one_thread): Update.
10657 (maybe_attach_thread): Update.
10659 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10661 * target.h (struct target_ops): Add qxfer_osdata member.
10662 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10664 (linux_qxfer_osdata): New functions.
10665 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10667 * server.c (handle_query): Handle "qXfer:osdata:read:".
10668 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10669 (buffer_xml_printf): New functions.
10670 * server.h (struct buffer): New.
10671 (buffer_grow_str, buffer_grow_str0): New macros.
10672 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10673 (buffer_xml_printf): Declare.
10675 2008-11-24 Doug Evans <dje@google.com>
10677 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10679 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10681 * server.c (handle_v_run): Always use the supplied argument list.
10683 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10685 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10686 (xtensa_regmap_table): Add entry for scompare1.
10688 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10690 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10691 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10692 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10693 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10694 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10695 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10696 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10697 XML target descriptions.
10698 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10699 when inferior is running on an ISA 2.05 or later processor. Add
10700 special case to return offset for full 64-bit slot of FPSCR when
10703 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10705 * Makefile.in (SFILES, clean): Added sparc64 files.
10706 (reg-sparc64.o, reg-sparc64.c): New.
10707 * configure.srv (sparc*-*-linux*): New configuration.
10708 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10709 syscall arguments for SPARC.
10710 (regsets_store_inferior_registers): Likewise.
10711 * linux-sparc-low.c: New file.
10713 2008-10-21 Doug Evans <dje@google.com>
10715 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10716 (READLINE_DIR,READLINE_DEP): Delete.
10717 (INTERNAL_CFLAGS): Update.
10718 (LINTFLAGS): Update.
10720 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10722 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10723 whole argv from the last run, not just argv[0].
10725 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10727 * regcache.c (new_register_cache): Return NULL if the register
10728 cache size isn't known yet.
10729 (free_register_cache): Avoid dereferencing a NULL regcache.
10731 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10733 * configure.srv: Merge MIPS and MIPS64.
10735 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10737 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10739 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10741 * Makefile.in: Add required vsx dependencies.
10743 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10744 Declare init_registers_powerpc_vsx32l.
10745 Declare init_registers_powerpc_vsx64l.
10746 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10747 (ppc_arch_setup): Check for VSX in hwcap.
10748 (ppc_fill_vsxregset): New function.
10749 (ppc_store_vsxregset): New function.
10750 Add new VSX entry in regset_info target_regsets.
10752 * configure.srv: Add new VSX dependencies.
10754 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10756 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10757 (remote_open): Set or clear transport_is_reliable.
10758 (putpkt_binary): Don't expect acks in noack mode.
10759 (getpkt): Don't send ack/nac in noack mode.
10760 * server.c (handle_general_set): Handle QStartNoAckMode.
10761 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10763 (main): Reset noack_mode on every connection.
10764 * server.h (noack_mode): Declare.
10766 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10768 * Makefile.in (GDBREPLAY_OBS): New variable.
10769 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10771 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10772 Daniel Jacobowitz <dan@codesourcery.com>
10774 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10775 (usr_store_inferior_registers): Likewise.
10776 (regsets_store_inferior_registers): Likewise.
10778 2008-07-31 Rolf Jansen <rj@surtec.com>
10779 Pedro Alves <pedro@codesourcery.com>
10781 * configure.ac: Check for memmem declaration.
10782 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10783 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10784 (disable_packet_qfThreadInfo): Unconditionally compile.
10785 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10786 * configure, config.in: Regenerate.
10788 2008-07-28 Doug Kwan <dougkwan@google.com>
10790 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10791 (linux_write_memory): Remove declaration of errno.
10793 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10795 * linux-low.c (handle_extended_wait): Do not use "status"
10796 variable uninitialized.
10798 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10800 * server.c (handle_v_attach): Inhibit reporting dll changes.
10802 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10804 * remote-utils.c (prepare_resume_reply): If requested, don't
10805 output "thread:TID" in the T stop reply.
10807 * server.c (disable_packet_vCont, disable_packet_Tthread)
10808 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10809 (handle_query): If requested, disable support for qC, qfThreadInfo
10811 (handle_v_requests): If requested, disable support for vCont.
10812 (gdbserver_show_disableable): New.
10813 (main): Handle --disable-packet and --disable-packet=LIST.
10815 * server.h (disable_packet_vCont, disable_packet_Tthread)
10816 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10818 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10820 * server.c (gdbserver_usage): Mention --version.
10822 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10824 * Makefile.in (gdbreplay.o): New rule.
10826 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10828 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10829 message, not gdbserver.
10831 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10832 Nathan Sidwell <nathan@codesourcery.com>
10833 Joseph Myers <joseph@codesourcery.com>
10835 * acinclude.m4: Include ../../config/acx.m4.
10836 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10837 * configure, config.in: Regenerate.
10838 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10839 * server.c (gdbserver_version): Print PKGVERSION.
10840 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10841 (main): Adjust gdbserver_usage calls.
10842 * gdbreplay.c (version, host_name): Add declarations.
10843 (gdbreplay_version, gdbreplay_usage): New.
10844 (main): Accept --version and --help options.
10846 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10848 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10849 (arm_breakpoint_at): Handle Thumb.
10850 (the_low_target): Add comment.
10852 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10854 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10856 2008-05-09 Doug Evans <dje@google.com>
10858 * server.h (decode_search_memory_packet): Declare.
10859 * remote-utils.c (decode_search_memory_packet): New fn.
10860 * server.c (handle_search_memory_1): New fn.
10861 (handle_search_memory): New fn.
10862 (handle_query): Process qSearch:memory packets.
10864 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10866 * regcache.c (registers_length): Remove.
10867 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10868 full register packet.
10869 * regcache.h (registers_length): Remove prototype.
10870 * server.h (PBUFSIZ): Define to 16384.
10872 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10874 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10875 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10876 powerpc-64l.o, and powerpc-altivec64l.o.
10877 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10878 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10879 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10880 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10881 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10884 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10885 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10886 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10887 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10888 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10889 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10890 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10891 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10892 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10893 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10896 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10897 (init_registers_powerpc_32l): ... this new prototype.
10898 (init_registers_powerpc_32): Remove, replace by ...
10899 (init_registers_powerpc_altivec32l): ... this new prototype.
10900 (init_registers_powerpc_e500): Remove, replace by ...
10901 (init_registers_powerpc_e500l): ... this new prototype.
10902 (init_registers_ppc64): Remove, replace by ...
10903 (init_registers_powerpc_64l): ... this new prototype.
10904 (init_registers_powerpc_64): Remove, replace by ...
10905 (init_registers_powerpc_altivec64l): ... this new prototype.
10906 (ppc_num_regs): Set to 73.
10907 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10908 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10909 (ppc_cannot_store_register): Handle orig_r3 and trap.
10910 (ppc_arch_setup): Update init_registers_... calls.
10911 (ppc_fill_gregset): Handle orig_r3 and trap.
10913 * inferiors.c (clear_inferiors): Reset current_inferior.
10915 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10917 * acinclude.m4: Add override.m4.
10918 * configure: Regenerate.
10920 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10922 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10923 initial call to init_register_ppc64.
10925 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10927 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10928 single powerpc*-*-linux* case.
10929 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10931 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10933 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10934 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10936 * linux-ppc-low.c: Include <elf.h>.
10937 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10938 (ppc_hwcap): New global variable.
10939 (ppc_regmap): Remove __SPE__ #ifdef sections.
10940 (ppc_regmap_e500): New global variable.
10941 (ppc_cannot_store_register): Update __SPE__ special case.
10942 (ppc_get_hwcap): New function.
10943 (ppc_arch_setup): Use it to determine whether inferior supports
10944 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10945 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10946 Do not access registers if target does not support AltiVec.
10947 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10948 Do not access registers if target does not support SPE.
10949 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10951 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10953 * linux-low.c (disabled_regsets, num_regsets): New.
10954 (use_regsets_p): Delete.
10955 (linux_wait_for_process): Clear disabled_regsets.
10956 (regsets_fetch_inferior_registers): Check and set it.
10957 (regsets_store_inferior_registers): Likewise.
10958 (linux_fetch_registers, linux_store_registers): Do not use
10960 (initialize_low): Allocate disabled_regsets.
10962 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10964 * Makefile.in (LIBOBJS): New.
10965 (OBS): Use LIBOBJS.
10966 (memmem.o): New rule.
10967 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10968 * configure: Regenerated.
10970 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10972 * server.c (handle_query): Never return "unsupported" for
10973 qXfer:features:read queries.
10975 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10977 * server.c (get_features_xml): Fix inverted condition.
10978 (handle_query): Always support qXfer:feature:read.
10980 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10982 * server.c (wrapper_argv): New.
10983 (start_inferior): Handle wrapper_argv. If set, expect an extra
10985 (gdbserver_usage): Document --wrapper.
10986 (main): Parse --wrapper.
10988 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10990 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10991 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10992 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10993 (ppc_set_pc): Likewise.
10994 (ppc_arch_setup): New function.
10995 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10996 of collect_register.
10997 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10999 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11001 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11002 instead of linux-ppc64-low.o.
11003 * linux-ppc64-low.c: Remove file.
11004 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11005 (linux-ppc64-low.o): Remove rule.
11007 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11008 (init_registers_powerpc_64): Likewise.
11009 (ppc_regmap): Conditionally define depending on __powerpc64__.
11010 (ppc_cannot_store_register): Do not special-case "fpscr" when
11011 compiled on __powerpc64__.
11012 (ppc_collect_ptrace_register): New function.
11013 (ppc_supply_ptrace_register): New function.
11014 (ppc_breakpoint): Change type to "unsigned int".
11015 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11016 (the_low_target): Conditionally provide initializers for the
11017 arch_setup member depending on __powerpc64__. Install
11018 collect_ptrace_register and supply_ptrace_register members.
11020 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11022 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11023 * server.c (gdbserver_xmltarget): Define.
11024 (get_features_xml): Use it to replace "target.xml" and arch_string.
11026 * configure.srv: Remove srv_xmltarget. Add XML files that were
11027 mentioned there to srv_xmlfiles instead. Remove conditional tests
11028 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11029 srv_xmlfiles and srv_regobj to include all possible choices.
11030 * configure.ac (srv_xmltarget): Remove.
11031 (srv_xmlfiles): Do not add "target.xml".
11032 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11033 checks for supplementary target information.
11034 * configure: Regenerate.
11035 * Makefile.in (XML_TARGET): Remove.
11036 (target.xml): Remove rule.
11037 (clean): Do not clean up target.xml.
11038 (.PRECIOUS): Do not mention target.xml.
11040 * target.h (struct target_ops): Remove arch_string member.
11041 * linux-low.c (linux_arch_string): Remove.
11042 (linux_target_ops): Remove arch_string initializer.
11043 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11044 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11045 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11046 * spu-low.c (spu_arch_string): Remove.
11047 (spu_target_ops): Remove arch_string initializer.
11048 * win32-low.c (win32_arch_string): Remove.
11049 (win32_target_ops): Remove arch_string initializer.
11050 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11051 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11052 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11054 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11056 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11057 by collect_ptrace_register and supply_ptrace_register hooks.
11058 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11059 instead of checking for the_low_target.left_pad_xfer.
11060 (usr_store_inferior_registers): Use collect_ptrace_register callback
11061 instead of checking for the_low_target.left_pad_xfer.
11063 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11064 (s390_supply_ptrace_register): Likewise.
11065 (s390_fill_gregset): Call s390_collect_ptrace_register.
11066 (the_low_target): Update.
11068 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11069 (ppc_supply_ptrace_register): Likewise.
11070 (the_low_target): Update.
11072 * linux-i386-low.c (the_low_target): Update.
11073 * linux-x86-64-low.c (the_low_target): Update.
11075 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11077 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11078 reg-s390.o and reg-s390x.o.
11080 * linux-low.c (new_inferior): New global variable.
11081 (linux_create_inferior, linux_attach): Set it.
11082 (linux_wait_for_process): Call the_low_target.arch_setup after the
11083 target has stopped for the first time.
11084 (initialize_low): Do not call the_low_target.arch_setup.
11086 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11087 (s390_set_pc): Likewise.
11088 (s390_arch_setup): New function.
11089 (the_low_target): Use s390_arch_setup as arch_setup routine.
11091 * regcache.c (realloc_register_cache): New function.
11092 (set_register_cache): Call it for each existing regcache.
11094 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11096 * server.h (init_registers): Remove prototype.
11098 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11099 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11100 instead of init_registers ().
11101 * linux-arm-low.c (init_registers_arm): Add prototype.
11102 (init_registers_arm_with_iwmmxt): Likewise.
11103 (the_low_target): Add initializer for arch_setup field.
11104 * linux-cris-low.c (init_registers_cris): Add prototype.
11105 (the_low_target): Add initializer for arch_setup field.
11106 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11107 (the_low_target): Add initializer for arch_setup field.
11108 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11109 (the_low_target): Add initializer for arch_setup field.
11110 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11111 (the_low_target): Add initializer for arch_setup field.
11112 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11113 (the_low_target): Add initializer for arch_setup field.
11114 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11115 (the_low_target): Add initializer for arch_setup field.
11116 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11117 (init_registers_mips64_linux): Likewise.
11118 (the_low_target): Add initializer for arch_setup field.
11119 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11120 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11121 (the_low_target): Add initializer for arch_setup field.
11122 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11123 (init_registers_powerpc_64): Likewise.
11124 (the_low_target): Add initializer for arch_setup field.
11125 * linux-s390-low.c (init_registers_s390): Add prototype.
11126 (init_registers_s390x): Likewise.
11127 (the_low_target): Add initializer for arch_setup field.
11128 * linux-sh-low.c (init_registers_sh): Add prototype.
11129 (the_low_target): Add initializer for arch_setup field.
11130 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11131 (the_low_target): Add initializer for arch_setup field.
11132 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11133 (the_low_target): Add initializer for arch_setup field.
11135 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11136 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11137 instead of init_registers ().
11138 * win32-arm-low.c (init_registers_arm): Add prototype.
11139 (the_low_target): Add initializer for arch_setup field.
11140 * win32-i386-low.c (init_registers_i386): Add prototype.
11141 (the_low_target): Add initializer for arch_setup field.
11143 * spu-low.c (init_registers_spu): Add prototype.
11144 (initialize_low): Call initialie_registers_spu () instead of
11145 initialize_registers ().
11147 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11149 * server.c (handle_v_requests): When handling the vRun and vAttach
11150 packets, if already debugging a process, don't kill it. Return an
11153 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11155 * server.c (handle_query): Correct length check.
11157 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11159 * win32-low.c (do_initial_child_stuff): Add process handle
11160 parameter. Set current_process_handle and current_process_id from the
11161 parameters. Clear globals.
11162 (win32_create_inferior): Don't set current_process_handle and
11163 current_process_id here. Instead pass them on the call to
11164 do_initial_child_stuff.
11165 (win32_attach): Likewise.
11166 (win32_clear_inferiors): New.
11167 (win32_kill): Don't close the current process handle or the
11168 current thread handle here. Instead call win32_clear_inferiors.
11169 (win32_detach): Don't open a new handle to the process. Call
11170 win32_clear_inferiors.
11171 (win32_join): Don't rely on current_process_handle; open a new
11172 handle using the process id.
11173 (win32_wait): Call win32_clear_inferiors when the inferior process
11176 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11178 * server.c (monitor_show_help): Add "exit".
11180 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11182 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11183 (clean): Add reg-xtensa.c.
11184 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11185 * configure.srv (xtensa*-*-linux*) New target.
11186 * linux-xtensa-low.c: New.
11187 * xtensa-xtregs.c: New.
11189 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11191 * hostio.c: Don't include errno.h.
11192 (errno_to_fileio_errno): Move to hostio-errno.
11193 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11194 error number outputting to the target->hostio_last_error callback.
11195 (hostio_packet_error): Use FILEIO_EINVAL directly.
11196 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11197 calls to hostio_error.
11198 * hostio-errno.c: New.
11199 * server.h (hostio_last_error_from_errno): Declare.
11200 * target.h (target_ops): Add hostio_last_error member.
11201 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11202 as hostio_last_error handler.
11203 * spu-low.c (spu_target_ops): Likewise.
11204 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11205 (wince_hostio_last_error): New functions.
11206 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11207 as hostio_last_error handler.
11208 (win32_target_ops) [!_WIN32_WCE]: Register
11209 hostio_last_error_from_errno as hostio_last_error handler.
11210 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11211 (hostio-errno.o): New rule.
11212 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11213 * configure.srv (srv_hostio_err_objs): New variable. Default to
11215 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11216 * configure: Regenerate.
11218 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11220 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11221 (linux_kill, linux_detach): Clean up the process list.
11222 * remote-utils.c (remote_open): Improve port number parsing.
11223 (putpkt_binary, input_interrupt): Only send interrupts if the target
11225 * server.c (extended_protocol): Make static.
11226 (attached): Define earlier.
11227 (exit_requested, response_needed, program_argv): New variables.
11228 (target_running): New.
11229 (start_inferior): Clear attached here.
11230 (attach_inferior): Set attached here.
11231 (require_running): Define.
11232 (handle_query): Use require_running and target_running. Implement
11234 (handle_v_attach, handle_v_run): New.
11235 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11236 (gdbserver_usage): Update.
11237 (main): Redo argument parsing. Handle --debug and --multi. Handle
11238 --attach along with other options or after the port. Save
11239 program_argv. Support no initial program. Resynchronize
11240 communication with GDB after an error. Handle "monitor exit".
11241 Use require_running and target_running. Always allow the extended
11242 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11243 restart in extended mode.
11244 * README: Refer to the GDB manual. Update --attach usage.
11246 2007-12-20 Andreas Schwab <schwab@suse.de>
11248 * linux-low.c (STACK_SIZE): Define.
11249 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11250 (linux_test_for_tracefork): Likewise.
11252 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11254 * linux-low.c (linux_wait_for_event): Update messages. Do not
11255 reinsert auto-delete breakpoints.
11256 * mem-break.c (struct breakpoint): Change return type of handler to
11258 (set_breakpoint_at): Update handler type.
11259 (reinsert_breakpoint_handler): Return 1 instead of calling
11261 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11263 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11264 * mem-break.h (set_breakpoint_at): Update handler type.
11265 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11266 * win32-low.c (auto_delete_breakpoint): New.
11267 (get_child_debug_event): Use it.
11269 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11271 * configure.ac: Check for pread and pwrite.
11272 * hostio.c (handle_pread): Fall back to lseek and read.
11273 (handle_pwrite): Fall back to lseek and write.
11274 * config.in, configure: Regenerated.
11276 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11278 * server.c (myresume): Add own_buf argument.
11279 (main): Update calls.
11281 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11283 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11284 * remote-utils.c (remote_open): Do not call disable_async_io.
11285 (block_async_io): Delete.
11286 (unblock_async_io): Make static.
11287 (initialize_async_io): New.
11288 * server.c (handle_v_cont): Handle async I/O here.
11289 (myresume): Likewise. Move other common resume tasks here...
11290 (main): ... from here. Call initialize_async_io. Disable async
11291 I/O before the main loop.
11292 * server.h (initialize_async_io): Declare.
11293 (block_async_io, unblock_async_io): Delete prototypes.
11294 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11296 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11298 * remote-utils.c (readchar): Allow binary data in received messages.
11300 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11302 * win32-low.c (attaching): New global.
11303 (win32_create_inferior): Clear the `attaching' global.
11304 (win32_attach): Set the `attaching' global.
11305 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11306 attaching. Only set a breakpoint at the entry point if not
11309 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11311 * server.c (main): Don't report dll events on the initial
11312 connection on attaches.
11314 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11316 * server.c (main): Relax numerical bases supported for the pid of
11317 the --attach command line argument.
11319 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11321 * win32-low.c (win32_attach): Call OpenProcess before
11322 DebugActiveProcess, not after. Add last error output to error
11325 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11327 * win32-low.c (win32_get_thread_context)
11328 (win32_set_thread_context): New functions.
11329 (thread_rec): Use win32_get_thread_context.
11330 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11331 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11334 2007-12-03 Leo Zayas
11335 Pedro Alves <pedro_alves@portugalmail.pt>
11337 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11339 (child_add_thread): Minor cleanup.
11340 (child_continue): Resume artificially suspended threads before
11341 calling ContinueDebugEvent.
11342 (suspend_one_thread): New.
11343 (fake_breakpoint_event): New.
11344 (get_child_debug_event): Change return type to int. Check here if
11345 gdb sent an interrupt request. If a soft interrupt was requested,
11346 fake a breakpoint event. Return 0 if there is no event to handle,
11348 (win32_wait): Don't check here if gdb sent an interrupt request.
11349 Ensure there is a valid event to handle.
11350 (win32_request_interrupt): Add soft interruption method as last
11353 2007-12-03 Leo Zayas
11354 Pedro Alves <pedro_alves@portugalmail.pt>
11356 * win32-low.h (win32_thread_info): Add descriptions to the
11357 structure members. Replace `suspend_count' counter by a
11359 * win32-low.c (thread_rec): Update condition of when to get the
11360 context from the inferior. Rely on ContextFlags being set if it
11361 has already been retrieved. Only suspend the inferior thread if
11362 we haven't already. Warn if that fails.
11363 (continue_one_thread): s/suspend_count/suspended/. Only call
11364 ResumeThread once. Warn if that fails.
11366 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11368 * win32-low.c (win32_wait): Don't read from the inferior when it
11369 has already exited.
11371 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11373 * Makefile.in (win32_low_h): New variable.
11374 (win32-low.o): Add dependency on $(win32_low_h).
11375 (win32-arm-low.o, win32-i386-low.o): New rules.
11377 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11379 * hostio.c: Correct copyright year.
11381 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11383 * Makefile.in (OBS): Add hostio.o.
11384 (hostio.o): New rule.
11385 * server.h (handle_vFile): Declare.
11386 * hostio.c: New file.
11387 * server.c (handle_v_requests): Take packet_len and new_packet_len
11388 for binary packets. Call handle_vFile.
11389 (main): Update call to handle_v_requests.
11391 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11393 * linux-low.c: Include <sched.h>.
11395 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11397 * linux-low.c (linux_tracefork_grandchild): New.
11398 (linux_tracefork_child): Use clone.
11399 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11401 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11403 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11405 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11407 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11409 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11411 * inferiors.c (change_inferior_id): Delete.
11412 (add_pid_to_list, pull_pid_from_list): New.
11413 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11414 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11415 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11416 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11417 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11418 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11419 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11420 (using_threads): Always set to 1.
11421 (handle_extended_wait): New.
11422 (add_process): Do not set TID.
11423 (linux_create_inferior): Set must_set_ptrace_flags.
11424 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11425 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11426 (linux_thread_alive): Rename TID argument to LWPID.
11427 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11428 (linux_wait_for_event): Do not use TID or check using_threads. Update
11429 call to dead_thread_notify. Call handle_extended_wait.
11430 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11431 (send_sigstop): Delete sigstop_sent.
11432 (wait_for_sigstop): Avoid TID.
11433 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11434 (linux_test_for_tracefork): New.
11435 (linux_lookup_signals): Use thread_db_active and
11436 linux_supports_tracefork_flag.
11437 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11438 * linux-low.h (get_process_thread): Avoid TID.
11439 (struct process_ifo): Move thread_known and tid to the end. Remove
11441 (linux_attach_lwp, thread_db_init): Update prototypes.
11442 * server.h (change_inferior_id): Delete prototype.
11443 (add_pid_to_list, pull_pid_from_list): New prototypes.
11444 * thread-db.c (thread_db_use_events): New.
11445 (find_first_thread): Rename to...
11446 (find_one_thread): ...this. Update callers and messages. Do not
11447 call fatal. Check thread_db_use_events. Do not call
11448 change_inferior_id or new_thread_notify.
11449 (maybe_attach_thread): Update. Do not call new_thread_notify.
11450 (thread_db_init): Set thread_db_use_events. Check use_events.
11451 * utils.c (fatal, warning): Correct message prefix.
11453 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11455 * Makefile.in (clean): Remove new files.
11456 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11457 (powerpc-64.o, powerpc-64.c): New rules.
11458 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11459 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11461 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11463 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11464 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11465 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11466 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11467 (target_regsets): Add AltiVec and SPE register sets.
11468 * configure.ac: Check for AltiVec and SPE.
11469 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11470 (ppc_fill_vrregset, ppc_store_vrregset): New.
11471 (target_regsets): Add AltiVec register set.
11472 * configure: Regenerated.
11474 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11476 * linux-low.c (O_LARGEFILE): Define.
11477 (linux_read_memory): Use /proc/PID/mem.
11478 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11479 * configure, config.in: Regenerated.
11481 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11483 * linux-low.c (linux_wait_for_event): Do not pass signals while
11486 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11488 * win32-low.c (create_process): New.
11489 (win32_create_inferior): Use create_process instead of
11490 CreateProcess. If create_process failed retry appending an ".exe"
11491 suffix. Store the GetLastError result immediatelly after
11492 create_process calls and use it on the call to error.
11494 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11496 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11498 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11500 * configure.ac: Switch license to GPLv3.
11502 2007-08-01 Michael Snyder <msnyder@access-company.com>
11504 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11506 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11508 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11510 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11511 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11512 CloseToolhelp32Snapshot.
11513 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11514 CloseToolhelp32Snapshot.
11516 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11518 * server.c (main): Check for inferior exit before main loop.
11520 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11522 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11523 instead of on tmp_desc.
11525 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11526 Daniel Jacobowitz <dan@codesourcery.com>
11528 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11529 (add_thread): Minor cleanups.
11530 (clear_inferiors): Move lower in the file. Clear the DLL
11532 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11533 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11534 (xml_escape_text): New.
11535 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11537 (handle_v_cont): Report errors.
11538 (gdbserver_version): Update.
11539 (main): Correct size of own_buf. Do not report initial DLL events.
11540 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11541 (unloaded_dll, xml_escape_text): New.
11542 * win32-low.c (enum target_waitkind): Update comments.
11543 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11544 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11545 (win32_EnumProcessModules, win32_GetModuleInformation)
11546 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11547 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11548 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11549 (win32_Module32First, win32_Module32Next, load_toolhelp)
11550 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11551 (get_child_debug_event): Handle DLL events.
11552 (win32_wait): Likewise.
11554 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11556 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11557 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11559 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11561 * win32-low.c (handle_output_debug_string): Ignore event if not
11564 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11566 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11568 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11570 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11572 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11574 * inferiors.c (change_inferior_id): Add comment.
11575 * linux-low.c (check_removed_breakpoint): Add an early
11576 prototype. Improve debug output.
11577 (linux_attach): Doc update.
11578 (linux_detach_one_process, linux_detach): Clean up before releasing
11580 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11581 * linux-low.h (struct process_info): Doc improvement.
11582 * mem-break.c (delete_all_breakpoints): New.
11583 * mem-break.h (delete_all_breakpoints): New prototype.
11584 * thread-db.c (find_first_thread): New.
11585 (thread_db_create_event): Call it instead of
11586 thread_db_find_new_threads. Clean up unused variables.
11587 (maybe_attach_thread): Remove first thread handling.
11588 (thread_db_find_new_threads): Use find_first_thread.
11589 (thread_db_get_tls_address): Likewise.
11591 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11593 * thread-db.c (thread_db_find_new_threads): Add prototype.
11594 (thread_db_create_event): Check for the main thread before adding
11596 (maybe_attach_thread): Only enable event reporting if TID == 0.
11597 (thread_db_get_tls_address): Check for new threads.
11599 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11601 * linux-low.c (linux_create_inferior): Try execv before execvp.
11602 * spu-low.c (spu_create_inferior): Likewise.
11604 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11606 * linux-low.c (linux_create_inferior): Change execv to execvp.
11607 * spu-low.c (spu_create_inferior): Likewies.
11609 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11611 * Makefile.in (clean): Clean new files instead of deleted ones.
11612 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11613 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11615 * configure.srv: Specify XML files and new regformats for MIPS and
11617 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11618 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11619 an entry for the restart register.
11620 (mips_cannot_fetch_register, mips_cannot_store_register)
11621 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11622 register names to match the XML descriptions.
11623 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11624 restart register instead of $0.
11626 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11627 Markus Deuling <deuling@de.ibm.com>
11629 * remote-utils.c (decode_xfer_write): New function.
11630 * server.h (decode_xfer_write): Add prototype.
11631 * server.c (handle_query): Add PACKET_LEN argument. Support
11632 qXfer:spu:read and qXfer:spu:write packets.
11633 (main): Pass packet_len to handle_query.
11634 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11635 * target.h (target_ops): Add qxfer_spu.
11637 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11639 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11640 accessing non-seekable spufs files.
11642 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11644 * server.c (handle_query): Add reply for qC packet.
11646 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11647 Leo Zayas <lerele@champenstudios@com>
11649 * server.h (check_remote_input_interrupt_request): New function.
11650 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11651 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11652 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11653 (check_remote_input_interrupt_request): New function.
11654 * server.h (check_remote_input_interrupt_request): Declare.
11655 * win32-low.c (winapi_DebugBreakProcess,
11656 winapi_GenerateConsoleCtrlEvent): New typedefs.
11657 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11659 (win32_wait): Check for remote interrupt request
11660 with check_remote_input_interrupt_request.
11661 (win32_request_interrupt): New function.
11662 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11664 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11666 * win32-low.c (debug_registers_changed,
11667 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11668 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11669 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11670 (thread_rec): Get context using the low target.
11671 (child_add_thread): Call thread_added on the low target,
11672 which does the same thing.
11674 (do_initial_child_stuff): Remove debug registers references.
11675 Set context using the low target. Resume threads after
11676 setting the contexts.
11677 (child_continue): Remove dead variable. Remove debug
11678 registers references.
11679 (child_fetch_inferior_registers): Go through the low target.
11680 (do_child_store_inferior_registers): Remove.
11681 (child_store_inferior_registers): Go through the low target.
11682 (win32_resume): Remove debug registers references.
11683 Set context using the low target.
11684 (handle_exception): Change return type to void. Don't record
11685 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11686 first chance exception.
11687 (get_child_debug_event): Change return type to void. Remove
11688 goto loop. Always return after waiting for debug event.
11689 (win32_wait): Convert to switch statement. Handle spurious
11692 * win32-i386-low.c (debug_registers_changed,
11693 debug_registers_used): New.
11694 (initial_stuff): Rename to ...
11695 (i386_initial_stuff): ... this. Clear debug registers
11697 (store_debug_registers): Delete.
11698 (i386_get_thread_context): New.
11699 (load_debug_registers): Delete.
11700 (i386_set_thread_context): New.
11701 (i386_thread_added): New.
11702 (single_step): Rename to ...
11703 (i386_single_step): ... this.
11704 (do_fetch_inferior_registers): Rename to ...
11705 (i386_fetch_inferior_register): ... this.
11706 (i386_store_inferior_register): New.
11707 (the_low_target): Adapt to new interface.
11709 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11710 (arm_get_thread_context): New.
11711 (arm_set_thread_context): New.
11713 (do_fetch_inferior_registers): Rename to ...
11714 (arm_fetch_inferior_register): ... this.
11715 (arm_store_inferior_register): New.
11716 (arm_wince_breakpoint): Reimplement as unsigned long.
11717 (arm_wince_breakpoint_len): Define.
11718 (the_low_target): Adapt to new interface.
11720 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11721 load_debug_registers. Add get_thread_context, set_thread_context,
11722 thread_added and store_inferior_register. Rename
11723 fetch_inferior_registers to fetch_inferior_register.
11724 (regptr): Remove declaration.
11726 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11728 * linux-low.c (linux_detach): Change return type to int. Return 0.
11729 * spu-low.c (spu_detach): Likewise.
11731 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11733 * target.h (target_ops): Change return type of detach to int.
11735 (join_inferior): New.
11736 * server.c (main): Don't skip detach support on mingw32.
11737 If the inferior doesn't support detaching return error.
11738 Call join_inferior instead of using waitpid.
11739 * linux-low.c (linux_join): New.
11740 (linux_target_op): Add linux_join.
11741 * spu-low.c (spu_join): New.
11742 (spu_target_ops): Add spu_join.
11743 * win32-low.c (win32_detach): Adapt to new interface.
11744 Reopen current_process_handle before detaching. Issue a child
11745 resume before detaching.
11747 (win32_target_op): Add win32_join.
11749 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11751 * win32-low.c (win32-attach): Fix return value.
11752 * target.h (target_ops): Describe ATTACH return values.
11754 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11756 * win32-low.c (GETPROCADDRESS): Define.
11757 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11758 (winapi_DebugSetProcessKillOnExit): Likewise.
11759 (win32_create_inferior): Force usage of ansi CreateProcessA.
11760 (win32_attach): Use GETPROCADDRESS.
11761 (win32_detach): Likewise.
11763 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11765 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11767 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11769 * win32-low.c: Commit leftover changes from 2007-03-29.
11771 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11773 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11774 fields short instead of int. Add explicit padding.
11775 (i387_cache_to_fsave): Remove unnecessary casts.
11776 (i387_fsave_to_cache): Doc fix.
11777 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11779 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11781 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11782 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11784 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11786 * configure.srv (arm*-*-mingw32ce*): Move near the other
11789 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11791 * configure.ac: Add errno checking.
11792 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11793 sys/file.h and malloc.h.
11794 (AC_CHECK_DECLS): Add perror.
11795 (srv_mingwce): Handle.
11796 * configure.srv (i[34567]86-*-cygwin*): Add
11797 win32-i386-low.o to srv_tgtobj.
11798 (i[34567]86-*-mingw*): Likewise.
11799 (arm*-*-mingw32ce*): Add case.
11800 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11801 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11802 [__MINGW32CE__] (strerror): New function.
11803 [__MINGW32CE__] (errno): Define to GetLastError.
11804 [__MINGW32CE__] (COUNTOF): New macro.
11805 (remote_open): Remove extra close call.
11806 * mem-break.c (delete_breakpoint_at): New function.
11807 * mem-break.h (delete_breakpoint_at): Declare.
11808 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11809 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11810 [USE_WIN32API] (read, write): Add char* casts.
11811 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11812 * server.h: Include wincecompat.h on Windows CE.
11813 [HAVE_ERRNO_H]: Check.
11814 (perror): Declare if not declared.
11815 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11816 (perror_with_name): Remove errno declaration.
11817 * wincecompat.h: New.
11818 * wincecompat.c: New.
11819 * win32-low.h: New.
11820 * win32-arm-low.c: New.
11821 * win32-i386-low.c: New.
11822 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11823 (OUTMSG2): Make it safe.
11825 (COUNTOF): New macro.
11826 (NUM_REGS): Get it from the low target.
11827 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11828 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11829 (thread_rec): Let low target handle debug registers.
11830 (child_add_thread): Likewise.
11831 (child_init_thread_list): Likewise.
11832 (continue_one_thread): Likewise.
11834 (do_child_fetch_inferior_registers): Move to ...
11835 * win32-i386-low.c: ... here, and rename to ...
11836 (do_fetch_inferior_registers): ... this.
11837 * win32-low.c (child_fetch_inferior_registers):
11838 Go through the low target.
11839 (do_child_store_inferior_registers): Use regptr.
11840 (strwinerror): New function.
11841 (win32_create_inferior): Handle Windows CE.
11842 Use strwinerror instead of strerror on Windows error
11843 codes. Add program to the error output.
11844 Don't close the main thread handle on Windows CE.
11845 (win32_attach): Use coredll.dll on Windows CE.
11846 (win32_kill): Close current process and current
11848 (win32_detach): Use coredll.dll on Windows CE.
11849 (win32_resume): Let low target handle debug registers, and
11851 (handle_exception): Add/Remove initial breakpoint. Avoid
11852 non-existant WSTOPSIG on Windows CE.
11853 (win32_read_inferior_memory): Cast to remove warning.
11854 (win32_arch_string): Go through the low target.
11855 (initialize_low): Call set_breakpoint_data with the low
11856 target's breakpoint.
11857 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11858 FOP_REGNUM, mappings): Move to ...
11859 * win32-i386-low.c: ... here.
11860 * win32-low.c (win32_thread_info): Move to ...
11861 * win32-low.h: ... here.
11862 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11863 win32-arm-low.c and wincecompat.c.
11864 (all:): Add $EXEEXT.
11865 (install-only:): Likewise.
11866 (gdbserver:): Likewise.
11867 (gdbreplay:): Likewise.
11868 * config.in: Regenerate.
11869 * configure: Regenerate.
11871 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11873 * win32-low.c: Rename typedef thread_info to
11874 win32_thread_info throughout.
11876 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11878 * win32-i386-low.c: Rename to ...
11879 * win32-low.c: ... this.
11880 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11881 * Makefile.in: Likewise.
11883 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11885 * remote-utils.c (monitor_output): Constify msg parameter.
11886 * server.h (monitor_output): Likewise.
11887 * win32-i386-low.c (handle_output_debug_string): New.
11888 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11889 handle_output_debug_string.
11890 (get_child_debug_event): Likewise.
11892 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11894 * server.c (main): Correct strtoul check.
11896 2007-03-27 Jon Ringle <jon@ringle.org>
11898 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11900 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11902 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11904 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11906 * terminal.h: Check HAVE_SGTTY_H.
11908 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11910 * remote-utils.c (remote_open): Print out the assigned port number.
11912 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11914 * remote-utils.c (monitor_output): New function.
11915 * server.c (debug_threads): Define here.
11916 (monitor_show_help): New function.
11917 (handle_query): Handle qRcmd.
11918 (main): Do not handle 'd' packet.
11919 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11920 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11923 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11925 * Makefile.in (EXEEXT): New.
11926 (clean): Use $(EXEEXT).
11928 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11930 * target.h (target_ops): Rename send_signal to request_interrupt,
11931 and remove enum target_signal parameter.
11932 * linux-low.c (linux_request_interrupt): Rename from
11933 linux_send_signal, and always send SIGINT.
11934 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11935 and always send SIGINT.
11936 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11938 (input_interrupt): Likewise.
11940 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11942 * server.c (get_features_xml): Check if target implemented
11944 * win32-i386-low.c (win32_arch_string): New.
11945 (win32_target_ops): Add win32_arch_string as arch_string member.
11947 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11949 * spu-low.c (spu_arch_string): New.
11950 (spu_target_ops): Add spu_arch_string.
11952 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11954 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11955 * configure.ac: Do not check for terminal.h.
11956 * configure, config.in: Regenerated.
11958 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11960 * Makefile.in (OBS): Add $(XML_BUILTIN).
11961 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11963 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11964 (arm-with-iwmmxt.c): New.
11965 * config.in, configure: Regenerate.
11966 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11967 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11968 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11969 (arm*-*-linux*): Add iWMMXt and regset support.
11970 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11971 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11972 (arm_store_wmmxregset, target_regsets): New.
11973 * server.c (get_features_xml): Take annex argument. Check builtin
11975 (handle_query): Handle multiple annexes.
11977 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11979 * remote-utils.c [USE_WIN32API] (read, write): Define.
11980 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11983 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11985 * linux-i386-low.c (the_low_target): Set arch_string.
11986 * linux-x86-64-low.c (the_low_target): Likewise.
11987 * linux-low.c (linux_arch_string): New.
11988 (linux_target_ops): Add it.
11989 * linux-low.h (struct linux_target_ops): Add arch_string.
11990 * server.c (write_qxfer_response): Use const void * for DATA.
11991 (get_features_xml): New.
11992 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11993 * target.h (struct target_ops): Add arch_string method.
11995 2007-01-03 Denis Pilat <denis.pilat@st.com>
11996 Daniel Jacobowitz <dan@codesourcery.com>
11998 * linux-low.c (linux_kill): Handle being called with no threads.
11999 * win32-i386-low.c (win32_kill): Likewise.
12000 (get_child_debug_event): Clear current_process_handle.
12002 2006-12-30 Denis PILAT <denis.pilat@st.com>
12003 Daniel Jacobowitz <dan@codesourcery.com>
12005 * remote-utils.c (remote_open): Check the type of specified
12006 serial port devices before opening them.
12007 * server.c (main): Kill the inferior if an error occurs during
12008 the first remote_open.
12010 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12012 * README: Update supported targets.
12014 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12016 * Makefile.in (clean): Remove reg-mips64.c.
12017 (reg-mips64.c, reg-mips64.o): New rules.
12018 * configure.srv: Handle mips64. Include regset support for mips.
12019 * linux-mips-low.c (union mips_register): New.
12020 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12021 (mips_breakpoint, mips_breakpoint_at): Use int.
12022 (mips_collect_register, mips_supply_register)
12023 (mips_collect_register_32bit, mips_supply_register_32bit)
12024 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12025 (mips_store_fpregset, target_regsets): New.
12026 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12028 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12030 * configure.srv: Add target "spu*-*-*".
12031 * Makefile.in (clean): Remove reg-spu.c.
12032 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12033 * spu-low.c: New file.
12035 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12037 * configure.ac: Correct td_thr_tls_get_addr test.
12038 * configure: Regenerated.
12040 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12042 * linux-low.c (linux_wait_for_event): Reformat. Use the
12043 pass_signals array.
12044 * remote-utils.c (decode_address_to_semicolon): New.
12045 * server.c (pass_signals, handle_general_set): New.
12046 (handle_query): Mention QPassSignals for qSupported.
12047 (main): Call handle_general_set.
12048 * server.h (pass_signals, decode_address_to_semicolon): New.
12050 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12052 * server.c (handle_query): Correct error handling for read_auxv.
12054 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12056 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12057 and srv_linux_thread_db to yes.
12058 * linux-s390-low.c (s390_fill_gregset): New function.
12059 (target_regsets): Define data structure.
12061 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12063 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12064 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12065 * config.in, configure: Regenerated.
12066 * inferiors.c (gdb_id_to_thread): New function.
12067 (gdb_id_to_thread_id): Use it.
12068 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12069 * linux-low.h (struct process_info): Add th member.
12070 (thread_db_get_tls_address): New prototype.
12071 * remote-utils.c (decode_address): Make non-static.
12072 * server.c (handle_query): Handle qGetTLSAddr.
12073 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12074 * target.h (struct target_ops): Add get_tls_address.
12075 * thread-db.c (maybe_attach_thread): Save the thread handle.
12076 (thread_db_get_tls_address): New.
12078 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12080 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12081 (linux_resume_one_process): Take a siginfo_t *. Update all
12082 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12083 (struct pending_signals): Add a siginfo_t.
12084 (linux_wait_for_process): Always set last_status.
12085 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12086 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12087 * linux-low.h (struct process_info): Add last_status.
12089 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12091 * remote-utils.c (try_rle): New function.
12092 (putpkt_binary): Use it.
12094 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12096 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12097 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12098 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12099 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12100 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12103 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12105 * server.c (terminal_fd): New variable.
12106 (old_foreground_pgrp): Likewise.
12107 (restore_old_foreground_pgrp): New function.
12108 (start_inferior): Record the terminal file descriptor in terminal_fd
12109 and its original foreground group in old_foreground_pgrp. Register
12110 restore_old_foreground_pgrp with atexit().
12112 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12114 * server.c (handle_query): Correct qPart to qXfer.
12116 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12118 * configure.ac: Check for more headers which are missing on
12119 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12120 * configure.srv: Add Cygwin and mingw32.
12121 * remote-utils.c: Don't include headers unconditionally which
12122 are missing on mingw32. Include <winsock.h> for mingw32.
12123 (remote_open): Adjust for mingw32 support. Flush
12124 standard error after writing to it.
12125 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12126 (unblock_async_io, enable_async_io, disable_async_io)
12127 (readchar, getpkt): Update for Winsock support.
12128 (prepare_resume_reply): Expect a protocol signal number.
12129 * server.c: Disable <sys/wait.h> on mingw32.
12130 (start_inferior): Adjust for mingw32 support. Flush
12131 standard error after writing to it.
12132 (attach_inferior): Likewise. Use protocol signal
12134 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12136 * win32-i386-low.c: New file.
12137 * Makefile.in (XM_CLIBS): Set.
12138 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12139 (win32-i386-low.o): New dependency rule.
12140 * linux-low.c (linux_wait): Use target signal numbers.
12141 * target.h (struct target_ops): Doc fix.
12142 * server.h (target_signal_to_name): New prototype.
12143 * gdbreplay.c: Don't include headers unconditionally which
12144 are missing on mingw32. Include <winsock.h> for mingw32.
12145 (remote_close, remote_open): Adjust for Winsock support.
12146 * configure, config.in: Regenerated.
12148 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12150 * server.c (decode_xfer_read, write_qxfer_response): New.
12151 (handle_query): Take a packet length argument. Handle
12152 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12153 the qSupported response.
12154 (main): Update call to handle_query.
12156 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12158 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12159 (putpkt_binary): Renamed from putpkt and adjusted for binary
12161 (putpkt): New wrapper for putpkt_binary.
12162 (readchar): Don't mask off the high bit.
12163 (decode_X_packet): New function.
12164 * server.c (main): Call putpkt_binary if a handler sets the packet
12165 length. Save the length of the incoming packet. Handle 'X'.
12166 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12168 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12170 * server.c (handle_query): Handle qSupported.
12172 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12174 * remote-utils.c (all_symbols_looked_up): New variable.
12175 (look_up_one_symbol): Check it.
12176 * server.h (look_up_one_symbol): New declaration.
12177 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12179 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12181 * Makefile.in (linux-arm-low.o): Update dependencies.
12182 * linux-arm-low.c: Include "gdb_proc_service.h".
12183 (PTRACE_GET_THREAD_AREA): Define.
12184 (ps_get_thread_area): New function.
12186 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12188 * configure.srv (m68k*-*-uclinux*): New target.
12189 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12190 (linux_resume_one_process): Remove extraneous cast.
12191 (linux_read_offsets): New.
12192 (linux_target_op): Add linux_read_offsets on mmuless systems.
12193 * server.c (handle_query): Add qOffsets logic.
12194 * target.h (struct target_ops): Add read_offsets.
12196 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12198 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12199 (PTRACE_GET_THREAD_AREA): Define.
12200 (ps_get_thread_area): New function.
12201 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12202 (linux-x86-64-low.o): Update.
12204 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12206 * configure.ac: Remove checks for prfpregset_t.
12207 * gdb_proc_service.h: New file.
12208 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12209 new "gdb_proc_service.h".
12210 * proc-service.c: Likewise.
12211 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12212 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12213 * Makefile.in (gdb_proc_service_h): Updated.
12214 * configure, config.in: Regenerated.
12216 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12218 * remote-utils.c (prepare_resume_reply): Move declaration
12219 of gdb_id_from_wait to the top of the block.
12221 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12223 * linux-low.c (regsets_store_inferior_registers): Read the regset
12224 from the target before filling it.
12226 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12228 * server.c (attach_inferior): Return SIGTRAP for a successful
12231 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12233 * Makefile.in (OBS): Add version.o.
12234 (STAGESTUFF): Delete.
12235 (version.o): Add dependencies.
12236 (version.c): Replace rule.
12237 (clean): Remove version.c.
12238 * server.c (gdbserver_version): New.
12239 (gdbserver_usage): Use printf.
12240 (main): Handle --version and --help.
12241 * server.h (version, host_name): Add declarations.
12243 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12255 * linux-x86-64-low.c:
12257 * linux-s390-low.c:
12258 * linux-ppc64-low.c:
12260 * linux-mips-low.c:
12261 * linux-m68k-low.c:
12262 * linux-m32r-low.c:
12265 * linux-ia64-low.c:
12266 * linux-i386-low.c:
12267 * linux-crisv32-low.c:
12279 * gdbserver.1: Add (C) after Copyright. Update the FSF
12282 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12284 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12285 (arm_breakpoint_at): Recognize both breakpoints.
12286 (the_low_target): Use the correct breakpoint instruction.
12288 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12290 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12291 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12292 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12293 (the_low_target): Update.
12295 2005-10-25 Andreas Schwab <schwab@suse.de>
12297 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12299 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12300 (ia64_num_regs): Reduce to 462.
12302 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12304 * acinclude.m4: Correct quoting.
12305 * aclocal.m4: Regenerated.
12307 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12308 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12309 (thread_db_init): Call thread_db_err_str.
12310 * configure.ac: Check for TD_VERSION.
12311 * config.in, configure: Regenerated.
12313 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12315 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12317 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12319 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12320 is not available. Define HAVE_PTRACE_GETREGS if it is.
12321 * config.in, configure: Regenerated.
12322 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12323 * linux-i386-low.c, linux-m68k-low.c: Update to use
12324 HAVE_PTRACE_GETREGS.
12325 * linux-low.c (regsets_fetch_inferior_registers)
12326 (regsets_store_inferior_registers): Only return 0 if we processed
12328 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12329 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12331 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12333 * inferiors.c (struct thread_info): Add gdb_id.
12334 (add_thread): Add gdb_id argument.
12335 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12336 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12337 calls to add_thread.
12338 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12339 * server.c (handle_query): Use thread_to_gdb_id.
12340 (handle_v_cont, main): Use gdb_id_to_thread_id.
12341 * server.h (add_thread): Update prototype.
12342 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12345 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12347 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12348 left-padded registers.
12349 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12350 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12352 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12354 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12355 * configure: Regenerate.
12356 * config.in: Regenerate.
12357 * server.h (NEED_DECLARATION_STRERROR):
12358 Replace with !HAVE_DECL_STRERROR.
12360 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12362 * linux-low.c (linux_wait, linux_send_signal): Don't test
12363 an unsigned long variable for > 0 if it could be MAX_ULONG.
12364 * server.c (myresume): Likewise.
12365 * target.c (set_desired_inferior): Likewise.
12367 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12369 * configure.ac: Simplify and improve check for socklen_t.
12370 * configure, config.in: Regenerate.
12372 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12374 * acconfig.h: Remove.
12375 * configure.ac: Add a test for socklen_t. Use three-argument
12376 AC_DEFINE throughout.
12377 * config.in: Regenerated using autoheader 2.59.
12378 * configure: Regenerated.
12380 * gdbreplay.c (socklen_t): Provide a default.
12381 (remote_open): Use socklen_t.
12382 * remote-utils.c (socklen_t): Provide a default.
12383 (remote_open): Use socklen_t.
12384 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12387 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12389 * linux-low.c (linux_read_memory, linux_write_memory)
12390 (linux_read_auxv): Likewise.
12391 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12392 (check_mem_write): Likewise.
12393 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12395 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12396 (registers_from_string, register_data): Likewise.
12397 * server.c (handle_query, main): Likewise.
12398 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12399 (decode_M_packet): Likewise.
12400 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12401 * target.h (struct target_ops): Update read_memory, write_memory,
12403 (read_inferior_memory, write_inferior_memory): Update.
12404 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12405 to unsigned char *.
12406 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12407 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12408 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12409 linux-s390-low.c, linux-sh-low.c: Update for changes in
12410 read_inferior_memory and the_low_target->breakpoint.
12412 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12414 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12415 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12416 * configure.srv: Add powerpc64-*-linux*.
12417 * linux-ppc64-low.c: New file.
12419 2005-05-23 Orjan Friberg <orjanf@axis.com>
12421 * linux-cris-low.c: New file with support for CRIS.
12422 * linux-crisv32-low.c: Ditto for CRISv32.
12423 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12424 (clean): Add reg-cris.c and reg-crisv32.c.
12425 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12426 reg-crisv32.o, and reg-crisv32.c to make rules.
12427 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12428 recognized targets.
12430 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12432 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12433 of sizeof (PTRACE_XFER_TYPE).
12434 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12436 2005-05-12 Orjan Friberg <orjanf@axis.com>
12438 * target.h (struct target_ops): Add insert_watchpoint,
12439 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12440 pointers for hardware watchpoint support.
12441 * linux-low.h (struct linux_target_ops): Ditto.
12442 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12443 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12444 to linux_target_ops.
12445 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12447 * server.c (main): Recognize 'Z' and 'z' packets.
12449 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12451 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12452 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12453 (the_low_target): Add new members.
12455 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12457 * proc-service.c (ps_lgetregs): Search all_processes instead of
12460 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12462 * server.c (start_inferior): Change return type to int.
12463 (attach_inferior): Change sigptr to int *.
12464 (handle_v_cont, handle_v_requests): Change signal to int *.
12465 (main): Change signal to int.
12467 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12469 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12470 * configure.srv: Add m32r*-*-linux*.
12471 * linux-m32r-low.c: New file.
12473 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12475 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12477 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12479 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12480 Take unsigned long arguments for PIDs.
12481 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12482 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12483 (wait_for_sigstop, linux_resume_one_process)
12484 (regsets_fetch_inferior_registers, linux_send_signal)
12485 (linux_read_auxv): Likewise. Update the types of variables holding
12486 PIDs. Update format string specifiers.
12487 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12488 * remote-utils.c (prepare_resume_reply): Likewise.
12489 * server.c (cont_thread, general_thread, step_thread)
12490 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12492 (handle_query): Update format specifiers.
12493 (handle_v_cont, main): Use strtoul for thread IDs.
12494 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12495 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12496 (general_thread, step_thread, thread_from_wait)
12497 (old_thread_from_wait): Update.
12498 * target.h (struct thread_resume): Use unsigned long for THREAD.
12499 (struct target_ops): Use unsigned long for arguments to attach and
12502 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12504 * acinclude.m4: Include bfd/bfd.m4 directly.
12505 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12506 <agriffis@toolchain.org>.
12507 * aclocal.m4, configure: Regenerated.
12509 2005-01-07 Andrew Cagney <cagney@gnu.org>
12511 * configure.ac: Rename configure.in, require autoconf 2.59.
12512 * configure: Re-generate.
12514 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12516 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12517 LIBS when finished.
12518 * aclocal.m4: Regenerated.
12519 * configure: Regenerated.
12521 2004-11-21 Andreas Schwab <schwab@suse.de>
12523 * linux-m68k-low.c (m68k_num_gregs): Define.
12524 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12525 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12526 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12527 (m68k_breakpoint_at): New. Add to the_low_target.
12529 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12530 srv_linux_thread_db to yes.
12532 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12534 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12535 (ARCH_SET_FS): Likewise.
12536 (ARCH_GET_FS): Likewise.
12537 (ARCH_GET_GS): Likewise.
12539 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12541 * linux-i386-low.c (ps_get_thread_area): New.
12542 * linux-x86-64-low.c (ps_get_thread_area): New.
12543 * linux-low.c: Include <sys/syscall.h>.
12544 (linux_kill_one_process): Don't kill the first thread here.
12545 (linux_kill): Kill the first thread here.
12546 (kill_lwp): New function.
12547 (send_sigstop, linux_send_signal): Use it.
12548 * proc-service.c: Clean up #ifdefs.
12549 (fpregset_info): Delete.
12550 (ps_lgetregs): Update and enable implementation.
12551 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12553 * remote-utils.c (struct sym_cache, symbol_cache): New.
12554 (input_interrupt): Print a clearer message.
12555 (async_io_enabled): New variable.
12556 (enable_async_io, disable_async_io): Use it. Update comments.
12557 (look_up_one_symbol): Use the symbol cache.
12558 * thread-db.c (thread_db_look_up_symbols): New function.
12559 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12561 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12563 * configure.in: Test for -rdynamic.
12564 * configure: Regenerated.
12565 * Makefile (INTERNAL_LDFLAGS): New.
12566 (gdbserver, gdbreplay): Use it.
12568 2004-09-02 Andrew Cagney <cagney@gnu.org>
12570 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12572 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12574 * linux-low.c (linux_wait): Clear all_processes list also.
12576 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12578 * linux-low.c: Include <errno.h>. Remove extern declaration of
12581 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12583 * gdbreplay.c, server.h, utils.c: Update copyright years.
12585 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12587 * server.c (main): Print child status or termination signal from
12588 variable 'signal', not 'sig'.
12590 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12592 * linux-low.c (linux_read_memory): Change return type to
12593 int. Check for and return error from ptrace().
12594 * target.c (read_inferior_memory): Change return type to int. Pass
12595 back return status from the_target->read_memory().
12596 * target.h (struct target_ops): Adapt *read_memory() prototype.
12598 (read_inferior_memory): Adapt prototype.
12599 * server.c (main): Return an error packet if
12600 read_inferior_memory() returns an error.
12602 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12604 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12605 Unify with other clean targets.
12607 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12609 * server.c (handle_v_cont): Call set_desired_inferior.
12611 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12613 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12615 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12617 * linux-low.c (linux_wait): Unblock async I/O.
12618 (linux_resume): Block and enable async I/O.
12619 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12620 * server.h (block_async_io, unblock_async_io): Add prototypes.
12622 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12624 * remote-utils.c (remote_open): Print a status notice after
12625 opening a TCP port.
12626 * server.c (attach_inferior): Print a status notice after
12629 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12631 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12633 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12635 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12637 * server.c, target.h: Update copyright years.
12639 2004-02-25 Roland McGrath <roland@redhat.com>
12641 * target.h (struct target_ops): New member `read_auxv'.
12642 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12643 * linux-low.c (linux_read_auxv): New function.
12644 (linux_target_ops): Initialize `read_auxv' member to that.
12646 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12648 Committed by Jim Blandy <jimb@redhat.com>.
12650 * linux-s390-low.c (s390_num_regs): Update.
12651 (s390_regmap): Remove control registers. Use __s390x__ predefine
12652 instead of GPR_SIZE to distiguish s390 and s390x targets.
12654 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12656 * linux-low.c: Update copyright year.
12657 (check_removed_breakpoint): Clear pending_is_breakpoint.
12658 (linux_set_resume_request, linux_queue_one_thread)
12659 (resume_status_pending_p): New functions.
12660 (linux_continue_one_thread): Use process->resume.
12661 (linux_resume): Only resume threads if there are no pending events.
12662 * linux-low.h (struct process_info): Add resume request
12665 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12667 * regcache.c (new_register_cache): Clear the allocated register
12668 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12670 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12672 * linux-low.c (linux_resume): Take a struct thread_resume *
12674 (linux_wait): Update call.
12675 (resume_ptr): New static variable.
12676 (linux_continue_one_thread): Renamed from
12677 linux_continue_one_process. Use resume_ptr.
12678 (linux_resume): Use linux_continue_one_thread.
12679 * server.c (handle_v_cont, handle_v_requests): New functions.
12680 (myresume): New function.
12681 (main): Handle 'v' case.
12682 * target.h (struct thread_resume): New type.
12683 (struct target_ops): Change argument of "resume" to struct
12685 (myresume): Delete macro.
12687 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12689 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12690 (uninstall): Support DESTDIR.
12692 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12694 * configure.srv: Add xscale*linux copy of arm*linux entry.
12696 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12698 * linux-arm-low.c (arm_reinsert_addr): New function.
12699 (the_low_target): Add arm_reinsert_addr.
12701 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12703 * mem-break.c: Remove whitespace at end of file.
12705 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12707 * configure.in: Check whether we need to prototype strerror.
12708 * server.h: Optionally prototype strerror.
12709 * gdbreplay.c (perror_with_name): Use strerror.
12710 * linux-low.c (linux_attach_lwp): Use strerror.
12711 * utils.c (perror_with_name): Use strerror.
12712 * config.in, configure: Regenerated.
12714 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12716 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12717 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12719 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12721 * Makefile.in (SFILES): Update.
12722 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12723 low-sun3.c: Remove files.
12725 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12727 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12728 (linux_detach_one_process, linux_detach): New functions.
12729 (linux_target_ops): Add linux_detach.
12730 * server.c (main): Handle 'D' packet.
12731 * target.h (struct target_ops): Add "detach" member.
12732 (detach_inferior): Define.
12734 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12736 From Kelley Cook <kelleycook@wideopenwest.com>:
12737 * configure.srv: Accept i[34567]86 variants.
12739 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12741 * linux-low.c (linux_wait_for_event): Correct comment typos.
12742 (linux_resume_one_process): Call check_removed_breakpoint.
12743 (linux_send_signal): New function.
12744 (linux_target_ops): Add linux_send_signal.
12745 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12747 * target.h (struct target_ops): Add send_signal.
12749 2003-05-29 Jim Blandy <jimb@redhat.com>
12751 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12752 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12753 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12754 away part of the register's value.
12756 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12758 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12759 (linux_wait_for_event, linux_init_signals): Likewise.
12761 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12763 * configure.in: Check for stdlib.h.
12764 * configure: Regenerated.
12765 * config.in: Regenerated.
12767 2003-01-04 Andreas Schwab <schwab@suse.de>
12769 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12771 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12773 * Makefile.in: Remove obsolete code.
12775 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12777 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12778 defined(PT_FPR0_HI).
12780 2002-11-17 Stuart Hughes <seh@zee2.com>
12782 * linux-arm-low.c (arm_num_regs): Increase.
12783 (arm_regmap): Include status register.
12785 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12787 * linux-low.c (register_addr): Remove incorrect -1 check.
12789 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12791 * linux-low.c (linux_create_inferior): Call setpgid. Return
12793 (unstopped_p, linux_signal_pid): Remove.
12794 (linux_target_ops): Remove linux_signal_pid.
12795 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12796 global instead of target method.
12797 * target.h (struct target_ops): Remove signal_pid. Update comment
12798 for create_inferior.
12799 * server.c (signal_pid): New variable.
12800 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12801 gdbserver. Set the child to be the foreground process group.
12802 (attach_inferior): Set signal_pid.
12804 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12806 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12808 2002-08-20 Jim Blandy <jimb@redhat.com>
12810 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12813 2002-08-01 Andrew Cagney <cagney@redhat.com>
12815 * Makefile.in: Make chill references obsolete.
12817 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12819 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12820 * configure: Regenerate.
12821 * config.in: Regenerate.
12823 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12825 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12826 (perror_with_name, remote_close, remote_open, expect, play): Static.
12828 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12830 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12831 byte offsets instead of an array of indexes.
12832 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12834 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12836 * regcache.c: Add comment.
12838 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12840 * thread-db.c: New file.
12841 * proc-service.c: New file.
12842 * acinclude.m4: New file.
12843 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12844 proc-service.o, and thread-db.o.
12845 (linux-low.o): Add USE_THREAD_DB.
12846 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12847 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12848 * aclocal.m4: Regenerated.
12849 * config.in: Regenerated.
12850 * configure: Regenerated.
12851 * configure.in: Check for proc_service.h, sys/procfs.h,
12852 thread_db.h, and linux/elf.h headrs.
12853 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12854 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12855 Check for -lthread_db and thread support.
12856 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12857 PowerPC, and SuperH.
12858 * i387-fp.c: Constify arguments.
12859 * i387-fp.h: Likewise.
12860 * inferiors.c: (struct thread_info): Renamed from
12861 `struct inferior_info'. Remove PID member. Use generic inferior
12862 list header. All uses updated.
12863 (inferiors, signal_pid): Removed.
12864 (all_threads): New variable.
12865 (get_thread): Define.
12866 (add_inferior_to_list): New function.
12867 (for_each_inferior): New function.
12868 (change_inferior_id): New function.
12869 (add_inferior): Removed.
12870 (remove_inferior): New function.
12871 (add_thread): New function.
12872 (free_one_thread): New function.
12873 (remove_thread): New function.
12874 (clear_inferiors): Use for_each_inferior and free_one_thread.
12875 (find_inferior): New function.
12876 (find_inferior_id): New function.
12877 (inferior_target_data): Update argument type.
12878 (set_inferior_target_data): Likewise.
12879 (inferior_regcache_data): Likewise.
12880 (set_inferior_regcache_data): Likewise.
12881 * linux-low.c (linux_bp_reinsert): Remove.
12882 (all_processes, stopping_threads, using_thrads)
12883 (struct pending_signals, debug_threads, pid_of): New.
12884 (inferior_pid): Replace with macro.
12885 (struct inferior_linux_data): Remove.
12886 (get_stop_pc, add_process): New functions.
12887 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12888 Use add_process and add_thread.
12889 (linux_attach_lwp): New function, based on old linux_attach. Use
12890 add_process and add_thread. Set stop_expected for new threads.
12891 (linux_attach): New function.
12892 (linux_kill_one_process): New function.
12893 (linux_kill): Kill all LWPs.
12894 (linux_thread_alive): Use find_inferior_id.
12895 (check_removed_breakpoints, status_pending_p): New functions.
12896 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12897 Update. Use WNOHANG. Wait for cloned processes also. Update process
12898 struct for the found process.
12899 (linux_wait_for_event): New function.
12900 (linux_wait): Use it. Support LWPs.
12901 (send_sigstop, wait_for_sigstop, stop_all_processes)
12902 (linux_resume_one_process, linux_continue_one_process): New functions.
12903 (linux_resume): Support LWPs.
12904 (REGISTER_RAW_SIZE): Remove.
12905 (fetch_register): Use register_size instead. Call supply_register.
12906 (usr_store_inferior_registers): Likewise. Call collect_register.
12907 Fix recursive case.
12908 (regsets_fetch_inferior_registers): Improve error message.
12909 (regsets_store_inferior_registers): Add debugging.
12910 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12911 (unstopped_p, linux_signal_pid): New functions.
12912 (linux_target_ops): Add linux_signal_pid.
12913 (linux_init_signals): New function.
12914 (initialize_low): Call it. Initialize using_threads.
12915 * regcache.c (inferior_regcache_data): Add valid
12917 (get_regcache): Fetch registers lazily. Add fetch argument
12918 and update all callers.
12919 (regcache_invalidate_one, regcache_invalidate): New
12921 (new_register_cache): Renamed from create_register_cache.
12922 Return the new regcache.
12923 (free_register_cache): Change argument to a void *.
12924 (registers_to_string, registers_from_string): Call get_regcache
12925 with fetch flag set.
12926 (register_data): Make static. Pass fetch flag to get_regcache.
12927 (supply_register): Call get_regcache with fetch flag clear.
12928 (collect_register): Call get_regcache with fetch flag set.
12929 (collect_register_as_string): New function.
12930 * regcache.h: Update.
12931 * remote-utils.c (putpkt): Flush after debug output and use
12933 Handle input interrupts while waiting for an ACK.
12934 (input_interrupt): Use signal_pid method.
12935 (getpkt): Flush after debug output and use stderr.
12936 (outreg): Use collect_register_as_string.
12937 (new_thread_notify, dead_thread_notify): New functions.
12938 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12939 and general_thread.
12940 (look_up_one_symbol): Flush after debug output.
12941 * server.c (step_thread, server_waiting): New variables.
12942 (start_inferior): Don't use signal_pid. Update call to mywait.
12943 (attach_inferior): Update call to mywait.
12944 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12945 (main): Don't fetch/store registers explicitly. Use
12946 set_desired_inferior. Support proposed ``Hs'' packet. Update
12948 * server.h: Update.
12949 (struct inferior_list, struct_inferior_list_entry): New.
12950 * target.c (set_desired_inferior): New.
12951 (write_inferior_memory): Constify.
12952 (mywait): New function.
12953 * target.h: Update.
12954 (struct target_ops): New signal_pid method.
12955 (mywait): Removed macro, added prototype.
12957 * linux-low.h (regset_func): Removed.
12958 (regset_fill_func, regset_store_func): New.
12959 (enum regset_type): New.
12960 (struct regset_info): Add type field. Use new operation types.
12961 (struct linux_target_ops): stop_pc renamed to get_pc.
12962 Add decr_pc_after_break and breakpoint_at.
12963 (get_process, get_thread_proess, get_process_thread)
12964 (strut process_info, all_processes, linux_attach_lwp)
12965 (thread_db_init): New.
12967 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12968 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12969 (the_low_target): Add new members.
12970 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12971 (i386_store_fpxregset): Constify.
12972 (target_regsets): Add new kind identifier.
12973 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12974 (i386_set_pc): Add debugging.
12975 (i386_breakpoint_at): New function.
12976 (the_low_target): Add new members.
12977 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12978 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12979 (mips_breakpoint_at): New.
12980 (the_low_target): Add new members.
12981 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12982 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12983 (the_low_target): Add new members.
12984 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12985 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12986 (the_low_target): Add new members.
12987 * linux-x86-64-low.c (target_regsets): Add new kind
12990 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12992 From Martin Pool <mbp@samba.org>:
12993 * server.c (gdbserver_usage): New function.
12996 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12998 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12999 stop_at -> stop_pc.
13001 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13003 * Makefile.in: Remove obsolete code.
13005 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13007 * linux-low.c (regsets_fetch_inferior_registers),
13008 (regsets_store_inferior_registers): Removed cast to int from
13010 * regcache.h: Added declaration of struct inferior_info.
13012 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13014 * inferiors.c (struct inferior_info): Add regcache_data.
13015 (add_inferior): Call create_register_cache.
13016 (clear_inferiors): Call free_register_cache.
13017 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13018 * regcache.c (struct inferior_regcache_data): New.
13019 (registers): Remove.
13020 (get_regcache): New function.
13021 (create_register_cache, free_register_cache): New functions.
13022 (set_register_cache): Don't initialize the register cache here.
13023 (registers_to_string, registers_from_string, register_data): Call
13025 * regcache.h: Add prototypes.
13026 * server.h: Likewise.
13028 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13030 * mem-break.c: New file.
13031 * mem-break.h: New file.
13032 * Makefile.in: Add mem-break.o rule; update server.h
13034 * inferiors.c (struct inferior_info): Add target_data
13036 (clear_inferiors): Free target_data member if set.
13037 (inferior_target_data, set_inferior_target_data): New functions.
13038 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13039 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13040 * linux-low.c (linux_bp_reinsert): New variable.
13041 (struct inferior_linux_data): New.
13042 (linux_create_inferior): Use set_inferior_target_data.
13043 (linux_attach): Likewise. Call add_inferior.
13044 (linux_wait_for_one_inferior): New function.
13045 (linux_wait): Call it.
13046 (linux_write_memory): Add const.
13047 (initialize_low): Call set_breakpoint_data.
13048 * linux-low.h (struct linux_target_ops): Add breakpoint
13050 * server.c (attach_inferior): Remove extra add_inferior
13052 * server.h: Include mem-break.h. Update inferior.c
13054 * target.c (read_inferior_memory)
13055 (write_inferior_memory): New functions.
13056 * target.h (read_inferior_memory)
13057 (write_inferior_memory): Change macros to prototypes.
13058 (struct target_ops): Update comments. Add const to write_memory
13061 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13063 * linux-low.c (usr_store_inferior_registers): Support
13064 registers which are allowed to fail to store.
13065 * linux-low.h (linux_target_ops): Likewise.
13066 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13067 (ppc_cannot_store_register): FPSCR may not be storable.
13069 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13071 * server.h: Include <string.h> if HAVE_STRING_H.
13072 * ChangeLog: Correct paths in last ChangeLog entry.
13074 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13076 * linux-low.h: Remove obsolete prototypes.
13077 (struct linux_target_ops): New.
13078 (extern the_low_target): New.
13079 * linux-low.c (num_regs, regmap): Remove declarations.
13080 (register_addr): Use the_low_target explicitly.
13081 (fetch_register): Likewise.
13082 (usr_fetch_inferior_registers): Likewise.
13083 (usr_store_inferior_registers): Likewise.
13084 * linux-arm-low.c (num_regs): Remove.
13085 (arm_num_regs): Define.
13086 (arm_regmap): Renamed from regmap, made static.
13087 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13089 (arm_cannot_store_register): Renamed from cannot_store_register,
13091 (the_low_target): New.
13092 * linux-i386-low.c (num_regs): Remove.
13093 (i386_num_regs): Define.
13094 (i386_regmap): Renamed from regmap, made static.
13095 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13097 (i386_cannot_store_register): Renamed from cannot_store_register,
13099 (the_low_target): New.
13100 * linux-ia64-low.c (num_regs): Remove.
13101 (ia64_num_regs): Define.
13102 (ia64_regmap): Renamed from regmap, made static.
13103 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13105 (ia64_cannot_store_register): Renamed from cannot_store_register,
13107 (the_low_target): New.
13108 * linux-m68k-low.c (num_regs): Remove.
13109 (m68k_num_regs): Define.
13110 (m68k_regmap): Renamed from regmap, made static.
13111 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13113 (m68k_cannot_store_register): Renamed from cannot_store_register,
13115 (the_low_target): New.
13116 * linux-mips-low.c (num_regs): Remove.
13117 (mips_num_regs): Define.
13118 (mips_regmap): Renamed from regmap, made static.
13119 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13121 (mips_cannot_store_register): Renamed from cannot_store_register,
13123 (the_low_target): New.
13124 * linux-ppc-low.c (num_regs): Remove.
13125 (ppc_num_regs): Define.
13126 (ppc_regmap): Renamed from regmap, made static.
13127 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13129 (ppc_cannot_store_register): Renamed from cannot_store_register,
13131 (the_low_target): New.
13132 * linux-s390-low.c (num_regs): Remove.
13133 (s390_num_regs): Define.
13134 (s390_regmap): Renamed from regmap, made static.
13135 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13137 (s390_cannot_store_register): Renamed from cannot_store_register,
13139 (the_low_target): New.
13140 * linux-sh-low.c (num_regs): Remove.
13141 (sh_num_regs): Define.
13142 (sh_regmap): Renamed from regmap, made static.
13143 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13145 (sh_cannot_store_register): Renamed from cannot_store_register,
13147 (the_low_target): New.
13148 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13149 (the_low_target): New.
13151 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13153 * Makefile.in: Add stamp-h target.
13154 * configure.in: Create stamp-h.
13155 * configure: Regenerated.
13157 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13159 * inferiors.c: New file.
13160 * target.c: New file.
13161 * target.h: New file.
13162 * Makefile.in: Add target.o and inferiors.o. Update
13164 * linux-low.c (inferior_pid): New static variable,
13165 moved from server.c.
13166 (linux_create_inferior): Renamed from create_inferior.
13167 Call add_inferior. Return 0 on success instead of a PID.
13168 (linux_attach): Renamed from myattach.
13169 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13170 (linux_thread_alive): Renamed from mythread_alive.
13171 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13173 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13174 (regsets_store_inferior_registers): Correct error message.
13175 Add missing ``return 0''.
13176 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13177 (linux_store_registers): Renamed from store_inferior_registers.
13178 (linux_read_memory): Renamed from read_inferior_memory.
13179 (linux_write_memory): Renamed from write_inferior_memory.
13180 (linux_target_ops): New structure.
13181 (initialize_low): Call set_target_ops ().
13182 * remote-utils.c (unhexify): New function.
13183 (hexify): New function.
13184 (input_interrupt): Send signals to ``signal_pid''.
13185 * server.c (inferior_pid): Remove.
13186 (start_inferior): Update create_inferior call.
13187 (attach_inferior): Call add_inferior.
13188 (handle_query): New function.
13189 (main): Call handle_query for `q' packets.
13190 * server.h: Include "target.h". Remove obsolete prototypes.
13191 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13193 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13195 * Makefile.in: Add WARN_CFLAGS. Update configury
13197 * configure.in: Check for <string.h>
13198 * configure: Regenerate.
13199 * config.in: Regenerate.
13200 * gdbreplay.c: Include needed system headers.
13201 (remote_open): Remove strchr prototype.
13202 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13203 * regcache.c (supply_register): Change buf argument to const void *.
13204 (supply_register_by_name): Likewise.
13205 (collect_register): Change buf argument to void *.
13206 (collect_register_by_name): Likewise.
13207 * regcache.h: Add missing prototypes.
13208 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13209 * server.c (handle_query): New function.
13210 (attached): New static variable, moved out of main.
13211 (main): Quiet longjmp clobber warnings.
13212 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13213 * utils.c (error): Remove NORETURN.