1 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
6 * configure.ac: Remove checks for the make program.
7 * configure: Re-generate.
9 2016-10-28 Pedro Alves <palves@redhat.com>
11 * Makefile.in (CXX_DIALECT): Get from configure.
12 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
13 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
14 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
15 * config.in: Regenerate.
16 * configure: Regenerate.
18 2016-10-27 Yao Qi <yao.qi@linaro.org>
20 * linux-low.c (linux_supports_range_stepping): Return true if
21 can_software_single_step return true.
23 2016-10-27 Yao Qi <yao.qi@linaro.org>
25 * inferiors.c (find_inferior_in_random): New function.
26 * inferiors.h (find_inferior_in_random): Declare.
27 * linux-low.c (linux_wait_for_event_filtered): Call
28 find_inferior_in_random instead of find_inferior.
30 2016-10-27 Yao Qi <yao.qi@linaro.org>
32 * linux-low.c (linux_wait_1): If single-step breakpoints are
33 inserted, remove them.
35 2016-10-26 Pedro Alves <palves@redhat.com>
37 * linux-low.c (handle_extended_wait): Link parent/child fork
39 (linux_wait_1): Unlink them.
40 (linux_set_resume_request): Ignore resume requests for
41 already-resumed and unhandled fork child threads.
42 * linux-low.h (struct lwp_info) <fork_relative>: New field.
43 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
45 (handle_v_requests) <vCont>: Don't call require_running.
46 * server.h (in_queued_stop_replies): New declaration.
48 2016-10-24 Yao Qi <yao.qi@linaro.org>
51 * linux-aarch64-low.c (append_insns): Cast the return value to
54 2016-10-10 Yao Qi <yao.qi@linaro.org>
56 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
58 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
60 * target.c (target_supports_multi_process): New function, moved
62 * target.h (target_supports_multi_process): ... here. Remove
65 2016-10-05 Tom Tromey <tom@tromey.com>
68 * tracepoint.c (handle_tracepoint_bkpts): Check
69 ipa_error_tracepoint, not ipa_stopping_tracepoint.
71 2016-10-05 Yao Qi <yao.qi@linaro.org>
73 * configure.srv: Update the path of arm-*.xml files.
75 2016-10-05 Terry Guo <terry.guo@arm.com>
76 Yao Qi <yao.qi@linaro.org>
78 * Makefile.in: Adjust the path of rules.
79 * configure.srv: Update the path of xml files.
80 * regformats/arm-with-iwmmxt.dat: Regenerated.
81 * regformats/arm-with-neon.dat: Likewise.
82 * regformats/arm-with-vfpv2.dat: Likewise.
83 * regformats/arm-with-vfpv3.dat Likewise.
85 2016-09-30 Yao Qi <yao.qi@linaro.org>
88 * target.c (target_stop_and_wait): Don't call
89 target_continue_no_signal, use resume_stop instead.
91 2016-09-26 Yao Qi <yao.qi@linaro.org>
93 * linux-low.c (linux_wait_1): Call debug_exit.
95 2016-09-23 Pedro Alves <palves@redhat.com>
97 * Makefile.in (SFILES): Add common/new-op.c.
98 (OBS): Add common/new-op.o.
101 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
103 * .gitinore: Ignore more files.
105 2016-09-21 Yao Qi <yao.qi@linaro.org>
107 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
110 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
112 * server.c (start_inferior): Call target_mourn_inferior instead of
113 mourn_inferior; pass ptid_t argument to it.
115 (handle_target_event): Likewise.
116 * target.c (target_mourn_inferior): New function.
117 * target.h (mourn_inferior): Delete macro.
119 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
121 * linux-low.c (lwp_is_stepping): New function.
123 2016-09-06 Carl Love <cel@us.ibm.com>
125 * server.c (start_inferior): Fixed comment, requested comment change
126 didn't get updated correctly. Removed reference to ptrace () call as
127 it is only true on Linux systems.
129 2016-09-06 Carl Love <cel@us.ibm.com>
131 * server.c (start_inferior): Do not call
132 function target_post_create_inferior () if the
133 inferior process has already exited.
135 2016-09-05 Pedro Alves <palves@redhat.com>
137 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
138 (COMPILE.pre, CC_LD): Use CXX directly.
139 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
140 * acinclude.m4: Don't include build-with-cxx.m4.
141 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
142 * configure: Regenerate.
144 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
147 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
148 call writing data to own_buf.
150 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
152 * target.c (mywait): Call target_wait instead of
154 (target_wait): New function.
156 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
158 * server.c (start_inferior): New variable 'ptid'. Replace calls
159 to the_target->resume by target_continue{,_no_signal}, depending
161 * target.c (target_stop_and_wait): Call target_continue_no_signal
162 instead of the_target->resume.
163 (target_continue): New function.
165 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
167 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
169 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
172 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
174 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
175 * linux-arm-low.c (ps_get_thread_area): Likewise.
176 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
177 * linux-m68k-low.c (ps_get_thread_area): Likewise.
178 * linux-mips-low.c (ps_get_thread_area): Likewise.
179 * linux-nios2-low.c (ps_get_thread_area): Likewise.
180 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
181 * linux-x86-low.c (ps_get_thread_area): Likewise.
182 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
184 2016-08-19 Pedro Alves <palves@redhat.com>
186 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
188 2016-08-19 Pedro Alves <palves@redhat.com>
190 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
191 comment. Use memcpy instead of casting through unsigned long.
193 2016-08-19 Pedro Alves <palves@redhat.com>
195 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
196 allocating around 0x80000000.
198 2016-08-19 Pedro Alves <palves@redhat.com>
201 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
202 (x32-avx512-linux-ipa.o): New rules.
203 * configure.ac (x86_64-*-linux*): New x32 check.
204 * configure.srv (ipa_x32_linux_regobj): New.
205 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
206 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
208 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
210 * configure: Regenerate.
212 2016-08-09 Pedro Alves <palves@redhat.com>
215 * Makefile.in (OBS): Add signals-state-save-restore.o.
216 (signals-state-save-restore.o): New rule.
217 * config.in: Regenerate.
218 * configure: Regenerate.
219 * linux-low.c: Include "signals-state-save-restore.h".
220 (linux_create_inferior): Call
221 restore_original_signals_state.
222 * server.c: Include "dispositions-save-restore.h".
223 (captured_main): Call save_original_signals_state.
225 2016-08-05 Pedro Alves <palves@redhat.com>
227 * configure: Regenerate.
229 2016-08-04 Yao Qi <yao.qi@linaro.org>
231 * linux-low.c (regsets_fetch_inferior_registers): Check
232 errno is ESRCH or not.
234 2016-08-02 Yao Qi <yao.qi@linaro.org>
236 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
237 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
238 (thread_db_load_search): Update.
239 (try_thread_db_load_1): Don't look for td_ta_event_addr,
240 td_ta_set_event and td_ta_event_getmsg.
242 2016-07-26 Pedro Alves <palves@redhat.com>
245 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
246 of unsigned long for 64-bit registers and use uint32_t instead of
247 unsigned int for 32-bit registers.
249 2016-07-26 Pedro Alves <palves@redhat.com>
251 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
254 2016-07-21 Tom Tromey <tom@tromey.com>
256 * configure: Rebuild.
258 2016-07-21 Yao Qi <yao.qi@linaro.org>
260 * mem-break.c (find_gdb_breakpoint): Cast bp to
261 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
263 2016-07-21 Yao Qi <yao.qi@linaro.org>
265 * server.c (handle_v_requests): Support s and S actions
266 if target_supports_software_single_step return true.
268 2016-07-21 Yao Qi <yao.qi@linaro.org>
270 * linux-low.c (resume_stopped_resumed_lwps): If resume request
271 is resume_step, call maybe_hw_step.
272 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
274 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
276 (proceed_one_lwp): If resume request is resume_step, install
277 reinsert breakpoints and call maybe_hw_step.
279 2016-07-21 Yao Qi <yao.qi@linaro.org>
281 * linux-low.c (proceed_one_lwp): Declare.
282 (linux_resume_one_thread): Remove local variable 'step'.
283 Lift code enqueue signal. Call proceed_one_lwp instead of
284 linux_resume_one_lwp.
286 2016-07-21 Yao Qi <yao.qi@linaro.org>
288 * linux-low.c (linux_resume_one_thread): Call
289 enqueue_pending_signal.
291 2016-07-21 Yao Qi <yao.qi@linaro.org>
293 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
294 * inferiors.c (do_restore_current_thread_cleanup): New function.
295 (make_cleanup_restore_current_thread): Likewise.
296 * linux-low.c (install_software_single_step_breakpoints): Call
297 make_cleanup_restore_current_thread. Switch current_thread to
300 2016-07-21 Yao Qi <yao.qi@linaro.org>
302 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
303 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
304 (clone_one_breakpoint): Likewise.
305 (delete_reinsert_breakpoints): Change parameter to thread.
307 (has_reinsert_breakpoints): Likewise.
308 (uninsert_reinsert_breakpoints): Likewise.
309 (reinsert_reinsert_breakpoints): Likewise.
310 * mem-break.h (set_reinsert_breakpoint): Update declaration.
311 (delete_reinsert_breakpoints): Likewise.
312 (reinsert_reinsert_breakpoints): Likewise.
313 (uninsert_reinsert_breakpoints): Likewise.
314 (has_reinsert_breakpoints): Likewise.
316 2016-07-21 Yao Qi <yao.qi@linaro.org>
318 * inferiors.c (get_thread_process): Make parameter const.
319 * inferiors.h (get_thread_process): Update declaration.
320 * mem-break.c (clone_all_breakpoints): Remove all parameters.
321 Add new parameters child_thread and parent_thread. Callers
323 * mem-break.h (clone_all_breakpoints): Update declaration.
325 2016-07-21 Yao Qi <yao.qi@linaro.org>
327 * mem-break.c (struct breakpoint) <cond_list>: Remove.
328 <command_list, handler>: Remove.
329 (struct gdb_breakpoint): New.
330 (struct other_breakpoint): New.
331 (struct reinsert_breakpoint): New.
332 (is_gdb_breakpoint): New function.
333 (any_persistent_commands): Update command_list if
334 is_gdb_breakpoint returns true.
335 (set_breakpoint): Create breakpoints according to their types.
336 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
337 (set_gdb_breakpoint_1): Likewise.
338 (set_gdb_breakpoint): Likewise.
339 (clear_breakpoint_conditions): Change parameter type to
340 'struct gdb_breakpoint *'.
341 (clear_breakpoint_commands): Likewise.
342 (clear_breakpoint_conditions_and_commands): Likewise.
343 (add_condition_to_breakpoint): Likewise.
344 (add_breakpoint_condition): Likewise.
345 (add_commands_to_breakpoint): Likewise.
346 (check_breakpoints): Check other_breakpoint.
347 (clone_one_breakpoint): Clone breakpopint according to its type.
348 * mem-break.h (struct gdb_breakpoint): Declare.
349 (set_gdb_breakpoint): Update declaration.
350 (clear_breakpoint_conditions_and_commands): Likewise.
351 (add_breakpoint_condition): Likewise.
352 (add_breakpoint_commands): Likewise.
353 * server.c (process_point_options): Change parameter type to
354 'struct gdb_breakpoint *'.
356 2016-07-21 Yao Qi <yao.qi@linaro.org>
358 * mem-break.c (set_breakpoint_at): Rename it to ...
359 (set_breakpoint_type_at): ... it.
360 (set_breakpoint_at): Call set_breakpoint_type_at.
361 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
362 * mem-break.h (set_breakpoint_at): Update comments.
364 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
366 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
368 (nios2_store_gregset): Likewise.
370 2016-07-01 Pedro Alves <palves@redhat.com>
371 Antoine Tremblay <antoine.tremblay@ericsson.com>
373 * linux-low.c: Change interface to take the target lwp_info
374 pointer directly and return void. Handle detaching from a zombie
376 (linux_detach_lwp_callback): New function.
377 (linux_detach): Detach from the leader thread after detaching from
380 2016-06-28 Yao Qi <yao.qi@linaro.org>
382 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
383 for variable new_offset.
384 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
385 (aarch64_ftrace_insn_reloc_cb): Likewise.
386 (aarch64_ftrace_insn_reloc_tb): Likewise.
387 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
388 PRIx64 instead of PRIx32.
390 2016-06-28 Yao Qi <yao.qi@linaro.org>
392 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
393 (the_low_target): Install arm_get_syscall_trapinfo.
395 2016-06-28 Yao Qi <yao.qi@linaro.org>
397 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
399 (the_low_target): Install aarch64_get_syscall_trapinfo.
401 2016-06-28 Yao Qi <yao.qi@linaro.org>
403 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
405 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
406 Remove parameter sysno.
407 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
410 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
412 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
413 (s390_emit_ne_goto): Likewise.
414 (s390_emit_lt_goto): Likewise.
415 (s390_emit_le_goto): Likewise.
416 (s390_emit_gt_goto): Likewise.
417 (s390_emit_ge_goto): Likewise.
418 (s390x_emit_eq_goto): Likewise.
419 (s390x_emit_ne_goto): Likewise.
420 (s390x_emit_lt_goto): Likewise.
421 (s390x_emit_le_goto): Likewise.
422 (s390x_emit_gt_goto): Likewise.
423 (s390x_emit_ge_goto): Likewise.
424 (s390_emit_ops_impl): Mark variable static.
425 (s390x_emit_ops): Likewise.
427 2016-06-17 Yao Qi <yao.qi@linaro.org>
429 * linux-low.c (handle_extended_wait): Call
430 uninsert_reinsert_breakpoints for the parent process. Remove
431 reinsert breakpoints from the child process. Reinsert them to
432 the parent process when vfork is done.
433 * mem-break.c (uninsert_reinsert_breakpoints): New function.
434 (reinsert_reinsert_breakpoints): New function.
435 * mem-break.h (uninsert_reinsert_breakpoints): Declare
436 (reinsert_reinsert_breakpoints): Declare.
438 2016-06-17 Yao Qi <yao.qi@linaro.org>
440 * linux-low.c (handle_extended_wait): If the parent is doing
441 step-over, remove the reinsert breakpoints from the forked child.
443 2016-06-17 Yao Qi <yao.qi@linaro.org>
445 * linux-low.c (unsuspend_all_lwps): Declare.
446 (linux_low_filter_event): If thread exited, call finish_step_over.
447 If step-over is finished, unsuspend other threads.
449 2016-06-17 Yao Qi <yao.qi@linaro.org>
451 * linux-low.c (linux_resume_one_lwp_throw): Assert
452 has_reinsert_breakpoints returns false.
453 * mem-break.c (delete_disabled_breakpoints): Assert
454 bp type isn't reinsert_breakpoint.
456 2016-06-17 Yao Qi <yao.qi@linaro.org>
458 * linux-low.c (maybe_hw_step): New function.
459 (linux_resume_one_lwp_throw): Call maybe_hw_step.
460 (finish_step_over): Switch current_thread to lwp temporarily,
461 and assert has_reinsert_breakpoints returns true.
462 (proceed_one_lwp): Call maybe_hw_step.
463 * mem-break.c (has_reinsert_breakpoints): New function.
464 * mem-break.h (has_reinsert_breakpoints): Declare.
466 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
468 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
470 2016-05-17 Yao Qi <yao.qi@linaro.org>
472 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
473 instead of find_inferior.
475 2016-05-05 Yao Qi <yao.qi@linaro.org>
477 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
478 Initialize res to zero.
480 2016-05-05 Yao Qi <yao.qi@linaro.org>
482 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
485 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
487 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
488 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
489 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
491 2016-04-28 Par Olsson <par.olsson@windriver.com>
492 Simon Marchi <simon.marchi@ericsson.com>
494 * tracepoint.c (write_inferior_int8): New function.
495 (cmd_qtenable_disable): Write enable flag using
498 2016-04-25 Yao Qi <yao.qi@linaro.org>
500 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
501 (need_step_over_p): Return zero if the LWP has pending signals
502 can be delivered on software single step target.
504 2016-04-25 Yao Qi <yao.qi@linaro.org>
506 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
507 return instead of error.
509 2016-04-22 Yao Qi <yao.qi@linaro.org>
511 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
514 2016-04-22 Yao Qi <yao.qi@linaro.org>
516 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
517 signal when stepping over breakpoint with software single
520 2016-04-21 Pedro Alves <palves@redhat.com>
522 * linux-s390-low.c (s390_collect_ptrace_register)
523 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
525 (s390_check_regset): Use void * instead of gdb_byte *.
527 2016-04-20 Pedro Alves <palves@redhat.com>
529 * configure: Renegerate.
531 2016-04-20 Yao Qi <yao.qi@linaro.org>
533 * linux-aarch32-low.c: Include "arch/arm-linux.h".
534 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
536 (arm_store_gregset): Likewise.
538 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
540 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
541 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
542 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
543 (amd64-avx-mpx-linux.c): New rules.
544 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
545 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
546 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
547 (srv_amd64_regobj): Add amd64-avx-mpx.o.
548 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
549 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
550 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
551 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
552 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
553 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
554 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
555 * linux-x86-low.c (x86_linux_read_description): Add case for
556 X86_XSTATE_AVX_MPX_MASK.
557 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
558 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
559 init_registers_i386_avx_mpx_linux.
560 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
561 (initialize_low_tracepoint): Call
562 init_registers_i386_avx_mpx_linux.
563 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
564 (initialize_low_tracepoint): Call
565 init_registers_amd64_avx_mpx_linux.
566 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
567 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
568 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
571 2016-04-18 Pedro Alves <palves@redhat.com>
573 * configure: Regenerate.
575 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
577 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
578 (aarch64_emit_sub): Likewise.
580 2016-04-12 Pedro Alves <palves@redhat.com>
582 * utils.c (prepare_to_throw_exception): Delete.
584 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
586 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
588 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
590 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
592 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
594 * linux-aarch64-ipa.c: Add <elf.h> include.
595 * linux-ppc-ipa.c: Add <elf.h> include.
596 * linux-s390-ipa.c: Add <elf.h> include.
598 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
600 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
601 (get_raw_reg_ptr): Likewise.
602 (get_trace_state_variable_value_ptr): Likewise.
603 (set_trace_state_variable_value_ptr): Likewise.
604 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
607 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
608 Marcin Kościelnicki <koriakin@0x04.net>
611 * linux-ppc-low.c (emit_insns): New function.
612 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
613 (ppc_emit_prologue): New function.
614 (ppc_emit_epilogue): New function.
615 (ppc_emit_add): New function.
616 (ppc_emit_sub): New function.
617 (ppc_emit_mul): New function.
618 (ppc_emit_lsh): New function.
619 (ppc_emit_rsh_signed): New function.
620 (ppc_emit_rsh_unsigned): New function.
621 (ppc_emit_ext): New function.
622 (ppc_emit_zero_ext): New function.
623 (ppc_emit_log_not): New function.
624 (ppc_emit_bit_and): New function.
625 (ppc_emit_bit_or): New function.
626 (ppc_emit_bit_xor): New function.
627 (ppc_emit_bit_not): New function.
628 (ppc_emit_equal): New function.
629 (ppc_emit_less_signed): New function.
630 (ppc_emit_less_unsigned): New function.
631 (ppc_emit_ref): New function.
632 (ppc_emit_const): New function.
633 (ppc_emit_reg): New function.
634 (ppc_emit_pop): New function.
635 (ppc_emit_stack_flush): New function.
636 (ppc_emit_swap): New function.
637 (ppc_emit_stack_adjust): New function.
638 (ppc_emit_call): New function.
639 (ppc_emit_int_call_1): New function.
640 (ppc_emit_void_call_2): New function.
641 (ppc_emit_if_goto): New function.
642 (ppc_emit_goto): New function.
643 (ppc_emit_eq_goto): New function.
644 (ppc_emit_ne_goto): New function.
645 (ppc_emit_lt_goto): New function.
646 (ppc_emit_le_goto): New function.
647 (ppc_emit_gt_goto): New function.
648 (ppc_emit_ge_goto): New function.
649 (ppc_write_goto_address): New function.
650 (ppc_emit_ops_impl): New static variable.
651 (ppc64v1_emit_prologue): New function.
652 (ppc64v2_emit_prologue): New function.
653 (ppc64_emit_epilogue): New function.
654 (ppc64_emit_add): New function.
655 (ppc64_emit_sub): New function.
656 (ppc64_emit_mul): New function.
657 (ppc64_emit_lsh): New function.
658 (ppc64_emit_rsh_signed): New function.
659 (ppc64_emit_rsh_unsigned): New function.
660 (ppc64_emit_ext): New function.
661 (ppc64_emit_zero_ext): New function.
662 (ppc64_emit_log_not): New function.
663 (ppc64_emit_bit_and): New function.
664 (ppc64_emit_bit_or): New function.
665 (ppc64_emit_bit_xor): New function.
666 (ppc64_emit_bit_not): New function.
667 (ppc64_emit_equal): New function.
668 (ppc64_emit_less_signed): New function.
669 (ppc64_emit_less_unsigned): New function.
670 (ppc64_emit_ref): New function.
671 (ppc64_emit_const): New function.
672 (ppc64v1_emit_reg): New function.
673 (ppc64v2_emit_reg): New function.
674 (ppc64_emit_pop): New function.
675 (ppc64_emit_stack_flush): New function.
676 (ppc64_emit_swap): New function.
677 (ppc64v1_emit_call): New function.
678 (ppc64v2_emit_call): New function.
679 (ppc64v1_emit_int_call_1): New function.
680 (ppc64v2_emit_int_call_1): New function.
681 (ppc64v1_emit_void_call_2): New function.
682 (ppc64v2_emit_void_call_2): New function.
683 (ppc64_emit_if_goto): New function.
684 (ppc64_emit_eq_goto): New function.
685 (ppc64_emit_ne_goto): New function.
686 (ppc64_emit_lt_goto): New function.
687 (ppc64_emit_le_goto): New function.
688 (ppc64_emit_gt_goto): New function.
689 (ppc64_emit_ge_goto): New function.
690 (ppc64v1_emit_ops_impl): New static variable.
691 (ppc64v2_emit_ops_impl): New static variable.
692 (ppc_emit_ops): New function.
693 (linux_low_target): Wire in ppc_emit_ops.
695 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
696 Marcin Kościelnicki <koriakin@0x04.net>
699 * Makefile.in: Add powerpc-*-ipa.o
700 * configure.srv: Add ipa_obj for powerpc*-linux.
701 * linux-ppc-ipa.c: New file.
702 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
704 (PPC_FIELD): New macro.
705 (PPC_SEXT): New macro.
706 (PPC_OP6): New macro.
710 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
711 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
712 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
713 (ppc_get_thread_area): New function.
714 (is_elfv2_inferior): New function.
715 (gen_ds_form): New function.
716 (GEN_STD): New macro.
717 (GEN_STDU): New macro.
719 (GEN_LDU): New macro.
720 (gen_d_form): New function.
721 (GEN_ADDI): New macro.
722 (GEN_ADDIS): New macro.
724 (GEN_LIS): New macro.
725 (GEN_ORI): New macro.
726 (GEN_ORIS): New macro.
727 (GEN_LWZ): New macro.
728 (GEN_STW): New macro.
729 (GEN_STWU): New macro.
730 (gen_xfx_form): New function.
731 (GEN_MFSPR): New macro.
732 (GEN_MTSPR): New macro.
733 (GEN_MFCR): New macro.
734 (GEN_MTCR): New macro.
735 (GEN_SYNC): New macro.
736 (GEN_LWSYNC): New macro.
737 (gen_x_form): New function.
740 (GEN_LWARX): New macro.
741 (GEN_STWCX): New macro.
742 (GEN_CMPW): New macro.
743 (gen_md_form): New function.
744 (GEN_RLDICL): New macro.
745 (GEN_RLDICR): New macro.
746 (gen_i_form): New function.
749 (gen_b_form): New function.
750 (GEN_BNE): New macro.
751 (GEN_LOAD): New macro.
752 (GEN_STORE): New macro.
753 (gen_limm): New function.
754 (gen_atomic_xchg): New function.
755 (gen_call): New function.
756 (ppc_relocate_instruction): New function.
757 (ppc_install_fast_tracepoint_jump_pad): New function.
758 (ppc_get_min_fast_tracepoint_insn_len): New function.
759 (ppc_get_ipa_tdesc_idx): New function.
760 (the_low_target): Wire in the new functions.
761 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
763 * linux-ppc-tdesc.h: New file.
765 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
767 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
768 (alloc_jump_pad_buffer): New function.
769 * linux-amd64-ipa.c: Add <sys/mman.h> include.
770 (alloc_jump_pad_buffer): New function.
771 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
772 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
773 (alloc_jump_pad_buffer): New function.
774 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
775 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
776 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
777 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
779 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
781 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
782 * linux-amd64-ipa.c: Likewise.
783 * linux-i386-ipa.c: Likewise.
784 * linux-s390-ipa.c: Likewise.
785 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
786 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
787 set_trace_state_variable_value_ptr.
788 (struct ipa_sym_addresses): Likewise.
789 (symbol_list): Likewise.
790 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
791 accessing gdb_collect directly.
792 (gdb_collect_ptr_type): New typedef.
793 (get_raw_reg_ptr_type): New typedef.
794 (get_trace_state_variable_value_ptr_type): New typedef.
795 (set_trace_state_variable_value_ptr_type): New typedef.
796 (gdb_collect_ptr): New global.
797 (get_raw_reg_ptr): New global.
798 (get_trace_state_variable_value_ptr): New global.
799 (set_trace_state_variable_value_ptr): New global.
800 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
801 accessing get_raw_reg directly.
802 (get_get_tsv_func_addr): Likewise for
803 get_trace_state_variable_value_ptr.
804 (get_set_tsv_func_addr): Likewise for
805 set_trace_state_variable_value_ptr.
806 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
808 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
810 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
812 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
814 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
816 (relocate_instruction): Remove own_buf.
817 * server.c (own_buf): Make global.
818 (handle_v_requests): Make global.
819 * server.h (own_buf): New declaration.
820 (handle_v_requests): New prototype.
822 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
825 * linux-s390-low.c (add_insns): New function.
826 (s390_emit_prologue): New function.
827 (s390_emit_epilogue): New function.
828 (s390_emit_add): New function.
829 (s390_emit_sub): New function.
830 (s390_emit_mul): New function.
831 (s390_emit_lsh): New function.
832 (s390_emit_rsh_signed): New function.
833 (s390_emit_rsh_unsigned): New function.
834 (s390_emit_ext): New function.
835 (s390_emit_log_not): New function.
836 (s390_emit_bit_and): New function.
837 (s390_emit_bit_or): New function.
838 (s390_emit_bit_xor): New function.
839 (s390_emit_bit_not): New function.
840 (s390_emit_equal): New function.
841 (s390_emit_less_signed): New function.
842 (s390_emit_less_unsigned): New function.
843 (s390_emit_ref): New function.
844 (s390_emit_if_goto): New function.
845 (s390_emit_goto): New function.
846 (s390_write_goto_address): New function.
847 (s390_emit_litpool): New function.
848 (s390_emit_const): New function.
849 (s390_emit_call): New function.
850 (s390_emit_reg): New function.
851 (s390_emit_pop): New function.
852 (s390_emit_stack_flush): New function.
853 (s390_emit_zero_ext): New function.
854 (s390_emit_swap): New function.
855 (s390_emit_stack_adjust): New function.
856 (s390_emit_set_r2): New function.
857 (s390_emit_int_call_1): New function.
858 (s390_emit_void_call_2): New function.
859 (s390_emit_eq_goto): New function.
860 (s390_emit_ne_goto): New function.
861 (s390_emit_lt_goto): New function.
862 (s390_emit_le_goto): New function.
863 (s390_emit_gt_goto): New function.
864 (s390_emit_ge_goto): New function.
865 (s390x_emit_prologue): New function.
866 (s390x_emit_epilogue): New function.
867 (s390x_emit_add): New function.
868 (s390x_emit_sub): New function.
869 (s390x_emit_mul): New function.
870 (s390x_emit_lsh): New function.
871 (s390x_emit_rsh_signed): New function.
872 (s390x_emit_rsh_unsigned): New function.
873 (s390x_emit_ext): New function.
874 (s390x_emit_log_not): New function.
875 (s390x_emit_bit_and): New function.
876 (s390x_emit_bit_or): New function.
877 (s390x_emit_bit_xor): New function.
878 (s390x_emit_bit_not): New function.
879 (s390x_emit_equal): New function.
880 (s390x_emit_less_signed): New function.
881 (s390x_emit_less_unsigned): New function.
882 (s390x_emit_ref): New function.
883 (s390x_emit_if_goto): New function.
884 (s390x_emit_const): New function.
885 (s390x_emit_call): New function.
886 (s390x_emit_reg): New function.
887 (s390x_emit_pop): New function.
888 (s390x_emit_stack_flush): New function.
889 (s390x_emit_zero_ext): New function.
890 (s390x_emit_swap): New function.
891 (s390x_emit_stack_adjust): New function.
892 (s390x_emit_int_call_1): New function.
893 (s390x_emit_void_call_2): New function.
894 (s390x_emit_eq_goto): New function.
895 (s390x_emit_ne_goto): New function.
896 (s390x_emit_lt_goto): New function.
897 (s390x_emit_le_goto): New function.
898 (s390x_emit_gt_goto): New function.
899 (s390x_emit_ge_goto): New function.
900 (s390_emit_ops): New function.
901 (struct linux_target_ops): Fill in emit_ops hook.
903 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
906 * Makefile.in: Add s390 IPA files.
907 * configure.srv: Build IPA for s390.
908 * linux-s390-ipa.c: New file.
909 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
910 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
911 (tdesc_s390_linux32): Likewise.
912 (init_registers_s390_linux32v1): Likewise.
913 (tdesc_s390_linux32v1): Likewise.
914 (init_registers_s390_linux32v2): Likewise.
915 (tdesc_s390_linux32v2): Likewise.
916 (init_registers_s390_linux64): Likewise.
917 (tdesc_s390_linux64): Likewise.
918 (init_registers_s390_linux64v1): Likewise.
919 (tdesc_s390_linux64v1): Likewise.
920 (init_registers_s390_linux64v2): Likewise.
921 (tdesc_s390_linux64v2): Likewise.
922 (init_registers_s390_te_linux64): Likewise.
923 (tdesc_s390_te_linux64): Likewise.
924 (init_registers_s390_vx_linux64): Likewise.
925 (tdesc_s390_vx_linux64): Likewise.
926 (init_registers_s390_tevx_linux64): Likewise.
927 (tdesc_s390_tevx_linux64): Likewise.
928 (init_registers_s390x_linux64): Likewise.
929 (tdesc_s390x_linux64): Likewise.
930 (init_registers_s390x_linux64v1): Likewise.
931 (tdesc_s390x_linux64v1): Likewise.
932 (init_registers_s390x_linux64v2): Likewise.
933 (tdesc_s390x_linux64v2): Likewise.
934 (init_registers_s390x_te_linux64): Likewise.
935 (tdesc_s390x_te_linux64): Likewise.
936 (init_registers_s390x_vx_linux64): Likewise.
937 (tdesc_s390x_vx_linux64): Likewise.
938 (init_registers_s390x_tevx_linux64): Likewise.
939 (tdesc_s390x_tevx_linux64): Likewise.
940 (have_hwcap_s390_vx): New static variable.
941 (s390_arch_setup): Fill have_hwcap_s390_vx.
942 (s390_get_thread_area): New function.
943 (s390_ft_entry_gpr_esa): New const.
944 (s390_ft_entry_gpr_zarch): New const.
945 (s390_ft_entry_misc): New const.
946 (s390_ft_entry_fr): New const.
947 (s390_ft_entry_vr): New const.
948 (s390_ft_main_31): New const.
949 (s390_ft_main_64): New const.
950 (s390_ft_exit_fr): New const.
951 (s390_ft_exit_vr): New const.
952 (s390_ft_exit_misc): New const.
953 (s390_ft_exit_gpr_esa): New const.
954 (s390_ft_exit_gpr_zarch): New const.
955 (append_insns): New function.
956 (s390_relocate_instruction): New function.
957 (s390_install_fast_tracepoint_jump_pad): New function.
958 (s390_get_min_fast_tracepoint_insn_len): New function.
959 (s390_get_ipa_tdesc_idx): New function.
960 (struct linux_target_ops): Wire in the above functions.
961 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
962 * linux-s390-tdesc.h: New file.
964 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
966 * linux-s390-low.c (s390_supports_tracepoints): New function.
967 (struct linux_target_ops): Fill supports_tracepoints hook.
969 2016-03-18 Yao Qi <yao.qi@linaro.org>
971 * linux-low.c (lwp_signal_can_be_delivered): New function.
972 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
974 2016-03-18 Yao Qi <yao.qi@linaro.org>
976 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
977 0 if signal is enqueued. Remove 'signal' from one debugging
978 message. Move one debugging message to some lines below.
979 Remove code setting 'signal' to 0.
981 2016-03-18 Yao Qi <yao.qi@linaro.org>
983 * linux-low.c (linux_low_filter_event): Remove redundant
984 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
986 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
988 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
989 (struct linux_target_ops): Wire in the above.
991 2016-03-03 Yao Qi <yao.qi@linaro.org>
993 * linux-low.c: Update comments to start_step_over.
995 2016-03-03 Yao Qi <yao.qi@linaro.org>
998 * linux-low.c (handle_extended_wait): Set child suspended
999 if event_lwp->bp_reinsert isn't zero.
1001 2016-03-02 Yao Qi <yao.qi@linaro.org>
1003 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1004 enqueue_pending_signal.
1006 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1008 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1011 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1013 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1014 (s390_regmap_3264) [!__s390x__]: New global.
1015 (s390_collect_ptrace_register): Skip map entries containing -1.
1016 (s390_supply_ptrace_register): Ditto.
1017 (s390_fill_gprs_high): New function.
1018 (s390_store_gprs_high): New function.
1019 (s390_regsets): Add NT_S390_HIGH_GPRS.
1020 (s390_get_hwcap): Enable on 31-bit.
1021 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1022 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1023 Detect NT_S390_HIGH_GPRS.
1024 (s390_usrregs_info_3264): Enable on 31-bit.
1025 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1026 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1028 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1031 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1032 * configure.srv: Ditto.
1033 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1034 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1035 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1036 (init_registers_amd64_linux): Remove prototype.
1037 (tdesc_amd64_linux): Remove declaration.
1038 (get_ipa_tdesc): New function.
1039 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1040 initialize remaining tdescs.
1041 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1042 (init_registers_i386_linux): Remove prototype.
1043 (tdesc_i386_linux): Remove declaration.
1044 (get_ipa_tdesc): New function.
1045 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1046 initialize remaining tdescs.
1047 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1048 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1049 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1050 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1051 (x86_get_ipa_tdesc_idx): New function.
1052 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1053 * linux-x86-tdesc.h: New file.
1054 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1055 (target_get_ipa_tdesc_idx): New macro.
1056 * tracepoint.c (ipa_tdesc_idx): New macro.
1057 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1058 (symbol_list): Add ipa_tdesc_idx.
1059 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1060 (ipa_tdesc): Remove.
1061 (ipa_tdesc_idx): New variable.
1062 (get_context_regcache): Use get_ipa_tdesc.
1063 (gdb_collect): Ditto.
1065 * tracepoint.h (get_ipa_tdesc): New prototype.
1066 (ipa_tdesc): Remove.
1068 2016-02-24 Pedro Alves <palves@redhat.com>
1070 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1071 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1072 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1073 Factor out common code between the USE_SIGTRAP_SIGINFO and
1074 !USE_SIGTRAP_SIGINFO blocks.
1075 (linux_low_filter_event): Call save_stop_reason instead of
1076 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1078 (linux_wait_1): Update comments.
1080 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1082 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1083 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1084 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1085 ppc_insert_point, ppc_remove_point.
1087 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1089 * linux-s390-low.c (s390_supports_z_point_type): New function.
1090 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1092 2016-02-16 Yao Qi <yao.qi@linaro.org>
1094 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1095 PC. Get pc from regcache_read_pc.
1097 2016-02-12 Yao Qi <yao.qi@linaro.org>
1099 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1100 or linux_get_pc_32bit.
1101 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1103 2016-02-12 Yao Qi <yao.qi@linaro.org>
1105 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1106 arm_linux_get_next_pcs_fixup.
1108 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1110 * tracepoint.c (x_tracepoint_action_download): Change
1111 write_inferior_data_ptr to write_inferior_data_pointer.
1112 (cmd_qtstart): Likewise.
1113 (write_inferior_data_ptr): Remove.
1114 (download_agent_expr): Change write_inferior_data_ptr to
1115 write_inferior_data_pointer.
1116 (download_tracepoint_1): Likewise.
1117 (download_tracepoint): Likewise.
1118 (download_trace_state_variables): Likewise.
1120 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1121 Marcin Kościelnicki <koriakin@0x04.net>
1123 * tracepoint.c (struct tracepoint_action_ops): Remove.
1124 (struct tracepoint_action): Remove ops.
1125 (m_tracepoint_action_download, r_tracepoint_action_download)
1126 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1127 size and offset accordingly.
1128 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1129 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1130 (tracepoint_action_send, tracepoint_action_download): New functions.
1131 Helpers for trace action handlers.
1132 (add_tracepoint_action): Remove setup actions ops.
1133 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1135 2016-02-10 Yao Qi <yao.qi@linaro.org>
1137 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1139 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1141 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1143 * configure: Regenerate.
1145 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1147 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1148 void * to gdb_byte *.
1149 * linux-low.c (siginfo_fixup): Likewise.
1150 (linux_xfer_siginfo): Likewise.
1151 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1153 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1155 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1157 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1159 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1161 * linux-x86-low.c [__x86_64__]: Include
1162 "nat/amd64-linux-siginfo.h".
1163 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1164 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1165 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1166 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1167 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1168 (cpt_si_fd, si_timerid, si_overrun): Move from
1169 nat/amd64-linux-siginfo.c.
1170 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1172 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1174 * server.c (skip_to_semicolon): Remove.
1175 (process_point_options): Use strchrnul instead of
1178 2016-01-26 Yao Qi <yao.qi@linaro.org>
1180 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1181 * linux-low.c (install_software_single_step_breakpoints): Don't
1182 call regcache_read_pc.
1183 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1186 2016-01-26 Yao Qi <yao.qi@linaro.org>
1188 * linux-low.c (install_software_single_step_breakpoints): Call
1189 regcache_read_pc instead of get_pc.
1191 2016-01-26 Yao Qi <yao.qi@linaro.org>
1193 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1194 (unblock_async_io): Rename to ...
1195 (block_unblock_async_io): ... it. New function.
1196 (enable_async_io): Don't install SIGIO handler. Unblock it
1198 (disable_async_io): Don't ignore SIGIO. Block it instead.
1199 (initialize_async_io): Install SIGIO handler. Don't call
1202 2016-01-26 Yao Qi <yao.qi@linaro.org>
1204 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1205 first character is '\003', call *the_target->request_interrupt.
1207 2016-01-25 Yao Qi <yao.qi@linaro.org>
1209 * remote-utils.c (new_thread_notify): Remove.
1210 (dead_thread_notify): Likewise.
1211 * remote-utils.h (new_thread_notify): Remove declaration.
1212 (dead_thread_notify): Likewise.
1214 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1216 * gdb.trace/pending.exp: Fix expected message on continue.
1218 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1220 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1221 it works properly on big-endian machines where sizeof (CORE_ADDR)
1224 2016-01-21 Pedro Alves <palves@redhat.com>
1226 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1227 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1228 * configure: Regenerate.
1230 2016-01-21 Yao Qi <yao.qi@linaro.org>
1232 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1233 is_thumb and set it according to CPSR saved on the stack.
1234 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1235 arm_sigreturn_next_pc.
1237 2016-01-18 Yao Qi <yao.qi@linaro.org>
1239 * linux-low.c (linux_set_pc_64bit): New function.
1240 (linux_get_pc_64bit): New function.
1241 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1243 * linux-sparc-low.c (debug_threads): Remove declaration.
1244 (sparc_get_pc): Remove.
1245 (the_low_target): Use linux_get_pc_64bit instead of
1247 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1248 (the_low_target): Use linux_get_pc_64bit and
1251 2016-01-18 Yao Qi <yao.qi@linaro.org>
1253 * linux-arm-low.c (debug_threads): Remove declaration.
1254 (arm_get_pc, arm_set_pc): Remove.
1255 (the_low_target): Use linux_get_pc_32bit and
1257 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1258 (the_low_target): Use linux_get_pc_32bit and
1260 * linux-cris-low.c (debug_threads): Remove declaration.
1261 (cris_get_pc, cris_set_pc,): Remove.
1262 (the_low_target): Use linux_get_pc_32bit and
1264 * linux-crisv32-low.c (debug_threads): Remove declaration.
1265 (cris_get_pc, cris_set_pc): Remove.
1266 (the_low_target): Use linux_get_pc_32bit and
1268 * linux-low.c: Include inttypes.h.
1269 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1270 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1271 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1272 (the_low_target): Use linux_get_pc_32bit and
1274 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1275 (the_low_target): Use linux_get_pc_32bit and
1277 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1278 (the_low_target): Use linux_get_pc_32bit and
1280 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1281 (the_low_target): Use linux_get_pc_32bit and
1283 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1284 (the_low_target): Use linux_get_pc_32bit and
1287 2016-01-18 Gary Benson <gbenson@redhat.com>
1289 * configure.ac (AC_FUNC_FORK): New check.
1290 * config.in: Regenerate.
1291 * configure: Likewise.
1293 2016-01-14 Yao Qi <yao.qi@linaro.org>
1295 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1296 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1297 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1298 arm_get_next_pcs_ctor.
1300 2016-01-12 Josh Stone <jistone@redhat.com>
1301 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1303 * inferiors.h: Include "gdb_vecs.h".
1304 (struct process_info): Add syscalls_to_catch.
1305 * inferiors.c (remove_process): Free syscalls_to_catch.
1306 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1307 syscall_return stops.
1308 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1309 * server.c (handle_general_set): Handle QCatchSyscalls.
1310 (handle_query): Report support for QCatchSyscalls.
1311 * target.h (struct target_ops): Add supports_catch_syscall.
1312 (target_supports_catch_syscall): New macro.
1313 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1314 (struct lwp_info): Add syscall_state.
1315 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1316 Maintain syscall_state and syscalls_to_catch across exec.
1317 (get_syscall_trapinfo): New function, proxy to the_low_target.
1318 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1319 (linux_low_filter_event): Toggle syscall_state entry/return for
1320 syscall traps, and set it ignored for all others.
1321 (gdb_catching_syscalls_p): New function.
1322 (gdb_catch_this_syscall_p): New function.
1323 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1324 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1325 (linux_supports_catch_syscall): New function.
1326 (linux_target_ops): Install it.
1327 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1328 (the_low_target): Install it.
1330 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1332 * acinclude.m4: Include new ../warning.m4 file.
1333 * configure: Regenerated.
1334 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1336 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1338 * ax.c (is_goto_target): Mark static.
1339 * linux-low.c (register_addr): Likewise.
1340 (linux_fetch_registers, linux_store_registers): Likewise.
1341 * mem-break.c (any_persistent_commands): Fix old prototype.
1342 (add_commands_to_breakpoint): Mark static.
1343 * regcache.c (find_register_by_name): Delete unused func.
1344 * remote-utils.c (hex_or_minus_one): Mark static.
1345 * server.c (monitor_show_help): Mark static.
1346 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1347 handle_v_requests): Likewise.
1349 2016-01-12 Pedro Alves <palves@redhat.com>
1351 Remove use of the registered trademark symbol throughout.
1353 2016-01-08 Yao Qi <yao.qi@linaro.org>
1355 * remote-utils.c (getpkt): If c is '\003', call target hook
1358 2016-01-06 Yao Qi <yao.qi@linaro.org>
1360 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1361 linux-aarch32-low.c.
1362 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1363 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1364 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1365 (thumb2_breakpoint): Declare.
1366 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1367 linux-aarch32-low.h.
1368 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1369 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1370 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1372 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1374 * gdbreplay.c (gdbreplay_version): Change copyright year in
1376 * server.c (gdbserver_version): Likewise.
1378 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1380 * server.c (crc32_table): Delete.
1381 (crc32): Use libiberty's xcrc32 function.
1383 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1385 * lynx-low.c (lynx_delete_thread_callback): New function.
1386 (lynx_mourn): Properly delete our process and all of its
1387 threads. Remove call to clear_inferiors.
1389 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1391 * target.c (thread_search_callback): Add check that
1392 the thread_stopped target callback is not NULL before
1395 2015-12-21 Yao Qi <yao.qi@linaro.org>
1397 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1400 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1402 * server.c (handle_query): Call target_supports_software_single_step.
1404 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1406 * linux-low.c (single_step): New function.
1407 (linux_resume_one_lwp_throw): Call single_step.
1408 (start_step_over): Likewise.
1410 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1412 * Makefile.in (SFILES): Append arch/arm-linux.c,
1413 arch/arm-get-next-pcs.c.
1414 (arm-linux.o): New rule.
1415 (arm-get-next-pcs.o): New rule.
1416 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1418 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1419 to linux-aarch32-low.c.
1420 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1421 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1422 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1423 (thumb2_breakpoint_len): Likewise.
1424 (arm_is_thumb_mode): Make non-static.
1425 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1426 from linux-aarch32-low.c.
1427 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1428 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1429 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1430 (thumb2_breakpoint_len): Likewise.
1431 (arm_is_thumb_mode): New declaration.
1432 * linux-arm-low.c: Include arch/arm-linux.h
1433 aarch/arm-get-next-pcs.h, sys/syscall.h.
1434 (get_next_pcs_ops): New struct.
1435 (get_next_pcs_addr_bits_remove): New function.
1436 (get_next_pcs_is_thumb): New function.
1437 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1438 (arm_sigreturn_next_pc): Likewise.
1439 (get_next_pcs_syscall_next_pc): Likewise.
1440 (arm_gdbserver_get_next_pcs): Likewise.
1441 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1443 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1444 * server.h: Include gdb_vecs.h.
1446 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1448 * Makefile.in (SFILES): Append common/common-regcache.c.
1449 (OBS): Append common-regcache.o.
1450 (common-regcache.o): New rule.
1451 * regcache.c (init_register_cache): Initialize cache to
1453 (regcache_raw_read_unsigned): New function.
1454 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1455 register_status enum.
1457 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1459 * linux-aarch64-low.c (the_low_targets): Rename
1460 breakpoint_reinsert_addr to get_next_pcs.
1461 * linux-arm-low.c (the_low_targets): Likewise.
1462 * linux-bfin-low.c (the_low_targets): Likewise.
1463 * linux-cris-low.c (the_low_targets): Likewise.
1464 * linux-crisv32-low.c (the_low_targets): Likewise.
1465 * linux-low.c (can_software_single_step): Likewise.
1466 (install_software_single_step_breakpoints): New function.
1467 (start_step_over): Use install_software_single_step_breakpoints.
1468 * linux-low.h: New CORE_ADDR vector.
1469 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1471 * linux-mips-low.c (the_low_targets): Likewise.
1472 * linux-nios2-low.c (the_low_targets): Likewise.
1473 * linux-sparc-low.c (the_low_targets): Likewise.
1475 2015-12-17 Pedro Alves <palves@redhat.com>
1477 * linux-low.c (linux_kill_one_lwp): Remove references to
1479 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1481 (linux_init_signals): Delete.
1482 (initialize_low): Adjust.
1483 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1485 2015-12-16 Pedro Alves <palves@redhat.com>
1487 * configure.ac (compiler warning flags): When testing a
1488 -Wno-foo option, check whether -Wfoo works instead.
1489 * configure: Regenerate.
1491 2015-12-11 Don Breazeal <donb@codesourcery.com>
1493 * server.c (process_serial_event): Don't exit from gdbserver
1494 in remote mode if there are still active inferiors.
1496 2015-12-11 Yao Qi <yao.qi@linaro.org>
1498 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1499 arm_breakpoint_at if the process is 32-bit.
1501 2015-12-11 Yao Qi <yao.qi@linaro.org>
1503 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1506 2015-12-07 Yao Qi <yao.qi@linaro.org>
1508 * configure.srv: Append arm.o to srv_tgtobj for
1509 aarch64*-*-linux* target.
1510 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1511 from linux-arm-low.c.
1512 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1513 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1514 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1515 (thumb2_breakpoint_len): Likewise.
1516 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1517 (arm_breakpoint_kinds): Likewise.
1518 (arm_breakpoint_kind_from_pc): Likewise.
1519 (arm_sw_breakpoint_from_kind): Likewise.
1520 (arm_breakpoint_kind_from_current_state): Likewise.
1521 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1522 (arm_sw_breakpoint_from_kind): Declare.
1523 (arm_breakpoint_kind_from_current_state): Declare.
1524 (arm_breakpoint_at): Declare.
1525 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1526 arm_sw_breakpoint_from_kind if process is 32-bit.
1527 (aarch64_breakpoint_kind_from_pc): New function.
1528 (aarch64_breakpoint_kind_from_current_state): New function.
1529 (the_low_target): Initialize fields breakpoint_kind_from_pc
1530 and breakpoint_kind_from_current_state.
1531 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1532 linux-aarch32-low.c.
1533 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1534 (arm_breakpoint, arm_breakpoint_len): Likewise.
1535 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1536 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1537 (arm_is_thumb_mode): Likewise.
1538 (arm_breakpoint_at): Likewise.
1539 (arm_breakpoint_kind_from_pc): Likewise.
1540 (arm_sw_breakpoint_from_kind): Likewise.
1541 (arm_breakpoint_kind_from_current_state): Likewise.
1544 2015-08-04 Yao Qi <yao.qi@linaro.org>
1546 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1547 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1548 * server.c (extended_protocol): Remove "static".
1549 * server.h (extended_protocol): Declare it.
1551 2015-12-04 Josh Stone <jistone@redhat.com>
1553 * target.h (struct target_ops) <arch_setup>: Rename to ...
1554 (struct target_ops) <post_create_inferior>: ... this.
1555 (target_arch_setup): Rename to ...
1556 (target_post_create_inferior): ... this, calling post_create_inferior.
1557 * server.c (start_inferior): Update target_arch_setup calls to
1558 target_post_create_inferior.
1559 * linux-low.c (linux_low_ptrace_options): Forward declare.
1560 (linux_arch_setup): Update its comment for general use.
1561 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1562 (struct linux_target_ops): Use linux_post_create_inferior.
1563 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1564 to post_create_inferior.
1565 * nto-low.c (struct nto_target_ops): Likewise.
1566 * spu-low.c (struct spu_target_ops): Likewise.
1567 * win32-low.c (struct win32_target_ops): Likewise.
1569 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1571 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1573 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1575 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1576 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1577 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1578 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1579 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1580 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1581 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1582 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1583 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1584 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1585 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1586 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1588 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1590 * linux-low.c (linux_look_up_symbols): Don't call
1591 linux_supports_traceclone.
1592 * linux-low.h (thread_db_init): Remove use_events argument.
1593 * thread-db.c (thread_db_use_event): Remove global variable.
1594 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1595 (struct thread_db) <td_create_bp>: Remove field.
1596 (thread_db_create_event): Remove function.
1597 (thread_db_enable_reporting): Likewise.
1598 (find_one_thread): Don't check for thread_db_use_events.
1599 (attach_thread): Likewise.
1600 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1601 (try_thread_db_load_1): Don't check for thread_db_use_events.
1602 (thread_db_init): Remove use_events argument and thread events
1604 (remove_thread_event_breakpoints): Remove function.
1605 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1607 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1609 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1611 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1612 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1613 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1614 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1615 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1617 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1619 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1620 * linux-low.c (can_hardware_single_step): Use
1621 supports_hardware_single_step.
1622 (can_software_single_step): New function.
1623 (start_step_over): Call can_software_single_step.
1624 (linux_supports_hardware_single_step): New function.
1625 (struct target_ops) <supports_software_single_step>: Initialize.
1626 * linux-low.h (struct linux_target_ops)
1627 <supports_hardware_single_step>: Initialize.
1628 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1629 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1630 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1631 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1632 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1633 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1634 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1635 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1636 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1637 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1639 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1640 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1642 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1643 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1644 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1646 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1647 * target.h (struct target_ops): <supports_software_single_step>:
1649 (target_supports_software_single_step): New macro.
1651 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1653 * linux-low.c (linux_wait_1): Fix pc advance condition.
1654 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1655 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1657 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1659 * linux-arm-low.c (arm_is_thumb_mode): New function.
1660 (arm_breakpoint_at): Use arm_is_thumb_mode.
1661 (arm_breakpoint_kind_from_current_state): New function.
1662 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1664 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1665 (linux_breakpoint_kind_from_current_state): New function.
1666 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1667 * linux-low.h (struct linux_target_ops)
1668 <breakpoint_kind_from_current_state>: New field.
1669 * target.h (struct target_ops): Likewise.
1670 (target_breakpoint_kind_from_current_state): New macro.
1672 2015-11-30 Pedro Alves <palves@redhat.com>
1674 * linux-low.c (linux_resume): Wake up the event loop before
1677 2015-11-30 Pedro Alves <palves@redhat.com>
1679 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1681 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1683 * target.c (struct thread_search): New structure.
1684 (thread_search_callback): New function.
1685 (prev_general_thread): New global.
1686 (prepare_to_access_memory, done_accessing_memory): New functions.
1687 * target.h (prepare_to_access_memory, done_accessing_memory):
1688 Replace macros with function declarations.
1690 2015-11-30 Pedro Alves <palves@redhat.com>
1693 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1694 report TARGET_WAITKIND_NO_RESUMED.
1695 * remote-utils.c (prepare_resume_reply): Handle
1696 TARGET_WAITKIND_NO_RESUMED.
1697 * server.c (report_no_resumed): New global.
1698 (handle_query) <qSupported>: Handle "no-resumed+". Report
1699 "no-resumed+" support.
1700 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1701 return error if the client doesn't support no-resumed events.
1702 (push_stop_notification): New function.
1703 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1704 events if the client supports them.
1706 2015-11-30 Pedro Alves <palves@redhat.com>
1708 * linux-low.c (thread_still_has_status_pending_p): Don't check
1710 (lwp_resumed): New function.
1711 (status_pending_p_callback): Return early if the LWP is not
1712 supposed to be resumed.
1714 2015-11-30 Pedro Alves <palves@redhat.com>
1716 * linux-low.c (handle_extended_wait): Assert that the LWP's
1717 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1718 thread create events, leave the new child's status pending.
1719 (linux_low_filter_event): If GDB wants to hear about thread exit
1720 events, leave the LWP marked dead and don't delete it.
1721 (linux_wait_for_event_filtered): Don't check for thread exit.
1722 (filter_exit_event): New function.
1723 (linux_wait_1): Use it, when returning an exit event.
1724 (linux_resume_one_lwp_throw): Assert that the LWP's
1725 waitstatus is TARGET_WAITKIND_IGNORE.
1726 * remote-utils.c (prepare_resume_reply): Handle
1727 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1728 * server.c (report_thread_events): New global.
1729 (handle_general_set): Handle QThreadEvents.
1730 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1731 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1732 TARGET_WAITKIND_THREAD_EXITED.
1733 * server.h (report_thread_events): Declare.
1735 2015-11-30 Pedro Alves <palves@redhat.com>
1737 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1738 the thread's last_resume_kind was resume_stop.
1740 2015-11-30 Pedro Alves <palves@redhat.com>
1742 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1745 2015-11-30 Pedro Alves <palves@redhat.com>
1747 * server.c (handle_v_requests): Handle vCtrlC.
1749 2015-11-30 Pedro Alves <palves@redhat.com>
1751 * gdbthread.h (find_any_thread_of_pid): Declare.
1752 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1754 * server.c (handle_query): If current_thread is NULL, look for
1755 another thread of the selected process.
1757 2015-11-26 Daniel Colascione <dancol@dancol.org>
1758 Simon Marchi <simon.marchi@ericsson.com>
1760 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1761 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1763 * target.h (struct target_ops) <thread_name>: New field.
1764 (target_thread_name): New macro.
1766 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1768 * regcache.h (regcache_invalidate_pid): Add declaration.
1769 * regcache.c (regcache_invalidate_pid): New function, extracted
1770 from regcache_invalidate.
1771 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1772 Add trivial documentation comment.
1773 * lynx-low.c: Use regcache_invalidate_pid instead of
1774 regcache_invalidate.
1776 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1778 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1779 and Elf64_auxv_t if the target is Android.
1781 2015-11-22 Doug Evans <xdje42@gmail.com>
1783 * target.h: #include <sys/types.h>.
1785 2015-11-19 Pedro Alves <palves@redhat.com>
1787 * linux-low.c (linux_process_qsupported): Change prototype.
1789 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1791 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1792 and adjust to loop over all features.
1793 * server.c (handle_query) <qSupported>: Adjust to call
1794 target_process_qsupported once, passing it a vector of unprocessed
1796 * target.h (struct target_ops) <process_qsupported>: Change
1798 (target_process_qsupported): Adjust.
1800 2015-11-19 Pedro Alves <palves@redhat.com>
1802 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1804 * configure: Regenerate.
1806 2015-11-19 Pedro Alves <palves@redhat.com>
1808 * configure: Regenerate.
1810 2015-11-19 Yao Qi <yao.qi@linaro.org>
1812 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1815 2015-11-19 Yao Qi <yao.qi@linaro.org>
1817 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1818 (struct aarch64_operand): Move enum out.
1820 2015-11-19 Yao Qi <yao.qi@linaro.org>
1822 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1823 struct user_fpsimd_state *.
1824 (aarch64_store_fpregset): Likewise.
1826 2015-11-19 Yao Qi <yao.qi@linaro.org>
1828 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1829 struct user_pt_regs *.
1830 (aarch64_store_gregset): Likewise.
1832 2015-11-18 Pedro Alves <palves@redhat.com>
1834 * Makefile.in (all_object_files): Add $IPA_OBJS.
1836 2015-11-17 Pedro Alves <palves@redhat.com>
1838 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1839 GDB_SIGNAL_0 and gdb_signal_to_string.
1841 2015-11-17 Pedro Alves <palves@redhat.com>
1843 * win32-low.c (handle_output_debug_string): Remove parameter.
1844 (win32_kill): Remove our_status local and adjust call to
1845 handle_output_debug_string.
1846 (get_child_debug_event): Adjust call to
1847 handle_output_debug_string.
1849 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1851 * linux-mips-low.c (mips_fill_gregset): Add cast.
1852 (mips_store_gregset): Likewise.
1853 (mips_fill_fpregset): Likewise.
1854 (mips_store_fpregset): Likewise.
1856 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1858 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1861 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1863 * linux-mips-low.c (mips_linux_new_thread): Change type of
1864 watch_type to enum target_hw_bp_type.
1866 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1868 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1869 Change return type to arm_hwbp_type.
1871 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1873 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1874 (arm_store_gregset): Likewise.
1875 * linux-arm-low.c (arm_get_hwcap): Likewise.
1876 (arm_read_description): Likewise.
1878 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1880 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1882 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1884 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1885 (ppc_fill_vsxregset): Likewise.
1886 (ppc_store_vsxregset): Likewise.
1887 (ppc_fill_vrregset): Likewise.
1888 (ppc_store_vrregset): Likewise.
1889 (ppc_fill_evrregset): Likewise.
1890 (ppc_store_evrregset): Likewise.
1892 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1894 * linux-ppc-low.c (ppc_usrregs_info): Remove
1895 forward-declaration.
1896 (ppc_arch_setup): Move lower in file.
1898 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1900 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1901 (ps_pdwrite): Likewise.
1903 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1905 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1906 to after assert checks.
1908 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1910 * proc-service.c (ps_pdread): Add/adjust casts.
1911 (ps_pdwrite): Add/adjust casts.
1913 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1915 * server.c (handle_search_memory_1): Cast return value of
1918 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1920 * server.c (write_qxfer_response): Change type of data to
1923 2015-10-29 Pedro Alves <palves@redhat.com>
1925 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1927 2015-10-29 Pedro Alves <palves@redhat.com>
1929 * tracepoint.c (clear_installed_tracepoints): Add casts.
1931 2015-10-29 Pedro Alves <palves@redhat.com>
1933 * server.c (handle_v_cont, process_serial_event): Add enum
1934 gdb_signal casts to signal parsing code.
1936 2015-10-29 Pedro Alves <palves@redhat.com>
1938 * linux-low.h (NULL_REGSET): Define.
1939 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1940 * linux-arm-low.c (arm_regsets): Likewise.
1941 * linux-crisv32-low.c (cris_regsets): Likewise.
1942 * linux-m68k-low.c (m68k_regsets): Likewise.
1943 * linux-mips-low.c (mips_regsets): Likewise.
1944 * linux-nios2-low.c (nios2_regsets): Likewise.
1945 * linux-ppc-low.c (ppc_regsets): Likewise.
1946 * linux-s390-low.c (s390_regsets): Likewise.
1947 * linux-sh-low.c (sh_regsets): Likewise.
1948 * linux-sparc-low.c (sparc_regsets): Likewise.
1949 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1950 * linux-tile-low.c (tile_regsets): Likewise.
1951 * linux-x86-low.c (x86_regsets): Likewise.
1952 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1954 2015-10-29 Pedro Alves <palves@redhat.com>
1956 * linux-low.h (NULL_REGSET): Define.
1957 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1958 * linux-arm-low.c (arm_regsets): Likewise.
1959 * linux-crisv32-low.c (cris_regsets): Likewise.
1960 * linux-m68k-low.c (m68k_regsets): Likewise.
1961 * linux-mips-low.c (mips_regsets): Likewise.
1962 * linux-nios2-low.c (nios2_regsets): Likewise.
1963 * linux-ppc-low.c (ppc_regsets): Likewise.
1964 * linux-s390-low.c (s390_regsets): Likewise.
1965 * linux-sh-low.c (sh_regsets): Likewise.
1966 * linux-sparc-low.c (sparc_regsets): Likewise.
1967 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1968 * linux-tile-low.c (tile_regsets): Likewise.
1969 * linux-x86-low.c (x86_regsets): Likewise.
1970 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1972 2015-10-26 Doug Evans <dje@google.com>
1974 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1976 2015-10-26 Doug Evans <dje@google.com>
1978 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1980 2015-10-26 Doug Evans <dje@google.com>
1982 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1984 (attach_thread, find_new_threads_callback): Ditto.
1986 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1988 * mem-break.h (set_breakpoint_data): Remove.
1990 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1992 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1993 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1994 (initialize_low): Remove set_breakpoint_data call.
1995 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1996 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1997 (initialize_low): Remove set_breakpoint_data call.
1998 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1999 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2000 (initialize_low): Remove set_breakpoint_data call.
2002 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2004 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2005 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2006 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2007 * target.h (target_breakpoint_kind_from_pc): New macro.
2009 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2011 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2012 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2013 the default breakpoint kind.
2015 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2017 * linux-arm-low.c (arm_supports_z_point_type): Add software
2020 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2022 * linux-arm-low.c: Refactor breakpoint definitions.
2023 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2024 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2026 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2028 * Makefile.in: Add arm.c/o.
2029 * configure.srv: Likewise.
2030 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2031 (arm_breakpoint_kind_from_pc): New function.
2032 (arm_sw_breakpoint_from_kind): Return proper kind.
2033 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2035 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2037 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2039 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2040 (struct raw_breakpoint) <size>: Remove.
2041 (struct raw_breakpoint) <kind>: Add.
2042 (bp_size): New function.
2043 (bp_opcode): Likewise.
2044 (find_raw_breakpoint_at): Adjust for kind.
2045 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2046 (remove_memory_breakpoint): Adjust for kind call bp_size.
2047 (set_raw_breakpoint_at): Adjust for kind.
2048 (set_breakpoint): Likewise.
2049 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2050 (delete_raw_breakpoint): Adjust for kind.
2051 (delete_breakpoint): Likewise.
2052 (find_gdb_breakpoint): Likewise.
2053 (set_gdb_breakpoint_1): Likewise.
2054 (set_gdb_breakpoint): Likewise.
2055 (delete_gdb_breakpoint_1): Likewise.
2056 (delete_gdb_breakpoint): Likewise.
2057 (uninsert_raw_breakpoint): Likewise.
2058 (reinsert_raw_breakpoint): Likewise.
2059 (set_breakpoint_data): Remove.
2060 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2061 (check_mem_read): Adjust for kind call bp_size.
2062 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2063 (clone_one_breakpoint): Adjust for kind.
2064 * mem-break.h (set_gdb_breakpoint): Likewise.
2065 (delete_gdb_breakpoint): Likewise.
2066 * server.c (process_serial_event): Likewise.
2068 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2070 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2071 (struct linux_target_ops) <breakpoint>: Remove.
2072 (struct linux_target_ops) <breakpoint_len>: Remove.
2073 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2074 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2075 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2076 (arm_sw_breakpoint_from_kind): New function.
2077 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2078 (struct linux_target_ops) <breakpoint>: Remove.
2079 (struct linux_target_ops) <breakpoint_len>: Remove.
2080 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2081 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2082 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2083 (struct linux_target_ops) <breakpoint>: Remove.
2084 (struct linux_target_ops) <breakpoint_len>: Remove.
2085 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2086 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2087 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2088 (struct linux_target_ops) <breakpoint>: Remove.
2089 (struct linux_target_ops) <breakpoint_len>: Remove.
2090 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2091 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2092 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2093 and sw_breakpoint_from_kind to increment the pc.
2094 (linux_breakpoint_kind_from_pc): New function.
2095 (linux_sw_breakpoint_from_kind): New function.
2096 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2097 (initialize_low): Call breakpoint_kind_from_pc and
2098 sw_breakpoint_from_kind to replace breakpoint_data/len.
2099 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2101 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2102 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2103 (struct linux_target_ops) <breakpoint>: Remove.
2104 (struct linux_target_ops) <breakpoint_len>: Remove.
2105 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2106 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2107 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2108 (struct linux_target_ops) <breakpoint>: Remove.
2109 (struct linux_target_ops) <breakpoint_len>: Remove.
2110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2111 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2112 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2113 (struct linux_target_ops) <breakpoint>: Remove.
2114 (struct linux_target_ops) <breakpoint_len>: Remove.
2115 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2116 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2117 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2118 (struct linux_target_ops) <breakpoint>: Remove.
2119 (struct linux_target_ops) <breakpoint_len>: Remove.
2120 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2121 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2122 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2123 (struct linux_target_ops) <breakpoint>: Remove.
2124 (struct linux_target_ops) <breakpoint_len>: Remove.
2125 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2126 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2127 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2128 (struct linux_target_ops) <breakpoint>: Remove.
2129 (struct linux_target_ops) <breakpoint_len>: Remove.
2130 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2131 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2132 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2133 (struct linux_target_ops) <breakpoint>: Remove.
2134 (struct linux_target_ops) <breakpoint_len>: Remove.
2135 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2136 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2137 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2138 (struct linux_target_ops) <breakpoint>: Remove.
2139 (struct linux_target_ops) <breakpoint_len>: Remove.
2140 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2141 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2142 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2143 (struct linux_target_ops) <breakpoint>: Remove.
2144 (struct linux_target_ops) <breakpoint_len>: Remove.
2145 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2146 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2147 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2148 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2149 (struct linux_target_ops) <breakpoint>: Remove.
2150 (struct linux_target_ops) <breakpoint_len>: Remove.
2151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2153 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2154 (struct linux_target_ops) <breakpoint>: Remove.
2155 (struct linux_target_ops) <breakpoint_len>: Remove.
2156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2159 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2161 * linux-cris-low.c (cris_get_pc): Remove void arg.
2163 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2165 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2168 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2170 * inferiors.c (thread_pid_matches_callback): New function.
2171 (find_thread_process): New function.
2172 (remove_thread): Reset current_thread.
2173 (remove_process): Assert threads have been removed first.
2175 2015-10-15 Yao Qi <yao.qi@linaro.org>
2177 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2179 (aarch64_remove_point): Likewise.
2180 * regcache.c (regcache_register_size): New function.
2182 2015-10-12 Yao Qi <yao.qi@linaro.org>
2184 * linux-aarch64-low.c: Update all callers as emit_load_store
2185 is renamed to aarch64_emit_load_store.
2187 2015-10-12 Yao Qi <yao.qi@linaro.org>
2189 * linux-aarch64-low.c: Update all callers of function renaming
2190 from emit_insn to aarch64_emit_insn.
2192 2015-10-12 Yao Qi <yao.qi@linaro.org>
2194 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2195 arch/aarch64-insn.h.
2196 (struct aarch64_memory_operand): Likewise.
2198 (emit_insn): Move to arch/aarch64-insn.c.
2199 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2200 (emit_load_store): Move to arch/aarch64-insn.c.
2201 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2202 (can_encode_int32): Remove.
2204 2015-10-12 Yao Qi <yao.qi@linaro.org>
2206 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2207 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2208 (aarch64_relocate_instruction): Likewise.
2209 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2210 (struct aarch64_insn_visitor): Likewise.
2212 2015-10-12 Yao Qi <yao.qi@linaro.org>
2214 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2215 (struct aarch64_insn_visitor): New.
2216 (struct aarch64_insn_relocation_data): New.
2217 (aarch64_ftrace_insn_reloc_b): New function.
2218 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2219 (aarch64_ftrace_insn_reloc_cb): Likewise.
2220 (aarch64_ftrace_insn_reloc_tb): Likewise.
2221 (aarch64_ftrace_insn_reloc_adr): Likewise.
2222 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2223 (aarch64_ftrace_insn_reloc_others): Likewise.
2225 (aarch64_relocate_instruction): Use visitor.
2227 2015-10-12 Yao Qi <yao.qi@linaro.org>
2229 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2230 int. Add argument buf.
2231 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2232 aarch64_relocate_instruction.
2234 2015-10-12 Yao Qi <yao.qi@linaro.org>
2236 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2237 argument insn. Remove local variable insn. Don't call
2239 (aarch64_install_fast_tracepoint_jump_pad): Call
2242 2015-09-30 Yao Qi <yao.qi@linaro.org>
2244 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2245 (emit_load_store_pair): Likewise.
2247 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2249 * dll.c (match_dll): Add cast(s).
2250 (unloaded_dll): Likewise.
2251 * linux-low.c (second_thread_of_pid_p): Likewise.
2252 (delete_lwp_callback): Likewise.
2253 (count_events_callback): Likewise.
2254 (select_event_lwp_callback): Likewise.
2255 (linux_set_resume_request): Likewise.
2256 * server.c (accumulate_file_name_length): Likewise.
2257 (emit_dll_description): Likewise.
2258 (handle_qxfer_threads_worker): Likewise.
2259 (visit_actioned_threads): Likewise.
2260 * thread-db.c (any_thread_of): Likewise.
2261 * tracepoint.c (same_process_p): Likewise.
2262 (match_blocktype): Likewise.
2263 (build_traceframe_info_xml): Likewise.
2265 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2267 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2269 (gdb_unparse_agent_expr): Likewise.
2270 * hostio.c (require_data): Likewise.
2271 (handle_pread): Likewise.
2272 * linux-low.c (disable_regset): Likewise.
2273 (fetch_register): Likewise.
2274 (store_register): Likewise.
2275 (get_dynamic): Likewise.
2276 (linux_qxfer_libraries_svr4): Likewise.
2277 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2278 (set_fast_tracepoint_jump): Likewise.
2279 (uninsert_fast_tracepoint_jumps_at): Likewise.
2280 (reinsert_fast_tracepoint_jumps_at): Likewise.
2281 (validate_inserted_breakpoint): Likewise.
2282 (clone_agent_expr): Likewise.
2283 * regcache.c (init_register_cache): Likewise.
2284 * remote-utils.c (putpkt_binary_1): Likewise.
2285 (decode_M_packet): Likewise.
2286 (decode_X_packet): Likewise.
2287 (look_up_one_symbol): Likewise.
2288 (relocate_instruction): Likewise.
2289 (monitor_output): Likewise.
2290 * server.c (handle_search_memory): Likewise.
2291 (handle_qxfer_exec_file): Likewise.
2292 (handle_qxfer_libraries): Likewise.
2293 (handle_qxfer): Likewise.
2294 (handle_query): Likewise.
2295 (handle_v_cont): Likewise.
2296 (handle_v_run): Likewise.
2297 (captured_main): Likewise.
2298 * target.c (write_inferior_memory): Likewise.
2299 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2300 * tracepoint.c (init_trace_buffer): Likewise.
2301 (add_tracepoint_action): Likewise.
2302 (add_traceframe): Likewise.
2303 (add_traceframe_block): Likewise.
2304 (cmd_qtdpsrc): Likewise.
2305 (cmd_qtdv): Likewise.
2306 (cmd_qtstatus): Likewise.
2307 (response_source): Likewise.
2308 (response_tsv): Likewise.
2309 (cmd_qtnotes): Likewise.
2310 (gdb_collect): Likewise.
2311 (initialize_tracepoint): Likewise.
2313 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2315 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2316 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2317 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2319 (enum aarch64_condition_codes): New enum.
2320 (w0): New static global.
2323 (struct aarch64_memory_operand) <type>: New
2324 MEMORY_OPERAND_POSTINDEX type.
2325 (postindex_memory_operand): New helper function.
2326 (emit_ret): New function.
2327 (emit_load_store_pair): New function, factored out of emit_stp
2328 with support for MEMORY_OPERAND_POSTINDEX.
2329 (emit_stp): Rewrite using emit_load_store_pair.
2330 (emit_ldp): New function.
2331 (emit_load_store): Likewise.
2332 (emit_ldr): Mention post-index instruction in comment.
2333 (emit_ldrh): New function.
2334 (emit_ldrb): New function.
2335 (emit_ldrsw): Mention post-index instruction in comment.
2336 (emit_str): Likewise.
2337 (emit_subs): New function.
2338 (emit_cmp): Likewise.
2339 (emit_and): Likewise.
2340 (emit_orr): Likewise.
2341 (emit_orn): Likewise.
2342 (emit_eor): Likewise.
2343 (emit_mvn): Likewise.
2344 (emit_lslv): Likewise.
2345 (emit_lsrv): Likewise.
2346 (emit_asrv): Likewise.
2347 (emit_mul): Likewise.
2348 (emit_sbfm): Likewise.
2349 (emit_sbfx): Likewise.
2350 (emit_ubfm): Likewise.
2351 (emit_ubfx): Likewise.
2352 (emit_csinc): Likewise.
2353 (emit_cset): Likewise.
2354 (emit_nop): Likewise.
2355 (emit_ops_insns): New helper function.
2356 (emit_pop): Likewise.
2357 (emit_push): Likewise.
2358 (aarch64_emit_prologue): New function.
2359 (aarch64_emit_epilogue): Likewise.
2360 (aarch64_emit_add): Likewise.
2361 (aarch64_emit_sub): Likewise.
2362 (aarch64_emit_mul): Likewise.
2363 (aarch64_emit_lsh): Likewise.
2364 (aarch64_emit_rsh_signed): Likewise.
2365 (aarch64_emit_rsh_unsigned): Likewise.
2366 (aarch64_emit_ext): Likewise.
2367 (aarch64_emit_log_not): Likewise.
2368 (aarch64_emit_bit_and): Likewise.
2369 (aarch64_emit_bit_or): Likewise.
2370 (aarch64_emit_bit_xor): Likewise.
2371 (aarch64_emit_bit_not): Likewise.
2372 (aarch64_emit_equal): Likewise.
2373 (aarch64_emit_less_signed): Likewise.
2374 (aarch64_emit_less_unsigned): Likewise.
2375 (aarch64_emit_ref): Likewise.
2376 (aarch64_emit_if_goto): Likewise.
2377 (aarch64_emit_goto): Likewise.
2378 (aarch64_write_goto_address): Likewise.
2379 (aarch64_emit_const): Likewise.
2380 (aarch64_emit_call): Likewise.
2381 (aarch64_emit_reg): Likewise.
2382 (aarch64_emit_pop): Likewise.
2383 (aarch64_emit_stack_flush): Likewise.
2384 (aarch64_emit_zero_ext): Likewise.
2385 (aarch64_emit_swap): Likewise.
2386 (aarch64_emit_stack_adjust): Likewise.
2387 (aarch64_emit_int_call_1): Likewise.
2388 (aarch64_emit_void_call_2): Likewise.
2389 (aarch64_emit_eq_goto): Likewise.
2390 (aarch64_emit_ne_goto): Likewise.
2391 (aarch64_emit_lt_goto): Likewise.
2392 (aarch64_emit_le_goto): Likewise.
2393 (aarch64_emit_gt_goto): Likewise.
2394 (aarch64_emit_ge_got): Likewise.
2395 (aarch64_emit_ops_impl): New static global variable.
2396 (aarch64_emit_ops): New target function, return
2397 &aarch64_emit_ops_impl.
2398 (struct linux_target_ops): Install it.
2400 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2402 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2403 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2405 * linux-aarch64-ipa.c: New file.
2406 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2408 (aarch64_get_thread_area): New target method.
2409 (extract_signed_bitfield): New helper function.
2410 (aarch64_decode_ldr_literal): New function.
2411 (enum aarch64_opcodes): New enum.
2412 (struct aarch64_register): New struct.
2413 (struct aarch64_operand): New struct.
2414 (x0): New static global.
2423 (aarch64_register): New helper function.
2424 (register_operand): Likewise.
2425 (immediate_operand): Likewise.
2426 (struct aarch64_memory_operand): New struct.
2427 (offset_memory_operand): New helper function.
2428 (preindex_memory_operand): Likewise.
2429 (enum aarch64_system_control_registers): New enum.
2430 (ENCODE): New macro.
2431 (emit_insn): New helper function.
2432 (emit_b): New function.
2433 (emit_bcond): Likewise.
2434 (emit_cb): Likewise.
2435 (emit_tb): Likewise.
2436 (emit_blr): Likewise.
2437 (emit_stp): Likewise.
2438 (emit_ldp_q_offset): Likewise.
2439 (emit_stp_q_offset): Likewise.
2440 (emit_load_store): Likewise.
2441 (emit_ldr): Likewise.
2442 (emit_ldrsw): Likewise.
2443 (emit_str): Likewise.
2444 (emit_ldaxr): Likewise.
2445 (emit_stxr): Likewise.
2446 (emit_stlr): Likewise.
2447 (emit_data_processing_reg): Likewise.
2448 (emit_data_processing): Likewise.
2449 (emit_add): Likewise.
2450 (emit_sub): Likewise.
2451 (emit_mov): Likewise.
2452 (emit_movk): Likewise.
2453 (emit_mov_addr): Likewise.
2454 (emit_mrs): Likewise.
2455 (emit_msr): Likewise.
2456 (emit_sevl): Likewise.
2457 (emit_wfe): Likewise.
2458 (append_insns): Likewise.
2459 (can_encode_int32_in): New helper function.
2460 (aarch64_relocate_instruction): New function.
2461 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2462 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2463 (struct linux_target_ops): Install aarch64_get_thread_area,
2464 aarch64_install_fast_tracepoint_jump_pad and
2465 aarch64_get_min_fast_tracepoint_insn_len.
2467 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2469 * Makefile.in (aarch64-insn.o): New rule.
2470 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2472 2015-09-21 Yao Qi <yao.qi@linaro.org>
2474 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2476 2015-09-21 Yao Qi <yao.qi@linaro.org>
2478 * tracepoint.c (max_jump_pad_size): Remove.
2480 2015-09-18 Yao Qi <yao.qi@linaro.org>
2482 * linux-aarch64-low.c: Don't include sys/uio.h.
2483 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2485 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2487 * tracepoint.c (eval_result_type): Change prototype.
2488 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2490 2015-09-15 Pedro Alves <palves@redhat.com>
2492 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2493 Check whether to report exec events instead of checking whether
2494 multiprocess is enabled.
2496 2015-09-15 Pedro Alves <palves@redhat.com>
2499 * remote-utils.c (prepare_resume_reply): Merge
2500 TARGET_WAITKIND_VFORK_DONE switch case with the
2501 TARGET_WAITKIND_FORKED case.
2503 2015-09-15 Yao Qi <yao.qi@linaro.org>
2505 * server.c (handle_query): Check string comparison using
2506 "else if" instead of "if".
2508 2015-09-15 Yao Qi <yao.qi@linaro.org>
2510 * server.c (vCont_supported): New global variable.
2511 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2512 matches. Append ";vContSupported+" to own_buf.
2513 (handle_v_requests): Append ";s;S" to own_buf if target supports
2514 hardware single step or vCont_supported is false.
2515 (capture_main): Set vCont_supported to zero.
2517 2015-09-15 Yao Qi <yao.qi@linaro.org>
2519 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2521 (linux_supports_hardware_single_step): ... New function.
2522 (linux_target_ops): Update.
2523 * lynx-low.c (lynx_target_ops): Set field
2524 supports_hardware_single_step to target_can_do_hardware_single_step.
2525 * nto-low.c (nto_target_ops): Likewise.
2526 * spu-low.c (spu_target_ops): Likewise.
2527 * win32-low.c (win32_target_ops): Likewise.
2528 * target.c (target_can_do_hardware_single_step): New function.
2529 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2530 Remove. <supports_hardware_single_step>: New field.
2531 (target_supports_conditional_breakpoints): Remove.
2532 (target_supports_hardware_single_step): New macro.
2533 (target_can_do_hardware_single_step): Declare.
2534 * server.c (handle_query): Use target_supports_hardware_single_step
2535 instead of target_supports_conditional_breakpoints.
2537 2015-09-15 Yao Qi <yao.qi@linaro.org>
2539 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2541 (struct linux_target_ops the_low_target): Install
2542 aarch64_linux_siginfo_fixup.
2544 2015-09-11 Don Breazeal <donb@codesourcery.com>
2545 Luis Machado <lgustavo@codesourcery.com>
2547 * linux-low.c (linux_mourn): Static declaration.
2548 (linux_arch_setup): Move in front of
2549 handle_extended_wait.
2550 (linux_arch_setup_thread): New function.
2551 (handle_extended_wait): Handle exec events. Call
2552 linux_arch_setup_thread. Make event_lwp argument a
2553 pointer-to-a-pointer.
2554 (check_zombie_leaders): Do not check stopped threads.
2555 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2556 (linux_low_filter_event): Add lwp and thread for exec'ing
2557 non-leader thread if leader thread has been deleted.
2558 Refactor code into linux_arch_setup_thread and call it.
2559 Pass child lwp pointer by reference to handle_extended_wait.
2560 (linux_wait_for_event_filtered): Update comment.
2561 (linux_wait_1): Prevent clobbering exec event status.
2562 (linux_supports_exec_events): New function.
2563 (linux_target_ops) <supports_exec_events>: Initialize new member.
2564 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2566 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2567 * server.c (report_exec_events): New global variable.
2568 (handle_query): Handle qSupported query for exec-events feature.
2569 (captured_main): Initialize report_exec_events.
2570 * server.h (report_exec_events): Declare new global variable.
2571 * target.h (struct target_ops) <supports_exec_events>: New
2573 (target_supports_exec_events): New macro.
2574 * win32-low.c (win32_target_ops) <supports_exec_events>:
2575 Initialize new member.
2577 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2579 * linux-low.c (linux_low_enable_btrace): Remove.
2580 (linux_target_ops): Replace linux_low_enable_btrace with
2581 linux_enable_btrace.
2583 2015-09-03 Yao Qi <yao.qi@linaro.org>
2585 * linux-aarch64-low.c (aarch64_insert_point): Call
2586 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2589 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2591 * linux-low.c (check_stopped_by_breakpoint): Use
2592 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2594 2015-08-27 Pedro Alves <palves@redhat.com>
2596 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2598 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2600 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2601 the XNEW-family equivalent.
2602 (compile_bytecodes): Likewise.
2603 * dll.c (loaded_dll): Likewise.
2604 * event-loop.c (append_callback_event): Likewise.
2605 (create_file_handler): Likewise.
2606 (create_file_event): Likewise.
2607 * hostio.c (handle_open): Likewise.
2608 * inferiors.c (add_thread): Likewise.
2609 (add_process): Likewise.
2610 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2611 * linux-arm-low.c (arm_new_process): Likewise.
2612 (arm_new_thread): Likewise.
2613 * linux-low.c (add_to_pid_list): Likewise.
2614 (linux_add_process): Likewise.
2615 (handle_extended_wait): Likewise.
2616 (add_lwp): Likewise.
2617 (enqueue_one_deferred_signal): Likewise.
2618 (enqueue_pending_signal): Likewise.
2619 (linux_resume_one_lwp_throw): Likewise.
2620 (linux_resume_one_thread): Likewise.
2621 (linux_read_memory): Likewise.
2622 (linux_write_memory): Likewise.
2623 * linux-mips-low.c (mips_linux_new_process): Likewise.
2624 (mips_linux_new_thread): Likewise.
2625 (mips_add_watchpoint): Likewise.
2626 * linux-x86-low.c (initialize_low_arch): Likewise.
2627 * lynx-low.c (lynx_add_process): Likewise.
2628 * mem-break.c (set_raw_breakpoint_at): Likewise.
2629 (set_breakpoint): Likewise.
2630 (add_condition_to_breakpoint): Likewise.
2631 (add_commands_to_breakpoint): Likewise.
2632 (clone_agent_expr): Likewise.
2633 (clone_one_breakpoint): Likewise.
2634 * regcache.c (new_register_cache): Likewise.
2635 * remote-utils.c (look_up_one_symbol): Likewise.
2636 * server.c (queue_stop_reply): Likewise.
2637 (start_inferior): Likewise.
2638 (queue_stop_reply_callback): Likewise.
2639 (handle_target_event): Likewise.
2640 * spu-low.c (fetch_ppc_memory): Likewise.
2641 (store_ppc_memory): Likewise.
2642 * target.c (set_target_ops): Likewise.
2643 * thread-db.c (thread_db_load_search): Likewise.
2644 (try_thread_db_load_1): Likewise.
2645 * tracepoint.c (add_tracepoint): Likewise.
2646 (add_tracepoint_action): Likewise.
2647 (create_trace_state_variable): Likewise.
2648 (cmd_qtdpsrc): Likewise.
2649 (cmd_qtro): Likewise.
2650 (add_while_stepping_state): Likewise.
2651 * win32-low.c (child_add_thread): Likewise.
2652 (get_image_name): Likewise.
2654 2015-08-25 Yao Qi <yao.qi@linaro.org>
2656 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2658 2015-08-25 Yao Qi <yao.qi@linaro.org>
2660 * Makefile.in (aarch64-linux.o): New rule.
2661 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2663 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2664 (aarch64_init_debug_reg_state): Make it extern.
2665 (aarch64_linux_prepare_to_resume): Remove.
2667 2015-08-25 Yao Qi <yao.qi@linaro.org>
2669 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2670 lwp_arch_private_info and ptid_of_lwp.
2672 2015-08-25 Yao Qi <yao.qi@linaro.org>
2674 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2675 Find proc_info by find_process_pid. All callers updated.
2677 2015-08-25 Yao Qi <yao.qi@linaro.org>
2679 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2681 (debug_reg_change_callback): Remove.
2682 (aarch64_notify_debug_reg_change): Remove.
2684 2015-08-25 Yao Qi <yao.qi@linaro.org>
2686 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2687 Call current_lwp_ptid.
2689 2015-08-25 Yao Qi <yao.qi@linaro.org>
2691 * linux-aarch64-low.c (debug_reg_change_callback): Use
2694 2015-08-25 Yao Qi <yao.qi@linaro.org>
2696 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2698 2015-08-25 Yao Qi <yao.qi@linaro.org>
2700 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2702 2015-08-25 Yao Qi <yao.qi@linaro.org>
2704 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2707 2015-08-25 Yao Qi <yao.qi@linaro.org>
2709 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2711 (debug_reg_change_callback): Remove argument entry and add argument
2712 lwp. Remove local variable thread. Don't print thread id in the
2713 debugging output. Don't check whether pid of thread equals to pid.
2714 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2715 iterate_over_lwps instead find_inferior.
2717 2015-08-24 Pedro Alves <palves@redhat.com>
2719 * inferiors.c (get_first_process): New function.
2720 * inferiors.h (get_first_process): New declaration.
2721 * remote-utils.c (read_ptid): Default to the first process in the
2722 list, instead of to the current thread's process.
2724 2015-08-24 Pedro Alves <palves@redhat.com>
2726 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2727 * event-loop.c: Likewise.
2728 * remote-utils.c: Likewise.
2729 * tracepoint.c: Likewise.
2731 2015-08-24 Pedro Alves <palves@redhat.com>
2733 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2736 2015-08-21 Pedro Alves <palves@redhat.com>
2738 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2739 instead of literal 1.
2741 2015-08-21 Pedro Alves <palves@redhat.com>
2743 * tdesc.c (default_description): Explicitly zero-initialize.
2745 2015-08-21 Pedro Alves <palves@redhat.com>
2748 * inferiors.c (remove_thread): Discard any pending stop reply for
2750 * server.c (remove_all_on_match_pid): Rename to ...
2751 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2753 (discard_queued_stop_replies): Change parameter to a ptid. Now
2755 (handle_v_kill, kill_inferior_callback, captured_main)
2756 (process_serial_event): Adjust.
2757 * server.h (discard_queued_stop_replies): Declare.
2759 2015-08-21 Pedro Alves <palves@redhat.com>
2761 * linux-low.c (wait_for_sigstop): Always switch to no thread
2762 selected if the previously current thread dies.
2763 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2764 process instead of the current thread's.
2765 * remote-utils.c (input_interrupt): Don't check if there's no
2767 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2768 current thread to the general thread fails, error out.
2769 (handle_qxfer_auxv, handle_qxfer_libraries)
2770 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2771 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2772 (handle_query): Check if there's a thread selected instead of
2773 checking whether there's any thread in the thread list.
2774 (handle_qxfer_threads, handle_qxfer_btrace)
2775 (handle_qxfer_btrace_conf): Don't error out early if there's no
2776 thread in the thread list.
2777 (handle_v_cont, myresume): Don't set the current thread to the
2779 (process_serial_event) <Hg handling>: Also set thread_id if the
2780 previous general thread is still alive.
2781 (process_serial_event) <g/G handling>: If setting the current
2782 thread to the general thread fails, error out.
2783 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2784 thread's lwp instead of the current thread's.
2785 * target.c (set_desired_thread): If the desired thread was not
2786 found, leave the current thread pointing to NULL. Return an int
2787 (boolean) indicating success.
2788 * target.h (set_desired_thread): Change return type to int.
2790 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2792 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2793 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2795 (ps_get_thread_area): New function.
2797 2015-08-19 Gary Benson <gbenson@redhat.com>
2799 * hostio.c (handle_pread): Do not attempt to read more data
2800 than hostio_reply_with_data can fit in a packet.
2802 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2804 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2806 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2808 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2810 2015-08-06 Pedro Alves <palves@redhat.com>
2812 * tracepoint.c (expr_eval_result): Now an int.
2814 2015-08-06 Pedro Alves <palves@redhat.com>
2816 * gdbthread.h (struct regcache): Forward declare.
2817 (struct thread_info) <regcache_data>: Now a struct regcache
2819 * inferiors.c (inferior_regcache_data)
2820 (set_inferior_regcache_data): Now work with struct regcache
2822 * inferiors.h (struct regcache): Forward declare.
2823 (inferior_regcache_data, set_inferior_regcache_data): Now work
2824 with struct regcache pointers.
2825 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2826 (free_register_cache_thread): Remove struct regcache pointer
2829 2015-08-06 Pedro Alves <palves@redhat.com>
2831 * server.c (captured_main): On error, print the exception message
2832 to stderr, and if run_once is set, throw a quit.
2834 2015-08-06 Pedro Alves <palves@redhat.com>
2836 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2839 2015-08-06 Pedro Alves <palves@redhat.com>
2841 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2842 reading beyond the passed in buffer length.
2844 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2846 * tracepoint.c (symbol_list) <required>: Remove.
2848 2015-08-06 Pedro Alves <palves@redhat.com>
2850 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2851 count if stopping and suspending threads.
2852 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2853 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2854 (linux_detach): Complete an ongoing step-over.
2855 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2857 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2858 (linux_wait_1): If passing a signal to the inferior after
2859 finishing a step-over, unsuspend and re-resume all lwps. If we
2860 see a single-step event but the thread should be continuing, don't
2861 pass the trap to gdb.
2862 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2863 internal_error instead of gdb_assert.
2864 (enqueue_pending_signal): New function.
2865 (check_ptrace_stopped_lwp_gone): Add debug output.
2866 (start_step_over): Use internal_error instead of gdb_assert.
2867 (complete_ongoing_step_over): New function.
2868 (linux_resume_one_thread): Don't resume a suspended thread.
2869 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2872 2015-08-06 Pedro Alves <palves@redhat.com>
2874 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2875 (linux_thread_alive): Use lwp_is_marked_dead.
2876 (extended_event_reported): Delete.
2877 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2878 instead of extended_event_reported.
2879 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2881 (lwp_is_marked_dead): New function.
2882 (lwp_running): Use lwp_is_marked_dead.
2883 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2886 2015-08-06 Pedro Alves <palves@redhat.com>
2888 * linux-low.c (linux_wait_1): Move fork event output out of the
2889 !report_to_gdb check. Pass event_child->waitstatus to
2890 target_waitstatus_to_string instead of ourstatus.
2892 2015-08-04 Yao Qi <yao.qi@linaro.org>
2894 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2895 if current_thread is 32 bit.
2897 2015-08-04 Yao Qi <yao.qi@linaro.org>
2899 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2900 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2901 * server.c (extended_protocol): Remove "static".
2902 * server.h (extended_protocol): Declare it.
2904 2015-08-04 Yao Qi <yao.qi@linaro.org>
2906 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2907 both aarch64 and aarch32.
2908 (aarch64_set_pc): Likewise.
2910 2015-08-04 Yao Qi <yao.qi@linaro.org>
2912 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2913 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2914 arm-with-neon.xml to srv_xmlfiles.
2915 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2916 (is_64bit_tdesc): New function.
2917 (aarch64_linux_read_description): New function.
2918 (aarch64_arch_setup): Call aarch64_linux_read_description.
2919 (regs_info): Rename to regs_info_aarch64.
2920 (aarch64_regs_info): Return right regs_info.
2921 (initialize_low_arch): Call initialize_low_arch_aarch32.
2923 2015-08-04 Yao Qi <yao.qi@linaro.org>
2925 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2926 * linux-aarch32-low.c: New file.
2927 * linux-aarch32-low.h: New file.
2928 * linux-arm-low.c (arm_fill_gregset): Move it to
2929 linux-aarch32-low.c.
2930 (arm_store_gregset): Likewise.
2931 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2932 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2933 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2934 (regs_info): Rename to regs_info_arm.
2935 (arm_regs_info): Return regs_info_aarch32 if
2936 have_ptrace_getregset is 1 and target description is
2937 arm_with_neon or arm_with_vfpv3.
2938 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2939 Call initialize_low_arch_aarch32 instead.
2941 2015-08-04 Yao Qi <yao.qi@linaro.org>
2943 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2944 * linux-low.c: ... here.
2945 * linux-low.h (have_ptrace_getregset): Declare it.
2947 2015-08-04 Pedro Alves <palves@redhat.com>
2949 * thread-db.c (struct thread_db): Use new typedefs.
2950 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2952 (disable_thread_event_reporting): Cast result of dlsym to
2953 destination function pointer type.
2954 (thread_db_mourn): Use td_ta_delete_ftype.
2956 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2958 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2960 (CDX_BREAKPOINT): Define for R2.
2961 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2962 (the_low_target): Add comments.
2964 2015-07-30 Yao Qi <yao.qi@linaro.org>
2966 * linux-arm-low.c (arm_hwcap): Remove it.
2967 (arm_read_description): New local variable arm_hwcap. Don't
2968 set arm_hwcap to zero.
2970 2015-07-30 Yao Qi <yao.qi@linaro.org>
2972 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2973 Use regcache->tdesc instead.
2974 (arm_store_wmmxregset): Likewise.
2975 (arm_fill_vfpregset): Likewise.
2976 (arm_store_vfpregset): Likewise.
2978 2015-07-30 Yao Qi <yao.qi@linaro.org>
2980 * linux-arm-low.c: Include arch/arm.h.
2981 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2982 (arm_store_gregset): Likewise.
2984 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2986 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2987 ptrace's 4th parameter.
2989 2015-07-27 Yao Qi <yao.qi@linaro.org>
2991 * configure.srv (case aarch64*-*-linux*): Don't set
2994 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2996 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2998 * linux-arm-low.c: Likewise.
2999 * linux-cris-low.c: Likewise.
3000 * linux-crisv32-low.c: Likewise.
3001 * linux-low.c: Likewise.
3002 * linux-m68k-low.c: Likewise.
3003 * linux-mips-low.c: Likewise.
3004 * linux-nios2-low.c: Likewise.
3005 * linux-s390-low.c: Likewise.
3006 * linux-sparc-low.c: Likewise.
3007 * linux-tic6x-low.c: Likewise.
3008 * linux-tile-low.c: Likewise.
3009 * linux-x86-low.c: Likewise.
3011 2015-07-24 Pedro Alves <palves@redhat.com>
3013 * config.in: Regenerate.
3014 * configure: Regenerate.
3016 2015-07-24 Pedro Alves <palves@redhat.com>
3018 * acinclude.m4: Include ../ptrace.m4.
3019 * configure.ac: Call GDB_AC_PTRACE.
3020 * config.in, configure: Regenerate.
3022 2015-07-24 Yao Qi <yao.qi@linaro.org>
3024 * linux-low.c (linux_create_inferior): Remove setting to
3025 proc->priv->new_inferior.
3026 (linux_attach): Likewise.
3027 (linux_low_filter_event): Likewise.
3028 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3030 2015-07-24 Yao Qi <yao.qi@linaro.org>
3032 * linux-low.c (linux_arch_setup): New function.
3033 (linux_low_filter_event): If proc->tdesc is NULL and
3034 proc->attached is true, call the_low_target.arch_setup.
3035 Otherwise, keep status pending, and return.
3036 (linux_resume_one_lwp_throw): Don't call get_pc if
3037 thread->while_stepping isn't NULL. Don't call
3038 get_thread_regcache if proc->tdesc is NULL.
3039 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3040 (linux_target_ops): Install arch_setup.
3041 * server.c (start_inferior): Call the_target->arch_setup.
3042 * target.h (struct target_ops) <arch_setup>: New field.
3043 (target_arch_setup): New marco.
3044 * lynx-low.c (lynx_target_ops): Update.
3045 * nto-low.c (nto_target_ops): Update.
3046 * spu-low.c (spu_target_ops): Update.
3047 * win32-low.c (win32_target_ops): Update.
3049 2015-07-24 Yao Qi <yao.qi@linaro.org>
3051 * linux-low.c (linux_add_process): Don't set
3052 proc->priv->new_inferior.
3053 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3054 (linux_attach): Likewise.
3056 2015-07-24 Yao Qi <yao.qi@linaro.org>
3058 * server.c (start_inferior): Code refactor.
3060 2015-07-24 Yao Qi <yao.qi@linaro.org>
3062 * server.c (process_serial_event): Set general_thread.
3064 2015-07-21 Yao Qi <yao.qi@linaro.org>
3066 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3067 aarch64_linux_get_debug_reg_capacity.
3069 2015-07-17 Yao Qi <yao.qi@linaro.org>
3071 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3072 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3073 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3074 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3075 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3076 (AARCH64_HWP_ALIGNMENT): Likewise.
3077 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3078 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3079 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3080 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3081 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3082 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3083 (struct aarch64_debug_reg_state): Likewise.
3084 (struct arch_lwp_info): Likewise.
3085 (aarch64_align_watchpoint): Likewise.
3086 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3087 (aarch64_watchpoint_length): Likewise.
3088 (aarch64_point_encode_ctrl_reg): Likewise
3089 (aarch64_point_is_aligned): Likewise.
3090 (aarch64_align_watchpoint): Likewise.
3091 (aarch64_linux_set_debug_regs):
3092 (aarch64_dr_state_insert_one_point): Likewise.
3093 (aarch64_dr_state_remove_one_point): Likewise.
3094 (aarch64_handle_breakpoint): Likewise.
3095 (aarch64_handle_aligned_watchpoint): Likewise.
3096 (aarch64_handle_unaligned_watchpoint): Likewise.
3097 (aarch64_handle_watchpoint): Likewise.
3099 2015-07-17 Yao Qi <yao.qi@linaro.org>
3101 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3102 and don't aarch64_get_debug_reg_state. All callers update.
3103 (aarch64_handle_aligned_watchpoint): Likewise.
3104 (aarch64_handle_unaligned_watchpoint): Likewise.
3105 (aarch64_handle_watchpoint): Likewise.
3106 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3107 (aarch64_remove_point): Likewise.
3109 2015-07-17 Yao Qi <yao.qi@linaro.org>
3111 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3113 (aarch64_handle_unaligned_watchpoint): Likewise.
3115 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3117 Revert the previous 3 commits:
3118 Move gdb_regex* to common/
3119 Move linux_find_memory_regions_full & co.
3120 gdbserver build-id attribute generator
3122 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3123 Jan Kratochvil <jan.kratochvil@redhat.com>
3125 gdbserver build-id attribute generator.
3126 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3127 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3128 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3130 (get_dynamic): Use find_pdhr to traverse program headers.
3131 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3132 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3133 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3134 (get_hex_build_id): New.
3135 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3136 to reply XML document.
3138 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3139 Jan Kratochvil <jan.kratochvil@redhat.com>
3141 * target.c: Include target/target-utils.h and fcntl.h.
3142 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3143 (target_fileio_read_stralloc): New functions.
3145 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3147 * Makefile.in (OBS): Add gdb_regex.o.
3149 * config.in: Rebuilt.
3150 * configure: Rebuilt.
3152 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3153 Jan Kratochvil <jan.kratochvil@redhat.com>
3155 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3156 * Makefile.in (OBS): Add target-utils.o.
3157 (linux-maps.o, target-utils.o): New.
3158 * configure.srv (srv_linux_obj): Add linux-maps.o.
3160 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3162 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3164 (the_low_target): Install it.
3166 2015-07-14 Pedro Alves <palves@redhat.com>
3168 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3169 Instead, ignore ECHILD, and throw an error for other errnos.
3171 2015-07-10 Pedro Alves <palves@redhat.com>
3173 * event-loop.c (struct callback_event) <data>: Change type to
3174 gdb_client_data instance instead of gdb_client_data pointer.
3175 (append_callback_event): Adjust.
3177 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3179 * linux-aarch64-low.c: Add comments for each linux_target_ops
3180 method. Remove comments already covered in target_ops and
3181 linux_target_ops definitions.
3182 (the_low_target): Add comments for each unimplemented method.
3184 2015-07-09 Yao Qi <yao.qi@linaro.org>
3186 * linux-aarch64-low.c (aarch64_regmap): Remove.
3187 (aarch64_usrregs_info): Remove.
3188 (regs_info): Set field usrregs to NULL.
3190 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3192 * linux-low.c: Include "rsp-low.h"
3193 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3194 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3195 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3196 (handle_btrace_enable_pt): New.
3197 (handle_btrace_general_set): Support "pt".
3198 (handle_btrace_conf_general_set): Support "pt:size".
3200 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3202 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3205 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3207 * linux-aarch64-low.c: Remove comment about endianness.
3208 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3209 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3212 2015-06-24 Gary Benson <gbenson@redhat.com>
3214 * linux-i386-ipa.c (stdint.h): Do not include.
3215 * lynx-i386-low.c (stdint.h): Likewise.
3216 * lynx-ppc-low.c (stdint.h): Likewise.
3217 * mem-break.c (stdint.h): Likewise.
3218 * thread-db.c (stdint.h): Likewise.
3219 * tracepoint.c (stdint.h): Likewise.
3220 * win32-low.c (stdint.h): Likewise.
3222 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3224 * server.c (write_qxfer_response): Update call to
3225 remote_escape_output.
3227 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3228 Jan Kratochvil <jan.kratochvil@redhat.com>
3230 Merge multiple hex conversions.
3231 * gdbreplay.c (tohex): Rename to 'fromhex'.
3232 (logchar): Use fromhex.
3234 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3236 * server.c (handle_qxfer_libraries): Set `version' attribute for
3239 2015-06-10 Gary Benson <gbenson@redhat.com>
3241 * target.h (struct target_ops) <multifs_open>: New field.
3242 <multifs_unlink>: Likewise.
3243 <multifs_readlink>: Likewise.
3244 * linux-low.c (nat/linux-namespaces.h): New include.
3245 (linux_target_ops): Initialize the_target->multifs_open,
3246 the_target->multifs_unlink and the_target->multifs_readlink.
3247 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3248 * hostio.c (hostio_fs_pid): New static variable.
3249 (hostio_handle_new_gdb_connection): New function.
3250 (handle_setfs): Likewise.
3251 (handle_open): Use the_target->multifs_open as appropriate.
3252 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3253 (handle_readlink): Use the_target->multifs_readlink as
3255 (handle_vFile): Handle vFile:setfs packets.
3256 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3257 after target_handle_new_gdb_connection.
3259 2015-06-10 Gary Benson <gbenson@redhat.com>
3261 * configure.ac (AC_CHECK_FUNCS): Add setns.
3262 * config.in: Regenerate.
3263 * configure: Likewise.
3264 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3265 (linux-namespaces.o): New rule.
3266 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3268 2015-06-09 Gary Benson <gbenson@redhat.com>
3270 * hostio.c (handle_open): Process mode argument with
3271 fileio_to_host_mode.
3273 2015-06-01 Yao Qi <yao.qi@linaro.org>
3275 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3276 * linux-x86-low.c: Likewise.
3278 2015-05-28 Don Breazeal <donb@codesourcery.com>
3280 * linux-low.c (handle_extended_wait): Initialize
3281 thread_info.last_resume_kind for new fork children.
3283 2015-05-15 Pedro Alves <palves@redhat.com>
3285 * target.h (target_handle_new_gdb_connection): Rewrite using if
3286 wrapped in do/while.
3288 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3290 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3291 * configure, config.in: Regenerate.
3292 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3295 2015-05-12 Don Breazeal <donb@codesourcery.com>
3297 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3298 PTRACE_EVENT_VFORK_DONE.
3299 (linux_low_ptrace_options, extended_event_reported): Add vfork
3301 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3302 and "vforkdone" for RSP 'T' Stop Reply Packet.
3303 * server.h (report_vfork_events): Declare
3306 2015-05-12 Don Breazeal <donb@codesourcery.com>
3308 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3309 (the_low_target) <new_fork>: Initialize new member.
3310 * linux-arm-low.c (arm_new_fork): New function.
3311 (the_low_target) <new_fork>: Initialize new member.
3312 * linux-low.c (handle_extended_wait): Call new target function
3314 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3315 * linux-mips-low.c (mips_add_watchpoint): New function
3316 extracted from mips_insert_point.
3317 (the_low_target) <new_fork>: Initialize new member.
3318 (mips_linux_new_fork): New function.
3319 (mips_insert_point): Call mips_add_watchpoint.
3320 * linux-x86-low.c (x86_linux_new_fork): New function.
3321 (the_low_target) <new_fork>: Initialize new member.
3323 2015-05-12 Don Breazeal <donb@codesourcery.com>
3325 * linux-low.c (handle_extended_wait): Implement return value,
3326 rename argument 'event_child' to 'event_lwp', handle
3327 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3328 (linux_low_ptrace_options): New function.
3329 (linux_low_filter_event): Call linux_low_ptrace_options,
3330 use different argument fo linux_enable_event_reporting,
3331 use return value from handle_extended_wait.
3332 (extended_event_reported): New function.
3333 (linux_wait_1): Call extended_event_reported and set
3334 status to report fork events.
3335 (linux_write_memory): Add pid to debug message.
3336 (reset_lwp_ptrace_options_callback): New function.
3337 (linux_handle_new_gdb_connection): New function.
3338 (linux_target_ops): Initialize new structure member.
3339 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3340 * lynx-low.c: Initialize new structure member.
3341 * remote-utils.c (prepare_resume_reply): Implement stop reason
3342 "fork" for "T" stop message.
3343 * server.c (handle_query): Call handle_new_gdb_connection.
3344 * server.h (report_fork_events): Declare global flag.
3345 * target.h (struct target_ops) <handle_new_gdb_connection>:
3347 (target_handle_new_gdb_connection): New macro.
3348 * win32-low.c: Initialize new structure member.
3350 2015-05-12 Don Breazeal <donb@codesourcery.com>
3352 * mem-break.c (APPEND_TO_LIST): Define macro.
3353 (clone_agent_expr): New function.
3354 (clone_one_breakpoint): New function.
3355 (clone_all_breakpoints): New function.
3356 * mem-break.h: Declare new functions.
3358 2015-05-12 Don Breazeal <donb@codesourcery.com>
3360 * linux-low.c (linux_supports_fork_events): New function.
3361 (linux_supports_vfork_events): New function.
3362 (linux_target_ops): Initialize new structure members.
3363 (initialize_low): Call linux_check_ptrace_features.
3364 * lynx-low.c (lynx_target_ops): Initialize new structure
3366 * server.c (report_fork_events, report_vfork_events):
3368 (handle_query): Add new features to qSupported packet and
3370 (captured_main): Initialize new global variables.
3371 * target.h (struct target_ops) <supports_fork_events>:
3373 <supports_vfork_events>: New member.
3374 (target_supports_fork_events): New macro.
3375 (target_supports_vfork_events): New macro.
3376 * win32-low.c (win32_target_ops): Initialize new structure
3379 2015-05-12 Gary Benson <gbenson@redhat.com>
3381 * server.c (handle_qxfer_exec_file): Use current process
3384 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3386 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3387 Remove HAVE_PTRACE_GETREGS conditionals.
3388 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3389 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3391 2015-05-08 Yao Qi <yao.qi@linaro.org>
3393 * linux-low.c (linux_supports_conditional_breakpoints): New
3395 (linux_target_ops): Install new target method.
3396 * lynx-low.c (lynx_target_ops): Install NULL hook for
3397 supports_conditional_breakpoints.
3398 * nto-low.c (nto_target_ops): Likewise.
3399 * spu-low.c (spu_target_ops): Likewise.
3400 * win32-low.c (win32_target_ops): Likewise.
3401 * server.c (handle_query): Check
3402 target_supports_conditional_breakpoints.
3403 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3405 (target_supports_conditional_breakpoints): New macro.
3407 2015-05-06 Pedro Alves <palves@redhat.com>
3410 * server.c (start_inferior): If the process exits, mourn it.
3412 2015-04-21 Gary Benson <gbenson@redhat.com>
3414 * hostio.c (fileio_open_flags_to_host): Factored out to
3415 fileio_to_host_openflags in common/fileio.c. Single use
3418 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3420 * linux-xtensa-low.c (xtensa_fill_gregset)
3421 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3424 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3426 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3427 (regs_info): Replace usrregs pointer with NULL.
3429 2015-04-17 Gary Benson <gbenson@redhat.com>
3431 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3432 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3433 * server.c (handle_qxfer_exec_file): New function.
3434 (qxfer_packets): Add exec-file entry.
3435 (handle_query): Report qXfer:exec-file:read as supported packet.
3437 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3439 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3441 2015-04-09 Gary Benson <gbenson@redhat.com>
3443 * hostio-errno.c (errno_to_fileio_error): Remove function.
3444 Update caller to use remote_fileio_to_fio_error.
3446 2015-04-09 Yao Qi <yao.qi@linaro.org>
3448 * linux-low.c (linux_insert_point): Call
3449 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3450 (linux_remove_point): Call remove_memory_breakpoint if type is
3452 * linux-x86-low.c (x86_insert_point): Don't call
3453 insert_memory_breakpoint.
3454 (x86_remove_point): Don't call remove_memory_breakpoint.
3456 2015-04-01 Pedro Alves <palves@redhat.com>
3457 Cleber Rosa <crosa@redhat.com>
3459 * server.c (gdbserver_usage): Reorganize and extend the usage
3462 2015-03-24 Pedro Alves <palves@redhat.com>
3464 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3465 output. Also dump TRAP_TRACE.
3466 (linux_low_filter_event): In debug output, distinguish a
3467 resume_stop SIGSTOP from a delayed SIGSTOP.
3469 2015-03-24 Gary Benson <gbenson@redhat.com>
3471 * linux-x86-low.c (x86_linux_new_thread): Moved to
3473 (x86_linux_prepare_to_resume): Likewise.
3475 2015-03-24 Gary Benson <gbenson@redhat.com>
3477 * Makefile.in (x86-linux-dregs.o): New rule.
3478 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3479 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3480 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3481 (x86_linux_dr_get): Likewise.
3482 (x86_linux_dr_set): Likewise.
3483 (update_debug_registers_callback): Likewise.
3484 (x86_linux_dr_set_addr): Likewise.
3485 (x86_linux_dr_get_addr): Likewise.
3486 (x86_linux_dr_set_control): Likewise.
3487 (x86_linux_dr_get_control): Likewise.
3488 (x86_linux_dr_get_status): Likewise.
3489 (x86_linux_update_debug_registers): Likewise.
3491 2015-03-24 Gary Benson <gbenson@redhat.com>
3493 * linux-x86-low.c (x86_linux_update_debug_registers):
3494 New function, factored out from...
3495 (x86_linux_prepare_to_resume): ...this.
3497 2015-03-24 Gary Benson <gbenson@redhat.com>
3499 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3500 (x86_linux_dr_set): Likewise.
3501 (update_debug_registers_callback): Likewise.
3502 (x86_linux_dr_set_addr): Likewise.
3503 (x86_linux_dr_get_addr): Likewise.
3504 (x86_linux_dr_set_control): Likewise.
3505 (x86_linux_dr_get_control): Likewise.
3506 (x86_linux_dr_get_status): Likewise.
3507 (x86_linux_prepare_to_resume): Likewise.
3509 2015-03-24 Gary Benson <gbenson@redhat.com>
3511 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3512 Use perror_with_name. Pass string through gettext.
3513 (x86_linux_dr_set): Likewise.
3515 2015-03-24 Gary Benson <gbenson@redhat.com>
3517 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3518 (x86_linux_dr_set_addr): ...this.
3519 (x86_dr_low_get_addr): Rename to...
3520 (x86_linux_dr_get_addr): ...this.
3521 (x86_dr_low_set_control): Rename to...
3522 (x86_linux_dr_set_control): ...this.
3523 (x86_dr_low_get_control): Rename to...
3524 (x86_linux_dr_get_control): ...this.
3525 (x86_dr_low_get_status): Rename to...
3526 (x86_linux_dr_get_status): ...this.
3527 (x86_dr_low): Update with new function names.
3529 2015-03-24 Gary Benson <gbenson@redhat.com>
3531 * Makefile.in (x86-linux.o): New rule.
3532 * configure.srv: Add x86-linux.o to relevant targets.
3533 * linux-low.c (lwp_set_arch_private_info): New function.
3534 (lwp_arch_private_info): Likewise.
3535 * linux-x86-low.c: Include nat/x86-linux.h.
3536 (arch_lwp_info): Removed structure.
3537 (update_debug_registers_callback):
3538 Use lwp_set_debug_registers_changed.
3539 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3540 and lwp_set_debug_registers_changed.
3541 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3543 2015-03-24 Gary Benson <gbenson@redhat.com>
3545 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3546 * linux-arm-low.c (arm_new_thread): Likewise.
3547 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3548 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3549 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3550 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3552 2015-03-24 Gary Benson <gbenson@redhat.com>
3554 * linux-low.c (ptid_of_lwp): New function.
3555 (lwp_is_stopped): Likewise.
3556 (lwp_stop_reason): Likewise.
3557 * linux-x86-low.c (update_debug_registers_callback):
3559 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3562 2015-03-24 Gary Benson <gbenson@redhat.com>
3564 * linux-low.h (linux_stop_lwp): Remove declaration.
3566 2015-03-24 Gary Benson <gbenson@redhat.com>
3568 * linux-low.h: Include nat/linux-nat.h.
3569 * linux-low.c (iterate_over_lwps_args): New structure.
3570 (iterate_over_lwps_filter): New function.
3571 (iterate_over_lwps): Likewise.
3572 * linux-x86-low.c (update_debug_registers_callback):
3573 Update signature to what iterate_over_lwps expects.
3574 Remove PID check that iterate_over_lwps now performs.
3575 (x86_dr_low_set_addr): Use iterate_over_lwps.
3576 (x86_dr_low_set_control): Likewise.
3578 2015-03-24 Gary Benson <gbenson@redhat.com>
3580 * linux-x86-low.c (x86_debug_reg_state): New function.
3581 (x86_linux_prepare_to_resume): Use the above.
3583 2015-03-24 Gary Benson <gbenson@redhat.com>
3585 * linux-low.c (current_lwp_ptid): New function.
3586 * linux-x86-low.c: Include nat/linux-nat.h.
3587 (x86_dr_low_get_addr): Use current_lwp_ptid.
3588 (x86_dr_low_get_control): Likewise.
3589 (x86_dr_low_get_status): Likewise.
3591 2015-03-20 Pedro Alves <palves@redhat.com>
3593 * tracepoint.c (cmd_qtstatus): Make "str" const.
3595 2015-03-20 Pedro Alves <palves@redhat.com>
3597 * server.c (handle_general_set): Make "req_str" const.
3599 2015-03-19 Pedro Alves <palves@redhat.com>
3601 * linux-low.c (linux_resume_one_lwp): Rename to ...
3602 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3603 instead call perror_with_name.
3604 (check_ptrace_stopped_lwp_gone): New function.
3605 (linux_resume_one_lwp): Reimplement as wrapper around
3606 linux_resume_one_lwp_throw that swallows errors if the LWP is
3609 2015-03-19 Pedro Alves <palves@redhat.com>
3611 * linux-low.c (count_events_callback, select_event_lwp_callback):
3612 No longer check whether the thread has resume_stop as last resume
3615 2015-03-19 Pedro Alves <palves@redhat.com>
3617 * linux-low.c (count_events_callback, select_event_lwp_callback):
3618 Use the lwp's status_pending_p field, not the thread's.
3620 2015-03-19 Pedro Alves <palves@redhat.com>
3622 * linux-low.c (select_event_lwp_callback): Update comments to
3623 no longer mention SIGTRAP.
3625 2015-03-18 Gary Benson <gbenson@redhat.com>
3627 * server.c (handle_query): Do not report vFile:fstat as supported.
3629 2015-03-11 Gary Benson <gbenson@redhat.com>
3631 * hostio.c (sys/types.h): New include.
3632 (sys/stat.h): Likewise.
3633 (common-remote-fileio.h): Likewise.
3634 (handle_fstat): New function.
3635 (handle_vFile): Handle vFile:fstat packets.
3637 2015-03-11 Gary Benson <gbenson@redhat.com>
3639 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3640 struct stat.st_blocks and struct stat.st_blksize.
3641 * configure: Regenerate.
3642 * config.in: Likewise.
3643 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3644 (OBS): Add common-remote-fileio.o.
3645 (common-remote-fileio.o): New rule.
3647 2015-03-09 Pedro Alves <palves@redhat.com>
3649 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3650 'struct sockaddr' pointer in 'accept' call.
3652 2015-03-09 Pedro Alves <palves@redhat.com>
3655 2015-03-07 Pedro Alves <palves@redhat.com>
3656 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3657 or <winsock2.h> here. Instead include "gdb_socket.h".
3658 (remote_open): Use union gdb_sockaddr_u.
3659 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3660 or <winsock2.h> here. Instead include "gdb_socket.h".
3661 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3662 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3664 (init_named_socket, gdb_agent_helper_thread): Use union
3667 2015-03-07 Pedro Alves <palves@redhat.com>
3669 * configure.ac (build_warnings): Move
3670 -Wdeclaration-after-statement to the C-specific set.
3671 * configure: Regenerate.
3673 2015-03-07 Pedro Alves <palves@redhat.com>
3675 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3676 or <winsock2.h> here. Instead include "gdb_socket.h".
3677 (remote_open): Use union gdb_sockaddr_u.
3678 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3679 or <winsock2.h> here. Instead include "gdb_socket.h".
3680 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3681 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3683 (init_named_socket, gdb_agent_helper_thread): Use union
3686 2015-03-07 Pedro Alves <palves@redhat.com>
3688 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3691 2015-03-06 Yao Qi <yao.qi@linaro.org>
3693 * linux-aarch64-low.c (aarch64_insert_point): Use
3694 show_debug_regs as a boolean.
3695 (aarch64_remove_point): Likewise.
3697 2015-03-05 Pedro Alves <palves@redhat.com>
3699 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3700 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3701 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3702 * nto-low.c (nto_target_ops): Likewise.
3703 * spu-low.c (spu_target_ops): Likewise.
3704 * win32-low.c (win32_target_ops): Likewise.
3706 2015-03-04 Pedro Alves <palves@redhat.com>
3708 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3709 Decide whether a breakpoint triggered based on the SIGTRAP's
3711 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3712 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3713 (linux_low_filter_event): Check for breakpoints before checking
3715 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3717 (linux_stopped_by_sw_breakpoint)
3718 (linux_supports_stopped_by_sw_breakpoint)
3719 (linux_stopped_by_hw_breakpoint)
3720 (linux_supports_stopped_by_hw_breakpoint): New functions.
3721 (linux_target_ops): Install new target methods.
3723 2015-03-04 Pedro Alves <palves@redhat.com>
3725 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3726 * server.c (swbreak_feature, hwbreak_feature): New globals.
3727 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3728 (captured_main): Clear swbreak_feature and hwbreak_feature.
3729 * server.h (swbreak_feature, hwbreak_feature): Declare.
3730 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3731 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3732 supports_stopped_by_hw_breakpoint>: New fields.
3733 (target_supports_stopped_by_sw_breakpoint)
3734 (target_stopped_by_sw_breakpoint)
3735 (target_supports_stopped_by_hw_breakpoint)
3736 (target_stopped_by_hw_breakpoint): Declare.
3738 2015-03-04 Pedro Alves <palves@redhat.com>
3740 enum lwp_stop_reason -> enum target_stop_reason
3741 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3742 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3743 (linux_wait_1, stuck_in_jump_pad_callback)
3744 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3745 (linux_stopped_by_watchpoint):
3746 * linux-low.h (enum lwp_stop_reason): Delete.
3747 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3748 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3750 2015-03-04 Yao Qi <yao.qi@linaro.org>
3752 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3754 2015-03-03 Gary Benson <gbenson@redhat.com>
3756 * hostio.c (handle_vFile): Fix prefix lengths.
3758 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3760 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3763 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3765 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3766 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3767 (clean): Add "rm -f" for above C files.
3768 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3769 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3770 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3771 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3772 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3773 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3774 (init_registers_s390x_vx_linux64)
3775 (init_registers_s390x_tevx_linux64)
3776 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3777 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3779 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3780 (s390_store_vxrs_high): New functions.
3781 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3783 (s390_arch_setup): Add logic for selecting one of the new target
3784 descriptions. Activate the new vector regsets if applicable.
3785 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3786 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3787 and init_registers_s390x_tevx_linux64.
3789 2015-03-01 Pedro Alves <palves@redhat.com>
3791 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3794 2015-02-27 Pedro Alves <palves@redhat.com>
3796 * linux-x86-low.c (u_debugreg_offset): New function.
3797 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3799 2015-02-27 Pedro Alves <palves@redhat.com>
3801 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3802 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3803 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3804 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3805 (ps_lsetfpregs, ps_getpid)
3806 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3807 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3808 (ps_lsetxregs, ps_plog): Declare.
3810 2015-02-27 Pedro Alves <palves@redhat.com>
3812 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3813 IP_AGENT_EXPORT_FUNC.
3814 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3815 IP_AGENT_EXPORT_FUNC.
3816 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3817 (IP_AGENT_EXPORT): Delete.
3818 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3819 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3820 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3821 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3822 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3823 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3824 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3825 (traceframe_read_count, traceframe_write_count)
3826 (traceframes_created, trace_state_variables, get_raw_reg)
3827 (get_trace_state_variable_value, set_trace_state_variable_value)
3828 (ust_loaded, helper_thread_id, cmd_buf): Use
3829 IPA_SYM_EXPORTED_NAME.
3830 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3831 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3832 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3833 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3834 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3835 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3836 EXTERN_C_PUSH/EXTERN_C_POP.
3837 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3838 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3839 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3840 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3841 (traceframe_write_count, traceframe_read_count)
3842 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3843 (about_to_request_buffer_space, get_trace_state_variable_value)
3844 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3845 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3846 EXTERN_C_PUSH/EXTERN_C_POP.
3847 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3848 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3849 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3850 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3851 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3852 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3853 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3854 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3856 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3857 (IP_AGENT_EXPORT_VAR_DECL): Define.
3859 (gdb_agent_get_raw_reg): Declare.
3861 2015-02-27 Tom Tromey <tromey@redhat.com>
3862 Pedro Alves <palves@redhat.com>
3864 Rename symbols whose names are reserved C++ keywords throughout.
3866 2015-02-27 Pedro Alves <palves@redhat.com>
3868 * Makefile.in (COMPILER): New, get it from autoconf.
3869 (CXX): Get from autoconf instead.
3870 (COMPILE.pre): Use COMPILER.
3871 (CC-LD): Rename to ...
3872 (CC_LD): ... this. Use COMPILER.
3873 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3874 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3875 * acinclude.m4: Include build-with-cxx.m4.
3876 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3877 Disable -Werror by default if building in C++ mode.
3878 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3879 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3880 the C++ compiler. Save/restore CXXFLAGS too.
3881 * configure: Regenerate.
3883 2015-02-27 Pedro Alves <palves@redhat.com>
3885 * acinclude.m4: Include libiberty.m4.
3886 * configure.ac: Call libiberty_INIT.
3887 * config.in, configure: Regenerate.
3889 2015-02-26 Pedro Alves <palves@redhat.com>
3891 * linux-low.c (linux_wait_1): When incrementing the PC past a
3892 program breakpoint always use the_low_target.breakpoint_len as
3893 increment, rather than the maximum between that and
3894 the_low_target.decr_pc_after_break.
3896 2015-02-23 Pedro Alves <palves@redhat.com>
3898 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3899 thread was doing a step-over; always adjust the PC if
3900 we stepped over a permanent breakpoint.
3901 (linux_wait_1): If we stepped over breakpoint that was on top of a
3902 permanent breakpoint, manually advance the PC past it.
3904 2015-02-23 Pedro Alves <palves@redhat.com>
3906 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3908 (x86_fill_gregset, x86_store_gregset): Use it when handling
3911 2015-02-20 Pedro Alves <palves@redhat.com>
3913 * thread-db.c: Include "nat/linux-procfs.h".
3914 (thread_db_init): Skip listing new threads if the kernel supports
3915 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3917 2015-02-20 Pedro Alves <palves@redhat.com>
3919 * linux-low.c (status_pending_p_callback): Use ptid_match.
3921 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3923 PR breakpoints/16812
3924 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3925 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3926 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3928 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3930 PR breakpoints/15956
3931 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3933 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3935 * linux-low.c (linux_low_btrace_conf): Print size.
3936 * server.c (handle_btrace_conf_general_set): New.
3937 (hanle_general_set): Call handle_btrace_conf_general_set.
3938 (handle_query): Report Qbtrace-conf:bts:size as supported.
3940 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3942 * linux-low.c (linux_low_enable_btrace): Update parameters.
3943 (linux_low_btrace_conf): New.
3944 (linux_target_ops)<to_btrace_conf>: Initialize.
3945 * server.c (current_btrace_conf): New.
3946 (handle_btrace_enable): Rename to ...
3947 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
3948 to target_enable_btrace. Update comment. Update users.
3949 (handle_qxfer_btrace_conf): New.
3950 (qxfer_packets): Add btrace-conf entry.
3951 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3952 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3953 (target_ops)<read_btrace_conf>: New.
3954 (target_enable_btrace): Update parameters.
3955 (target_read_btrace_conf): New.
3957 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3959 * server.c (handle_btrace_general_set): Remove call to
3960 target_supports_btrace.
3961 (supported_btrace_packets): New.
3962 (handle_query): Call supported_btrace_packets.
3963 * target.h: include btrace-common.h.
3964 (btrace_target_info): Removed.
3965 (supports_btrace, target_supports_btrace): Update parameters.
3967 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3969 * Makefile.in (SFILES): Add common/btrace-common.c.
3970 (OBS): Add common/btrace-common.o.
3971 (btrace-common.o): Add build rules.
3972 * linux-low: Include btrace-common.h.
3973 (linux_low_read_btrace): Use struct btrace_data. Call
3974 btrace_data_init and btrace_data_fini.
3976 2015-02-06 Pedro Alves <palves@redhat.com>
3978 * thread-db.c (find_new_threads_callback): Add debug output.
3980 2015-02-04 Pedro Alves <palves@redhat.com>
3982 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3983 (resume_stopped_resumed_lwps): New function.
3984 (linux_wait_for_event_filtered): Use it.
3986 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3988 * Makefile.in (SFILES): Add linux-personality.c.
3989 (linux-personality.o): New rule.
3990 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3991 list of objects to be built.
3992 * linux-low.c: Include nat/linux-personality.h.
3993 (linux_create_inferior): Remove code to disable address space
3994 randomization (moved to ../nat/linux-personality.c). Create
3995 cleanup to disable address space randomization.
3997 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3999 * Makefile.in (posix-strerror.o): New rule.
4000 (mingw-strerror.o): Likewise.
4001 * configure: Regenerated.
4002 * configure.ac: Source file ../common/common.host. Initialize new
4003 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4005 2015-01-14 Yao Qi <yao@codesourcery.com>
4007 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4008 (ppc-linux.o): New rule.
4009 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4010 * configure.ac: AC_CHECK_FUNCS(getauxval).
4011 * config.in: Re-generated.
4012 * configure: Re-generated.
4013 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4014 ppc64_64bit_inferior_p
4016 2015-01-14 Yao Qi <yao@codesourcery.com>
4018 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4019 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4020 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4021 (PT_ORIG_R3, PT_TRAP): Likewise.
4022 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4023 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4024 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4026 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4028 * i387-fp.c (i387_cache_to_xsave): In look over
4029 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4030 zmmh_low_space field by use of zmmh_high_space.
4032 2015-01-09 Pedro Alves <palves@redhat.com>
4034 * linux-low.c (step_over_bkpt): Move higher up in the file.
4035 (handle_extended_wait): Don't store the stop_pc here.
4036 (get_stop_pc): Adjust comments and rename to ...
4037 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4038 stopped for a software breakpoint or hardware breakpoint.
4039 (thread_still_has_status_pending_p): New function.
4040 (status_pending_p_callback): Use
4041 thread_still_has_status_pending_p. If the event is no longer
4042 interesting, resume the LWP.
4043 (handle_tracepoints): Add assert.
4044 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4045 (wstatus_maybe_breakpoint): New function.
4046 (cancel_breakpoint): Delete function.
4047 (check_stopped_by_watchpoint): New function, factored out from
4048 linux_low_filter_event.
4049 (lp_status_maybe_breakpoint): Delete function.
4050 (linux_low_filter_event): Remove filter_ptid argument.
4051 Leave thread group exits pending here. Store the LWP's stop PC.
4052 Always leave events pending.
4053 (linux_wait_for_event_filtered): Pull all events out of the
4054 kernel, and leave them all pending.
4055 (count_events_callback, select_event_lwp_callback): Consider all
4057 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4058 (select_event_lwp): Only give preference to the stepping LWP in
4059 all-stop mode. Adjust comments.
4060 (ignore_event): New function.
4061 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4062 references to cancel_breakpoints. Adjust to renames. Also give
4063 equal priority to all LWPs that have had events in non-stop mode.
4064 If reporting a software breakpoint event, unadjust the LWP's PC.
4065 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4066 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4068 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4069 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4070 (linux_stopped_by_watchpoint): Adjust.
4071 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4072 * linux-low.h (enum lwp_stop_reason): New.
4073 (struct lwp_info) <stop_pc>: Adjust comment.
4074 <stopped_by_watchpoint>: Delete field.
4075 <stop_reason>: New field.
4076 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4077 * mem-break.c (software_breakpoint_inserted_here)
4078 (hardware_breakpoint_inserted_here): New function.
4079 * mem-break.h (software_breakpoint_inserted_here)
4080 (hardware_breakpoint_inserted_here): Declare.
4081 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4082 (cancel_breakpoints): Delete.
4083 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4084 (upload_fast_traceframes): Remove references to
4087 2015-01-09 Pedro Alves <palves@redhat.com>
4089 * thread-db.c (find_new_threads_callback): Ignore thread if the
4090 kernel thread ID is -1.
4092 2015-01-09 Pedro Alves <palves@redhat.com>
4094 * linux-low.c (linux_attach_fail_reason_string): Move to
4095 nat/linux-ptrace.c, and rename.
4096 (linux_attach_lwp): Update comment.
4097 (attach_proc_task_lwp_callback): New function.
4098 (linux_attach): Adjust to rename and use
4099 linux_proc_attach_tgid_threads.
4100 (linux_attach_fail_reason_string): Delete declaration.
4102 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4104 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4105 * server.c (gdbserver_version): Likewise.
4107 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4109 * remote-utils.c: Include ctype.h.
4110 (input_interrupt): Explicitly handle the case when the char
4111 received is the NUL byte. Improve the printing of non-ASCII
4114 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4116 * linux-low.c (linux_low_filter_event): Update call to
4117 linux_enable_event_reporting following the addition of
4118 a new parameter to that function.
4120 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4123 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4124 (AARCH64_FPCR_REGNO): Likewise.
4125 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4126 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4127 (aarch64_store_fpregset): Likewise.
4129 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4131 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4132 Remove FIXME comment about assumption about N.
4134 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4136 * configure.ac: If large-file support is disabled in GDBserver,
4137 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4138 * configure: Regenerate.
4140 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4142 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4143 warning upon ENODATA from ptrace.
4144 * linux-s390-low.c (s390_store_tdb): New.
4145 (s390_regsets): Add regset for NT_S390_TDB.
4147 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4149 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4150 without a fill_function.
4151 * linux-s390-low.c (s390_fill_last_break): Remove.
4152 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4153 (s390_arch_setup): Use regset's size instead of fill_function for
4156 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4158 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4159 the regset's store function when ptrace returned an error.
4160 * regcache.c (get_thread_regcache): Invalidate register cache
4161 before fetching inferior's registers.
4163 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4165 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4166 while-loop as for-loop.
4167 (regsets_store_inferior_registers): Likewise.
4169 2014-11-28 Yao Qi <yao@codesourcery.com>
4171 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4172 * config.in, configure: Re-generate.
4173 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4176 2014-11-21 Yao Qi <yao@codesourcery.com>
4178 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4179 (AC_CHECK_HEADERS): Remove malloc.h.
4180 * configure: Re-generated.
4181 * config.in: Re-generated.
4182 * server.h: Don't include alloca.h and malloc.h.
4183 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4184 Don't include malloc.h.
4186 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4188 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4189 corresponding ERRNO check in same block.
4191 2014-11-12 Pedro Alves <palves@redhat.com>
4193 * server.c (cont_thread): Update comment.
4194 (start_inferior, attach_inferior): No longer clear cont_thread.
4195 (handle_v_cont): No longer set cont_thread.
4196 (captured_main): Clear cont_thread each time a GDB connects.
4198 2014-11-12 Pedro Alves <palves@redhat.com>
4200 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4201 thread, and don't resume all threads if the Hc thread has exited.
4203 2014-11-12 Pedro Alves <palves@redhat.com>
4205 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4206 the process group instead of to a specific LWP.
4208 2014-10-15 Pedro Alves <palves@redhat.com>
4211 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4213 (arm_set_thread_context): Delete.
4214 (the_low_target): Adjust.
4215 * win32-i386-low.c (debug_registers_changed)
4216 (debug_registers_used): Delete.
4217 (update_debug_registers_callback): New function.
4218 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4219 needing to update their debug registers.
4220 (win32_get_current_dr): New function.
4221 (x86_dr_low_get_addr, x86_dr_low_get_control)
4222 (x86_dr_low_get_status): Fetch the debug register from the thread
4224 (i386_initial_stuff): Adjust.
4225 (i386_get_thread_context): Remove current_event parameter. Don't
4226 clear debug_registers_changed nor copy DR values to
4228 (i386_set_thread_context): Delete.
4229 (i386_prepare_to_resume): New function.
4230 (i386_thread_added): Mark the thread as needing to update irs
4232 (the_low_target): Remove i386_set_thread_context and install
4233 i386_prepare_to_resume.
4234 * win32-low.c (win32_get_thread_context): Adjust.
4235 (win32_set_thread_context): Use SetThreadContext
4237 (win32_prepare_to_resume): New function.
4238 (win32_require_context): New function, factored out from ...
4239 (thread_rec): ... this.
4240 (continue_one_thread): Call win32_prepare_to_resume on each thread
4241 we're about to continue.
4242 (win32_resume): Call win32_prepare_to_resume on the event thread.
4243 * win32-low.h (struct win32_thread_info)
4244 <debug_registers_changed>: New field.
4245 (struct win32_target_ops): Change prototype of set_thread_context,
4246 delete set_thread_context and add prepare_to_resume.
4247 (win32_require_context): New declaration.
4249 2014-10-08 Gary Benson <gbenson@redhat.com>
4251 * server.h: Do not include common-exceptions.h.
4253 2014-10-08 Gary Benson <gbenson@redhat.com>
4255 * server.h: Do not include cleanups.h.
4257 2014-09-30 James Hogan <james.hogan@imgtec.com>
4259 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4262 2014-09-23 Yao Qi <yao@codesourcery.com>
4264 * linux-low.c (lp_status_maybe_breakpoint): New function.
4265 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4266 (count_events_callback): Likewise.
4267 (select_event_lwp_callback): Likewise.
4268 (cancel_breakpoints_callback): Likewise.
4270 2014-09-19 Don Breazeal <donb@codesourcery.com>
4272 * linux-low.c (handle_extended_wait): Call
4273 linux_ptrace_get_extended_event.
4274 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4275 linux_is_extended_waitstatus.
4277 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4279 * Makefile.in (CPPFLAGS): Define.
4280 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4281 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4283 2014-09-16 Gary Benson <gbenson@redhat.com>
4285 * inferiors.h (current_inferior): Renamed as...
4286 (current_thread): New variable. All uses updated.
4287 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4288 (maybe_move_out_of_jump_pad): Likewise.
4289 (cancel_breakpoint): Likewise.
4290 (linux_low_filter_event): Likewise.
4291 (wait_for_sigstop): Likewise.
4292 (linux_resume_one_lwp): Likewise.
4293 (need_step_over_p): Likewise.
4294 (start_step_over): Likewise.
4295 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4296 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4297 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4298 and save_inferior as saved_thread.
4299 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4301 (regcache_invalidate_thread): Likewise.
4302 * remote-utils.c (prepare_resume_reply): Likewise.
4303 * thread-db.c (thread_db_get_tls_address): Likewise.
4304 (disable_thread_event_reporting): Likewise.
4305 (remove_thread_event_breakpoints): Likewise.
4306 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4308 * target.h (set_desired_inferior): Renamed as...
4309 (set_desired_thread): New declaration. All uses updated.
4310 * server.c (myresume): Updated comment to reference thread instead
4312 (handle_serial_event): Likewise.
4313 (handle_target_event): Likewise.
4315 2014-09-12 Tom Tromey <tromey@redhat.com>
4316 Gary Benson <gbenson@redhat.com>
4318 * regcache.h: Include common-regcache.h.
4319 (regcache_read_pc): Don't declare.
4320 * regcache.c (get_thread_regcache_for_ptid): New function.
4322 2014-09-11 Tom Tromey <tromey@redhat.com>
4323 Gary Benson <gbenson@redhat.com>
4325 * symbol.c: New file.
4326 * Makefile.in (SFILES): Add symbol.c.
4327 (OBS): Add symbol.o.
4329 2014-09-11 Gary Benson <gbenson@redhat.com>
4331 * target.c (target_stop_ptid, target_continue_ptid): New
4334 2014-09-11 Tom Tromey <tromey@redhat.com>
4335 Gary Benson <gbenson@redhat.com>
4337 * target.h: Include target/target.h.
4338 * target.c (target_read_memory, target_read_uint32)
4339 (target_write_memory): New functions.
4341 2014-09-11 Gary Benson <gbenson@redhat.com>
4343 * server.h (debug_hw_points): Don't declare.
4344 * server.c (debug_hw_points): Don't define. Replace all uses
4345 with show_debug_regs.
4346 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4347 all uses with show_debug_regs.
4349 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4351 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4352 endianness into account.
4353 (ppc_supply_ptrace_register): Likewise.
4355 2014-09-03 James Hogan <james.hogan@imgtec.com>
4357 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4358 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4360 2014-09-03 Gary Benson <gbenson@redhat.com>
4362 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4363 ALL_DEBUG_ADDRESS_REGISTERS.
4365 2014-09-02 Gary Benson <gbenson@redhat.com>
4367 * i386-low.h: Renamed as...
4368 * x86-low.h: New file. All type, function and variable name
4369 prefixes changed from "i386_" to "x86_". All references updated.
4370 * i386-low.c: Renamed as...
4371 * x86-low.c: New file. All type, function and variable name
4372 prefixes changed from "i386_" to "x86_". All references updated.
4374 2014-09-02 Gary Benson <gbenson@redhat.com>
4376 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4377 (x86_linux_new_thread): Likewise.
4379 2014-08-29 Gary Benson <gbenson@redhat.com>
4381 * server.h (setjmp.h): Do not include.
4382 (toplevel): Do not declare.
4383 (common-exceptions.h): Include.
4384 (cleanups.h): Likewise.
4385 * server.c (toplevel): Do not define.
4386 (exit_code): New static global.
4387 (detach_or_kill_for_exit_cleanup): New function.
4388 (main): New function. Original main renamed to...
4389 (captured_main): New function.
4390 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4392 2014-08-29 Gary Benson <gbenson@redhat.com>
4394 * Makefile.in (SFILES): Add common/common-exceptions.c.
4395 (OBS): Add common-exceptions.o.
4396 (common-exceptions.o): New rule.
4397 * utils.c (prepare_to_throw_exception): New function.
4399 2014-08-29 Gary Benson <gbenson@redhat.com>
4401 * config.in: Regenerate.
4402 * configure: Likewise.
4404 2014-08-29 Gary Benson <gbenson@redhat.com>
4406 * Makefile.in (SFILES): Add common/cleanups.c.
4408 (cleanups.o): New rule.
4410 2014-08-29 Gary Benson <gbenson@redhat.com>
4412 * utils.c (internal_vwarning): New function.
4414 2014-08-28 Gary Benson <gbenson@redhat.com>
4416 * utils.h (fatal): Remove declaration.
4417 * utils.c (fatal): Remove function.
4419 2014-08-28 Gary Benson <gbenson@redhat.com>
4421 * tracepoint.c (gdb_agent_init): Replace fatal with
4423 (initialize_tracepoint): Likewise.
4425 2014-08-28 Gary Benson <gbenson@redhat.com>
4427 * remote-utils.c (remote_prepare): Replace fatal with error.
4429 2014-08-28 Gary Benson <gbenson@redhat.com>
4431 * linux-low.c (linux_async): Replace fatal with warning.
4433 (linux_start_non_stop): Return -1 if linux_async failed.
4435 2014-08-28 Gary Benson <gbenson@redhat.com>
4437 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4439 (i386_dr_low_get_addr): Remove vague comment.
4440 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4443 2014-08-28 Gary Benson <gbenson@redhat.com>
4445 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4446 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4448 (linux_resume_one_lwp): Likewise.
4449 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4451 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4452 with internal_error.
4453 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4454 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4455 (find_register_by_name): Replace fatal with internal_error.
4456 (find_regno): Likewise.
4457 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4458 * thread-db.c (thread_db_create_event): Likewise.
4459 (thread_db_load_search): Likewise.
4460 (try_thread_db_load_1): Likewise.
4461 * tracepoint.c (get_jump_space_head): Replace fatal with
4463 (claim_trampoline_space): Likewise.
4464 (have_fast_tracepoint_trampoline_buffer): Likewise.
4465 (cmd_qtstart): Likewise.
4466 (stop_tracing): Likewise.
4467 (fast_tracepoint_collecting): Likewise.
4468 (target_malloc): Likewise.
4469 (download_tracepoint): Likewise.
4470 (download_trace_state_variables): Replace check with gdb_assert.
4471 (upload_fast_traceframes): Replace fatal with internal_error.
4473 2014-08-19 Tom Tromey <tromey@redhat.com>
4474 Gary Benson <gbenson@redhat.com>
4476 * Makefile.in (SFILES): Add common/common-debug.c.
4477 (OBS): Add common-debug.o.
4478 (common-debug.o): New rule.
4479 * debug.h (debug_printf): Don't declare.
4480 * debug.c (debug_printf): Renamed and rewritten as...
4481 (debug_vprintf): New function.
4483 2014-08-19 Gary Benson <gbenson@redhat.com>
4485 * utils.h: Do not include print-utils.h.
4487 2014-08-19 Tom Tromey <tromey@redhat.com>
4488 Gary Benson <gbenson@redhat.com>
4490 * server.h: Add static assertion.
4491 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4493 2014-08-19 Tom Tromey <tromey@redhat.com>
4494 Gary Benson <gbenson@redhat.com>
4496 * Makefile.in (SFILES): Add common/errors.c.
4497 (OBS): Add errors.o.
4498 (IPA_OBS): Add errors-ipa.o.
4499 (errors.o): New rule.
4500 (errors-ipa.o): Likewise.
4501 * utils.h (perror_with_name, error, warning): Don't declare.
4502 * utils.c (warning): Renamed and rewritten as...
4503 (vwarning): New function.
4504 (error): Renamed and rewritten as...
4505 (verror): New function.
4506 (internal_error): Renamed and rewritten as...
4507 (internal_verror): New function.
4509 2014-08-07 Gary Benson <gbenson@redhat.com>
4511 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4512 * configure: Regenerate.
4513 * config.in: Likewise.
4514 * server.h: Do not include errno.h.
4515 * event-loop.c: Likewise.
4516 * hostio-errno.c: Likewise.
4517 * linux-low.c: Likewise.
4518 * remote-utils.c: Likewise.
4519 * spu-low.c: Likewise.
4520 * utils.c: Likewise.
4521 * gdbreplay.c: Unconditionally include errno.h.
4523 2014-08-07 Gary Benson <gbenson@redhat.com>
4525 * server.h: Do not include string.h.
4526 * event-loop.c: Likewise.
4527 * linux-low.c: Likewise.
4528 * regcache.c: Likewise.
4529 * remote-utils.c: Likewise.
4530 * spu-low.c: Likewise.
4531 * utils.c: Likewise.
4533 2014-08-07 Gary Benson <gbenson@redhat.com>
4535 * server.h: Do not include gdb_assert.h.
4537 2014-08-07 Gary Benson <gbenson@redhat.com>
4539 * server.h: Do not include common-utils.h.
4541 2014-08-07 Gary Benson <gbenson@redhat.com>
4543 * server.h: Do not include ptid.h.
4544 * notif.h: Likewise.
4546 2014-08-07 Gary Benson <gbenson@redhat.com>
4548 * server.h: Do not include gdb_locale.h.
4550 2014-08-07 Gary Benson <gbenson@redhat.com>
4552 * server.h: Do not include gdb/signals.h.
4553 * win32-low.c: Likewise.
4555 2014-08-07 Gary Benson <gbenson@redhat.com>
4557 * server.h: Do not include pathmax.h.
4559 2014-08-07 Gary Benson <gbenson@redhat.com>
4561 * server.h: Do not include libiberty.h.
4562 * linux-bfin-low.c: Likewise.
4564 2014-08-07 Gary Benson <gbenson@redhat.com>
4566 * server.h: Do not include ansidecl.h.
4568 2014-08-07 Gary Benson <gbenson@redhat.com>
4570 * linux-x86-low.c: Do not include stddef.h.
4571 * lynx-ppc-low.c: Likewise.
4572 * tracepoint.c: Likewise.
4574 2014-08-07 Gary Benson <gbenson@redhat.com>
4576 * server.h: Do not include stdarg.h.
4577 * nto-low.c: Likewise.
4579 2014-08-07 Gary Benson <gbenson@redhat.com>
4581 * server.h: Do not include stdlib.h.
4582 * inferiors.c: Likewise.
4583 * linux-low.c: Likewise.
4584 * regcache.c: Likewise.
4585 * spu-low.c: Likewise.
4586 * tracepoint.c: Likewise.
4587 * utils.c: Likewise.
4589 2014-08-07 Gary Benson <gbenson@redhat.com>
4591 * server.h: Do not include stdio.h.
4592 * linux-low.c: Likewise.
4593 * remote-utils.c: Likewise.
4594 * spu-low.c: Likewise.
4595 * utils.c: Likewise.
4596 * wincecompat.c: Likewise.
4598 2014-08-06 Gary Benson <gbenson@redhat.com>
4600 * regcache.c (init_register_cache): Move conditionals inside if.
4602 2014-08-06 Gary Benson <gbenson@redhat.com>
4604 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4606 2014-07-31 Gary Benson <gbenson@redhat.com>
4608 * ax.h: Do not include server.h.
4609 * gdbthread.h: Likewise.
4610 * lynx-low.h: Likewise.
4611 * notif.h: Likewise.
4613 2014-07-30 Gary Benson <gbenson@redhat.com>
4615 * server.h: Include common-defs.h.
4616 Do not include config.h or build-gnulib-gdbserver/config.h.
4618 2014-07-30 Gary Benson <gbenson@redhat.com>
4620 * hostio-errno.c: Move server.h to top of includes list.
4621 * inferiors.c: Likewise.
4622 * linux-x86-low.c: Likewise.
4623 * notif.c: Include server.h.
4625 2014-07-24 Tom Tromey <tromey@redhat.com>
4626 Gary Benson <gbenson@redhat.com>
4628 * server.h (CORE_ADDR): Now unsigned.
4630 2014-07-16 Pedro Alves <palves@redhat.com>
4632 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4634 2014-07-15 Pedro Alves <palves@redhat.com>
4636 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4639 2014-07-11 Pedro Alves <palves@redhat.com>
4641 * linux-low.c (kill_wait_lwp): New function, based on
4642 kill_one_lwp_callback, but use my_waitpid directly.
4643 (kill_one_lwp_callback, linux_kill): Use it.
4645 2014-06-23 Pedro Alves <palves@redhat.com>
4647 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4648 before setting DR0..DR3.
4650 2014-06-20 Gary Benson <gbenson@redhat.com>
4652 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4653 * configure: Regenerated.
4654 * config.in: Likewise.
4656 2014-06-20 Gary Benson <gbenson@redhat.com>
4658 * Makefile.in (SFILES): Update locations for files moved
4660 (object file files): Reordered.
4662 2014-06-20 Gary Benson <gbenson@redhat.com>
4664 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4665 (i386_dr_low_set_addr): Likewise.
4666 (i386_dr_low_get_addr): Likewise.
4667 (i386_dr_low_can_set_control): Likewise.
4668 (i386_dr_low_set_control): Likewise.
4669 (i386_dr_low_get_control): Likewise.
4670 (i386_dr_low_get_status): Likewise.
4671 (i386_get_debug_register_length): Likewise.
4672 * linux-x86-low.c (i386_dr_low_set_addr):
4673 Changed signature. Made static.
4674 (i386_dr_low_get_addr): Likewise.
4675 (i386_dr_low_set_control): Likewise.
4676 (i386_dr_low_get_control): Likewise.
4677 (i386_dr_low_get_status): Likewise.
4678 (i386_dr_low): New global variable.
4679 * win32-i386-low.c (i386_dr_low_set_addr):
4680 Changed signature. Made static.
4681 (i386_dr_low_get_addr): Likewise.
4682 (i386_dr_low_set_control): Likewise.
4683 (i386_dr_low_get_control): Likewise.
4684 (i386_dr_low_get_status): Likewise.
4685 (i386_dr_low): New global variable.
4687 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4689 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4690 * Makefile.in (AR, AR_FLAGS): Define.
4691 * configure: Regenerate.
4693 2014-06-19 Gary Benson <gbenson@redhat.com>
4695 * Makefile.in (i386-dregs.o): New rule.
4696 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4697 * i386-low.c (target.h): Remove include.
4698 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4699 (DR_CONTROL_SHIFT): Likewise.
4700 (DR_CONTROL_SIZE): Likewise.
4701 (DR_RW_EXECUTE): Likewise.
4702 (DR_RW_WRITE): Likewise.
4703 (DR_RW_READ): Likewise.
4704 (DR_RW_IORW): Likewise.
4705 (DR_LEN_1): Likewise.
4706 (DR_LEN_2): Likewise.
4707 (DR_LEN_4): Likewise.
4708 (DR_LEN_8): Likewise.
4709 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4710 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4711 (DR_ENABLE_SIZE): Likewise.
4712 (DR_LOCAL_SLOWDOWN): Likewise.
4713 (DR_GLOBAL_SLOWDOWN): Likewise.
4714 (DR_CONTROL_RESERVED): Likewise.
4715 (I386_DR_CONTROL_MASK): Likewise.
4716 (I386_DR_VACANT): Likewise.
4717 (I386_DR_LOCAL_ENABLE): Likewise.
4718 (I386_DR_GLOBAL_ENABLE): Likewise.
4719 (I386_DR_DISABLE): Likewise.
4720 (I386_DR_SET_RW_LEN): Likewise.
4721 (I386_DR_GET_RW_LEN): Likewise.
4722 (I386_DR_WATCH_HIT): Likewise.
4723 (i386_wp_op_t): Likewise.
4724 (i386_show_dr): Likewise.
4725 (i386_length_and_rw_bits): Likewise.
4726 (i386_insert_aligned_watchpoint): Likewise.
4727 (i386_remove_aligned_watchpoint): Likewise.
4728 (i386_handle_nonaligned_watchpoint): Likewise.
4729 i386_update_inferior_debug_regs(): Likewise.
4730 (i386_dr_insert_watchpoint): Likewise.
4731 (i386_dr_remove_watchpoint): Likewise.
4732 (i386_dr_region_ok_for_watchpoint): Likewise.
4733 (i386_dr_stopped_data_address): Likewise.
4734 (i386_dr_stopped_by_watchpoint): Likewise.
4736 2014-06-19 Gary Benson <gbenson@redhat.com>
4738 * i386-low.c (i386_dr_show): Renamed to
4739 i386_show_dr and made static. All uses updated.
4740 (i386_dr_length_and_rw_bits): Renamed to
4741 i386_length_and_rw_bits and made static.
4743 (i386_dr_insert_aligned_watchpoint): Renamed to
4744 i386_insert_aligned_watchpoint and made static.
4746 (i386_dr_remove_aligned_watchpoint): Renamed to
4747 i386_remove_aligned_watchpoint and made static.
4749 (i386_dr_update_inferior_debug_regs): Renamed to
4750 i386_update_inferior_debug_regs and made static.
4753 2014-06-18 Gary Benson <gbenson@redhat.com>
4755 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4756 (i386_dr_low_can_set_control): Likewise.
4757 (i386_get_debug_register_length): Likewise.
4758 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4759 (i386_dr_low_can_set_control): Likewise.
4760 (i386_get_debug_register_length): Likewise.
4762 2014-06-17 Gary Benson <gbenson@redhat.com>
4764 * i386-low.h (i386-dregs.h): New include.
4765 (DR_FIRSTADDR): Now in i386-dregs.h.
4766 (DR_LASTADDR): Likewise.
4767 (DR_NADDR): Likewise.
4768 (DR_STATUS): Likewise.
4769 (DR_CONTROL): Likewise.
4770 (i386_debug_reg_state): Likewise.
4771 (i386_dr_insert_watchpoint): Likewise.
4772 (i386_dr_remove_watchpoint): Likewise.
4773 (i386_dr_region_ok_for_watchpoint): Likewise.
4774 (i386_dr_stopped_data_address): Likewise.
4775 (i386_dr_stopped_by_watchpoint): Likewise.
4776 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4778 2014-06-18 Gary Benson <gbenson@redhat.com>
4780 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4781 i386_dr_insert_watchpoint.
4782 (i386_low_remove_watchpoint): Renamed to
4783 i386_dr_remove_watchpoint.
4784 (i386_low_region_ok_for_watchpoint): Renamed to
4785 i386_dr_region_ok_for_watchpoint.
4786 (i386_low_stopped_data_address): Renamed to
4787 i386_dr_stopped_data_address.
4788 (i386_low_stopped_by_watchpoint): Renamed to
4789 i386_dr_stopped_by_watchpoint.
4790 * i386-low.c (i386_show_dr): Renamed to
4791 i386_dr_show and made nonstatic. All uses updated.
4792 (i386_length_and_rw_bits): Renamed to
4793 i386_dr_length_and_rw_bits and made nonstatic.
4795 (i386_insert_aligned_watchpoint): Renamed to
4796 i386_dr_insert_aligned_watchpoint and made nonstatic.
4798 (i386_remove_aligned_watchpoint): Renamed to
4799 i386_dr_remove_aligned_watchpoint and made nonstatic.
4801 (i386_update_inferior_debug_regs): Renamed to
4802 i386_dr_update_inferior_debug_regs and made nonstatic.
4804 (i386_low_insert_watchpoint): Renamed to
4805 i386_dr_insert_watchpoint. All uses updated.
4806 (i386_low_remove_watchpoint): Renamed to
4807 i386_dr_remove_watchpoint. All uses updated.
4808 (i386_low_region_ok_for_watchpoint): Renamed to
4809 i386_dr_region_ok_for_watchpoint. All uses updated.
4810 (i386_low_stopped_data_address): Renamed to
4811 i386_dr_stopped_data_address. All uses updated.
4812 (i386_low_stopped_by_watchpoint): Renamed to
4813 i386_dr_stopped_by_watchpoint. All uses updated.
4815 2014-06-18 Gary Benson <gbenson@redhat.com>
4817 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4818 (i386_dr_low_can_set_control): Likewise.
4819 (i386_insert_aligned_watchpoint): New check.
4821 2014-06-18 Gary Benson <gbenson@redhat.com>
4823 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4826 2014-06-18 Gary Benson <gbenson@redhat.com>
4828 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4829 instead of fatal and error.
4830 (i386_handle_nonaligned_watchpoint): Likewise.
4832 2014-06-18 Gary Benson <gbenson@redhat.com>
4834 * i386-low.c (i386_get_debug_register_length): New macro.
4835 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4836 (i386_show_dr): Use debug_printf instead of fprintf. Use
4837 phex to format values.
4839 2014-06-18 Gary Benson <gbenson@redhat.com>
4841 * i386-low.h: Comment changes.
4842 * i386-low.c: Likewise.
4844 2014-06-18 Gary Benson <gbenson@redhat.com>
4846 * i386-low.c: Whitespace changes.
4848 2014-06-12 Tom Tromey <tromey@redhat.com>
4850 * utils.c (freeargv): Remove.
4852 2014-06-12 Tom Tromey <tromey@redhat.com>
4854 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4855 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4856 (parse_debug_format_options): Likewise.
4857 (gdbserver_usage): Likewise.
4858 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4859 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4860 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4862 ($(LIBGNU)): Depend on libiberty.
4863 (all-lib): Recurse into all subdirs.
4864 (install-only): Invoke "install" target in subdirs.
4865 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4867 * configure: Rebuild.
4868 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4869 for vasprintf, vsnprintf, or gettimeofday.
4870 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4873 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4875 * development.sh: Delete.
4876 * Makefile.in (config.status): Adjust dependency on development.sh.
4877 * configure.ac: Adjust development.sh source call.
4878 * configure: Regenerate.
4880 2014-06-02 Pedro Alves <palves@redhat.com>
4882 * ax.c (gdb_free_agent_expr): New function.
4883 * ax.h (gdb_free_agent_expr): New declaration.
4884 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4886 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4888 (clear_breakpoint_conditions_and_commands): New function.
4889 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4890 (clear_breakpoint_conditions_and_commands): New declaration.
4892 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4894 * linux-aarch64-low.c (asm/ptrace.h): Include.
4896 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4898 Fix TLS access for -static -pthread.
4899 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4900 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4901 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4903 2014-05-20 Pedro Alves <palves@redhat.com>
4905 * linux-aarch64-low.c (aarch64_insert_point)
4906 (aarch64_remove_point): No longer check whether the type is
4907 supported here. Adjust to new interface.
4908 (the_low_target): Install aarch64_supports_z_point_type as
4909 supports_z_point_type method.
4910 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4911 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4912 instead of a Z packet char. Adjust.
4913 (arm_supports_z_point_type): New function.
4914 (arm_insert_point, arm_remove_point): Adjust to new interface.
4915 (the_low_target): Install arm_supports_z_point_type.
4916 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4917 (cris_insert_point, cris_remove_point): Adjust to new interface.
4918 Don't check whether the type is supported here.
4919 (the_low_target): Install cris_supports_z_point_type.
4920 * linux-low.c (linux_supports_z_point_type): New function.
4921 (linux_insert_point, linux_remove_point): Adjust to new interface.
4922 * linux-low.h (struct linux_target_ops) <insert_point,
4923 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4924 raw_breakpoint pointer parameter.
4925 <supports_z_point_type>: New method.
4926 * linux-mips-low.c (mips_supports_z_point_type): New function.
4927 (mips_insert_point, mips_remove_point): Adjust to new interface.
4928 Use mips_supports_z_point_type.
4929 (the_low_target): Install mips_supports_z_point_type.
4930 * linux-ppc-low.c (the_low_target): Install NULL as
4931 supports_z_point_type method.
4932 * linux-s390-low.c (the_low_target): Install NULL as
4933 supports_z_point_type method.
4934 * linux-sparc-low.c (the_low_target): Install NULL as
4935 supports_z_point_type method.
4936 * linux-x86-low.c (x86_supports_z_point_type): New function.
4937 (x86_insert_point): Adjust to new insert_point interface. Use
4938 insert_memory_breakpoint. Adjust to new
4939 i386_low_insert_watchpoint interface.
4940 (x86_remove_point): Adjust to remove_point interface. Use
4941 remove_memory_breakpoint. Adjust to new
4942 i386_low_remove_watchpoint interface.
4943 (the_low_target): Install x86_supports_z_point_type.
4944 * lynx-low.c (lynx_target_ops): Install NULL as
4945 supports_z_point_type callback.
4946 * nto-low.c (nto_supports_z_point_type): New.
4947 (nto_insert_point, nto_remove_point): Adjust to new interface.
4948 (nto_target_ops): Install nto_supports_z_point_type.
4949 * mem-break.c: Adjust intro comment.
4950 (struct raw_breakpoint) <raw_type, size>: New fields.
4951 <inserted>: Update comment.
4952 <shlib_disabled>: Delete field.
4953 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4954 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4955 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4956 (raw_bkpt_type_to_target_hw_bp_type): New function.
4957 (find_enabled_raw_code_breakpoint_at): New function.
4958 (find_raw_breakpoint_at): New type and size parameters. Use them.
4959 (insert_memory_breakpoint): New function, based off
4960 set_raw_breakpoint_at.
4961 (remove_memory_breakpoint): New function.
4962 (set_raw_breakpoint_at): Reimplement.
4963 (set_breakpoint): New, based on set_breakpoint_at.
4964 (set_breakpoint_at): Reimplement.
4965 (delete_raw_breakpoint): Go through the_target->remove_point
4966 instead of assuming memory breakpoints.
4967 (find_gdb_breakpoint_at): Delete.
4968 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4969 (find_gdb_breakpoint): New function.
4970 (set_gdb_breakpoint_at): Delete.
4971 (z_type_supported): New function.
4972 (set_gdb_breakpoint_1): New function, loosely based off
4973 set_gdb_breakpoint_at.
4974 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4975 (delete_gdb_breakpoint_at): Delete.
4976 (delete_gdb_breakpoint_1): New function, loosely based off
4977 delete_gdb_breakpoint_at.
4978 (delete_gdb_breakpoint): New function.
4979 (clear_gdb_breakpoint_conditions): Rename to ...
4980 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4982 (add_condition_to_breakpoint): Make static.
4983 (add_breakpoint_condition): Take a struct breakpoint pointer
4984 instead of an address. Adjust.
4985 (gdb_condition_true_at_breakpoint): Rename to ...
4986 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4988 (gdb_condition_true_at_breakpoint): Reimplement.
4989 (add_breakpoint_commands): Take a struct breakpoint pointer
4990 instead of an address. Adjust.
4991 (gdb_no_commands_at_breakpoint): Rename to ...
4992 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4993 parameter. Return true if no breakpoint was found. Change debug
4995 (gdb_no_commands_at_breakpoint): Reimplement.
4996 (run_breakpoint_commands): Rename to ...
4997 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4998 and change return type to boolean.
4999 (run_breakpoint_commands): New function.
5000 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5001 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5002 breakpoint. Go through the_target->remove_point instead of
5003 assuming memory breakpoint.
5004 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5005 software and hardware breakpoints.
5006 (reinsert_raw_breakpoint): Go through the_target->insert_point
5007 instead of assuming memory breakpoint.
5008 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5009 software and hardware breakpoints.
5010 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5011 Check both software and hardware breakpoints.
5012 (validate_inserted_breakpoint): Assert the breakpoint is a
5013 software breakpoint. Set the inserted flag to -1 instead of
5014 setting shlib_disabled.
5015 (delete_disabled_breakpoints): Adjust.
5016 (validate_breakpoints): Only validate software breakpoints.
5017 Adjust to inserted flag change.
5018 (check_mem_read, check_mem_write): Skip breakpoint types other
5019 than software breakpoints. Adjust to inserted flag change.
5020 * mem-break.h (enum raw_bkpt_type): New enum.
5021 (raw_breakpoint, struct process_info): Forward declare.
5022 (Z_packet_to_target_hw_bp_type): Delete declaration.
5023 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5024 (set_gdb_breakpoint, delete_gdb_breakpoint)
5025 (clear_breakpoint_conditions): New declarations.
5026 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5027 (breakpoint_inserted_here): Update comment.
5028 (add_breakpoint_condition, add_breakpoint_commands): Replace
5029 address parameter with a breakpoint pointer parameter.
5030 (gdb_breakpoint_here): Update comment.
5031 (delete_gdb_breakpoint_at): Delete.
5032 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5033 * server.c (process_point_options): Take a struct breakpoint
5034 pointer instead of an address. Adjust.
5035 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5036 delete_gdb_breakpoint.
5037 * spu-low.c (spu_target_ops): Install NULL as
5038 supports_z_point_type method.
5039 * target.h: Include mem-break.h.
5040 (struct target_ops) <prepare_to_access_memory>: Update comment.
5041 <supports_z_point_type>: New field.
5042 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5043 instead of a char. Also take a raw breakpoint pointer.
5044 * win32-arm-low.c (the_low_target): Install NULL as
5045 supports_z_point_type.
5046 * win32-i386-low.c (i386_supports_z_point_type): New function.
5047 (i386_insert_point, i386_remove_point): Adjust to new interface.
5048 (the_low_target): Install i386_supports_z_point_type.
5049 * win32-low.c (win32_supports_z_point_type): New function.
5050 (win32_insert_point, win32_remove_point): Adjust to new interface.
5051 (win32_target_ops): Install win32_supports_z_point_type.
5052 * win32-low.h (struct win32_target_ops):
5053 <supports_z_point_type>: New method.
5054 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5055 instead of a char. Also take a raw breakpoint pointer.
5057 2014-05-20 Pedro Alves <palves@redhat.com>
5059 * mem-break.h: Include break-common.h.
5060 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5061 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5062 (Z_packet_to_target_hw_bp_type): New declaration.
5063 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5064 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5065 (Z_PACKET_ACCESS_WP): Delete macros.
5066 (Z_packet_to_hw_type): Delete function.
5067 * i386-low.h: Don't include break-common.h here.
5068 (Z_packet_to_hw_type): Delete declaration.
5069 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5070 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5071 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5072 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5073 * linux-aarch64-low.c: Don't include break-common.h here.
5074 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5075 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5076 (Z_packet_to_target_hw_bp_type): Delete function.
5077 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5079 (mips_insert_point, mips_remove_point): Use
5080 Z_packet_to_target_hw_bp_type.
5082 2014-05-20 Pedro Alves <palves@redhat.com>
5084 * linux-aarch64-low.c: Include break-common.h.
5085 (enum target_point_type): Delete.
5086 (Z_packet_to_point_type): Rename to ...
5087 (Z_packet_to_target_hw_bp_type): ... this, and return a
5088 target_hw_bp_type instead.
5089 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5090 instead of an enum target_point_type.
5091 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5093 (aarch64_dr_state_insert_one_point)
5094 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5095 (aarch64_handle_aligned_watchpoint)
5096 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5097 Take an enum target_hw_bp_type instead of an enum
5099 (aarch64_supports_z_point_type): New function.
5100 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5101 use Z_packet_to_target_hw_bp_type.
5103 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5105 * configure.ac: Only use -Werror by default when DEVELOPMENT
5107 * configure: Regenerate.
5109 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5111 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5112 * linux-x86-low.c (X86_64_USER_REGS): New.
5113 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5115 2014-04-28 Yao Qi <yao@codesourcery.com>
5117 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5120 2014-04-25 Pedro Alves <palves@redhat.com>
5123 * linux-low.c (linux_attach_fail_reason_string): New function.
5124 (linux_attach_lwp): Delete.
5125 (linux_attach_lwp_1): Rename to ...
5126 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5127 argument. Remove "initial" parameter. Return int instead of
5128 void. Don't error or warn here.
5129 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5130 failure to attach to the tgid. Call warning when failing to
5132 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5133 argument. Remove "initial" parameter. Return int instead of
5134 void. Don't error or warn here.
5135 (linux_attach_fail_reason_string): New declaration.
5136 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5137 interface change. Use linux_attach_fail_reason_string.
5139 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5140 Walfred Tedeschi <walfred.tedeschi@intel.com>
5142 * Makefile.in: Added rules to handle new files
5143 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5144 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5145 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5146 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5147 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5148 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5150 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5151 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5152 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5153 i386/x32-avx512.xml.
5154 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5155 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5156 i386/x32-avx512-linux.xml.
5157 * i387-fp.c (num_avx512_k_registers): New constant for number
5159 (num_avx512_zmmh_low_registers): New constant for number of
5160 lower ZMM registers (0-15).
5161 (num_avx512_zmmh_high_registers): New constant for number of
5162 higher ZMM registers (16-31).
5163 (num_avx512_ymmh_registers): New contant for number of higher
5164 YMM registers (ymm16-31 added by avx521 on x86_64).
5165 (num_avx512_xmm_registers): New constant for number of higher
5166 XMM registers (xmm16-31 added by AVX512 on x86_64).
5167 (struct i387_xsave): Add space for AVX512 registers.
5168 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5169 Add code to handle AVX512 registers.
5170 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5171 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5172 prototypei from generated file.
5173 (tdesc_amd64_avx512_linux): Likewise.
5174 (init_registers_x32_avx512_linux): Likewise.
5175 (tdesc_x32_avx512_linux): Likewise.
5176 (init_registers_i386_avx512_linux): Likewise.
5177 (tdesc_i386_avx512_linux): Likewise.
5178 (x86_64_regmap): Add AVX512 registers.
5179 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5181 (initialize_low_arch): Add code to initialize AVX512 registers.
5183 2014-04-23 Pedro Alves <palves@redhat.com>
5185 * mem-break.c (find_gdb_breakpoint_at): Make static.
5186 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5188 2014-04-23 Pedro Alves <palves@redhat.com>
5190 * i386-low.c: Don't include break-common.h here.
5191 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5192 prototype to take target_hw_bp_type as argument instead of a Z
5194 * i386-low.h: Include break-common.h here.
5195 (Z_packet_to_hw_type): Declare.
5196 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5198 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5199 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5200 (x86_remove_point): Convert the packet number to a
5201 target_hw_bp_type before calling i386_low_remove_watchpoint.
5202 * win32-i386-low.c (i386_insert_point): Convert the packet number
5203 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5204 (i386_remove_point): Convert the packet number to a
5205 target_hw_bp_type before calling i386_low_remove_watchpoint.
5207 2014-04-23 Pedro Alves <palves@redhat.com>
5209 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5211 2014-04-10 Pedro Alves <palves@redhat.com>
5213 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5214 Check if the condition or command is NULL before checking if the
5215 breakpoint is known. On success, return true.
5216 * mem-break.h (add_breakpoint_condition): Document return.
5217 (add_breakpoint_commands): Add describing comment.
5218 * server.c (skip_to_semicolon): New function.
5219 (process_point_options): Use it.
5221 2014-04-09 Pedro Alves <palves@redhat.com>
5223 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5226 2014-02-27 Pedro Alves <palves@redhat.com>
5229 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5231 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5233 (last_thread_of_process_p): Take a PID argument instead of a
5235 (linux_wait_for_lwp): Delete.
5236 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5238 (linux_low_filter_event): New function, party factored out from
5239 linux_wait_for_event.
5240 (linux_wait_for_event): Rename to ...
5241 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5242 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5243 sigsuspend. Check for zombie leaders.
5244 (linux_wait_for_event): Reimplement as wrapper around
5245 linux_wait_for_event_filtered.
5246 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5247 a normal or signal exit is seen, it's the whole process exiting.
5248 (wait_for_sigstop): No longer a for_each_inferior callback.
5249 Rewrite on top of linux_wait_for_event_filtered.
5250 (stop_all_lwps): Call wait_for_sigstop directly.
5251 * server.c (resume, handle_target_event): Handle
5252 TARGET_WAITKIND_NO_RESUMED.
5254 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5256 * win32-low.c (psapi_get_dll_name,
5257 * win32_CreateToolhelp32Snapshot): Delete.
5258 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5259 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5261 (handle_load_dll): Add function description.
5262 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5264 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5266 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5268 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5269 base address when calling win32_add_one_solib.
5270 (handle_load_dll): Delete local variable load_addr.
5271 Remove 0x1000 offset applied to DLL base address when calling
5272 win32_add_one_solib.
5273 (handle_unload_dll): Add comment.
5275 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5277 * win32-low.c (win32_add_all_dlls): Renames
5278 win32_ensure_ntdll_loaded. Rewrite function documentation.
5279 Adjust implementation to always load all DLLs.
5280 Add 0x1000 offset to DLL base address when calling
5281 win32_add_one_solib.
5282 (child_initialization_done): New static global.
5283 (do_initial_child_stuff): Set child_initialization_done to
5284 zero during child initialization, and 1 after. Replace call
5285 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5287 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5288 (handle_unload_dll): Add function documentation.
5289 (get_child_debug_event): Ignore load and unload DLL events
5290 during child initialization.
5292 2014-02-20 Doug Evans <dje@google.com>
5294 Remove global all_lwps.
5295 * inferiors.h (ptid_of): Move here from linux-low.h.
5296 (pid_of, lwpid_of): Ditto.
5297 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5298 parameter is a struct thread_info * now.
5299 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5300 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5301 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5303 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5304 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5305 * linux-arm-low.c (update_registers_callback): Update, "entry"
5306 parameter is a struct thread_info * now.
5307 Fetch lwpid from current_inferior directly.
5308 (arm_insert_point): Pass &all_threads to find_inferior instead of
5310 (arm_remove_point): Ditto.
5311 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5312 (arm_prepare_to_resume): Fetch pid from thread.
5313 (arm_read_description): Fetch lwpid from current_inferior directly.
5314 * linux-low.c (all_lwps): Delete.
5315 (delete_lwp): Delete call to remove_inferior.
5316 (handle_extended_wait): Fetch lwpid from thread.
5317 (add_lwp): Don't set lwp->entry.id. Remove call to
5318 add_inferior_to_list.
5319 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5320 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5321 (kill_one_lwp_callback): Ditto.
5322 (linux_kill): Don't dereference NULL pointer.
5323 Fetch ptid,lwpid from thread.
5324 (get_detach_signal): Fetch ptid from thread.
5325 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5326 Simplify call to regcache_invalidate_thread.
5327 (delete_lwp_callback): Update, "entry" parameter is a
5328 struct thread_info * now. Fetch pid from thread.
5329 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5330 (status_pending_p_callback): Update, "entry" parameter is a
5331 struct thread_info * now. Fetch ptid from thread.
5332 (find_lwp_pid): Update, "entry" parameter is a
5333 struct thread_info * now.
5334 (linux_wait_for_lwp): Fetch pid from thread.
5335 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5336 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5337 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5338 (dequeue_one_deferred_signal): Ditto.
5339 (cancel_breakpoint): Fetch ptid from current_inferior.
5340 (linux_wait_for_event): Pass &all_threads to find_inferior,
5341 not &all_lwps. Fetch ptid, lwpid from thread.
5342 (count_events_callback): Update, "entry" parameter is a
5343 struct thread_info * now.
5344 (select_singlestep_lwp_callback): Ditto.
5345 (select_event_lwp_callback): Ditto.
5346 (cancel_breakpoints_callback): Ditto.
5347 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5349 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5350 (unsuspend_one_lwp): Update, "entry" parameter is a
5351 struct thread_info * now.
5352 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5354 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5355 Fetch lwpid from thread, not lwp.
5356 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5357 Pass &all_threads to find_inferior, not &all_lwps.
5358 (send_sigstop): Fetch lwpid from thread, not lwp.
5359 (send_sigstop_callback): Update, "entry" parameter is a
5360 struct thread_info * now.
5361 (suspend_and_send_sigstop_callback): Ditto.
5362 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5363 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5364 struct thread_info * now.
5365 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5367 (lwp_running): Update, "entry" parameter is a
5368 struct thread_info * now.
5369 (stop_all_lwps): Fetch ptid from thread.
5370 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5371 (linux_resume_one_lwp): Fetch lwpid from thread.
5372 (linux_set_resume_request): Update, "entry" parameter is a
5373 struct thread_info * now. Fetch pid, lwpid from thread.
5374 (resume_status_pending_p): Update, "entry" parameter is a
5375 struct thread_info * now.
5376 (need_step_over_p): Ditto. Fetch lwpid from thread.
5377 (start_step_over): Fetch lwpid from thread.
5378 (linux_resume_one_thread): Update, "entry" parameter is a
5379 struct thread_info * now. Fetch lwpid from thread.
5380 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5381 (proceed_one_lwp): Update, "entry" parameter is a
5382 struct thread_info * now. Fetch lwpid from thread.
5383 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5384 struct thread_info * now.
5385 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5386 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5387 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5389 (regsets_store_inferior_registers): Ditto.
5390 (fetch_register, store_register): Ditto.
5391 (linux_read_memory, linux_write_memory): Ditto.
5392 (linux_request_interrupt): Ditto.
5393 (linux_read_auxv): Ditto.
5394 (linux_xfer_siginfo): Ditto.
5395 (linux_qxfer_spu): Ditto.
5396 (linux_qxfer_libraries_svr4): Ditto.
5397 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5398 moved to inferiors.h.
5400 (get_thread_lwp): Update.
5401 (struct lwp_info): Delete member "entry". Simplify comment for
5404 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5405 current_inferior directly.
5406 (update_watch_registers_callback): Update, "entry" parameter is a
5407 struct thread_info * now. Fetch pid from thread.
5408 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5409 (mips_insert_point): Fetch lwpid from current_inferior.
5410 Pass &all_threads to find_inferior, not &all_lwps.
5411 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5412 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5414 (mips_stopped_data_address): Ditto.
5415 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5417 * linux-tile-low.c (tile_arch_setup): Ditto.
5418 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5419 (update_debug_registers_callback): Update, "entry" parameter is a
5420 struct thread_info * now. Fetch pid from thread.
5421 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5422 Pass &all_threads to find_inferior, not &all_lwps.
5423 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5424 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5425 Pass &all_threads to find_inferior, not &all_lwps.
5426 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5427 (i386_dr_low_get_status): Ditto.
5428 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5429 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5430 (x86_linux_read_description): Ditto.
5431 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5433 2014-02-20 Doug Evans <dje@google.com>
5435 * inferiors.c (get_first_inferior): Fix buglet.
5437 2014-02-19 Doug Evans <dje@google.com>
5439 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5440 * inferiors.c (add_thread): Change result type to struct thread_info *.
5441 All callers updated.
5442 (add_lwp): Call add_thread here instead of in callers.
5443 All callers updated.
5444 * linux-low.h (get_lwp_thread): Rewrite.
5445 (struct lwp_info): New member "thread".
5447 2014-02-19 Doug Evans <dje@google.com>
5449 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5450 All callers updated.
5452 2014-02-19 Doug Evans <dje@google.com>
5454 * inferiors.c (add_thread): Fix whitespace.
5456 2014-02-19 Doug Evans <dje@google.com>
5458 * dll.c (clear_dlls): Replace accessing list implemention details
5460 * gdbthread.h (get_first_thread): Declare.
5461 * inferiors.c (for_each_inferior_with_data): New function.
5462 (get_first_thread): New function.
5463 (find_thread_ptid): Simplify.
5464 (get_first_inferior): New function.
5465 (clear_list): Delete.
5466 (one_inferior_p): New function.
5467 (clear_inferior_list): New function.
5468 (clear_inferiors): Update.
5469 * inferiors.h (for_each_inferior_with_data): Declare.
5470 (clear_inferior_list): Declare.
5471 (one_inferior_p): Declare.
5472 (get_first_inferior): Declare.
5473 * linux-low.c (linux_wait_for_event): Replace accessing list
5474 implemention details with API function.
5475 * server.c (target_running): Ditto.
5476 (accumulate_file_name_length): New function.
5477 (emit_dll_description): New function.
5478 (handle_qxfer_libraries): Replace accessing list implemention
5479 details with API function.
5480 (handle_qxfer_threads_worker): New function.
5481 (handle_qxfer_threads_proper): Replace accessing list implemention
5482 details with API function.
5483 (handle_query): Ditto.
5484 (visit_actioned_threads_callback_ftype): New typedef.
5485 (visit_actioned_threads_data): New struct.
5486 (visit_actioned_threads): Rewrite to be find_inferior callback.
5487 (resume): Call find_inferior.
5488 (handle_status): Replace accessing list implemention
5489 details with API function.
5490 (process_serial_event): Replace accessing list implemention details
5492 * target.c (set_desired_inferior): Replace accessing list implemention
5493 details with API function.
5494 * tracepoint.c (same_process_p): New function.
5495 (gdb_agent_about_to_close): Replace accessing list implemention
5496 details with API function.
5497 * win32-low.c (child_delete_thread): Replace accessing list
5498 implemention details with API function.
5499 (match_dll_by_basename): New function.
5500 (dll_is_loaded_by_basename): New function.
5501 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5502 details call to dll_is_loaded_by_basename.
5504 2014-02-19 Doug Evans <dje@google.com>
5506 * dll.h (struct dll_info): Add comment.
5507 * gdbthread.h (struct thread_info): Add comment.
5508 (current_ptid): Simplify.
5509 * inferiors.c (add_process): Update.
5510 (remove_process): Update.
5511 * inferiors.h (struct process_info): Rename member "head" to "entry".
5512 * linux-low.c (delete_lwp): Update.
5514 (last_thread_of_process_p): Update.
5515 (kill_one_lwp_callback, linux_kill): Update.
5516 (status_pending_p_callback): Update.
5517 (wait_for_sigstop): Update. Simplify read of ptid.
5518 (start_step_over): Update.
5519 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5520 (get_lwp_thread): Update.
5521 (struct lwp_info): Rename member "head" to "entry".
5522 * regcache.h (inferior_list_entry): Delete.
5523 * server.c (kill_inferior_callback): Update.
5524 (detach_or_kill_inferior_callback): Update.
5525 (print_started_pid): Update.
5526 (print_attached_pid): Update.
5527 (process_serial_event): Simplify read of ptid.
5528 * thread-db.c (thread_db_create_event): Update.
5529 (thread_db_get_tls_address): Update.
5530 * win32-low.c (current_inferior_ptid): Simplify.
5532 2014-02-19 Tom Tromey <tromey@redhat.com>
5534 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5536 (target_supports_btrace): Update.
5538 2014-02-14 Yao Qi <yao@codesourcery.com>
5540 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5541 (rsp-low-ipa.o): New target.
5543 2014-02-12 Tom Tromey <tromey@redhat.com>
5545 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5546 convert_ascii_to_int.
5547 * regcache.c (registers_to_string): Likewise.
5548 * remote-utils.c (decode_M_packet): Likewise.
5549 * server.c (process_serial_event): Likewise.
5551 2014-02-12 Tom Tromey <tromey@redhat.com>
5553 * server.c (handle_query, handle_v_run): Use hex2bin, not
5555 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5557 2014-02-12 Tom Tromey <tromey@redhat.com>
5559 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5560 convert_int_to_ascii.
5561 * regcache.c (registers_to_string, collect_register_as_string):
5563 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5565 * server.c (process_serial_event): Likewise.
5566 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5567 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5569 2014-02-12 Tom Tromey <tromey@redhat.com>
5571 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5572 bin2hex, not hexify.
5573 * tracepoint.c (cmd_qtstatus): Likewise.
5575 2014-02-12 Tom Tromey <tromey@redhat.com>
5577 * remote-utils.c (monitor_output): Pass explicit length to
5580 2014-02-12 Tom Tromey <tromey@redhat.com>
5582 * tracepoint.c: Include rsp-low.h.
5583 * server.c: Include rsp-low.h.
5584 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5585 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5587 * remote-utils.c: Include rsp-low.h.
5588 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5589 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5590 (convert_int_to_ascii, convert_ascii_to_int): Move to
5592 * regcache.c: Include rsp-low.h.
5593 * ax.c: Include rsp-low.h.
5594 * Makefile.in (SFILES): Add common/rsp-low.c.
5595 (OBS): Add rsp-low.o.
5596 (rsp-low.o): New target.
5598 2014-02-12 Tom Tromey <tromey@redhat.com>
5600 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5601 Include print-utils.h.
5602 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5603 (plongest, thirty_two, phex_nz): Remove.
5604 * Makefile.in (SFILES): Add common/print-utils.c.
5605 (OBS): Add print-utils.o.
5606 (print-utils-ipa.o): New target.
5607 (print-utils.o): New target.
5608 (IPA_OBJS): Add print-utils-ipa.o.
5610 2014-02-06 Tom Tromey <tromey@redhat.com>
5612 * Makefile.in (SFILES): Fix indentation.
5614 2014-02-05 Doug Evans <dje@google.com>
5616 * linux-low.c (linux_wait_for_event): Improve comment.
5617 (linux_wait_1): Keep current_inferior in sync with event_child.
5619 2014-01-22 Doug Evans <dje@google.com>
5621 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5623 2014-01-22 Doug Evans <dje@google.com>
5625 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5626 * configure: Regenerate.
5627 * config.in: Regenerate.
5628 * Makefile.in (SFILES): Add debug.c.
5630 * debug.c: New file.
5631 * debug.h: New file.
5632 * linux-aarch64-low.c (*): Update all debugging printfs to use
5633 debug_printf instead of fprintf.
5634 * linux-arm-low.c (*): Ditto.
5635 * linux-cris-low.c (*): Ditto.
5636 * linux-crisv32-low.c (*): Ditto.
5637 * linux-m32r-low.c (*): Ditto.
5638 * linux-sparc-low.c (*): Ditto.
5639 * linux-x86.c (*): Ditto.
5640 * linux-low.c (*): Ditto.
5641 (linux_wait_1): Add calls to debug_enter, debug_exit.
5642 (linux_wait): Remove redundant debugging printf.
5643 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5644 (linux_resume, unstop_all_lwps): Ditto.
5645 * mem-break.c (*): Update all debugging printfs to use
5646 debug_printf instead of fprintf.
5647 * remote-utils.c (*): Ditto.
5648 * thread-db.c (*): Ditto.
5649 * server.c #include <ctype.h>, "gdb_vecs.h".
5650 (debug_threads): Moved to debug.c.
5651 (*): Update all debugging printfs to use debug_printf instead of
5653 (start_inferior): Replace call to fflush with call to debug_flush.
5654 (monitor_show_help): Mention set debug-format.
5655 (parse_debug_format_options): New function.
5656 (handle_monitor_command): Handle "monitor set debug-format".
5657 (gdbserver_usage): Mention --debug-format.
5658 (main): Parse --debug-format.
5659 * server.h (debug_threads): Declaration moved to debug.h.
5661 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5662 trace_debug_1 that uses debug_printf.
5663 (tracepoint_look_up_symbols): Update all debugging printfs to use
5664 debug_printf instead of fprintf.
5666 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5668 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5671 2014-01-17 Pedro Alves <palves@redhat.com>
5674 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5675 defined after including gdb_proc_service.h.
5677 2014-01-16 Doug Evans <dje@google.com>
5679 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5680 (match_dll): Use it.
5682 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5684 * target.h (target_ops) <read_btrace>: Change parameters and
5685 return type to allow error reporting.
5686 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5687 trace reading errors on.
5688 * linux-low.c (linux_low_read_btrace): Pass trace reading
5690 (linux_low_disable_btrace): New.
5692 2014-01-15 Doug Evans <dje@google.com>
5694 * inferiors.c (thread_id_to_gdb_id): Delete.
5695 * inferiors.h (thread_id_to_gdb_id): Delete.
5697 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5699 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5700 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5703 2014-01-08 Pedro Alves <palves@redhat.com>
5705 * server.c (handle_status): Don't discard previous queued stop
5706 replies or thread's pending status here.
5707 (main) <disconnection>: Do it here instead.
5709 2014-01-08 Pedro Alves <palves@redhat.com>
5711 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5712 * server.c (visit_actioned_threads, handle_pending_status): New
5714 (handle_v_cont): Factor out parts to ...
5715 (resume): ... this new function. If in all-stop, and a thread
5716 being resumed has a pending status, report it without actually
5718 (myresume): Adjust to use the new 'resume' function.
5719 (clear_pending_status_callback, set_pending_status_callback)
5720 (find_status_pending_thread_callback): New functions.
5721 (handle_status): Handle the case of multiple threads having
5722 interesting statuses to report. Report threads' real last signal
5723 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5724 with an interesting thread to report the status for, instead of
5725 always reporting the status of the first thread.
5727 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5729 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5730 * gdbreplay.c (gdbreplay_version): Likewise.
5732 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5734 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5735 iov.iov_len with the real length in use.
5737 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5739 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5740 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5741 for all targets that use win32-low.c.
5742 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5743 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5745 2013-12-13 Pedro Alves <palves@redhat.com>
5747 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5748 if equal to TARGET_WAITKIND_LOADED.
5749 * win32-low.c (cached_status): New static global.
5750 (win32_wait): Add declaration.
5751 (do_initial_child_stuff): Flush all initial pending debug events
5752 up to the initial breakpoint.
5753 (win32_wait): If CACHED_STATUS was set, return that instead
5754 of doing a real wait. Remove the code resuming the execution
5755 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5756 during the initial phase. Also remove the code changing
5757 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5758 TARGET_WAITKIND_STOPPED.
5760 2013-12-11 Yao Qi <yao@codesourcery.com>
5762 * notif.c (handle_notif_ack): Return 0 if no notification
5765 2013-11-20 Doug Evans <dje@google.com>
5767 * linux-low.c (linux_set_resume_request): Fix comment.
5769 2013-11-20 Doug Evans <dje@google.com>
5771 * linux-low.c (resume_status_pending_p): Tweak comment.
5773 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5775 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5776 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5777 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5778 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5779 (srv_amd64_regobj): Add amd64-mpx.o.
5780 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5781 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5782 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5783 * i387-fp.c (num_pl_bnd_register) Added constant.
5784 (num_pl_bnd_cfg_registers) Added constant.
5785 (struct i387_xsave) Added reserved area and MPX fields.
5786 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5787 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5789 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5790 (init_registers_amd64_mpx_linux): Declare new function.
5791 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5792 (x86_64_regmap): Add MPX registers.
5793 (x86_linux_read_description): Add MPX case.
5794 (initialize_low_arch): Initialize MPX targets.
5796 2013-11-18 Tom Tromey <tromey@redhat.com>
5798 * configure: Rebuild.
5799 * configure.ac: Don't check for stdlib.h.
5800 * gdbreplay.c: Unconditionally include stdlib.h.
5802 2013-11-18 Tom Tromey <tromey@redhat.com>
5804 * config.in: Rebuild.
5805 * configure: Rebuild.
5806 * configure.ac: Don't use AC_HEADER_DIRENT.
5808 2013-11-18 Tom Tromey <tromey@redhat.com>
5810 * server.h: Don't check HAVE_STRING_H.
5811 * gdbreplay.c: Don't check HAVE_STRING_H.
5812 * configure: Rebuild.
5814 2013-11-18 Tom Tromey <tromey@redhat.com>
5816 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5819 2013-11-08 Tom Tromey <tromey@redhat.com>
5821 * configure, config.in: Rebuild.
5822 * configure.ac: Remove unused configury.
5824 2013-11-08 Tom Tromey <tromey@redhat.com>
5826 * acinclude.m4: Include common.m4, codeset.m4.
5827 * configure, config.in: Rebuild.
5828 * configure.ac: Use GDB_AC_COMMON.
5830 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5832 * linux-s390-low.c (HWCAP_S390_TE): New define.
5833 (s390_arch_setup): Consider the TE field in the HWCAP for
5834 determining 'have_regset_tdb'.
5836 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5839 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5842 2013-10-02 Pedro Alves <palves@redhat.com>
5844 * server.c (process_serial_event): Don't output "GDBserver
5845 exiting" if GDB is connected through stdio.
5846 * target.c (mywait): Likewise, be silent if GDB is connected
5849 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5851 * lynx-low.c (lynx_add_threads_after_attach): New function.
5852 (lynx_attach): Remove call to add_thread. Add call to
5853 lynx_add_threads_after_attach instead.
5855 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5857 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5858 * config.in, configure: Regenerated.
5860 2013-09-18 Yao Qi <yao@codesourcery.com>
5863 * server.c (start_inferior): Clear 'resume_info'.
5865 2013-09-16 Jiong Wang <jiwang@tilera.com>
5867 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5870 2013-09-16 Jiong Wang <jiwang@tilera.com>
5872 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5873 linux-tile-low.o to srv_tgtobj.
5875 2013-09-16 Will Newton <will.newton@linaro.org>
5877 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5880 2013-09-06 Pedro Alves <palves@redhat.com>
5882 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5883 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5884 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5885 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5886 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5887 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5889 2013-09-06 Pedro Alves <palves@redhat.com>
5891 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5892 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5894 2013-09-06 Pedro Alves <palves@redhat.com>
5896 * linux-amd64-ipa.c: Include tracepoint.h.
5897 * linux-i386-ipa.c: Include tracepoint.h.
5899 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5901 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5902 (ps_get_thread_area): New function.
5904 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5906 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5907 (initialize_low_arch): Call init_registers_crisv32 rather than
5908 init_register_crisv32.
5910 2013-09-05 Pedro Alves <palves@redhat.com>
5912 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5914 * hostio.h: ... this new file.
5915 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5916 win32-low.c: Include hostio.h.
5918 2013-09-05 Pedro Alves <palves@redhat.com>
5920 * server.h (gdb_client_data, handler_func, callback_handler_func)
5921 (delete_file_handler, add_file_handler, append_callback_event)
5922 (delete_callback_event, start_event_loop, initialize_event_loop):
5923 Move to event-loop.h and include it.
5924 * event-loop.h: New file.
5926 2013-09-05 Pedro Alves <palves@redhat.com>
5928 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5929 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5930 (loaded_dll, unloaded_dll): Move to ...
5931 * dll.h: ... this new file.
5932 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5934 2013-09-05 Pedro Alves <palves@redhat.com>
5936 * server.h (current_process, get_thread_process, all_processes)
5937 (add_inferior_to_list, for_each_inferior, current_inferior)
5938 (remove_inferior, add_process, remove_process, find_process_pid)
5939 (have_started_inferiors_p, have_attached_inferiors_p)
5940 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5941 (clear_inferiors, find_inferior, find_inferior_id)
5942 (inferior_target_data, set_inferior_target_data)
5943 (inferior_regcache_data, set_inferior_regcache_data): Move to
5944 inferiors.h, and include it.
5945 * inferiors.h: New file.
5947 2013-09-05 Pedro Alves <palves@redhat.com>
5949 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5953 2013-09-05 Pedro Alves <palves@redhat.com>
5955 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5957 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5958 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5959 (handle_tracepoint_general_set, handle_tracepoint_query)
5960 (tracepoint_finished_step, tracepoint_was_hit)
5961 (release_while_stepping_state_list, current_traceframe)
5962 (in_readonly_region, traceframe_read_mem)
5963 (fetch_traceframe_registers, traceframe_read_sdata)
5964 (traceframe_read_info, struct fast_tpoint_collect_status)
5965 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5966 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5967 (supply_fast_tracepoint_registers)
5968 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5969 (ipa_tdesc, claim_trampoline_space)
5970 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5971 (agent_mem_read, agent_get_trace_state_variable_value)
5972 (agent_set_trace_state_variable_value, agent_tsv_read)
5973 (agent_mem_read_string, get_raw_reg_func_addr)
5974 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5975 * tracepoint.h: ... this new file.
5977 2013-09-05 Pedro Alves <palves@redhat.com>
5979 * server.h (perror_with_name, error, fatal, warning, paddress)
5980 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5982 * utils.h: New file.
5984 2013-09-05 Pedro Alves <palves@redhat.com>
5986 * server.h (remote_debug, noack_mode, transport_is_reliable)
5987 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5988 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5989 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5990 (write_enn, initialize_async_io, enable_async_io)
5991 (disable_async_io, check_remote_input_interrupt_request)
5992 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5993 (dead_thread_notify, prepare_resume_reply)
5994 (decode_address_to_semicolon, decode_address, decode_m_packet)
5995 (decode_M_packet, decode_X_packet, decode_xfer_write)
5996 (decode_search_memory_packet, unhexify, hexify)
5997 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5998 (look_up_one_symbol, relocate_instruction)
5999 (monitor_output): Move to remote-utils.h, and include it.
6000 * remote-utils.h: New file.
6002 2013-09-05 Pedro Alves <palves@redhat.com>
6004 * server.h (_): Delete.
6006 2013-09-02 Pedro Alves <palves@redhat.com>
6008 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6009 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6011 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6013 2013-09-02 Pierre Muller <muller@sourceware.org>
6015 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6016 or WriteProcessMemory complete successfully and handle
6017 ERROR_PARTIAL_COPY error.
6019 2013-09-02 Pedro Alves <palves@redhat.com>
6021 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6022 error instead of EIO.
6024 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6027 * linux-low.c: Include filestuff.h.
6028 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6029 * lynx-low.c: Include filestuff.h.
6030 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6031 * server.c: Include filestuff.h.
6032 (main): Call notice_open_fds.
6033 * spu-low.c: Include filestuff.h.
6034 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6036 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6038 * Makefile.in: Explain why ../target and ../nat are not
6039 listed as include file search paths.
6040 (linux-waitpid.o): New object file rule.
6041 * configure.srv (srv_native_linux_obj): New variable.
6042 Replace all occurrences of linux native object files with
6043 $srv_native_linux_obj.
6044 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6045 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6046 (linux_enable_event_reporting): Remove declaration.
6047 (my_waitpid): Moved to common/linux-waitpid.c.
6048 (linux_wait_for_event): Pass ptid when calling
6049 linux_enable_event_reporting.
6050 (linux_supports_tracefork_flag): Remove.
6051 (linux_enable_event_reporting): Likewise.
6052 (linux_tracefork_grandchild): Remove.
6053 (STACK_SIZE): Moved to common/linux-ptrace.c.
6054 (linux_tracefork_child): Remove.
6055 (linux_test_for_tracefork): Remove.
6056 (linux_look_up_symbols): Call linux_supports_traceclone.
6057 (initialize_low): Remove call to linux_test_for_tracefork.
6058 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6059 common/linux-ptrace.h.
6060 (PTRACE_TYPE_ARG4): Likewise.
6061 Include linux-ptrace.h.
6063 2013-08-21 Pedro Alves <palves@redhat.com>
6065 * config.in: Renegerate.
6067 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6069 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6070 (SFILES): Remove $(srcdir)/common/target-common.c and
6071 add $(srcdir)/target/waitstatus.c.
6072 (OBS): Remove target-common.o and add waitstatus.o.
6073 (server_h): Remove $(srcdir)/../common/target-common.h and
6074 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6075 and $(srcdir)/../target/waitstatus.h.
6076 (target-common.o): Remove.
6077 (waitstatus.o): New target object file.
6078 * target.h: Do not include target-common.h and
6079 include target/resume.h, target/wait.h and
6080 target/waitstatus.h.
6082 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6084 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6085 to PTRACE_TYPE_ARG3.
6086 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6087 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6089 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6090 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6092 2013-07-27 Jie Zhang <jie@codesourcery.com>
6093 Daniel Jacobowitz <dan@codesourcery.com>
6094 Yao Qi <yao@codesourcery.com>
6096 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6097 (mips-linux-watch.o): New rule.
6098 (mips_linux_watch_h): New variable.
6099 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6101 * linux-mips-low.c: Include mips-linux-watch.h.
6102 (struct arch_process_info, struct arch_lwp_info): New.
6103 (update_watch_registers_callback): New function.
6104 (mips_linux_new_process, mips_linux_new_thread) New functions.
6105 (mips_linux_prepare_to_resume, mips_insert_point): New
6107 (mips_remove_point, mips_stopped_by_watchpoint): New
6109 (rsp_bp_type_to_target_hw_bp_type): New function.
6110 (mips_stopped_data_address): New function.
6111 (the_low_target): Add watchpoint support functions.
6113 2013-07-27 Yao Qi <yao@codesourcery.com>
6115 * i386-low.c: Include break-common.h.
6116 (enum target_hw_bp_type): Remove.
6118 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6120 * Makefile.in (SFILES): /common/target-common.c.
6121 (OBS): Add target-common.o.
6122 (server_h): Add $(srcdir)/../common/target-common.h.
6123 (target-common.o): New target.
6124 * server.c (queue_stop_reply_callback): Free
6125 status string after use.
6126 * target.c (target_waitstatus_to_string): Remove.
6127 * target.h: Include target-common.h.
6128 (resume_kind): Likewise.
6129 (target_waitkind): Likewise.
6130 (target_waitstatus): Likewise.
6131 (TARGET_WNOHANG): Likewise.
6133 2013-07-04 Yao Qi <yao@codesourcery.com>
6135 * Makefile.in (host_alias): Use @host_noncanonical@.
6136 (target_alias): Use @target_noncanonical@.
6137 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6138 ACX_NONCANONICAL_HOST.
6139 * configure: Regenerated.
6142 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6144 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6145 * configure: Rebuild.
6146 * Makefile.in (version_host, version_target): Get from configure.
6147 (version.c): Use $(version_host) and $(version_target).
6149 2013-07-03 Pedro Alves <palves@redhat.com>
6151 * Makefile.in (config.status): Depend on development.sh.
6152 * acinclude.m4: Include libmcheck.m4.
6153 * configure: Regenerate.
6155 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6157 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6158 attribute inside the parentheses.
6159 (winapi_DebugSetProcessKillOnExit): Ditto.
6160 (winapi_DebugBreakProcess): Ditto.
6161 (winapi_GenerateConsoleCtrlEvent): Ditto.
6163 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6165 * notif.h (notif_event): Add a dummy member to avoid compiler
6168 2013-07-01 Pedro Alves <palves@redhat.com>
6170 * hostio.c (HOSTIO_PATH_MAX): Define.
6171 (require_filename, handle_open, handle_unlink, handle_readlink):
6174 2013-07-01 Pedro Alves <palves@redhat.com>
6176 * server.h: Include "pathmax.h".
6177 * linux-low.c: Don't include sys/param.h.
6178 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6180 * win32-low.c: Don't include sys/param.h.
6181 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6183 2013-07-01 Pedro Alves <palves@redhat.com>
6185 * event-loop.c: Don't check HAVE_UNISTD_H before including
6187 * gdbreplay.c: Likewise.
6188 * remote-utils.c: Likewise.
6189 * server.c: Likewise.
6190 * configure.ac: Don't check for unistd.h.
6191 * configure: Regenerate.
6193 2013-06-28 Tom Tromey <tromey@redhat.com>
6195 * Makefile.in (version.c): Use version.in, not
6198 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6200 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6201 * configure: Rebuild.
6202 * Makefile.in (version_host, version_target): Get from configure.
6203 (version.c): Use $(version_host) and $(version_target).
6205 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6207 Fix trace-status to output user name without trailing colon.
6208 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6210 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6212 Fix trace-status to output proper start-time and stop-time.
6213 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6214 output start time and stop time in hex as gdb expects.
6216 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6218 * tracepoint.c (build_traceframe_info_xml): Output trace state
6219 variables present in the trace buffer.
6221 2013-06-24 Tom Tromey <tromey@redhat.com>
6223 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6225 (version.o): Remove.
6226 * gdbreplay.c: Include version.h.
6227 (version, host_name): Don't declare.
6228 * server.h: Include version.h.
6229 (version, host_name): Don't declare.
6231 2013-06-12 Pedro Alves <palves@redhat.com>
6233 * linux-x86-low.c (linux_is_elf64): Delete global.
6234 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6235 with local linux_pid_exe_is_elf_64_file use.
6237 2013-06-11 Pedro Alves <palves@redhat.com>
6239 * linux-low.c (regset_disabled, disable_regset): New functions.
6240 (regsets_fetch_inferior_registers)
6241 (regsets_store_inferior_registers): Use them.
6242 (initialize_regsets_info); Don't allocate the disabled_regsets
6244 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6247 2013-06-11 Pedro Alves <palves@redhat.com>
6249 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6252 2013-06-11 Pedro Alves <palves@redhat.com>
6254 * linux-x86-low.c (initialize_low_arch): Call
6255 init_registers_x32_avx_linux.
6257 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6259 Fix compatibility with Android Bionic.
6260 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6263 2013-06-07 Pedro Alves <palves@redhat.com>
6266 * Makefile.in (OBS): Add tdesc.o.
6267 (IPA_OBJS): Add tdesc-ipa.o.
6268 (tdesc-ipa.o): New rule.
6269 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6271 * linux-low.c (new_inferior): Delete.
6272 (disabled_regsets, num_regsets): Delete.
6273 (linux_add_process): Adjust to set the new per-process
6275 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6276 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6277 was a stop. When calling arch_setup, switch the current inferior
6278 to the thread that got an event.
6279 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6280 (regsets_fetch_inferior_registers)
6281 (regsets_store_inferior_registers): New regsets_info parameter.
6283 (linux_register_in_regsets): New regs_info parameter. Adjust to
6285 (register_addr, fetch_register, store_register): New usrregs_info
6286 parameter. Adjust to use it.
6287 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6288 parameter regs_info. Adjust to use it.
6289 (linux_fetch_registers): Get the current inferior's regs_info, and
6291 (linux_store_registers): Ditto.
6292 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6293 (initialize_low): Don't initialize the target_regsets here. Call
6294 initialize_low_arch.
6295 * linux-low.h (target_regsets): Delete declaration.
6296 (struct regsets_info): New.
6297 (struct usrregs_info): New.
6298 (struct regs_info): New.
6299 (struct process_info_private) <new_inferior>: New field.
6300 (struct linux_target_ops): Delete the num_regs, regmap, and
6301 regset_bitmap fields. New field regs_info.
6302 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6303 * i387-fp.c (num_xmm_registers): Delete.
6304 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6305 calls to new interface.
6306 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6307 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6308 Infer the number of xmm registers from the regcache's target
6310 * i387-fp.h (num_xmm_registers): Delete.
6311 * inferiors.c (add_thread): Don't install the thread's regcache
6313 * proc-service.c (gregset_info): Fetch the current inferior's
6314 regs_info. Adjust to use it.
6315 * regcache.c: Include tdesc.h.
6316 (register_bytes, reg_defs, num_registers)
6317 (gdbserver_expedite_regs): Delete.
6318 (get_thread_regcache): If the thread doesn't have a regcache yet,
6319 create one, instead of aborting gdbserver.
6320 (regcache_invalidate_one): Rename to ...
6321 (regcache_invalidate_thread): ... this.
6322 (regcache_invalidate_one): New.
6323 (regcache_invalidate): Only invalidate registers of the current
6325 (init_register_cache): Add target_desc parameter, and use it.
6326 (new_register_cache): Ditto. Assert the target description has a
6327 non zero registers_size.
6328 (regcache_cpy): Add assertions. Adjust.
6329 (realloc_register_cache, set_register_cache): Delete.
6330 (registers_to_string, registers_from_string): Adjust.
6331 (find_register_by_name, find_regno, find_register_by_number)
6332 (register_cache_size): Add target_desc parameter, and use it.
6333 (free_register_cache_thread, free_register_cache_thread_one)
6334 (regcache_release, register_cache_size): New.
6335 (register_size): Add target_desc parameter, and use it.
6336 (register_data, supply_register, supply_register_zeroed)
6337 (supply_regblock, supply_register_by_name, collect_register)
6338 (collect_register_as_string, collect_register_by_name): Adjust.
6339 * regcache.h (struct target_desc): Forward declare.
6340 (struct regcache) <tdesc>: New field.
6341 (init_register_cache, new_register_cache): Add target_desc
6343 (regcache_invalidate_thread): Declare.
6344 (regcache_invalidate_one): Delete declaration.
6345 (regcache_release): Declare.
6346 (find_register_by_number, register_cache_size, register_size)
6347 (find_regno): Add target_desc parameter.
6348 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6350 * remote-utils.c: Include tdesc.h.
6351 (outreg, prepare_resume_reply): Adjust.
6352 * server.c: Include tdesc.h.
6353 (gdbserver_xmltarget): Delete declaration.
6354 (get_features_xml, process_serial_event): Adjust.
6355 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6357 (struct process_info) <tdesc>: New field.
6358 (ipa_tdesc): Declare.
6359 * tdesc.c: New file.
6360 * tdesc.h: New file.
6361 * tracepoint.c: Include tdesc.h.
6362 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6363 (get_context_regcache): Adjust to pass ipa_tdesc down.
6364 (do_action_at_tracepoint): Adjust to get the register cache size
6365 from the context regcache's description.
6366 (traceframe_walk_blocks): Adjust to get the register cache size
6367 from the current trace frame's description.
6368 (traceframe_get_pc): Adjust to get current trace frame's
6369 description and pass it down.
6370 (gdb_collect): Adjust to get the register cache size from the
6372 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6373 (gdbserver_xmltarget): Delete.
6374 (initialize_low_tracepoint): Set the ipa's target description.
6375 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6376 (initialize_low_tracepoint): Set the ipa's target description.
6377 * linux-x86-low.c: Include tdesc.h.
6378 [__x86_64__] (is_64bit_tdesc): New.
6379 (ps_get_thread_area, x86_get_thread_area): Use it.
6380 (i386_cannot_store_register): Rename to ...
6381 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6382 (i386_cannot_fetch_register): Rename to ...
6383 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6384 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6386 (target_regsets): Rename to ...
6387 (x86_regsets): ... this.
6388 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6390 (x86_siginfo_fixup): Use is_64bit_tdesc.
6391 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6392 (tdesc_x32_avx_linux, tdesc_x32_linux)
6393 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6395 (x86_linux_update_xmltarget): Delete.
6396 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6397 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6398 (AMD64_LINUX_USER64_CS): New.
6399 (x86_linux_read_description): New, based on
6400 x86_linux_update_xmltarget.
6401 (same_process_callback): New.
6402 (x86_arch_setup_process_callback): New.
6403 (x86_linux_update_xmltarget): New.
6404 (x86_regsets_info): New.
6405 (amd64_linux_regs_info): New.
6406 (i386_linux_usrregs_info): New.
6407 (i386_linux_regs_info): New.
6408 (x86_linux_regs_info): New.
6409 (x86_arch_setup): Reimplement.
6410 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6411 (x86_emit_ops): Ditto.
6412 (the_low_target): Adjust. Install x86_linux_regs_info,
6413 x86_cannot_fetch_register, and x86_cannot_store_register.
6414 (initialize_low_arch): New.
6415 * linux-ia64-low.c (tdesc_ia64): Declare.
6416 (ia64_fetch_register): Adjust.
6417 (ia64_usrregs_info, regs_info): New globals.
6418 (ia64_regs_info): New function.
6419 (the_low_target): Adjust.
6420 (initialize_low_arch): New function.
6421 * linux-sparc-low.c (tdesc_sparc64): Declare.
6422 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6424 (sparc_arch_setup): New function.
6425 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6426 (the_low_target): Adjust.
6427 (initialize_low_arch): New function.
6428 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6429 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6430 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6431 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6432 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6433 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6434 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6435 (tdesc_powerpc_isa205_vsx64l): Declare.
6436 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6437 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6438 (ppc_set_pc, ppc_get_hwcap): Adjust.
6439 (ppc_usrregs_info): Forward declare.
6440 (!__powerpc64__) ppc_regmap_adjusted: New global.
6441 (ppc_arch_setup): Adjust to the current process'es target
6443 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6444 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6445 (ppc_store_evrregset): Adjust.
6446 (target_regsets): Rename to ...
6447 (ppc_regsets): ... this, and make static.
6448 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6449 (ppc_regs_info): New function.
6450 (the_low_target): Adjust.
6451 (initialize_low_arch): New function.
6452 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6453 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6454 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6455 (tdesc_s390x_linux64v2): Declare.
6456 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6457 (s390_fill_gregset, s390_store_last_break): Adjust.
6458 (target_regsets): Rename to ...
6459 (s390_regsets): ... this, and make static.
6460 (s390_get_pc, s390_set_pc): Adjust.
6461 (s390_get_hwcap): New target_desc parameter, and use it.
6462 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6463 (s390_arch_setup): Adjust to set the current process'es target
6464 description. Don't adjust the regmap.
6465 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6466 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6467 (regs_info_3264): New globals.
6468 (s390_regs_info): New function.
6469 (the_low_target): Adjust.
6470 (initialize_low_arch): New function.
6471 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6472 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6473 [__mips64] (init_registers_mips_linux)
6474 (init_registers_mips_dsp_linux): Delete defines.
6475 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6476 (have_dsp): New global.
6477 (mips_read_description): New, based on mips_arch_setup.
6478 (mips_arch_setup): Reimplement.
6479 (get_usrregs_info): New function.
6480 (mips_cannot_fetch_register, mips_cannot_store_register)
6481 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6482 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6483 (target_regsets): Rename to ...
6484 (mips_regsets): ... this, and make static.
6485 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6486 (dsp_regs_info, regs_info): New globals.
6487 (mips_regs_info): New function.
6488 (the_low_target): Adjust.
6489 (initialize_low_arch): New function.
6490 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6491 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6493 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6494 (arm_read_description): New, with bits factored from
6496 (arm_arch_setup): Reimplement.
6497 (target_regsets): Rename to ...
6498 (arm_regsets): ... this, and make static.
6499 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6500 (arm_regs_info): New function.
6501 (the_low_target): Adjust.
6502 (initialize_low_arch): New function.
6503 * linux-m68k-low.c (tdesc_m68k): Declare.
6504 (target_regsets): Rename to ...
6505 (m68k_regsets): ... this, and make static.
6506 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6507 (m68k_regs_info): New function.
6508 (m68k_arch_setup): New function.
6509 (the_low_target): Adjust.
6510 (initialize_low_arch): New function.
6511 * linux-sh-low.c (tdesc_sharch): Declare.
6512 (target_regsets): Rename to ...
6513 (sh_regsets): ... this, and make static.
6514 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6515 (sh_regs_info, sh_arch_setup): New functions.
6516 (the_low_target): Adjust.
6517 (initialize_low_arch): New function.
6518 * linux-bfin-low.c (tdesc_bfin): Declare.
6519 (bfin_arch_setup): New function.
6520 (bfin_usrregs_info, regs_info): New globals.
6521 (bfin_regs_info): New function.
6522 (the_low_target): Adjust.
6523 (initialize_low_arch): New function.
6524 * linux-cris-low.c (tdesc_cris): Declare.
6525 (cris_arch_setup): New function.
6526 (cris_usrregs_info, regs_info): New globals.
6527 (cris_regs_info): New function.
6528 (the_low_target): Adjust.
6529 (initialize_low_arch): New function.
6530 * linux-cris-low.c (tdesc_crisv32): Declare.
6531 (cris_arch_setup): New function.
6532 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6533 (cris_regs_info): New function.
6534 (the_low_target): Adjust.
6535 (initialize_low_arch): New function.
6536 * linux-m32r-low.c (tdesc_m32r): Declare.
6537 (m32r_arch_setup): New function.
6538 (m32r_usrregs_info, regs_info): New globals.
6539 (m32r_regs_info): Adjust.
6540 (initialize_low_arch): New function.
6541 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6542 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6543 (tic6x_usrregs_info): Forward declare.
6544 (tic6x_read_description): New function, based on ...
6545 (tic6x_arch_setup): ... this. Reimplement.
6546 (target_regsets): Rename to ...
6547 (tic6x_regsets): ... this, and make static.
6548 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6549 (tic6x_regs_info): New function.
6550 (the_low_target): Adjust.
6551 (initialize_low_arch): New function.
6552 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6553 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6554 (target_regsets): Rename to ...
6555 (xtensa_regsets): ... this, and make static.
6556 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6558 (xtensa_arch_setup, xtensa_regs_info): New functions.
6559 (the_low_target): Adjust.
6560 (initialize_low_arch): New function.
6561 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6562 (nios2_arch_setup): Set the current process'es tdesc.
6563 (target_regsets): Rename to ...
6564 (nios2_regsets): ... this.
6565 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6566 (nios2_regs_info): New function.
6567 (the_low_target): Adjust.
6568 (initialize_low_arch): New function.
6569 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6570 (aarch64_arch_setup): Set the current process'es tdesc.
6571 (target_regsets): Rename to ...
6572 (aarch64_regsets): ... this.
6573 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6574 (aarch64_regs_info): New function.
6575 (the_low_target): Adjust.
6576 (initialize_low_arch): New function.
6577 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6579 (target_regsets): Rename to ...
6580 (tile_regsets): ... this.
6581 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6582 (tile_regs_info): New function.
6583 (tile_arch_setup): Set the current process'es tdesc.
6584 (the_low_target): Adjust.
6585 (initialize_low_arch): New function.
6586 * spu-low.c (tdesc_spu): Declare.
6587 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6588 * win32-arm-low.c (tdesc_arm): Declare.
6589 (arm_arch_setup): New function.
6590 (the_low_target): Install arm_arch_setup instead of
6592 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6593 (init_windows_x86): Rename to ...
6594 (i386_arch_setup): ... this. Set `win32_tdesc'.
6595 (the_low_target): Adjust.
6596 * win32-low.c (win32_tdesc): New global.
6597 (child_add_thread): Don't create the thread cache here.
6598 (do_initial_child_stuff): Set the new process'es tdesc.
6599 * win32-low.h (struct target_desc): Forward declare.
6600 (win32_tdesc): Declare.
6601 * lynx-i386-low.c (tdesc_i386): Declare global.
6602 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6603 * lynx-low.c (lynx_tdesc): New global.
6604 (lynx_add_process): Set the new process'es tdesc.
6605 * lynx-low.h (struct target_desc): Forward declare.
6606 (lynx_tdesc): Declare global.
6607 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6608 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6609 * nto-low.c (nto_tdesc): New global.
6610 (do_attach): Set the new process'es tdesc.
6611 * nto-low.h (struct target_desc): Forward declare.
6612 (nto_tdesc): Declare.
6613 * nto-x86-low.c (tdesc_i386): Declare.
6614 (nto_x86_arch_setup): Set `nto_tdesc'.
6616 2013-06-04 Gary Benson <gbenson@redhat.com>
6618 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6619 to qSupported response when appropriate.
6620 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6621 with nonzero-length annex.
6622 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6623 arguments supplied in annex.
6625 2013-05-31 Doug Evans <dje@google.com>
6628 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6629 64 bits in 64-cross-32 environment.
6631 2013-05-28 Pedro Alves <palves@redhat.com>
6633 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6634 (aarch64-without-fpu.c): Delete rule.
6635 * configure.srv (aarch64*-*-linux*): Remove references to
6636 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6637 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6640 2013-05-24 Pedro Alves <palves@redhat.com>
6642 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6643 instead of strchr/decode_address. Error if the range isn't split
6644 with a ','. Don't assume there's be a ':' in the action.
6646 2013-05-23 Yao Qi <yao@codesourcery.com>
6647 Pedro Alves <palves@redhat.com>
6649 * linux-low.c (lwp_in_step_range): New function.
6650 (linux_wait_1): If the thread was range stepping and stopped
6651 outside the stepping range, report the stop to GDB. Otherwise,
6652 continue stepping. Add range stepping debug output.
6653 (linux_set_resume_request): Copy the step range from the resume
6655 (linux_supports_range_stepping): New.
6656 (linux_target_ops) <supports_range_stepping>: Set to
6657 linux_supports_range_stepping.
6658 * linux-low.h (struct linux_target_ops)
6659 <supports_range_stepping>: New field.
6660 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6661 * linux-x86-low.c (x86_supports_range_stepping): New.
6662 (the_low_target) <supports_range_stepping>: Set to
6663 x86_supports_range_stepping.
6664 * server.c (handle_v_cont): Handle 'r' action.
6665 (handle_v_requests): Append ";r" if the target supports range
6667 * target.h (struct thread_resume) <step_range_start,
6668 step_range_end>: New fields.
6669 (struct target_ops) <supports_range_stepping>:
6671 (target_supports_range_stepping): New macro.
6673 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6675 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6676 confusion in comment.
6678 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6680 * lynx-low.c (struct process_info_private): New type.
6681 (lynx_add_process): New function.
6682 (lynx_create_inferior, lynx_attach): Replace calls to
6683 add_process by calls to lynx_add_process.
6684 (lynx_resume): If PTID is null, then try using
6685 current_process()->private->last_wait_event_ptid.
6687 (lynx_clear_inferiors): Delete. The contents of that function
6688 has been inlined in lynx_mourn;
6689 (lynx_wait_1): Save the ptid in the process's private data.
6690 (lynx_mourn): Free the process' private data. Replace call
6691 to lynx_clear_inferiors by call to clear_inferiors.
6693 2013-05-17 Yao Qi <yao@codesourcery.com>
6695 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6698 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6700 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6701 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6702 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6703 PT_TEXT_END_ADDR guards. Update comments.
6704 (linux_target_op) <read_offsets>: Conditionally define to
6705 linux_read_offsets if the target is UCLIBC and if it defines
6706 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6708 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6709 Andrew Jenner <andrew@codesourcery.com>
6711 * Makefile.in (SFILES): Add linux-nios2-low.c.
6712 (clean): Add action to delete nios2-linux.c.
6713 (nios2-linux.c): New rule.
6714 * configure.srv: Add nios2*-*-linux*.
6715 * linux-nios2-low.c: New.
6717 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6719 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6721 2013-04-25 Hui Zhu <hui@codesourcery.com>
6724 * ax.c (ax_printf): Add fflush.
6726 2013-04-22 Tom Tromey <tromey@redhat.com>
6728 * Makefile.in (SFILES): Add filestuff.c.
6729 (OBS): Add filestuff.o.
6730 (filestuff.o): New target.
6731 * config.in, configure: Rebuild.
6732 * configure.ac: Check for fdwalk, pipe2.
6734 2013-04-17 Pedro Alves <palves@redhat.com>
6736 * configure.ac (USE_THREAD_DB): Delete variable.
6737 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6738 Don't AC_SUBST USE_THREAD_DB.
6739 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6740 * config.in, configure: Regenerate.
6742 2013-04-16 Pedro Alves <palves@redhat.com>
6744 * linux-low.h (struct lwp_info) <thread_known>: Move under
6745 the USE_THREAD_DB #ifdef.
6747 2013-04-16 Pedro Alves <palves@redhat.com>
6749 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6750 (linux-low.o): Delete rule.
6751 * linux-low.h: Always include "gdb_thread_db.h" instead of
6752 conditionally including thread_db.h.
6753 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6756 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6758 * Makefile.in (install-only): Fix make install regression.
6760 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6762 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6763 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6765 * gdbserver.1: Remove.
6767 2013-03-22 Pedro Alves <palves@redhat.com>
6769 * linux-low.c (handle_extended_wait): Don't call
6770 linux_enable_event_reporting.
6772 2013-03-15 Tony Theodore <tonyt@logyst.com>
6775 * Makefile.in (SHELL): Use @SHELL@.
6777 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6779 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6782 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6784 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6785 Remove extraneous NULL element.
6787 2013-03-13 Yao Qi <yao@codesourcery.com>
6789 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6790 'V' block in trace frame.
6792 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6794 * target.h (struct target_ops): Add btrace ops.
6795 (target_supports_btrace): New macro.
6796 (target_enable_btrace): New macro.
6797 (target_disable_btrace): New macro.
6798 (target_read_btrace): New macro.
6799 * gdbthread.h (struct thread_info): Add btrace field.
6800 * server.c: Include btrace-common.h.
6801 (handle_btrace_general_set): New function.
6802 (handle_btrace_enable): New function.
6803 (handle_btrace_disable): New function.
6804 (handle_general_set): Call handle_btrace_general_set.
6805 (handle_qxfer_btrace): New function.
6806 (struct qxfer qxfer_packets[]): Add btrace entry.
6807 * inferiors.c (remove_thread): Disable btrace.
6808 * linux-low: Include linux-btrace.h.
6809 (linux_low_enable_btrace): New function.
6810 (linux_low_read_btrace): New function.
6811 (linux_target_ops): Add btrace ops.
6812 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6813 Add srv_linux_btrace=yes.
6814 (x86_64-*-linux*): Add linux-btrace.o.
6815 Add srv_linux_btrace=yes.
6816 * configure.ac: Define HAVE_LINUX_BTRACE.
6817 * config.in: Regenerated.
6818 * configure: Regenerated.
6820 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6822 * server.c (handle_qxfer): Preserve error message if -3 is
6824 (qxfer): Document the -3 return value.
6826 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6828 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6829 (linux_btrace_h): New variable.
6830 (linux-btrace.o): New rule.
6832 2013-03-08 Stan Shebs <stan@codesourcery.com>
6833 Hafiz Abid Qadeer <abidh@codesourcery.com>
6835 * tracepoint.c (trace_buffer_size): New global.
6836 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6837 (init_trace_buffer): Change to one-argument function. Allocate
6838 trace buffer memory.
6839 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6840 handle QTBuffer:size packet.
6841 (cmd_bigqtbuffer_size): New function.
6842 (initialize_tracepoint): Call init_trace_buffer with
6843 DEFAULT_TRACE_BUFFER_SIZE.
6844 * server.c (handle_query): Add QTBuffer:size in the
6847 2013-03-07 Yao Qi <yao@codesourcery.com>
6849 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6850 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6852 (cmd_qtsp): Adjust condition. Do post increment.
6853 Set cur_action and cur_step_action back to 0.
6855 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6858 * linux-low.c (linux_write_memory): Return early success if LEN is
6861 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6863 * configure.srv: Add x86_64-*-cygwin* as target.
6865 2013-02-28 Tom Tromey <tromey@redhat.com>
6867 * configure.ac: Invoke AC_SYS_LARGEFILE.
6868 * configure, config.in: Rebuild.
6870 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6872 * win32-low.c: Throughout, fix format strings and casts of
6873 printf-like functions to avoid type related warnings on all
6875 (get_child_debug_event): Print dwDebugEventCode as hex since
6876 that's how it's usually documented.
6878 2013-02-28 Yao Qi <yao@codesourcery.com>
6880 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6883 2013-02-27 Jiong Wang <jiwang@tilera.com>
6885 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6886 (reg-tilegx32.c): New rule.
6887 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6888 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6889 different register info initializer according to elf class.
6890 (init_registers_tilgx32): New function. The tilegx32 register info
6892 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6893 (tile_store_gregset): Likewise.
6895 2013-02-27 Yao Qi <yao@codesourcery.com>
6897 * server.c (process_point_options): Print debug message when
6898 debug_threads is true.
6900 2013-02-26 Yao Qi <yao@codesourcery.com>
6902 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6904 2013-02-19 Pedro Alves <palves@redhat.com>
6905 Kai Tietz <ktietz@redhat.com>
6909 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6910 instead of strtoul to extract address from packet.
6911 (process_serial_event) <'z'>: Likewise.
6913 2013-02-18 Yao Qi <yao@codesourcery.com>
6915 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6917 2013-02-14 Pedro Alves <palves@redhat.com>
6921 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6922 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6924 2013-02-14 Pedro Alves <palves@redhat.com>
6926 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6928 2013-02-14 Pedro Alves <palves@redhat.com>
6930 * tracepoint.c (save_string): Delete.
6931 (add_tracepoint_action): Use savestring instead of save_string.
6933 2013-02-12 Pedro Alves <palves@redhat.com>
6935 * linux-xtensa-low.c: Ditto.
6936 * xtensa-xtregs.c: Ditto.
6938 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6940 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6943 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6945 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6946 aarch64_num_wp_regs and aarch64_num_bp_regs to
6947 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6949 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6951 * linux-aarch64-low.c (ps_get_thread_area): Replace
6952 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6954 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6955 Marcus Shawcroft <marcus.shawcroft@arm.com>
6956 Nigel Stephens <nigel.stephens@arm.com>
6957 Yufeng Zhang <yufeng.zhang@arm.com>
6959 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6960 (aarch64.c, aarch64-without-fpu.c): New targets.
6961 * configure.srv (aarch64*-*-linux*): New.
6962 * linux-aarch64-low.c: New file.
6964 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6966 * linux-low.c (handle_extended_wait, linux_create_inferior)
6967 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6968 (dequeue_one_deferred_signal, linux_resume_one_thread)
6969 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6970 (linux_tracefork_grandchild, linux_test_for_tracefork)
6971 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6972 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6973 where the argument is 0.
6975 2013-01-25 Yao Qi <yao@codesourcery.com>
6977 * event-loop.c: Include "queue.h".
6978 (gdb_event_p): New typedef.
6979 (struct gdb_event) <next_event>: Remove.
6980 (event_queue): Change to QUEUE(gdb_event_p).
6981 (async_queue_event): Remove.
6982 (gdb_event_xfree): New.
6983 (initialize_event_loop): New.
6984 (process_event): Use API from QUEUE.
6985 (wait_for_event): Likewise.
6986 * server.c (main): Call initialize_event_loop.
6987 * server.h (initialize_event_loop): Declare.
6989 2013-01-18 Yao Qi <yao@codesourcery.com>
6991 * ax.h (struct eval_agent_expr_context): New.
6992 (gdb_eval_agent_expr): Update declaration.
6993 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6994 TFRAME. Add new argument CTX.
6995 * server.h (struct eval_agent_expr_context): Declare.
6996 (agent_mem_read, agent_tsv_read): Update declaration.
6997 (agent_mem_read_string): Likewise.
6998 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6999 (add_traceframe_block): Add new argument TPOINT.
7000 Increase TPOINT->traceframe_usage.
7001 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7002 eval_tracepoint_agent_expr.
7003 (condition_true_at_tracepoint): Likewise.
7004 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7005 (agent_mem_read_string, agent_tsv_read): Likewise.
7007 2013-01-16 Yao Qi <yao@codesourcery.com>
7009 * linux-low.c (linux_resume_one_lwp): Don't check
7010 'lwp->bp_reinsert != 0'.
7012 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7013 Pedro Alves <palves@redhat.com>
7015 * lynx-low.c (ptrace_request_to_str): Define a temporary
7016 macro and use it to simplify this function's implementation.
7018 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7020 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7023 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7025 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7027 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7029 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7031 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7033 * lynx-low.c (lynx_resume): Use the resume_info parameter
7034 to determine the ptid for the lynx_ptrace call, unless
7035 it is equal to minus_one_ptid, in which case we use the
7036 ptid of the current_inferior.
7037 (lynx_wait_1): After having received a thread create/exit
7038 event, resume the inferior's execution using the signaling
7039 thread's ptid, rather than the old ptid.
7041 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7043 * lynx-low.c (lynx_resume): Delete variable ret.
7045 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7047 * gdbreplay.c (gdbreplay_version): Update copyright year.
7048 * server.c (gdbserver_version): Likewise.
7050 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7052 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7055 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7057 * lynx-low.c (ptrace_request_to_str): Add handling for
7060 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7062 * lynx-low.c (lynx_attach): Delete variable new_process.
7064 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7066 * lynx-low.c (lynx_create_inferior): Delete variable
7069 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7071 * lynx-low.c (ptrace_request_to_str): Do not handle
7072 PTRACE_GETTHREADLIST if this macro does not exist.
7074 2012-12-15 Yao Qi <yao@codesourcery.com>
7076 * Makefile.in (OBS): Add notif.o.
7077 * notif.c, notif.h: New.
7078 * server.c: Include "notif.h".
7079 (struct vstop_notif) <next>: Remove.
7081 (queue_stop_reply): Update.
7082 (push_event, send_next_stop_reply): Remove.
7083 (discard_queued_stop_replies): Update.
7084 (notif_stop): New variable.
7085 (handle_v_stopped): Remove.
7086 (handle_v_requests): Don't call handle_v_stopped. Call
7087 handle_ack_notif instead.
7088 (queue_stop_reply_callback): Call notif_event_enque instead
7089 of queue_stop_reply.
7090 (handle_status): Don't call send_next_stop_reply, call
7091 notif_write_event instead.
7092 (kill_inferior_callback): Likewise.
7093 (detach_or_kill_inferior_callback): Likewise.
7094 (main): Call initialize_notif.
7095 (process_serial_event): Call QUEUE_is_empty.
7096 (handle_target_event): Call notif_push instead of push event.
7097 * server.h (push_event): Remove declaration.
7099 2012-12-10 Tom Tromey <tromey@redhat.com>
7101 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7102 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7105 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7106 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7107 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7108 (amd64-linux-ipa.o, ax.o): Rewrite.
7109 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7110 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7111 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7112 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7113 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7114 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7115 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7116 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7117 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7118 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7119 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7120 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7121 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7122 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7123 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7124 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7125 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7126 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7127 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7128 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7129 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7130 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7131 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7132 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7133 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7134 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7135 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7136 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7137 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7138 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7139 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7140 (reg-tilegx.o): Remove.
7141 (all_object_files): New macro.
7142 Include .deps files.
7143 * aclocal.m4, configure: Rebuild.
7144 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7145 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7146 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7148 2012-12-05 Tom Tromey <tromey@redhat.com>
7151 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7153 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7155 * configure.ac: Check for linux/perf_event.h.
7156 * config.in: Regenerated.
7157 * configure: Regenerated.
7159 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7161 * hostio.c (handle_readlink): Decrease buffer size
7162 parameter passed to readlink by one byte.
7164 2012-11-26 Yao Qi <yao@codesourcery.com>
7166 * configure.ac (build_warnings): Append '-Wempty-body'.
7167 * configure: Regenerated.
7168 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7171 2012-11-15 Pierre Muller <muller@sourceware.org>
7173 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7174 * config.in: Regenerate.
7175 * configure: Regenerate.
7176 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7177 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7178 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7179 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7181 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7182 instead of <sys/wait.h> header.
7183 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7185 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7187 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7188 (various make rules): Remove -DGDBSERVER
7190 2012-11-09 Yao Qi <yao@codesourcery.com>
7192 * spu-low.c (current_ptid): Move it to ..
7193 * gdbthread.h: ... here. New.
7194 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7195 * server.c (myresume, process_serial_event): Likewise.
7196 * thread-db.c (thread_db_find_new_threads): Likewise.
7197 * tracepoint.c (run_inferior_command): Likewise.
7199 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7201 * server.c (handle_search_memory_1): Include access length in
7204 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7206 * linux-crisv32-low.c: Fix compile errors.
7208 2012-09-04 Yao Qi <yao@codesourcery.com>
7210 * tracepoint.c (cmd_qtsv): Adjust debug message.
7211 Don't check CUR_TPOINT.
7213 2012-08-28 Yao Qi <yao@codesourcery.com>
7215 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7216 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7217 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7218 Remove declarations of xmalloc, xreallloc, xstrdup and
7220 * Makefile.in (libiberty_h): New.
7221 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7222 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7224 2012-08-23 Yao Qi <yao@codesourcery.com>
7226 * server.h: Remove declaration of 'xsnprintf'.
7228 2012-08-22 Keith Seitz <keiths@redhat.com>
7230 * server.h: Include build-gnulib-gbserver/config.h.
7231 * gdbreplay.c: Likewise.
7233 2012-08-08 Doug Evans <dje@google.com>
7235 * Makefile.in (SFILES): Add gdb_vecs.c.
7236 (OBS): Add gdb_vecs.o.
7237 (gdb_vecs_h, host_defs_h): New variables.
7238 (thread-db.o): Add $(gdb_vecs_h) dependency.
7239 (gdb_vecs.o): New rule.
7240 * thread-db.c: #include "gdb_vecs.h".
7241 (thread_db_load_search): Use a vector to iterate over path elements.
7242 Handle text appearing after "$pdir".
7244 * configure.ac: Add check for strstr.
7245 * config.in: Regenerate.
7246 * configure: Regenerate.
7248 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7250 * hostio.c (handle_pread): If pread fails, fall back to attempting
7252 (handle_pwrite): Likewise for pwrite.
7254 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7256 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7257 between unsupported TYPE and unimplementable ADDR/LEN combination.
7258 (arm_insert_point): Act on new return value.
7260 2012-07-31 Pedro Alves <palves@redhat.com>
7262 * server.c (process_point_options): Only skip tokens if we find
7263 one that is unrecognized. Don't treat 'X' specially while
7264 skipping unrecognized tokens.
7266 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7268 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7269 to 4-byte-align HW breakpoint addresses for Thumb.
7271 2012-07-27 Yao Qi <yao@codesourcery.com>
7275 * server.h: Declare gdb_agent_about_to_close.
7276 * target.c (kill_inferior): Include "agent.h".
7277 New. Send command 'kill'.
7278 * target.h (kill_inferior): Removed macro.
7279 * tracepoint.c (gdb_agent_about_to_close): New.
7280 (gdb_agent_helper_thread): Handle command 'close'.
7281 Wait endlessly until the inferior stops.
7282 Install gdb_agent_remove_socket to atexit hook.
7283 (agent_socket_name): New static variable.
7284 (gdb_agent_socket_init): Replace local variable 'name' with
7285 'agent_socket_name'.
7286 (gdb_agent_remove_socket): New.
7288 2012-07-27 Yao Qi <yao@codesourcery.com>
7290 * server.c (process_point_options): Stop at 'X' when parsing.
7292 2012-07-19 Michael Eager <eager@eagercon.com>
7294 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7296 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7297 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7298 hardware breakpoint.
7300 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7302 * gdbserver/linux-low.c (initialize_low): Call
7303 linux_ptrace_init_warnings.
7305 2012-07-02 Doug Evans <dje@google.com>
7307 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7310 2012-07-02 Stan Shebs <stan@codesourcery.com>
7312 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7313 (ax.o): Add it to build rule.
7315 (OBS): Add format.o.
7316 (IPA_OBS): Add format.o.
7317 * server.c (handle_query): Claim support for breakpoint commands.
7318 (process_point_options): Add command case.
7319 (process_serial_event): Leave running if there are printfs in
7321 * mem-break.h (any_persistent_commands): Declare.
7322 (add_breakpoint_commands): Declare.
7323 (gdb_no_commands_at_breakpoint): Declare.
7324 (run_breakpoint_commands): Declare.
7325 * mem-break.c (struct point_command_list): New struct.
7326 (struct breakpoint): New field command_list.
7327 (any_persistent_commands): New function.
7328 (add_commands_to_breakpoint): New function.
7329 (add_breakpoint_commands): New function.
7330 (gdb_no_commands_at_breakpoint): New function.
7331 (run_breakpoint_commands): New function.
7332 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7334 * ax.c: Include format.h.
7335 (ax_printf): New function.
7336 (gdb_eval_agent_expr): Add printf opcode.
7338 2012-06-13 Yao Qi <yao@codesourcery.com>
7340 * server.c (start_inferior): Remove duplicated writes to fields
7341 'last_resume_kind' and 'last_status' of 'current_inferior'.
7343 2012-06-12 Yao Qi <yao@codesourcery.com>
7344 Pedro Alves <palves@redhat.com>
7346 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7348 * server.c (handle_v_cont): Extend comment.
7350 2012-06-11 Yao Qi <yao@codesourcery.com>
7352 * linux-low.c (linux_attach): Add 'static'.
7354 2012-06-06 Yao Qi <yao@codesourcery.com>
7356 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7358 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7360 Fix gcc -flto compilation warning.
7361 * server.c (main): Make variable multi_mode and attach volatile.
7363 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7365 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7366 if the platform doesn't know about it.
7368 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7370 * Makefile.in (SFILES): Add linux-tile-low.c.
7371 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7372 * configure.srv: Handle tilegx-*-linux*.
7373 * linux-tile-low.c: New file.
7375 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7377 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7379 2012-05-24 Pedro Alves <palves@redhat.com>
7383 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7385 2012-05-24 Pedro Alves <palves@redhat.com>
7389 Replace target_signal with gdb_signal throughout.
7391 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7393 * linux-low.c (linux_store_registers): Avoid the copying sequence
7394 when no data has been retrieved by ptrace.
7396 2012-05-22 Will Deacon <will.deacon@arm.com>
7398 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7399 Include asm/ptrace.h.
7400 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7403 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7405 * linux-low.c (linux_store_registers): Don't re-retrieve data
7406 with ptrace that has already been obtained from /proc. Always
7407 copy any data retrieved with ptrace to the buffer supplied.
7409 2012-05-11 Yao Qi <yao@codesourcery.com>
7410 Pedro Alves <palves@redhat.com>
7412 * linux-low.c (enum stopping_threads_kind): New.
7413 (stopping_threads): Change type to `enum stopping_threads_kind'.
7414 (handle_extended_wait): If stopping and suspending threads, leave
7415 the new_lwp suspended too.
7416 (linux_wait_for_event): Adjust.
7417 (stop_all_lwps): Set `stopping_threads' to
7418 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7419 whether we're suspending threads or just stopping them. Assert no
7422 2012-04-29 Yao Qi <yao@codesourcery.com>
7424 * server.h: Move some code to ...
7425 * gdbthread.h: ... here. New.
7426 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7427 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7428 (nto-low.o, win32-low.o): Likewise.
7429 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7430 * regcache.c, remote-utils.c, server.c: Likewise.
7431 * target.c, tracepoint.c, win32-low.c: Likewise.
7433 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7435 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7436 (PTRACE_ARG4_TYPE): Likewise.
7437 (PTRACE_XFER_TYPE): Likewise.
7438 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7439 ptrace to PTRACE_ARG3_TYPE.
7440 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7441 (PTRACE_ARG4_TYPE): Likewise.
7442 (PTRACE_XFER_TYPE): Likewise.
7443 (linux_detach_one_lwp): Cast fourth argument of
7444 ptrace to long then PTRACE_ARG4_TYPE.
7445 (regsets_fetch_inferior_registers): Cast third argument of
7446 ptrace to long then PTRACE_ARG3_TYPE.
7447 (regsets_store_inferior_registers): Likewise.
7449 2012-04-20 Pedro Alves <palves@redhat.com>
7451 * configure: Regenerate.
7453 2012-04-19 Pedro Alves <palves@redhat.com>
7455 * Makefile.in (GNULIB_BUILDDIR): New.
7456 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7457 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7458 (all, install-only, uninstall, clean-info, all-lib, clean): No
7459 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7460 (maintainer-clean realclean distclean): Use subdir_do.
7462 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7463 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7464 * acinclude.m4: Include acx_configure_dir.m4.
7465 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7466 calls. Call AC_PROG_RANLIB. Configure gnulib using
7469 (GNULIB_STDINT_H): Adjust.
7470 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7471 * gdbreplay.c: Include build-gnulib/config.h.
7472 * server.h: Likewise.
7473 * aclocal.m4: Regenerate.
7474 * config.in: Regenerate.
7475 * configure: Regenerate.
7477 2012-04-19 Pedro Alves <palves@redhat.com>
7479 * Makefile.in (LIBGNU, INCGNU): Adjust.
7480 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7481 (all, install-only, uninstall, clean-info, all-lib, clean)
7482 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7483 * configure.ac: Adjust AC_OUTPUT output.
7484 * aclocal.m4: Regenerate.
7485 * configure: Regenerate.
7487 2012-04-19 Pedro Alves <palves@redhat.com>
7489 * Makefile.in (generated_files): New.
7490 (server_h): Remove the explicit dependency on config.h, and depend
7491 on $generated_files.
7493 2012-04-19 Pedro Alves <palves@redhat.com>
7495 * Makefile.in (INCGNU): Add -Ignulib.
7497 2012-04-19 Pedro Alves <palves@redhat.com>
7499 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7500 (INCGNU): ... this, and spell out -I here.
7501 (GNULIB_LIB): Rename to ...
7503 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7505 2012-04-19 Pedro Alves <palves@redhat.com>
7507 * config.in: Regenerate.
7509 2012-04-19 Pedro Alves <palves@redhat.com>
7511 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7512 * server.h (memmem): Remove declaration.
7513 * config.in: Regenerate.
7514 * configure: Regenerate.
7516 2012-04-19 Yao Qi <yao@codesourcery.com>
7518 * Makefile.in (SFILES): Add common/vec.c.
7522 2012-04-19 Yao Qi <yao@codesourcery.com>
7524 * remote-utils.c (prepare_resume_reply): Replace with macro
7525 target_core_of_thread.
7526 * server.c (handle_qxfer_threads_proper): Likewise.
7527 * target.h (traget_core_of_thread): New macro.
7529 2012-04-18 Pedro Alves <palves@redhat.com>
7531 * aclocal.m4: Regenerate.
7532 * configure: Regenerate.
7534 2012-04-16 Yao Qi <yao@codesourcery.com>
7536 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7537 duplicated on address.
7539 2012-04-16 Yao Qi <yao@codesourcery.com>
7541 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7542 (struct tracepoint_action_ops) <send>: New field.
7543 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7544 (agent_expr_send, x_tracepoint_action_send): New.
7545 (l_tracepoint_action_send): New.
7546 (cmd_qtdp): Download and install tracepoint
7547 according to `use_agent'.
7548 (run_inferior_command): Add one more parameter `len'.
7550 (tracepoint_send_agent): New.
7551 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7553 2012-04-16 Yao Qi <yao@codesourcery.com>
7555 * tracepoint.c (download_tracepoints): Moved to ...
7556 (cmd_qtstart): ... here.
7558 2012-04-14 Yao Qi <yao@codesourcery.com>
7560 * tracepoint.c: Include inttypes.h.
7561 (struct collect_memory_action): Use sized types.
7562 (struct tracepoint): Likewise.
7563 (cmd_qtdp, stop_tracing): Update print specifiers.
7564 (cmd_qtp, response_tracepoint): Likewise.
7565 (collect_data_at_tracepoint): Likewise.
7566 (collect_data_at_step): Likewise.
7568 2012-04-14 Yao Qi <yao@codesourcery.com>
7570 Import gnulib module inttypes.
7571 * aclocal.m4, config.in, configure: Regenerated.
7573 2012-04-14 Yao Qi <yao@codesourcery.com>
7575 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7576 Makefile and config.status at last.
7578 2012-04-13 Yao Qi <yao@codesourcery.com>
7580 * tracepoint.c: Include stdint.h unconditionally.
7582 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7584 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7585 on BFD_HAVE_SYS_PROCFS_TYPE.
7586 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7587 * configure: Regenerate.
7588 * config.in: Likewise.
7590 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7592 * Makefile.in (clean): Also remove x32.c x32-linux.c
7593 x32-avx.c x32-avx-linux.c.
7594 (x32.o): New target.
7596 (x32-linux.o): Likewise.
7597 (x32-linux.c): Likewise.
7598 (x32-avx.o): Likewise.
7599 (x32-avx.c): Likewise.
7600 (x32-avx-linux.o): Likewise.
7601 (x32-avx-linux.c): Likewise.
7603 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7604 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7605 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7606 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7607 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7608 i386/x32-avx-linux.xml.
7610 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7611 (init_registers_x32_avx_linux): Likwise.
7612 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7613 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7615 2012-04-13 Pedro Alves <palves@redhat.com>
7617 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7618 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7619 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7620 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7623 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7625 * linux-x86-low.c (compat_x32_clock_t): New.
7626 (compat_x32_siginfo_t): Likewise.
7627 (compat_x32_siginfo_from_siginfo): Likewise.
7628 (siginfo_from_compat_x32_siginfo): Likewise.
7629 (linux_is_elf64): Likewise.
7630 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7631 and siginfo_from_compat_x32_siginfo for x32.
7632 (x86_arch_setup): Set linux_is_elf64.
7634 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7637 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7639 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7640 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7641 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7642 compatible with process.
7644 2012-04-12 Yao Qi <yao@codesourcery.com>
7646 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7647 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7648 (install-only, install-info, clean): Handle sub dir gnulib.
7649 (all-lib, am--refresh): New targets.
7650 (memmem.o): Remove target.
7651 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7652 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7653 (AC_REPLACE_FUNCS): Remove memmem.
7654 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7655 (AC_OUTPUT): Generate Makefile in gnulib/.
7656 * aclocal.m4, config.in, configure: Regenerated.
7658 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7660 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7662 2012-04-05 Pedro Alves <palves@redhat.com>
7664 -Werror=strict-aliasing
7666 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7669 2012-04-04 Pedro Alves <palves@redhat.com>
7671 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7672 (sparc_store_gregset_from_stack, sparc_store_gregset)
7673 (sparc_breakpoint_at): Fix formatting.
7675 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7677 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7679 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7680 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7681 * config.in: Regenerate.
7682 * configure: Likewise.
7684 2012-03-29 Pedro Alves <palves@redhat.com>
7686 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7687 Correct ptrace arguments.
7689 2012-03-28 Pedro Alves <palves@redhat.com>
7691 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7692 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7693 (IA64_FR1_REGNUM): New defines.
7694 (ia64_fetch_register): New.
7695 (the_low_target): Install it.
7696 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7698 * linux-low.c (linux_fetch_registers): Try the
7699 the_low_target.fetch_register hook first.
7701 * linux-arm-low.c (the_low_target): Adjust.
7702 * linux-bfin-low.c (the_low_target): Adjust.
7703 * linux-cris-low.c (the_low_target): Adjust.
7704 * linux-crisv32-low.c (the_low_target): Adjust.
7705 * linux-m32r-low.c (the_low_target): Adjust.
7706 * linux-m68k-low.c (the_low_target): Adjust.
7707 * linux-mips-low.c (the_low_target): Adjust.
7708 * linux-ppc-low.c (the_low_target): Adjust.
7709 * linux-s390-low.c (the_low_target): Adjust.
7710 * linux-sh-low.c (the_low_target): Adjust.
7711 * linux-sparc-low.c (the_low_target): Adjust.
7712 * linux-tic6x-low.c (the_low_target): Adjust.
7713 * linux-x86-low.c (the_low_target): Adjust.
7714 * linux-xtensa-low.c (the_low_target): Adjust.
7716 2012-03-26 Pedro Alves <palves@redhat.com>
7718 * server.c (handle_qxfer_libraries): Don't bail early if
7719 the_target->qxfer_libraries_svr4 is not NULL.
7721 2012-03-26 Pedro Alves <palves@redhat.com>
7723 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7725 2012-03-23 Pedro Alves <palves@redhat.com>
7727 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7728 "library-list-svr4" element's start tag when the the DSO list is
7731 2012-03-23 Pedro Alves <palves@redhat.com>
7733 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7734 a variable whose type size is the same as the inferior's pointer
7737 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7739 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7741 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7742 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7743 * linux-low.h: Include <signal.h>.
7744 (struct siginfo): Remove forward declaration.
7745 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7748 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7750 * .gitignore: Ignore more files.
7752 2012-03-19 Pedro Alves <palves@redhat.com>
7753 Jan Kratochvil <jan.kratochvil@redhat.com>
7755 * server.c (cont_thread, general_thread): Add describing comments.
7756 (start_inferior): Clear `cont_thread'.
7757 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7760 2012-03-15 Yao Qi <yao@codesourcery.com>
7762 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7764 (cmd_qtdp): ... here.
7766 2012-03-15 Yao Qi <yao@codesourcery.com>
7768 * tracepoint.c (struct tracepoint_action_ops): New.
7769 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7770 (m_tracepoint_action_download): New.
7771 (r_tracepoint_action_download): New.
7772 (x_tracepoint_action_download): New.
7773 (l_tracepoint_action_download): New.
7774 (add_tracepoint_action): Install `action->ops' according type.
7775 (download_tracepoint_1): Move code `download' function pointer
7776 of various tracepoint_action_ops.
7778 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7780 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7781 linux_ptrace_attach_warnings.
7783 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7785 * Makefile.in (linux-ptrace.o): New.
7786 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7787 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7788 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7789 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7790 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7792 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7794 2012-03-08 Yao Qi <yao@codesourcery.com>
7795 Pedro Alves <palves@redhat.com>
7797 Fix PR server/13392.
7798 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7800 * tracepoint.c (remove_tracepoint): New.
7801 (cmd_qtdp): Call remove_tracepoint when failed to install.
7803 2012-03-07 Pedro Alves <palves@redhat.com>
7805 * linux-low.c (get_detach_signal): New.
7806 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7807 Pass on pending signals to PTRACE_DETACH. Check the result of the
7809 * server.c (program_signals, program_signals_p): New.
7810 (handle_general_set): Handle QProgramSignals.
7811 * server.h (program_signals, program_signals_p): Declare.
7813 2012-03-05 Pedro Alves <palves@redhat.com>
7814 Jan Kratochvil <jan.kratochvil@redhat.com>
7816 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7819 2012-03-03 Yao Qi <yao@codesourcery.com>
7821 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7822 agent_look_up_symbols.
7824 2012-03-03 Yao Qi <yao@codesourcery.com>
7826 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7827 (linux-x86-low.o): Likewise.
7828 * server.h: Remove in_process_agent_loaded.
7829 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7833 2012-03-03 Yao Qi <yao@codesourcery.com>
7835 * tracepoint.c (gdb_agent_capability): New global.
7836 (in_process_agent_loaded_ust): Renamed to
7837 `in_process_agent_supports_ust'.
7839 (in_process_agent_supports_ust): Call agent_capability_check.
7840 (clear_installed_tracepoints): Assert that agent supports
7843 2012-03-03 Yao Qi <yao@codesourcery.com>
7845 * linux-low.c (linux_supports_agent): New.
7846 (linux_target_ops): Initialize field `supports_agent' with
7847 linux_supports_agent.
7848 * target.h (struct target_ops) <supports_agent>: New.
7849 (target_supports_agent): New macro.
7850 * server.c (handle_general_set): Handle packet 'QAgent'.
7851 (handle_query): Send `QAgent+'.
7852 * Makefile.in (server.o): Depends on agent.h.
7854 2012-03-03 Yao Qi <yao@codesourcery.com>
7856 * Makefile.in (OBS): Add agent.o.
7857 Add new rule for agent.o.
7858 Track dependence of tracepoint.c on agent.h.
7859 * tracepoint.c (run_inferior_command_1):
7860 (run_inferior_command): Call agent_run_command.
7861 (gdb_ust_connect_sync_socket): Deleted. Move it to
7863 (resume_thread, stop_thread): Likewise.
7864 (gdb_ust_socket_init): Renamed to ...
7865 (gdb_agent_socket_init): ... New.
7866 (gdb_ust_thread): Renamed to ...
7867 (gdb_agent_helper_thread): ... New.
7868 (gdb_ust_init): Move some code to ...
7869 (gdb_agent_init): ... here. New.
7870 [HAVE_UST]: Call gdb_ust_init.
7871 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7872 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7873 * config.in, configure: Regenerated.
7875 2012-03-02 Pedro Alves <palves@redhat.com>
7877 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7878 * linux-low.c (struct simple_pid_list): New.
7879 (stopped_pids): New a struct simple_pid_list pointer.
7880 (add_to_pid_list, pull_pid_from_list): New.
7881 (handle_extended_wait): Don't assume the first signal new children
7882 report is SIGSTOP. Adjust call to pull_pid_from_list.
7883 (linux_wait_for_lwp): Adjust.
7885 2012-03-02 Yao Qi <yao@codesourcery.com>
7887 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7890 2012-03-02 Yao Qi <yao@codesourcery.com>
7892 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7893 `stop_pc' and `tpoint'. Update caller.
7895 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7897 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7898 * linux-low.c (use_linux_regsets): New macro.
7899 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7900 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7901 (linux_register_in_regsets): New function.
7902 (usr_fetch_inferior_registers): Skip registers covered by
7904 (usr_store_inferior_registers): Likewise.
7905 (usr_fetch_inferior_registers): New macro.
7906 (usr_store_inferior_registers): Likewise.
7907 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7908 (linux_store_registers): Likewise.
7909 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7911 (init_registers_mips64_dsp_linux): Likewise.
7912 (init_registers_mips_linux): New macro.
7913 (init_registers_mips_dsp_linux): Likewise.
7914 (mips_dsp_num_regs): Likewise.
7915 (DSP_BASE, DSP_CONTROL): New fallback macros.
7916 (mips_base_regs): New macro.
7917 (mips_regmap): Use it. Fix the size.
7918 (mips_dsp_regmap): New variable.
7919 (mips_dsp_regset_bitmap): Likewise.
7920 (mips_arch_setup): New function.
7921 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7923 (mips_cannot_store_register): Likewise.
7924 (the_low_target): Update .arch_setup, .num_regs and .regmap
7925 initializers. Add .regset_bitmap initializer.
7926 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7928 * linux-bfin-low.c (the_low_target): Likewise.
7929 * linux-cris-low.c (the_low_target): Likewise.
7930 * linux-crisv32-low.c (the_low_target): Likewise.
7931 * linux-ia64-low.c (the_low_target): Likewise.
7932 * linux-m32r-low.c (the_low_target): Likewise.
7933 * linux-m68k-low.c (the_low_target): Likewise.
7934 * linux-ppc-low.c (the_low_target): Likewise.
7935 * linux-s390-low.c (the_low_target): Likewise.
7936 * linux-sh-low.c (the_low_target): Likewise.
7937 * linux-sparc-low.c (the_low_target): Likewise.
7938 * linux-tic6x-low.c (the_low_target): Likewise.
7939 * linux-x86-low.c (the_low_target): Likewise.
7940 * linux-xtensa-low.c (the_low_target): Likewise.
7941 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7942 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7943 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7945 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7946 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7948 2012-02-29 Yao Qi <yao@codesourcery.com>
7949 Pedro Alves <palves@redhat.com>
7951 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7952 `step_over_finished' is true.
7954 2012-02-27 Pedro Alves <palves@redhat.com>
7956 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7957 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7959 2012-02-27 Pedro Alves <palves@redhat.com>
7962 * linux-low.c (pid_is_stopped): New.
7963 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7965 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7967 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7970 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7972 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7974 2012-02-24 Luis Machado <lgustavo@codesourcery>
7976 * server.c (handle_query): Advertise support for target-side
7977 breakpoint condition evaluation.
7978 (process_point_options): New function.
7979 (process_serial_event): When inserting a breakpoint, check for
7980 a target-side condition that should be evaluated.
7982 * mem-break.c: Include regcache.h and ax.h.
7983 (point_cond_list_t): New data structure.
7984 (breakpoint) <cond_list>: New field.
7985 (find_gdb_breakpoint_at): Make non-static.
7986 (delete_gdb_breakpoint_at): Clear any target-side
7988 (clear_gdb_breakpoint_conditions): New function.
7989 (add_condition_to_breakpoint): Likewise.
7990 (add_breakpoint_condition): Likewise.
7991 (gdb_condition_true_at_breakpoint): Likewise.
7992 (gdb_breakpoint_here): Return result directly instead
7993 of going through a local variable.
7995 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7996 (clear_gdb_breakpoint_conditions): Likewise.
7997 (add_breakpoint_condition): Likewise.
7998 (gdb_condition_true_at_breakpoint): Likewise.
8000 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8001 (need_step_over_p): Take target-side breakpoint condition into
8004 2012-02-24 Luis Machado <lgustavo@codesourcery>
8006 * server.h: Include tracepoint.h.
8007 (agent_mem_read, agent_get_trace_state_variable_value,
8008 agent_set_trace_state_variable_value,
8009 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8010 get_set_tsv_func_addr): New prototypes.
8012 * ax.h: New include file.
8013 * ax.c: New source file.
8015 * tracepoint.c: Include ax.h.
8016 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8017 agent_expr, eval_result_type): Move to ax.h.
8018 (parse_agent_expr): Rename to ...
8019 (gdb_parse_agent_expr): ... this, make it non-static and move
8021 (unparse_agent_expr) Rename to ...
8022 (gdb_unparse_agent_expr): ... this, make it non-static and move
8024 (eval_agent_expr): Rename to ...
8025 (eval_tracepoint_agent_expr): ... this.
8026 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8027 forward declarations.
8028 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8029 (agent_get_trace_state_variable_value): New function.
8030 (agent_set_trace_state_variable_value): New function.
8031 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8032 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8033 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8034 (condition_true_at_tracepoint): Likewise.
8035 (parse_agent_expr): Rename to ...
8036 (gdb_parse_agent_expr): ... this and move to ax.c.
8037 (unparse_agent_expr): Rename to ...
8038 (gdb_unparse_agent_expr): ... this and move to ax.c.
8039 (gdb_agent_op_name): Move to ax.c.
8040 (eval_agent_expr): Rename to ...
8041 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8043 (eval_tracepoint_agent_expr): New function.
8044 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8046 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8048 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8049 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8050 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8051 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8052 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8053 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8054 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8055 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8056 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8057 (compile_bytecodes): Remove forward declaration.
8058 (is_goto_target): Move to ax.c.
8059 (compile_bytecodes): Move to ax.c and call
8060 agent_get_trace_state_variable_value (...) and
8061 agent_set_trace_state_variable_value (...).
8063 * Makefile.in: Update ax.c and IPA dependencies.
8065 2012-02-24 Pedro Alves <palves@redhat.com>
8067 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8068 (cmd_bigqtbuffer_circular): ... this. Only handle
8069 'QTBuffer:circular:'.
8070 (handle_tracepoint_general_set): Adjust.
8072 2012-02-16 Yao Qi <yao@codesourcery.com>
8074 * inferiors.c: Move code to ...
8075 * dll.c: .... here. New.
8076 * server.h: Declare clear_dlls.
8077 * Makefile.in (SFILES): Add dll.c.
8081 2012-02-11 Yao Qi <yao@codesourcery.com>
8083 * server.c: (handle_monitor_command): Add a new parameter
8085 (handle_query): Update caller.
8087 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8089 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8090 * configure, config.in: Regenerate.
8091 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8094 2012-02-02 Pedro Alves <palves@redhat.com>
8096 Try SIGKILL first, then PTRACE_KILL.
8097 * linux-low.c (linux_kill_one_lwp): New.
8098 (linux_kill_one_lwp): Rename to ...
8099 (kill_one_lwp_callback): ... this. Use the new
8102 2012-02-02 Pedro Alves <palves@redhat.com>
8104 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8107 2012-01-27 Pedro Alves <palves@redhat.com>
8109 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8110 (elf_64_file_p): Make static.
8111 (linux_pid_exe_is_elf_64_file): New.
8112 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8113 Delete declarations.
8114 (linux_pid_exe_is_elf_64_file): Declare.
8115 * linux-x86-low.c (x86_arch_setup): Use
8116 linux_pid_exe_is_elf_64_file.
8118 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8120 * linux-low.c (linux_wait_for_event_1): Rename to ...
8121 (linux_wait_for_event): ... here and merge it with former
8122 linux_wait_for_event - new variable wait_ptid, use it.
8123 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8125 2012-01-23 Pedro Alves <palves@redhat.com>
8127 * server.c (main): Avoid yet another case of infinite loop while
8128 detaching/killing after a longjmp.
8130 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8133 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8135 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8137 * hostio.c (handle_readlink): New function.
8138 (handle_vFile): Call it to handle "vFile:readlink" packets.
8140 2012-01-20 Pedro Alves <palves@redhat.com>
8141 Ulrich Weigand <ulrich.weigand@linaro.org>
8143 * server.c (handle_v_requests): Only support vAttach and vRun to
8144 start multiple processes when in extended protocol mode.
8146 2012-01-17 Pedro Alves <palves@redhat.com>
8148 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8149 memalign plus mprotect to allocate the scratch buffer.
8151 2012-01-13 Pedro Alves <palves@redhat.com>
8153 * server.c (attach_inferior): Clear `cont_thread'.
8155 2012-01-13 Pedro Alves <palves@redhat.com>
8157 * server.c (main): Avoid infinite loop while detaching/killing
8160 2012-01-09 Doug Evans <dje@google.com>
8162 * server.c (start_inferior): Set last_ptid in --wrapper case.
8164 2012-01-06 Yao Qi <yao@codesourcery.com>
8166 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8168 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8170 2012-01-04 Yao Qi <yao@codesourcery.com>
8172 * tracepoint.c (cmd_qtdp): Print debug message
8173 for static tracepoint.
8175 2012-01-04 Yao Qi <yao@codesourcery.com>
8177 * tracepoint.c (trace_vdebug): Differentiate debug message
8178 between gdbserver and IPA.
8180 2012-01-03 Yao Qi <yao@codesourcery.com>
8182 * tracepoint.c (tracepoint_was_hit): Don't collect for
8185 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8187 * terminal.h: Reformat copyright header.
8189 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8191 * server.c (gdbserver_version): Update copyright year.
8192 * gdbreplay.c (gdbreplay_version): Likewise.
8194 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8196 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8199 2011-12-18 Hui Zhu <teawater@gmail.com>
8200 * linux-low.c (linux_create_inferior): Save return value to ret.
8202 2011-12-18 Hui Zhu <teawater@gmail.com>
8204 * linux-low.c (linux_create_inferior): Save return value to ret.
8206 2011-12-16 Doug Evans <dje@google.com>
8208 * linux-low.c (linux_create_inferior): If stdio connection,
8209 redirect stdin from /dev/null, stdout to stderr.
8210 * remote-utils.c (remote_is_stdio): New static global.
8211 (remote_connection_is_stdio): New function.
8212 (remote_prepare): Handle stdio connection.
8213 (remote_open): Ditto.
8214 (remote_close): Don't close stdin for stdio connections.
8215 (read_prim,write_prim): New functions. Replace all calls to
8216 read/write to these.
8217 * server.c (main): Watch for "-" argument. Move call to
8218 remote_prepare before start_inferior.
8219 * server.h (STDIO_CONNECTION_NAME): New macro.
8220 (remote_connection_is_stdio): Declare.
8222 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8223 in debugging output.
8225 2011-12-15 Yao Qi <yao@codesourcery.com>
8227 * tracepoint.c: Include sys/syscall.h.
8228 (gdb_ust_thread): Remove preprocessor conditional.
8230 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8232 * linux-low.c (linux_detach_one_lwp): Call
8233 the_low_target.prepare_to_resume before detaching.
8235 2011-12-14 Yao Qi <yao@codesourcery.com>
8237 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8240 2011-12-14 Yao Qi <yao@codesourcery.com>
8242 * i386-low.c (i386_low_stopped_data_address): Initialize local
8245 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8249 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8250 DR_CONTROL unless necessary. Extend comments.
8251 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8252 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8254 2011-12-13 Yao Qi <yao@codesourcery.com>
8256 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8258 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8260 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8262 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8263 Print new debug message for such case.
8265 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8267 Fix overlapping memcpy.
8268 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8269 the read_inferior_memory transfer.
8270 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8271 write_inferior_memory transfer.
8272 (set_fast_tracepoint_jump): New variable buf. Use it for the
8273 read_inferior_memory and write_inferior_memory transfers.
8274 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8275 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8276 Use it for the write_inferior_memory transfer.
8277 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8280 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8282 * linux-low.c (fetch_register, store_register): Make code
8283 consistent, fix formatting.
8285 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8287 * linux-low.c (usr_store_inferior_registers): Factor out code
8288 to handle individual registers into...
8289 (store_register): ... this new function.
8291 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8293 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8294 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8295 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8296 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8297 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8298 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8299 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8300 (srv_xmlfiles): Add new XML files.
8302 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8304 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8305 (init_registers_s390_linux32v1): Add prototype.
8306 (init_registers_s390_linux32v2): Likewise.
8307 (init_registers_s390_linux64v1): Likewise.
8308 (init_registers_s390_linux64v2): Likewise.
8309 (init_registers_s390x_linux64v1): Likewise.
8310 (init_registers_s390x_linux64v2): Likewise.
8311 (s390_num_regs): Increment to 52.
8312 (s390_regmap): Add orig_r2 register.
8313 (s390_num_regs_3264): Increment to 68.
8314 (s390_regmap_3264): Add orig_r2 register.
8315 (s390_collect_ptrace_register): Handle orig_r2 register.
8316 (s390_supply_ptrace_register): Likewise.
8317 (s390_fill_last_break): New function.
8318 (s390_store_last_break): Likewise.
8319 (s390_fill_system_call): New function.
8320 (s390_store_system_call): Likewise.
8321 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8323 (s390_check_regset): New function.
8324 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8325 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8326 Update target_regsets for available register sets.
8328 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8329 Jan Kratochvil <jan.kratochvil@redhat.com>
8331 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8332 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8334 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8335 * linux-low.h (struct process_info_private): New member r_debug.
8336 * server.c (handle_qxfer_libraries): Call
8337 the_target->qxfer_libraries_svr4.
8338 (handle_qxfer_libraries_svr4): New function.
8339 (qxfer_packets): New entry "libraries-svr4".
8340 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8341 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8342 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8343 PACKET_qXfer_libraries_svr4.
8345 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8347 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8348 PSW address/mask between 8-byte and 16-byte formats.
8349 (s390_supply_ptrace_register): Likewise.
8350 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8351 basic addressing mode bit.
8353 2011-11-24 Stan Shebs <stan@codesourcery.com>
8355 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8357 2011-11-17 Stan Shebs <stan@codesourcery.com>
8359 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8360 (tracing_start_time): New global.
8361 (tracing_stop_time): New global.
8362 (tracing_user_name): New global.
8363 (tracing_notes): New global.
8364 (tracing_stop_note): New global.
8365 (cmd_qtstart): Set traceframe_usage, start_time.
8366 (stop_tracing): Set stop_time.
8367 (cmd_qtstatus): Report additional status.
8368 (cmd_qtp): New function.
8369 (handle_tracepoint_query): Call it.
8370 (cmd_qtnotes): New function.
8371 (handle_tracepoint_general_set): Call it.
8372 (get_timestamp): Rename from tsv_get_timestamp.
8374 2011-11-14 Stan Shebs <stan@codesourcery.com>
8375 Kwok Cheung Yeung <kcy@codesourcery.com>
8377 * linux-x86-low.c (small_jump_insn): New.
8378 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8379 trampoline and error message, build a trampoline and issue a small
8380 jump instruction to it.
8381 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8382 trampoline and error message.
8383 (x86_get_min_fast_tracepoint_insn_len): New.
8384 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8385 * linux-low.h (struct linux_target_ops): Add arguments to
8386 install_fast_tracepoint_jump_pad operation, add new operation.
8387 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8389 (linux_get_min_fast_tracepoint_insn_len): New function.
8390 (linux_target_op): Add new operation.
8391 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8392 (gdb_trampoline_buffer_end): Ditto.
8393 (gdb_trampoline_buffer_error): Ditto.
8394 (struct ipa_sym_addresses): Add fields for new IPA variables.
8395 (symbol_list): Add entries for new IPA variables.
8396 (struct tracepoint): Add fields to hold the address range of the
8397 trampoline used by the tracepoint.
8398 (trampoline_buffer_head): New static variable.
8399 (trampoline_buffer_tail): Ditto.
8400 (claim_trampoline_space): New function.
8401 (have_fast_tracepoint_trampoline_buffer): New function.
8402 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8404 (install_fast_tracepoint): Ditto, also add error buffer argument.
8405 (cmd_qtminftpilen): New function.
8406 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8407 (fast_tracepoint_from_trampoline_address): New function.
8408 (fast_tracepoint_collecting): Handle trampoline as part of jump
8410 (set_trampoline_buffer_space): New function.
8411 (initialize_tracepoint): Initialize new IPA variables.
8412 * target.h (struct target_ops): Add arguments to
8413 install_fast_tracepoint_jump_pad operation, add new
8414 get_min_fast_tracepoint_insn_len operation.
8415 (target_get_min_fast_tracepoint_insn_len): New.
8416 (install_fast_tracepoint_jump_pad): Add arguments.
8417 * server.h (IPA_BUFSIZ): Define.
8418 * linux-i386-ipa.c: Include extra header files.
8419 (initialize_fast_tracepoint_trampoline_buffer): New function.
8420 (initialize_low_tracepoint): Call it.
8421 * server.h (set_trampoline_buffer_space): Declare.
8422 (claim_trampoline_space): Ditto.
8423 (have_fast_tracepoint_trampoline_buffer): Ditto.
8425 2011-11-14 Yao Qi <yao@codesourcery.com>
8427 * server.c (handle_query): Handle InstallInTrace for qSupported.
8428 * tracepoint.c (add_tracepoint): Sort list.
8429 (install_tracepoint, download_tracepoint): New.
8430 (cmd_qtdp): Call them to install and download tracepoints.
8431 (sort_tracepoints): Removed.
8432 (cmd_qtstart): Update.
8434 2011-11-14 Yao Qi <yao@codesourcery.com>
8436 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8437 * mem-break.h: Declare.
8438 * tracepoint.c (cmd_qtstart): Move some code to ...
8439 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8441 (download_tracepoints): Move some code to ...
8442 (download_tracepoint_1): ... here. New.
8444 2011-11-08 Yao Qi <yao@codesourcery.com>
8446 * remote-utils.c (relocate_instruction): A comment fix.
8448 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8450 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8451 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8452 dr_status_mirror and dr_control_mirror from debug_reg_state.
8453 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8454 (i386_initial_stuff): Remove use of deleted globals.
8455 (i386_get_thread_context, i386_set_thread_context,
8456 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8457 from debug_reg_state.
8459 2011-11-05 Yao Qi <yao@codesourcery.com>
8461 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8462 address as TPOINT's.
8464 2011-11-02 Stan Shebs <stan@codesourcery.com>
8466 * tracepoint.c (agent_mem_read_string): New function.
8467 (eval_agent_expr): Call it for tracenz.
8468 * server.c (handle_query): Report support for tracenz.
8470 2011-11-02 Yao Qi <yao@codesourcery.com>
8472 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8474 2011-11-02 Yao Qi <yao@codesourcery.com>
8476 * target.h: Fix a typo in comment.
8478 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8480 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8481 clobber the breakpoints' shadows with fast tracepoint jumps.
8482 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8483 * target.c (write_inferior_memory): Also pass MYADDR down to
8486 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8488 * configure.ac: Check support for personality routine.
8489 * configure: Regenerate.
8490 * config.in: Likewise.
8491 * linux-low.c: Include <sys/personality.h>.
8492 Define ADDR_NO_RANDOMIZE if necessary.
8493 (linux_create_inferior): Disable address space randomization when
8494 forking inferior, if requested.
8495 (linux_supports_disable_randomization): New function.
8496 (linux_target_ops): Install it.
8497 * server.h (disable_randomization): Declare.
8498 * server.c (disable_randomization): New global variable.
8499 (handle_general_set): Handle QDisableRandomization.
8500 (handle_query): Likewise for qSupported.
8501 (main): Support --disable-randomization and --no-disable-randomization
8502 command line arguments.
8503 * target.h (struct target_ops): Add supports_disable_randomization.
8504 (target_supports_disable_randomization): New macro.
8506 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8508 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8510 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8511 [!PT_GETDSBT] (target_loadmap): New definition.
8512 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8513 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8514 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8515 and PT_GETDSBT to LINUX_LOADMAP.
8516 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8517 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8519 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8521 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8522 (arm_linux_hwbp_cap): New static variable.
8523 (arm_linux_get_hwbp_cap): Replace by ...
8524 (arm_linux_init_hwbp_cap): ... this new function.
8525 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8526 (arm_linux_get_hw_watchpoint_count): Likewise.
8527 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8528 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8529 (arm_prepare_to_resume): Use perror_with_name instead of error.
8531 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8533 * linux-arm-low.c: Include <signal.h>.
8534 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8535 (struct arm_linux_hwbp_cap): New data type.
8536 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8537 (struct arm_linux_hw_breakpoint): New data type.
8538 (MAX_BPTS, MAX_WPTS): Define.
8539 (struct arch_process_info, struct arch_lwp_info): New data types.
8540 (arm_linux_get_hwbp_cap): New function.
8541 (arm_linux_get_hw_breakpoint_count): Likewise.
8542 (arm_linux_get_hw_watchpoint_count): Likewise.
8543 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8544 (arm_hwbp_control_initialize): Likewise.
8545 (arm_hwbp_control_is_enabled): Likewise.
8546 (arm_hwbp_control_is_initialized): Likewise.
8547 (arm_hwbp_control_disable): Likewise.
8548 (arm_linux_hw_breakpoint_equal): Likewise.
8549 (arm_linux_hw_point_initialize): Likewise.
8550 (struct update_registers_data): New data structure.
8551 (update_registers_callback: New function.
8552 (arm_insert_point): Likewise.
8553 (arm_remove_point): Likewise.
8554 (arm_stopped_by_watchpoint): Likewise.
8555 (arm_stopped_data_address): Likewise.
8556 (arm_new_process): Likewise.
8557 (arm_new_thread): Likewise.
8558 (arm_prepare_to_resume): Likewise.
8559 (the_low_target): Register arm_insert_point, arm_remove_point,
8560 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8561 arm_new_thread, and arm_prepare_to_resume.
8563 2011-09-15 Stan Shebs <stan@codesourcery.com>
8565 * server.h (struct emit_ops): Add compare-goto fields.
8566 * tracepoint.c (gdb_agent_op_sizes): New table.
8567 (emit_eq_goto): New function.
8568 (emit_ne_goto): New function.
8569 (emit_lt_goto): New function.
8570 (emit_le_goto): New function.
8571 (emit_gt_goto): New function.
8572 (emit_ge_goto): New function.
8573 (is_goto_target): New function.
8574 (compile_bytecodes): Recognize special cases of compare-goto
8575 combinations and call specialized emitters for them.
8576 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8577 (amd64_emit_ne_goto): New function.
8578 (amd64_emit_lt_goto): New function.
8579 (amd64_emit_le_goto): New function.
8580 (amd64_emit_gt_goto): New function.
8581 (amd64_emit_ge_goto): New function.
8582 (amd64_emit_ops): Add the new functions.
8583 (i386_emit_eq_goto): New function.
8584 (i386_emit_ne_goto): New function.
8585 (i386_emit_lt_goto): New function.
8586 (i386_emit_le_goto): New function.
8587 (i386_emit_gt_goto): New function.
8588 (i386_emit_ge_goto): New function.
8589 (i386_emit_ops): Add the new functions.
8591 2011-09-08 Stan Shebs <stan@codesourcery.com>
8593 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8594 (i386_emit_epilogue): Restore %ebx.
8596 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8598 * server.c (step_thread): Remove definition.
8599 (process_serial_event): Don't handle Hs.
8600 * server.h (step_thread): Remove declaration.
8601 * target.c (set_desired_inferior): Remove use of step_thread.
8603 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8605 * linux-low.c: Include linux-procfs.h.
8606 (linux_attach_lwp_1): Update comments.
8607 (linux_attach): Scan for existing threads when attaching to a
8608 process that is the tgid.
8609 * Makefile.in: Update dependencies.
8611 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8613 * configure.srv: Add linux-procfs.o dependencies.
8615 2011-08-14 Yao Qi <yao@codesourcery.com>
8617 * target.h (struct target_ops): Fix indent.
8618 * win32-low.c (win32_target_ops): Fix comment.
8620 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8621 Yao Qi <yao@codesourcery.com>
8623 * Makefile.in (clean): Remove tic6x-*.c files.
8624 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8625 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8626 (tic6x-c64xp-linux.c): Likewise.
8627 * configure.srv: Add support for tic6x-*-uclinux.
8628 * linux-tic6x-low.c: New.
8629 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8631 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8632 Yao Qi <yao@codesourcery.com>
8634 * target.h (struct target_ops): Add read_loadmap.
8635 * linux-low.c (struct target_loadseg): New type.
8636 (struct target_loadmap): New type.
8637 (linux_read_loadmap): New function.
8638 (linux_target_ops): Add linux_read_loadmap.
8639 * server.c (handle_query): Support qXfer:fdpic:read packet.
8640 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8643 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8645 * win32-low.c: Include <stdint.h>.
8647 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8649 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8650 to the inferior here.
8651 (i386_remove_aligned_watchpoint): Ditto.
8652 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8653 fit part of the watchpoint in the debug registers.
8654 (i386_update_inferior_debug_regs): New.
8655 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8656 registers, and only update the inferior on success.
8657 (i386_low_remove_watchpoint): Ditto.
8659 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8661 * linux-low.c (compare_ints, unique, list_threads, show_process,
8662 linux_core_of_thread): Delete.
8663 (linux_target_ops): Change linux_core_of_thread to
8664 linux_common_core_of_thread.
8665 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8666 * utils.c (malloc_failure): Change type of argument.
8667 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8668 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8669 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8670 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8671 (IPA_OBJS): Add common-utils-ipa.o.
8672 (ptid_h, linux_osdata_h): New macros.
8673 (server_h): Add common/common-utils.h, common/xml-utils.h,
8674 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8676 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8677 ptid.o, buffer.o): New rules.
8678 (linux-low.o): Add common/linux-osdata.h as a dependency.
8679 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8680 * configure.ac: Add AC_HEADER_DIRENT check.
8681 * config.in: Regenerate.
8682 * configure: Regenerate.
8683 * remote-utils.c (xml_escape_text): Delete.
8684 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8685 buffer_xml_printf): Move to common/buffer.c.
8686 * server.c (main): Remove call to initialize_inferiors.
8687 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8688 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8689 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8690 internal_error, gdb_assert, gdb_assert_fail): Delete.
8691 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8692 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8694 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8695 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8696 initialize_inferiors): Delete.
8698 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8700 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8703 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8705 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8707 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8709 2011-05-26 Yao Qi <yao@codesourcery.com>
8711 * Makefile.in (thread-db.o): Track dependence to
8712 common/gdb_thread_db.h.
8713 * thread-db.c: include gdb_thread_db.h from right place.
8715 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8717 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8718 __FILE__ and __LINE__ to internal_error.
8720 2011-05-13 Doug Evans <dje@google.com>
8722 * thread-db.c (try_thread_db_load_from_sdir): New function.
8723 (try_thread_db_load_from_dir): New function.
8724 (thread_db_load_search): Handle $sdir, ignore $pdir.
8725 Remove trying of system directories if search of
8726 libthread-db-search-path fails, that is now done via $sdir.
8728 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8730 * server.c (handle_query): Add EnableDisableTracepoints to the list
8731 of supported features.
8732 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8734 (cmd_qtenable_disable): New.
8735 (cmd_qtstart): Install tracepoints even if disabled.
8736 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8737 receiving a QTEnable or QTDisable packet.
8738 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8739 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8741 (gdb_probe): Skip data collection if static tracepoint is disabled.
8743 2011-05-10 Doug Evans <dje@google.com>
8745 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8747 2011-05-04 Doug Evans <dje@google.com>
8749 * linux-low.c (linux_join): Skip process lookup.
8750 * spu-low.c (spu_join): Ditto.
8751 * server.c (join_inferiors_callback): Delete.
8752 (process_serial_event): For 'D' packet (detach) call join_inferior
8755 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8757 * README: Don't mention xscale*-*-linux*.
8758 * configure.srv (xscale*-*-linux*): Don't handle target.
8760 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8762 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8764 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8765 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8766 (i386_emit_void_call_2): Likewise.
8768 2011-04-26 Yao Qi <yao@codesourcery.com>
8770 * linux-low.c: Move common macros to linux-ptrace.h.
8771 Include linux-ptrace.h.
8772 * Makefile.in (linux_ptrace_h): New.
8773 (linux-low.o): Depends on linux-ptrace.h.
8775 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8777 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8778 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8779 (remote_prepare): New function with most of the TCP code from ...
8780 (remote_open): ... here. Detect PORT here unconditionally. Move also
8781 setting transport_is_reliable.
8782 * server.c (run_once): New variable.
8783 (gdbserver_usage): Document it.
8784 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8785 the first run if RUN_ONCE.
8786 * server.h (run_once, remote_prepare): New declarations.
8788 2011-04-19 Tom Tromey <tromey@redhat.com>
8790 * win32-low.c (handle_load_dll): Remove duplicate "the".
8792 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8794 Remove support for old Cygwin 1.5 versions.
8795 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8796 function to avoid warning.
8797 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8800 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8802 * gdbserver/server.h (Macro _): Define it if not available.
8804 2011-03-14 Michael Snyder <msnyder@vmware.com>
8806 * hostio.c (handle_close): Remove unnecessary null test.
8808 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8810 * Makefile.in (maintainer-clean realclean distclean): Remove
8811 "make ... subdir_do" command.
8813 2011-03-10 Michael Snyder <msnyder@vmware.com>
8815 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8817 * server.c (handle_v_run): Free alloced buffer on early return.
8819 2011-03-09 Yao Qi <yao@codesourcery.com>
8822 2011-03-04 Yao Qi <yao@codesourcery.com>
8824 * Makefile.in: Remove GNU make feature --directory.
8826 2011-03-05 Yao Qi <yao@codesourcery.com>
8828 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8829 (subdir_do): New make target. Copied from gdb/Makefile.
8830 (maintainer-clean, realclean, distclean, clean): Call corresponding
8831 make targets in common/Makefile.
8833 2011-02-11 Yao Qi <yao@codesourcery.com>
8835 * configure.ac: Call AC_PROG_RANLIB.
8836 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8837 * configure: Regenerate.
8839 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8841 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8843 2011-03-06 Yao Qi <yao@codesourcery.com>
8845 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8847 2011-03-05 Yao Qi <yao@codesourcery.com>
8849 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8850 (subdir_do): New make target. Copied from gdb/Makefile.
8851 (maintainer-clean, realclean, distclean, clean): Call corresponding
8852 make targets in common/Makefile.
8854 2011-03-04 Yao Qi <yao@codesourcery.com>
8856 * Makefile.in: Remove GNU make feature --directory.
8858 2011-03-04 Michael Snyder <msnyder@vmware.com>
8860 * server.c (queue_stop_reply): Call xmalloc not malloc.
8862 2011-03-02 Michael Snyder <msnyder@vmware.com>
8864 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8866 2011-02-28 Michael Snyder <msnyder@vmware.com>
8868 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8869 (cmd_qtframe): Ditto.
8870 (cmd_qtbuffer): Ditto.
8871 (cmd_bigqtbuffer): Ditto.
8873 * utils.c (decimal2str): Initialize 'width' to nine, then
8876 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8878 * hostio.c (require_data): Free *data, not data.
8880 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8882 * hostio.c (require_data): Use free, not xfree.
8884 2011-02-27 Michael Snyder <msnyder@vmware.com>
8886 * server.c (handle_query): Discard unused value.
8888 * hostio.c (require_data): Free malloc memory before returning
8891 2011-02-26 Michael Snyder <msnyder@vmware.com>
8893 * linux-low.c (list_threads): Call closedir for dirent.
8895 2011-02-27 Michael Snyder <msnyder@vmware.com>
8897 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8898 a case statement falls through.
8900 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8902 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8905 2011-02-26 Michael Snyder <msnyder@vmware.com>
8907 * utils.c (decimal2str): Eliminate dead code and dead param.
8908 (pulongest): Drop dead param from call to decimal2str.
8911 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8913 Revert the following patch (not approved yet):
8914 2011-02-21 Hui Zhu <teawater@gmail.com>
8915 * tracepoint.c (tp_printf): New function.
8916 (eval_agent_expr): Handle gdb_agent_op_printf.
8918 2011-02-21 Hui Zhu <teawater@gmail.com>
8920 * tracepoint.c (tp_printf): New function.
8921 (eval_agent_expr): Handle gdb_agent_op_printf.
8923 2011-02-18 Tom Tromey <tromey@redhat.com>
8925 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8926 (tracepoint.o): Likewise.
8927 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8928 (gdb_agent_op_names): Likewise.
8930 2011-02-18 Tom Tromey <tromey@redhat.com>
8932 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8933 gdb_agent_op_rot>: New constants.
8934 (gdb_agent_op_names): Add pick and roll.
8935 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8938 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8940 * aclocal.m4: Regenerated with aclocal-1.11.1.
8942 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8944 * server.c (handle_qxfer_traceframe_info): New.
8945 (qxfer_packets): Register "traceframe-info".
8946 (handle_query): Report support for qXfer:traceframe-info:read+.
8947 * tracepoint.c (match_blocktype): New.
8948 (traceframe_find_block_type): Rename to ...
8949 (traceframe_walk_blocks): ... this. Add callback filter argument,
8951 (traceframe_find_block_type): New, reimplemented on top of
8952 traceframe_walk_blocks.
8953 (build_traceframe_info_xml): New.
8954 (traceframe_read_info): New.
8955 * server.h (traceframe_read_info): Declare.
8957 2011-02-11 Yao Qi <yao@codesourcery.com>
8959 * configure.ac: Call AC_PROG_RANLIB.
8960 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8961 * configure: Regenerate.
8963 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8965 * server.c (gdb_read_memory): Change return semantics to allow
8967 (handle_search_memory_1): Adjust.
8968 (process_serial_event) <'m' packet>: Handle partial transfers.
8969 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8971 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8973 * regcache.c (init_register_cache): Initialize
8974 regcache->register_status.
8975 (free_register_cache): Release regcache->register_status.
8976 (regcache_cpy): Copy register_status.
8977 (registers_to_string): Print 'x's for unavailable registers.
8978 (supply_register): Mark the register's status valid or
8979 unavailable, depending on whether a buffer was passed in or not.
8980 (supply_register_zeroed): New.
8981 (supply_regblock): Mark the registers' status valid or
8982 unavailable, depending on whether a buffer was passed in or not.
8983 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8984 (struct regcache): New `register_status' field.
8985 (supply_register_zeroed): Declare.
8986 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8987 supply_register_zeroed, rather than passing a NULL buffer to
8989 * tracepoint.c (fetch_traceframe_registers): Update comment.
8991 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8993 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8996 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8998 * server.h (decode_xfer_write): Change prototype.
8999 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9000 and don't extract the annex here.
9001 * server.c (decode_xfer_read): Remove `annex' parameter,
9002 and don't extract the annex here.
9004 (struct qxfer): New.
9005 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9006 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9007 (handle_qxfer_statictrace): New functions, abstracted out from
9008 handle_query, and made to use the struct qxfer interface.
9009 (handle_threads_qxfer_proper): Rename to ...
9010 (handle_qxfer_threads_proper): ... this.
9011 (handle_threads_qxfer): Rename to ...
9012 (handle_qxfer_threads): ... this. Adjust.
9013 (qxfer_packets): New array.
9014 (handle_qxfer): New function.
9015 (handle_query): Use handle_qxfer.
9017 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9019 * gdbreplay.c: Shorten lines of >= 80 columns.
9020 * linux-low.c: Ditto.
9021 * linux-ppc-low.c: Ditto.
9022 * linux-s390-low.c: Ditto.
9023 * linux-sparc-low.c: Ditto.
9024 * linux-x86-low.c: Ditto.
9025 * linux-xtensa-low.c: Ditto.
9026 * mem-break.c: Ditto.
9028 * regcache.h: Ditto.
9029 * remote-utils.c: Ditto.
9032 * thread-db.c: Ditto.
9033 * tracepoint.c: Ditto.
9035 * win32-low.h: Ditto.
9037 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9039 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9042 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9044 * server.c (gdbserver_version): Update copyright year in version
9046 * gdbreplay.c (gdbreplay_version): Ditto.
9048 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9050 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9051 * linux-bfin-low.c: New file.
9052 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9053 PT_DATA_ADDR for BFIN targets.
9054 * Makefile.in (SFILES): Add linux-bfin-low.c.
9055 (clean): Remove reg-bfin.c.
9056 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9057 * README: Mention supported Blackfin targets.
9059 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9061 * .gitignore: New file.
9063 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9065 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9067 2010-10-22 Jie Zhang <jie@codesourcery.com>
9069 * Makefile.in: Add FLAGS_TO_PASS variable.
9070 (install): Remove dependency of install-only and recursively
9071 invoke make for install-only.
9073 2010-10-04 Doug Evans <dje@google.com>
9075 * Makefile.in (uninstall): Use $(DESTDIR).
9077 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9081 * linux-x86-low.c (compat_siginfo_from_siginfo)
9082 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9083 si_code is < 0. Check for si_code == SI_TIMER before checking for
9086 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9088 * lynx-i386-low.c: New file.
9089 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9091 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9093 * lynx-low.c (ptrace_request_to_str): Remove handling for
9094 request values that have been removed in LynxOS 5.x.
9096 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9098 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9101 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9103 * configure.ac: Add --enable-inprocess-agent option.
9104 * configure: Rebuilt.
9106 2010-09-06 Yao Qi <yao@codesourcery.com>
9108 * linux-low.c (linux_kill): Remove unused variable.
9109 (linux_stabilize_threads): Likewise.
9110 * server.c (start_inferior): Likewise.
9111 (queue_stop_reply_callback): Likewise.
9112 * tracepoint.c (do_action_at_tracepoint): Likewise.
9114 2010-09-06 Yao Qi <yao@codesourcery.com>
9116 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9119 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9121 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9123 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9125 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9128 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9130 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9131 gdbserver/lynx-ppc-low.c: New files.
9132 * Makefile.in (lynx_low_h): New variable.
9133 (lynx-low.o, lynx-ppc-low.o): New rules.
9134 * configure.ac: On LynxOS, link with -lnetinet.
9135 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9136 * configure: regenerate.
9138 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9140 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9141 * configure.ac: Add check for vasprintf and vsnprintf.
9142 * configure, config.in: Regenerate.
9143 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9145 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9147 * gdbreplay.c: Move include of alloca.h up, next to include of
9149 * server.h: Add include of malloc.h.
9150 * mem-break.c: Remove include of malloc.h.
9151 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9153 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9155 * Makefile.in (memmem.o): Build with -Wno-error.
9157 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9159 * utils.c (xsnprintf): Make non-static.
9160 * server.h: Add xsnprintf declaration.
9161 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9162 replace calls to snprintf by calls to xsnprintf throughout.
9164 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9166 * configure.ac: Add configure check for alloca.
9167 * configure, config.in: Regenerate.
9168 * server.h: Include alloca.h if it exists.
9169 * gdbreplay.c: Include alloca.h if it exists.
9171 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9173 * linux-low.c (__SIGRTMIN): Define if not already defined.
9174 (linux_create_inferior): Check for __ANDROID__ rather than
9176 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9177 are already deferred.
9178 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9179 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9180 stopped and already has a pending signal to report.
9181 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9182 a pending signal to report or is moving out of a jump pad.
9183 (linux_init_signals): Check for __ANDROID__ rather than
9186 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9188 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9189 debug_threads check. Avoid a linear search when not doing debug
9192 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9194 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9195 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9196 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9197 (process_event): Change local fd's type to gdb_fildes_t.
9198 (create_file_handler): Adjust prototype.
9199 (delete_file_handler): Adjust prototype.
9200 (handle_file_event): Adjust prototype. Use pfildes.
9201 (create_file_event): Adjsut prototype.
9202 * remote-utils.c (remote_desc, listen_desc): Change type to
9204 * server.h: New gdb_fildes_t typedef.
9205 [USE_WIN32API]: Include winsock2.h.
9206 (delete_file_handler, add_file_handler): Adjust prototypes.
9208 * utils.c (pfildes): New.
9210 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9212 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9213 * configure: Regenerate.
9215 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9217 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9218 (linux_done_accessing_memory): ... this.
9219 (linux_target_ops): Adjust.
9220 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9221 * nto-low.c (nto_target_ops): Adjust comment.
9222 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9223 * spu-low.c (spu_target_ops): Adjust comment.
9224 * target.h (target_ops): Rename unprepare_to_access_memory field
9225 to done_accessing_memory.
9226 (unprepare_to_access_memory): Rename to ...
9227 (done_accessing_memory): ... this.
9229 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9231 * linux-low.c (linux_prepare_to_access_memory): New.
9232 (linux_unprepare_to_access_memory): New.
9233 (linux_target_ops): Install them.
9234 * server.c (read_memory): Rename to ...
9235 (gdb_read_memory): ... this. Use
9236 prepare_to_access_memory/prepare_to_access_memory.
9237 (write_memory): Rename to ...
9238 (gdb_write_memory): ... this. Use
9239 prepare_to_access_memory/prepare_to_access_memory.
9240 (handle_search_memory_1): Adjust.
9241 (process_serial_event): Adjust.
9242 * target.h (struct target_ops): New fields
9243 prepare_to_access_memory and unprepare_to_access_memory.
9244 (prepare_to_access_memory, unprepare_to_access_memory): New.
9245 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9246 prepare_to_access_memory/prepare_to_access_memory.
9247 * nto-low.c (nto_target_ops): Adjust.
9248 * spu-low.c (spu_target_ops): Adjust.
9249 * win32-low.c (win32_target_ops): Adjust.
9251 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9253 * Makefile.in (WARN_CFLAGS): Get it from configure.
9254 (WERROR_CFLAGS): New.
9255 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9256 * configure.ac: Introduce --enable-werror, which adds -Werror to
9257 the compiler command line. Enabled by default. Disable with
9258 --disable-werror. Add -Wdeclaration-after-statement
9259 Wpointer-arith and -Wformat-nonliteral to warning flags.
9260 * configure: Regenerate.
9262 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9264 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9266 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9268 * gdbreplay.c (remote_error): New.
9270 (expect): Use gdbchar. Check for error reading from GDB.
9271 Clarify sync error output.
9272 (play): Check for errors writing to GDB.
9273 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9274 * remote-utils.c (getpkt): Check for errors writing to the remote
9277 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9279 * linux-low.c (linux_wait_1): Move non-debugging code out of
9280 `debug_threads' control.
9282 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9284 * linux-low.c (linux_wait_1): Don't set last_status here.
9285 * server.c (push_event, queue_stop_reply_callback): Assert we're
9286 not pushing a TARGET_WAITKIND_IGNORE event.
9287 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9288 (myresume, handle_target_event): Set the thread's last_resume_kind
9289 and last_status from the target returned status.
9291 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9295 * linux-x86-low.c (update_debug_registers_callback): New.
9296 (i386_dr_low_set_addr): Use it.
9297 (i386_dr_low_get_addr): New.
9298 (i386_dr_low_set_control): Use update_debug_registers_callback.
9299 (i386_dr_low_get_control): New.
9300 (i386_dr_low_get_status): Adjust.
9301 * linux-low.c (linux_stop_lwp): New.
9302 * linux-low.h (linux_stop_lwp): Declare.
9304 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9305 argument instead of a i386_debug_reg_state.
9306 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9307 a i386_debug_reg_state.
9308 (i386_insert_aligned_watchpoint): Adjust.
9309 (i386_remove_aligned_watchpoint): Adjust.
9310 (i386_low_stopped_data_address): Read the debug registers from the
9311 inferior instead of from the mirrors.
9312 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9313 (i386_dr_low_get_addr): Declare.
9314 (i386_dr_low_get_control): Declare.
9315 (i386_dr_low_get_status): Change prototype.
9317 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9318 (i386_dr_low_get_addr): New.
9319 (i386_dr_low_get_control): New.
9320 (i386_dr_low_get_status): Adjust prototype. Return
9322 (i386_initial_stuff): Clear dr_status_mirror and
9324 (i386_get_thread_context): Adjust.
9325 (i386_set_thread_context): Adjust.
9326 (i386_thread_added): Adjust.
9328 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9330 * linux-low.h (linux_thread_area): Delete declaration.
9332 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9334 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9335 after its termination.
9337 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9339 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9340 (gdb_wants_all_stopped): Delete.
9341 (linux_wait_1): Don't call them.
9342 * server.c (handle_v_cont): Tag all threads as want-stopped.
9343 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9344 stopped as "client-wants-stopped".
9346 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9348 * Makefile.in (signals_h): New.
9349 (server_h): Depend on it.
9350 (server.o): Don't depend on $(signals_def).
9351 (signals.o): Depend on $(signals_def).
9353 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9355 * Makefile.in (signals_def): New.
9356 (server_h): Append include/gdb/signals.h and signals_def.
9357 (server.o): Append signals_def.
9359 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9361 * server.c (handle_target_event): Use target_signal_to_host for
9362 resume_info.sig initialization.
9363 * target.h (struct thread_resume) <sig>: New comment.
9365 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9367 * server.c (handle_query): strcpy() the returned string from paddress()
9368 instead of sprintf().
9369 * utils.c (paddress): Return phex_nz().
9371 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9373 * server.c (handle_v_cont): Call mourn_inferior if process
9375 (myresume): Likewise.
9377 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9379 Static tracepoints, and integration with UST.
9381 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9382 * mem-break.c (uninsert_all_breakpoints)
9383 (reinsert_all_breakpoints): New.
9384 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9385 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9386 (gdb_agent_ust_loaded, helper_thread_id)
9387 (gdb_agent_helper_thread_id): New macros.
9388 (struct ipa_sym_addresses): Add addr_ust_loaded,
9389 addr_helper_thread_id, addr_cmd_buf.
9390 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9391 (in_process_agent_loaded_ust): New.
9392 (write_e_ust_not_loaded): New.
9393 (maybe_write_ipa_ust_not_loaded): New.
9394 (struct collect_static_trace_data_action): New.
9395 (enum tracepoint_type) <static_tracepoint>: New.
9396 (struct tracepoint) <handle>: Mention static tracepoints.
9397 (struct static_tracepoint_ctx): New.
9398 (CMD_BUF_SIZE): New.
9399 (add_tracepoint_action): Handle static tracepoint actions.
9400 (unprobe_marker_at): New.
9401 (clear_installed_tracepoints): Handle static tracepoints.
9402 (cmd_qtdp): Handle static tracepoints.
9403 (probe_marker_at): New.
9404 (cmd_qtstart): Handle static tracepoints.
9405 (response_tracepoint): Handle static tracepoints.
9406 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9407 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9408 (get_context_regcache): Handle static tracepoints.
9409 (do_action_at_tracepoint): Handle static tracepoint actions.
9410 (traceframe_find_block_type): Handle static trace data blocks.
9411 (traceframe_read_sdata): New.
9412 (download_tracepoints): Download static tracepoint actions.
9413 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9414 (GDB_PROBE_NAME): New.
9419 (ust_marker_to_static_tracepoint): New.
9421 (collect_ust_data_at_tracepoint): New.
9422 (gdb_ust_probe): New.
9423 (UNIX_PATH_MAX, SOCK_DIR): New.
9424 (gdb_ust_connect_sync_socket): New.
9425 (resume_thread, stop_thread): New.
9426 (run_inferior_command): New.
9427 (init_named_socket): New.
9428 (gdb_ust_socket_init): New.
9429 (cstr_to_hexstr): New.
9431 (first_marker, next_marker): New.
9432 (response_ust_marker): New.
9433 (cmd_qtfstm, cmd_qtsstm): New.
9434 (unprobe_marker_at, probe_marker_at): New.
9435 (cmd_qtstmat, gdb_ust_thread): New.
9436 (gdb_ust_init): New.
9437 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9438 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9440 (x86_64_st_collect_regmap): New.
9441 (X86_64_NUM_ST_COLLECT_GREGS): New.
9442 (AMD64_RIP_REGNUM): New.
9443 (supply_static_tracepoint_registers): New.
9444 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9446 (i386_st_collect_regmap): New.
9447 (i386_NUM_ST_COLLECT_GREGS): New.
9448 (supply_static_tracepoint_registers): New.
9449 * server.c (handle_query): Handle qXfer:statictrace:read.
9450 <qSupported>: Report support for StaticTracepoints, and
9451 qXfer:statictrace:read features.
9452 * server.h (traceframe_read_sdata)
9453 (supply_static_tracepoint_registers): Declare.
9454 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9455 (unpack_varlen_hex): Include in IPA build.
9456 * Makefile.in (ustlibs, ustinc): New.
9457 (IPA_OBJS): Add remote-utils-ipa.o.
9458 ($(IPA_LIB)): Link -ldl and -lpthread.
9460 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9461 * config.in, configure: Regenerate.
9463 2010-06-20 Ian Lance Taylor <iant@google.com>
9464 Pedro Alves <pedro@codesourcery.com>
9466 * linux-x86-low.c (always_true): Delete.
9467 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9468 trying to fool the compiler with always_true.
9470 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9472 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9473 conditions in gdbserver.
9475 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9477 * spu-low.c (spu_read_memory): Wrap around local store limit.
9478 (spu_write_memory): Likewise.
9480 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9482 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9483 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9485 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9487 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9488 uses with LONGEST uses.
9490 2010-06-14 Stan Shebs <stan@codesourcery.com>
9491 Pedro Alves <pedro@codesourcery.com>
9495 * linux-x86-low.c: Include limits.h.
9500 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9501 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9502 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9503 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9504 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9505 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9506 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9507 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9508 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9509 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9510 (amd64_emit_void_call_2): New.
9511 (amd64_emit_ops): New.
9512 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9513 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9514 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9515 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9516 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9517 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9518 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9519 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9520 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9521 (i386_emit_stack_adjust, i386_emit_int_call_1)
9522 (i386_emit_void_call_2): New.
9523 (i386_emit_ops): New.
9524 (x86_emit_ops): New.
9525 (the_low_target): Install x86_emit_ops.
9526 * server.h (struct emit_ops): New.
9527 (get_raw_reg_func_addr): Declare.
9528 (current_insn_ptr, emit_error): Declare.
9529 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9530 (set_trace_state_variable_value): New defines.
9531 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9532 addr_get_trace_state_variable_value and
9533 addr_set_trace_state_variable_value.
9534 (symbol_list): New fields for get_raw_reg,
9535 get_trace_state_variable_value and set_trace_state_variable_value.
9536 (condfn): New typedef.
9537 (struct tracepoint): New field `compiled_cond'.
9538 (do_action_at_tracepoint): Clear compiled_cond.
9539 (get_trace_state_variable_value, set_trace_state_variable_value):
9541 (condition_true_at_tracepoint): If there's a compiled condition,
9543 (current_insn_ptr, emit_error): New globals.
9544 (struct bytecode_address): New.
9545 (get_raw_reg_func_addr): New.
9546 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9547 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9548 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9549 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9550 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9551 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9552 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9553 (compile_tracepoint_condition, compile_bytecodes): New.
9554 * target.h (emit_ops): Forward declare.
9555 (struct target_ops): New field emit_ops.
9556 (target_emit_ops): New.
9557 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9558 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9559 * linux-low.c (linux_emit_ops): New.
9560 (linux_target_ops): Install it.
9561 * linux-low.h (struct linux_target_ops): New field emit_ops.
9563 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9565 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9566 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9568 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9569 Stan Shebs <stan@codesourcery.com>
9571 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9572 (all): Depend on $(extra_libraries).
9573 (install-only): Install the IPA.
9574 (IPA_OBJS, IPA_LIB): New.
9575 (clean): Remove the IPA lib.
9576 (IPAGENT_CFLAGS): New.
9577 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9578 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9579 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9580 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9581 * configure.ac: Check for atomic builtins support in the compiler.
9582 (IPA_DEPFILES, extra_libraries): Define.
9583 * configure.srv (ipa_obj): Add description.
9584 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9585 (i[34567]86-*-linux*): Set ipa_obj.
9586 (x86_64-*-linux*): Set ipa_obj.
9587 * linux-low.c (stabilizing_threads): New.
9588 (supports_fast_tracepoints): New.
9589 (linux_detach): Stabilize threads before detaching.
9590 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9591 the lwp is either not stabilizing, or is moving out of a jump pad.
9592 (linux_fast_tracepoint_collecting): New.
9593 (maybe_move_out_of_jump_pad): New.
9594 (enqueue_one_deferred_signal): New.
9595 (dequeue_one_deferred_signal): New.
9596 (linux_wait_for_event_1): If moving out of a jump pad, defer
9597 pending signals to later.
9598 (linux_stabilize_threads): New.
9599 (linux_wait_1): Check if threads need moving out of jump pads, and
9601 (stuck_in_jump_pad_callback): New.
9602 (move_out_of_jump_pad_callback): New.
9604 (linux_resume_one_lwp): Handle moving out of jump pads.
9605 (linux_set_resume_request): Dequeue deferred signals.
9606 (need_step_over_p): Also step over fast tracepoint jumps.
9607 (start_step_over): Also uninsert fast tracepoint jumps.
9608 (finish_step_over): Also reinsert fast tracepoint jumps.
9609 (linux_install_fast_tracepoint_jump): New.
9610 (linux_target_ops): Install linux_stabilize_threads and
9611 linux_install_fast_tracepoint_jump_pad.
9612 * linux-low.h (linux_target_ops) <get_thread_area,
9613 install_fast_tracepoint_jump_pad>: New fields.
9614 (struct lwp_info) <collecting_fast_tracepoint,
9615 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9616 (linux_get_thread_area): Declare.
9617 * linux-x86-low.c (jump_insn): New.
9618 (x86_get_thread_area): New.
9619 (append_insns): New.
9621 (amd64_install_fast_tracepoint_jump_pad): New.
9622 (i386_install_fast_tracepoint_jump_pad): New.
9623 (x86_install_fast_tracepoint_jump_pad): New.
9624 (the_low_target): Install x86_get_thread_area and
9625 x86_install_fast_tracepoint_jump_pad.
9626 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9627 (struct fast_tracepoint_jump): New.
9628 (fast_tracepoint_jump_insn): New.
9629 (fast_tracepoint_jump_shadow): New.
9630 (find_fast_tracepoint_jump_at): New.
9631 (fast_tracepoint_jump_here): New.
9632 (delete_fast_tracepoint_jump): New.
9633 (set_fast_tracepoint_jump): New.
9634 (uninsert_fast_tracepoint_jumps_at): New.
9635 (reinsert_fast_tracepoint_jumps_at): New.
9636 (set_breakpoint_at): Use write_inferior_memory.
9637 (uninsert_raw_breakpoint): Use write_inferior_memory.
9638 (check_mem_read): Mask out fast tracepoint jumps.
9639 (check_mem_write): Mask out fast tracepoint jumps.
9640 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9641 (set_fast_tracepoint_jump): Declare.
9642 (delete_fast_tracepoint_jump)
9643 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9644 (reinsert_fast_tracepoint_jumps_at): Declare.
9645 * regcache.c: Don't compile many functions when building the
9646 in-process agent library.
9647 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9648 the register buffer in the heap.
9649 (free_register_cache): If the register buffer isn't owned by the
9650 regcache, don't free it.
9651 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9652 pre-existing register caches.
9653 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9655 (convert_ascii_to_int): : Constify `from' parameter type.
9656 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9657 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9658 the needed buffer in-place.
9659 (relocate_instruction): New.
9660 * server.c (handle_query) <qSymbols>: If the target supports
9661 tracepoints, give it a chance of looking up symbols. Report
9662 support for fast tracepoints.
9663 (handle_status): Stabilize threads.
9664 (process_serial_event): Adjust.
9665 * server.h (struct fast_tracepoint_jump): Forward declare.
9666 (struct process_info) <fast_tracepoint_jumps>: New field.
9667 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9668 (decode_X_packet, decode_M_packet): Adjust.
9669 (relocate_instruction): Declare.
9670 (in_process_agent_loaded): Declare.
9671 (tracepoint_look_up_symbols): Declare.
9672 (struct fast_tpoint_collect_status): Declare.
9673 (fast_tracepoint_collecting): Declare.
9674 (force_unlock_trace_buffer): Declare.
9675 (handle_tracepoint_bkpts): Declare.
9676 (initialize_low_tracepoint)
9677 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9678 * target.h (struct target_ops) <stabilize_threads,
9679 install_fast_tracepoint_jump_pad>: New fields.
9680 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9681 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9682 [HAVE_STDINT_H]: Include stdint.h.
9683 (trace_debug_1): Rename to ...
9684 (trace_vdebug): ... this.
9685 (trace_debug): Rename to ...
9686 (trace_debug_1): ... this. Add `level' parameter.
9688 (ATTR_USED, ATTR_NOINLINE): New.
9689 (IP_AGENT_EXPORT): New.
9690 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9691 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9692 (about_to_request_buffer_space, trace_buffer_is_full)
9693 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9694 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9695 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9696 (traceframe_write_count, traceframes_created)
9697 (trace_state_variables)
9698 New renaming defines.
9699 (struct ipa_sym_addresses): New.
9700 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9702 (ipa_sym_addrs): New.
9703 (all_tracepoint_symbols_looked_up): New.
9704 (in_process_agent_loaded): New.
9705 (write_e_ipa_not_loaded): New.
9706 (maybe_write_ipa_not_loaded): New.
9707 (tracepoint_look_up_symbols): New.
9708 (debug_threads) [IN_PROCESS_AGENT]: New.
9709 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9710 (UNKNOWN_SIDE_EFFECTS): New.
9711 (stop_tracing): New.
9712 (flush_trace_buffer): New.
9713 (stop_tracing_bkpt): New.
9714 (flush_trace_buffer_bkpt): New.
9715 (read_inferior_integer): New.
9716 (read_inferior_uinteger): New.
9717 (read_inferior_data_pointer): New.
9718 (write_inferior_data_pointer): New.
9719 (write_inferior_integer): New.
9720 (write_inferior_uinteger): New.
9721 (struct collect_static_trace_data_action): Delete.
9722 (enum tracepoint_type): New.
9723 (struct tracepoint) <type>: New field `type'.
9724 <actions_str, step_actions, step_actions_str>: Only include in
9726 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9727 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9728 (tracepoints): Use IP_AGENT_EXPORT.
9729 (last_tracepoint): Don't include in the IPA.
9730 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9731 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9732 (alloced_trace_state_variables): New.
9733 (trace_state_variables): Use IP_AGENT_EXPORT.
9734 (traceframe_t): Delete unused variable.
9735 (circular_trace_buffer): Don't include in the IPA.
9736 (trace_buffer_start): Delete.
9737 (struct trace_buffer_control): New.
9738 (trace_buffer_free): Delete.
9739 (struct ipa_trace_buffer_control): New.
9740 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9741 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9743 (trace_buffer_ctrl): New.
9744 (TRACE_BUFFER_CTRL_CURR): New.
9745 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9746 Reimplement as macros.
9747 (trace_buffer_wrap): Delete.
9748 (traceframe_write_count, traceframe_read_count)
9749 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9750 (struct tracepoint_hit_ctx) <type>: New field.
9751 (struct fast_tracepoint_ctx): New.
9752 (memory_barrier): New.
9754 (record_tracepoint_error): Update atomically in the IPA.
9755 (clear_inferior_trace_buffer): New.
9756 (about_to_request_buffer_space): New.
9757 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9758 updating the same buffer.
9759 (add_tracepoint): Default the tracepoint's type to trap
9760 tracepoint, and orig_size to -1.
9761 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9763 (create_trace_state_variable): New parameter `gdb'. Handle it.
9764 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9765 (cmd_qtdp): Handle fast tracepoints.
9767 (max_jump_pad_size): New.
9768 (gdb_jump_pad_head): New.
9769 (get_jump_space_head): New.
9770 (claim_jump_space): New.
9771 (sort_tracepoints): New.
9772 (MAX_JUMP_SIZE): New.
9773 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9775 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9776 support. Upload fast traceframes, and delete internal IPA
9778 (stop_tracing_handler): New.
9779 (flush_trace_buffer_handler): New.
9780 (cmd_qtstop): Upload fast tracepoints.
9781 (response_tracepoint): Handle fast tracepoints.
9782 (tracepoint_finished_step): Upload fast traceframes. Set the
9783 tracepoint hit context's tracepoint type.
9784 (handle_tracepoint_bkpts): New.
9785 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9786 type. Add comment about fast tracepoints.
9787 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9788 non-existing action_str field.
9789 (get_context_regcache): Handle fast tracepoints.
9790 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9792 (fast_tracepoint_from_jump_pad_address): New.
9793 (fast_tracepoint_from_ipa_tpoint_address): New.
9794 (collecting_t): New.
9795 (force_unlock_trace_buffer): New.
9796 (fast_tracepoint_collecting): New.
9799 (write_inferior_data_ptr): New.
9800 (target_tp_heap): New.
9801 (target_malloc): New.
9802 (download_agent_expr): New.
9804 (download_tracepoints): New.
9805 (download_trace_state_variables): New.
9806 (upload_fast_traceframes): New.
9807 (IPA_FIRST_TRACEFRAME): New.
9808 (IPA_NEXT_TRACEFRAME_1): New.
9809 (IPA_NEXT_TRACEFRAME): New.
9810 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9811 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9812 (gdb_jump_pad_buffer_end): New.
9813 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9814 (initialize_tracepoint): Adjust.
9815 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9816 buffer. Initialize the low module.
9817 * utils.c (PREFIX, TOOLNAME): New.
9818 (malloc_failure): Use PREFIX.
9819 (error): In the IPA, an error causes an exit.
9820 (fatal, warning): Use PREFIX.
9821 (internal_error): Use TOOLNAME.
9822 (NUMCELLS): Increase to 10.
9823 * configure, config.in: Regenerate.
9825 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9827 * server.c (handle_query) <qSupported>: Do two passes over the
9828 qSupported string to avoid nesting strtok.
9830 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9832 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9834 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9836 * configure: Regenerate.
9837 * proc-service.list: New.
9839 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9841 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9844 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9846 * gdbreplay.c (remote_open): Check error return from socket() call by
9847 its equality to -1 not by it being negative.
9848 * remote-utils.c (remote_open): Likewise.
9850 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9852 * config.h: Regenerate.
9854 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9856 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9857 doesn't provide PTRACE_GET_THREAD_AREA.
9859 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9861 * linux-m68k-low.c: Include <asm/ptrace.h>
9862 (ps_get_thread_area): Implement.
9864 2010-05-03 Doug Evans <dje@google.com>
9866 * event-loop.c (struct callback_event): New struct.
9867 (callback_list): New global.
9868 (append_callback_event, delete_callback_event): New functions.
9869 (process_callback): New function.
9870 (start_event_loop): Call it.
9871 * remote-utils.c (NOT_SCHEDULED): Define.
9872 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9873 moved out of readchar.
9874 (readchar): Rewrite. Call reschedule before returning.
9875 (reset_readchar): New function.
9876 (remote_close): Call it.
9877 (process_remaining, reschedule): New functions.
9878 * server.h (callback_handler_func): New typedef.
9879 (append_callback_event, delete_callback_event): Declare.
9881 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9883 * proc-service.c (ps_pglobal_lookup): Use
9884 thread_db_look_up_one_symbol.
9885 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9886 parameter. Use it instead of all_symbols_looked_up.
9887 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9889 (all_symbols_looked_up): Don't declare.
9890 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9891 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9893 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9894 Set all_symbols_looked_up here.
9895 (thread_db_look_up_one_symbol): New.
9896 (thread_db_get_tls_address): Adjust.
9897 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9898 thread_db object on the heap, and tentatively set it in the
9900 (thread_db_init): Don't set all_symbols_looked_up here.
9901 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9903 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9905 * linux-low.c (linux_kill, linux_detach): Adjust.
9906 (status_pending_p_callback): Remove redundant statement. Check
9907 for !TARGET_WAITIKIND_IGNORE, instead of
9908 TARGET_WAITKIND_STOPPED.
9909 (handle_tracepoints): Make sure LWP is locked. Adjust.
9910 (linux_wait_for_event_1): Adjust.
9911 (linux_cancel_breakpoints): New.
9912 (unsuspend_one_lwp): New.
9913 (unsuspend_all_lwps): New.
9914 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9915 (send_sigstop_callback): Change return type to int, add new
9916 `except' parameter and handle it.
9917 (suspend_and_send_sigstop_callback): New.
9918 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9919 pass them down. If SUSPEND, also increment the lwp's suspend
9921 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9922 (need_step_over_p): Don't consider suspended LWPs.
9923 (start_step_over): Adjust.
9924 (proceed_one_lwp): Change return type to int, add new `except'
9925 parameter and handle it.
9926 (unsuspend_and_proceed_one_lwp): New.
9927 (proceed_all_lwps): Use find_inferior instead of
9929 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9930 also decrement the suspend count of LWPs. Pass `except' down,
9931 instead of hacking its suspend count.
9932 (linux_pause_all): Add `freeze' parameter. Adjust.
9933 (linux_unpause_all): New.
9934 (linux_target_ops): Install linux_unpause_all.
9935 * server.c (handle_status): Adjust.
9936 * target.h (struct target_ops): New fields `unpause_all' and
9937 `cancel_breakpoints'. Add new parameter to `pause_all'.
9938 (pause_all): Add new `freeze' parameter.
9940 (cancel_breakpoints): New.
9941 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9943 (cmd_qtstart): Pause threads.
9944 (stop_tracing): Pause threads, and cancel breakpoints.
9945 * win32-low.c (win32_target_ops): Adjust.
9947 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9949 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9950 the inferior right away from here...
9951 (linux_wait_1): ... to here, and adjust to check the thread's
9952 last_resume_kind instead of the lwp's step or stop_expected flags.
9954 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9956 * README: Use consistent `GDB' and `GDBserver' spellings.
9958 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9960 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9961 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9962 (linux_detach_one_lwp): Assume the lwp is stopped.
9963 (any_thread_of): Delete.
9964 (linux_detach): Stop all lwps here. Don't blindly delete all
9966 (delete_lwp_callback): New.
9967 (linux_mourn): Delete all lwps of the process that is gone.
9968 (linux_wait_1): Don't delete the last lwp of the process here.
9969 * mem-break.h (mark_breakpoints_out): Declare.
9970 * mem-break.c (mark_breakpoints_out): New.
9971 (free_all_breakpoints): Use it.
9972 * server.c (handle_target_event): If the process is gone, mark
9974 * thread-db.c (struct thread_db) <create_bp>: New field.
9975 (thread_db_enable_reporting): Fix prototype. Store a thread event
9976 breakpoint reference in the thread_db struct.
9977 (thread_db_load_search): Clear the thread_db object.
9978 (try_thread_db_load_1): Ditto.
9979 (switch_to_process): New.
9980 (disable_thread_event_reporting): Use it.
9981 (remove_thread_event_breakpoints): New.
9982 (thread_db_detach, thread_db_mourn): Use it.
9984 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9986 * linux-low.c (linux_enable_event_reporting): New.
9987 (linux_wait_for_event_1, handle_extended_wait): Use it.
9989 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9991 * linux-low.c (linux_kill_one_lwp, linux_kill)
9992 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9993 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9994 SIGSTOP even if the LWP is stopped.
9995 (send_sigstop_callback): New.
9996 (stop_all_lwps): Use send_sigstop_callback instead.
9997 (linux_resume_one_thread): Adjust.
9998 (proceed_one_lwp): Still proceed an LWP that the client has
9999 requested to stop, if we haven't reported it as stopped yet. Make
10000 sure that LWPs the client want stopped, have a pending SIGSTOP.
10002 2010-04-26 Doug Evans <dje@google.com>
10004 * server.c (handle_general_set): Make static.
10006 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10007 Print received char after testing for error/eof instead of before.
10008 (input_interrupt): Tweak comment.
10010 2010-04-23 Doug Evans <dje@google.com>
10012 * server.c (start_inferior): Print inferior argv if --debug.
10014 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10016 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10017 * nto-x86-low.c: Include server.h
10019 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10021 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10022 be consistent with other sources of this directory.
10023 (init_registers_amd64): Correct name of source file of this function
10026 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10028 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10029 64-bit executables.
10031 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10033 * win32-i386-low.c: Add 64-bit support.
10034 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10035 (init_registers_amd64): Declare.
10036 (mappings): Add 64-bit version of array.
10037 (init_windows_x86): New function.
10038 (the_low_target): Change init_arch field to init_windows_x86.
10040 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10042 * win32-low.c: Adapt to support also 64-bit architecture.
10043 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10044 (get_image_name): Use SIZE_T type for local variable `done'.
10045 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10046 (toolhelp_get_dll_name): Idem.
10047 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10048 Use uintptr_t typecast to avoid warning.
10049 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10050 (handle_exception): Use phex_nz to avoid warning.
10051 (win32_wait): Remove unused local variable `process'.
10053 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10055 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10058 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10060 * configure.ac: Use `ws2_32' library for srv_mingw.
10061 * configure: Regenerate.
10062 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10063 * remote-utils.c: Likewise.
10065 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10067 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10068 if __x86_64__ is defined.
10070 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10072 * configure: Regenerate.
10074 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10076 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10077 * target.h (target_ops): New get_tib_address field.
10078 * win32-low.h (win32_thread_info): Add thread_local_base field.
10079 * win32-low.c (child_add_thread): Add tlb argument.
10080 Set thread_local_base field to TLB.
10081 (get_child_debug_event): Adapt to child_add_thread change.
10082 (win32_get_tib_address): New function.
10083 (win32_target_ops): Set get_tib_address field to
10084 win32_get_tib_address.
10085 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10087 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10089 * linux-low.c (linux_mourn): Also remove the process.
10090 * server.c (handle_target_event): Don't remove the process here.
10091 * nto-low.c (nto_mourn): New.
10092 (nto_target_ops): Install it.
10093 * spu-low.c (spu_mourn): New.
10094 (spu_target_ops): Install it.
10095 * win32-low.c (win32_mourn): New.
10096 (win32_target_ops): Install it.
10098 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10100 * server.h (buffer_xml_printf): Remove redundant `;'.
10102 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10104 * regcache.c (set_register_cache): Invalidate regcaches before
10105 changing the register cache layout.
10106 (regcache_invalidate_one): Allow a NULL regcache.
10107 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10108 regcaches before changing the register cache layout or the target
10111 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10113 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10114 variable warning on Linux/x86-64.
10116 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10118 GDBserver disconnected tracing support.
10120 * linux-low.c (linux_remove_process): Delete.
10121 (add_lwp): Don't set last_resume_kind here.
10122 (linux_kill): Use `mourn'.
10123 (linux_detach): Use `thread_db_detach', and `mourn'.
10124 (linux_mourn): New.
10125 (linux_attach_lwp_1): Adjust comment.
10126 (linux_attach): last_resume_kind moved the thread_info; adjust.
10127 (status_pending_p_callback): Adjust.
10128 (linux_wait_for_event_1): Adjust.
10129 (count_events_callback, select_singlestep_lwp_callback)
10130 (select_event_lwp_callback, cancel_breakpoints_callback)
10131 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10132 (proceed_one_lwp): Adjust.
10133 (linux_async): Add debug output.
10134 (linux_thread_stopped): New.
10135 (linux_pause_all): New.
10136 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10138 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10139 (thread_db_free): Delete declaration.
10140 (thread_db_detach, thread_db_mourn): Declare.
10141 * thread-db.c (thread_db_init): Use thread_db_mourn.
10142 (thread_db_free): Delete, split in two.
10143 (disable_thread_event_reporting): New.
10144 (thread_db_detach): New.
10145 (thread_db_mourn): New.
10147 * server.h (struct thread_info) <last_resume_kind>: New field.
10148 <attached>: Add comment.
10149 <gdb_detached>: New field.
10150 (handler_func): Change return type to int.
10151 (handle_serial_event, handle_target_event): Ditto.
10152 (gdb_connected): Declare.
10154 (disconnected_tracing): Declare.
10155 (stop_tracing): Declare.
10157 * server.c (handle_query) <qSupported>: Report support for
10158 disconnected tracing.
10159 (queue_stop_reply_callback): Account for running threads.
10160 (gdb_wants_thread_stopped): New.
10161 (gdb_wants_all_threads_stopped): New.
10162 (gdb_reattached_process): New.
10163 (handle_status): Clear the `gdb_detached' flag of all processes.
10164 In all-stop, stop all threads.
10165 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10166 (process_serial_event): If the remote connection breaks, or if an
10167 exit was forced with "monitor exit", force an event loop exit.
10168 Handle disconnected tracing on detach.
10169 (handle_serial_event): Adjust.
10170 (handle_target_event): If GDB isn't connected, forward events back
10171 to the inferior, unless the last process exited, in which case,
10172 exit gdbserver. Adjust interface.
10174 * remote-utils.c (remote_open): Don't block in accept. Instead
10175 register an event loop source on the listen socket file
10176 descriptor. Refactor bits into ...
10177 (listen_desc): ... this new global.
10178 (gdb_connected): ... this new function.
10179 (enable_async_notification): ... this new function.
10180 (handle_accept_event): ... this new function.
10181 (remote_close): Clear remote_desc.
10183 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10185 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10187 (mourn_inferior): Define.
10188 (target_process_qsupported): Avoid the dangling else problem.
10189 (thread_stopped): Define.
10190 (pause_all): Define.
10191 (target_waitstatus_to_string): Declare.
10192 * target.c (target_waitstatus_to_string): New.
10194 * tracepoint.c (tracing): Make extern.
10195 (disconnected_tracing): New.
10196 (stop_tracing): Make extern. Handle tracing stops due to GDB
10198 (cmd_qtdisconnected): New.
10199 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10200 (handle_tracepoint_general_set): Handle QTDisconnected.
10202 * event-loop.c (event_handler_func): Change return type to int.
10203 (process_event): Bail out if the event handler wants the event
10205 (handle_file_event): Ditto.
10206 (start_event_loop): Bail out if the event handler wants the event
10209 * nto-low.c (nto_target_ops): Adjust.
10210 * spu-low.c (spu_wait): Don't remove the process here.
10211 (spu_target_ops): Adjust.
10212 * win32-low.c (win32_wait): Don't remove the process here.
10213 (win32_target_ops): Adjust.
10215 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10217 * regcache.c (realloc_register_cache): Invalidate inferior's
10218 regcache before recreating it.
10220 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10222 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10224 2010-04-09 Stan Shebs <stan@codesourcery.com>
10225 Pedro Alves <pedro@codesourcery.com>
10227 * server.h (LONGEST): New.
10228 (struct thread_info) <while_stepping>: New field.
10229 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10231 (initialize_tracepoint, handle_tracepoint_general_set)
10232 (handle_tracepoint_query, tracepoint_finished_step)
10233 (tracepoint_was_hit, release_while_stepping_state_list):
10234 (current_traceframe): Declare.
10235 * server.c (handle_general_set): Handle tracepoint packets.
10236 (read_memory): New.
10237 (write_memory): New.
10238 (handle_search_memory_1): Use read_memory.
10239 (handle_query): Report support for conditional tracepoints, trace
10240 state variables, and tracepoint sources. Handle tracepoint
10242 (main): Initialize the tracepoints module.
10243 (process_serial_event): Handle traceframe reads/writes.
10245 * linux-low.c (handle_tracepoints): New.
10246 (linux_wait_1): Call it.
10247 (linux_resume_one_lwp): Handle while-stepping.
10248 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10249 (linux_target_ops): Install them.
10250 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10252 * linux-x86-low.c (x86_supports_tracepoints): New.
10253 (the_low_target). Install it.
10255 * mem-break.h (delete_breakpoint): Declare.
10256 * mem-break.c (delete_breakpoint): Make external.
10258 * target.h (struct target_ops): Add `supports_tracepoints',
10259 `read_pc', and `write_pc' fields.
10260 (target_supports_tracepoints): Define.
10261 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10264 * regcache.h (struct regcache) <registers_owned>: New field.
10265 (init_register_cache, regcache_cpy): Declare.
10266 (regcache_read_pc, regcache_write_pc): Declare.
10267 (register_cache_size): Declare.
10268 (supply_regblock): Declare.
10269 * regcache.c (init_register_cache): New.
10270 (new_register_cache): Use it.
10271 (regcache_cpy): New.
10272 (register_cache_size): New.
10273 (supply_regblock): New.
10274 (regcache_read_pc, regcache_write_pc): New.
10276 * tracepoint.c: New.
10278 * Makefile.in (OBS): Add tracepoint.o.
10279 (tracepoint.o): New rule.
10281 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10283 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10285 (i386-mmx.c): Likewise.
10286 (i386-mmx-linux.o): Likewise.
10287 (i386-mmx-linux.c): Likewise.
10289 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10290 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10291 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10292 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10294 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10295 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10296 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10298 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10300 * Makefile.in (clean): Updated.
10302 (i386-avx.c): Likewise.
10303 (i386-avx-linux.o): Likewise.
10304 (i386-avx-linux.c): Likewise.
10305 (amd64-avx.o): Likewise.
10306 (amd64-avx.c): Likewise.
10307 (amd64-avx-linux.o): Likewise.
10308 (amd64-avx-linux.c): Likewise.
10310 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10311 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10312 (srv_amd64_regobj): Add amd64-avx.o.
10313 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10314 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10315 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10316 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10317 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10318 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10319 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10321 * i387-fp.c: Include "i386-xstate.h".
10323 (i387_cache_to_xsave): Likewise.
10324 (i387_xsave_to_cache): Likewise.
10325 (x86_xcr0): Likewise.
10327 * i387-fp.h (i387_cache_to_xsave): Likewise.
10328 (i387_xsave_to_cache): Likewise.
10329 (x86_xcr0): Likewise.
10331 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10332 * linux-crisv32-low.c (target_regsets): Likewise.
10333 * linux-m68k-low.c (target_regsets): Likewise.
10334 * linux-mips-low.c (target_regsets): Likewise.
10335 * linux-ppc-low.c (target_regsets): Likewise.
10336 * linux-s390-low.c (target_regsets): Likewise.
10337 * linux-sh-low.c (target_regsets): Likewise.
10338 * linux-sparc-low.c (target_regsets): Likewise.
10339 * linux-xtensa-low.c (target_regsets): Likewise.
10341 * linux-low.c: Include <sys/uio.h>.
10342 (regsets_fetch_inferior_registers): Support nt_type.
10343 (regsets_store_inferior_registers): Likewise.
10344 (linux_process_qsupported): New.
10345 (linux_target_ops): Add linux_process_qsupported.
10347 * linux-low.h (regset_info): Add nt_type.
10348 (linux_target_ops): Add process_qsupported.
10350 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10352 (init_registers_i386_avx_linux): New.
10353 (init_registers_amd64_avx_linux): Likewise.
10354 (xmltarget_i386_linux_no_xml): Likewise.
10355 (xmltarget_amd64_linux_no_xml): Likewise.
10356 (PTRACE_GETREGSET): Likewise.
10357 (PTRACE_SETREGSET): Likewise.
10358 (x86_fill_xstateregset): Likewise.
10359 (x86_store_xstateregset): Likewise.
10360 (use_xml): Likewise.
10361 (x86_linux_update_xmltarget): Likewise.
10362 (x86_linux_process_qsupported): Likewise.
10363 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10364 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10365 init_registers_i386_linux here. Call
10366 x86_linux_update_xmltarget.
10367 (the_low_target): Add x86_linux_process_qsupported.
10369 * server.c (handle_query): Call target_process_qsupported.
10371 * target.h (target_ops): Add process_qsupported.
10372 (target_process_qsupported): New.
10374 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10376 * inferiors.c (add_thread): Set last_status kind to
10377 TARGET_WAITKIND_IGNORE.
10378 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10379 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10380 (linux_wait_1): Move `thread' local definition to block that uses
10381 it. Don't NULL initialize `event_child'.
10382 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10383 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10384 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10386 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10388 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10389 an extended waitstatus, or by a watchpoint.
10390 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10391 thread was stepping or has been stopped by a watchpoint.
10393 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10395 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10396 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10397 of another, then delete the previous, and validate all
10399 (validate_inserted_breakpoint): New.
10400 (delete_disabled_breakpoints): New.
10401 (validate_breakpoints): New.
10402 (check_mem_read): Validate breakpoints before trusting their
10403 shadow. Delete disabled breakpoints.
10404 (check_mem_write): Validate breakpoints before trusting they
10405 should be inserted. Delete disabled breakpoints.
10406 * mem-break.h (validate_breakpoints):
10407 * server.c (handle_query): Validate breakpoints when we see a
10410 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10412 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10413 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10414 if we could tell there's a GDB breakpoint at stop_pc.
10415 (need_step_over_p): Don't do a step over if we find a GDB
10416 breakpoint at the resume PC.
10418 * mem-break.c (struct raw_breakpoint): New.
10419 (enum bkpt_type): New type `gdb_breakpoint'.
10420 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10421 fields. New field `raw'.
10422 (find_raw_breakpoint_at): New.
10423 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10424 breakpoint instead.
10425 (set_breakpoint_at): Adjust.
10426 (delete_raw_breakpoint): New.
10427 (release_breakpoint): New.
10428 (delete_breakpoint): Rename to...
10429 (delete_breakpoint_1): ... this. Add proc parameter. Use
10430 release_breakpoint. Return ENOENT.
10431 (delete_breakpoint): Reimplement.
10432 (find_breakpoint_at): Delete.
10433 (find_gdb_breakpoint_at): New.
10434 (delete_breakpoint_at): Delete.
10435 (set_gdb_breakpoint_at): New.
10436 (delete_gdb_breakpoint_at): New.
10437 (gdb_breakpoint_here): New.
10438 (set_reinsert_breakpoint): Use release_breakpoint.
10439 (uninsert_breakpoint): Rename to ...
10440 (uninsert_raw_breakpoint): ... this.
10441 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10442 (reinsert_raw_breakpoint): Change parameter type to
10444 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10446 (check_breakpoints): Adjust. Use release_breakpoint.
10447 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10448 (breakpoint_inserted_here): Ditto.
10449 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10450 Don't trust the breakpoint's shadow if it is not inserted.
10451 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10452 (delete_all_breakpoints): Adjust.
10453 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10454 use delete_breakpoint_1.
10456 * mem-break.h (breakpoints_supported): Delete declaration.
10457 (set_gdb_breakpoint_at): Declare.
10458 (gdb_breakpoint_here): Declare.
10459 (delete_breakpoint_at): Delete.
10460 (delete_gdb_breakpoint_at): Declare.
10462 * server.h (struct raw_breakpoint): Forward declare.
10463 (struct process_info): New field `raw_breakpoints'.
10465 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10468 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10470 * linux-low.c (status_pending_p_callback): Fix comment.
10471 (linux_wait_for_event_1): Move most of the internal breakpoint
10472 handling from here...
10473 (linux_wait_1): ... to here.
10474 (count_events_callback): New.
10475 (select_singlestep_lwp_callback): New.
10476 (select_event_lwp_callback): New.
10477 (cancel_breakpoints_callback): New.
10478 (select_event_lwp): New.
10479 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10480 priority to all LWPs that have had events that should be reported
10481 to the client. Cancel breakpoints when about to reporting the
10482 event to the client, not while stopping lwps. No longer cancel
10483 finished single-steps here.
10484 (cancel_finished_single_step): Delete.
10485 (cancel_finished_single_steps): Delete.
10487 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10489 * mem-break.c (enum bkpt_type): New.
10490 (struct breakpoint): New field `type'.
10491 (set_breakpoint_at): Change return type to struct breakpoint
10492 pointer. Set type to `other_breakpoint' by default.
10493 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10494 in the breakpoint list.
10495 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10496 (reinsert_breakpoint): Rename to ...
10497 (reinsert_raw_breakpoint): ... this.
10498 (reinsert_breakpoints_at): Adjust.
10499 * mem-break.h (struct breakpoint): Declare.
10500 (set_breakpoint_at): Change return type to struct breakpoint
10503 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10505 * server.c (handle_query): Assign, not compare.
10507 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10509 Teach linux gdbserver to step-over-breakpoints.
10511 * linux-low.c (can_hardware_single_step): New.
10512 (supports_breakpoints): New.
10513 (handle_extended_wait): If stopping threads, read the stop pc of
10514 the new cloned LWP.
10516 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10517 low target doesn't support retrieving the PC.
10518 (add_lwp): Set last_resume_kind to resume_continue.
10519 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10520 (linux_attach): Don't clear stop_expected. Set the lwp's
10521 last_resume_kind to resume_stop.
10522 (linux_detach_one_lwp): Don't check for removed breakpoints.
10523 (check_removed_breakpoint): Delete.
10524 (status_pending_p): Rename to ...
10525 (status_pending_p_callback): ... this. Don't check for removed
10526 breakpoints. Don't consider threads that are stopped from GDB's
10528 (linux_wait_for_lwp): Always read the stop_pc here.
10529 (cancel_breakpoint): New.
10530 (step_over_bkpt): New global.
10531 (linux_wait_for_event_1): Implement stepping over breakpoints.
10532 (gdb_wants_lwp_stopped): New.
10533 (gdb_wants_all_stopped): New.
10534 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10535 single-step traps here. Store the thread's last reported target
10537 (send_sigstop): Don't clear stop_expected. Always set it,
10539 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10540 (cancel_finished_single_step): New.
10541 (cancel_finished_single_steps): New.
10542 (wait_for_sigstop): Don't cancel finished single-step traps here.
10543 (linux_resume_one_lwp): Don't check for removed breakpoints.
10544 Don't set `step' on non-hardware step archs.
10545 (linux_set_resume_request): Ignore resume_stop requests if already
10546 stopping or stopped. Set the lwp's last_resume_kind.
10547 (resume_status_pending_p): Don't check for removed breakpoints.
10548 (need_step_over_p): New.
10549 (start_step_over): New.
10550 (finish_step_over): New.
10551 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10552 requests. Clear the thread's last reported target waitstatus.
10553 Don't use the `suspended' flag. Don't consider pending breakpoints.
10554 (linux_resume): Start a step-over if necessary.
10555 (proceed_one_lwp): New.
10556 (proceed_all_lwps): New.
10557 (unstop_all_lwps): New.
10558 * linux-low.h (struct lwp_info): Rewrite comment for the
10559 `suspended' flag. Add the `stop_pc' field. Delete the
10560 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10561 Add `'last_resume_kind' and `need_step_over' fields.
10562 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10563 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10564 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10565 (set_raw_breakpoint_at): New.
10566 (set_breakpoint_at): Rewrite to use it.
10567 (reinsert_breakpoint_handler): Delete.
10568 (set_reinsert_breakpoint): New.
10569 (reinsert_breakpoint_by_bp): Delete.
10570 (delete_reinsert_breakpoints): New.
10571 (uninsert_breakpoint): Rewrite.
10572 (uninsert_breakpoints_at): New.
10573 (reinsert_breakpoint): Rewrite.
10574 (reinsert_breakpoints_at): New.
10575 (check_breakpoints): Rewrite.
10576 (breakpoint_here): New.
10577 (breakpoint_inserted_here): New.
10578 (check_mem_read): Adjust.
10579 * mem-break.h (breakpoints_supported, breakpoint_here)
10580 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10581 (reinsert_breakpoint_by_bp): Delete declaration.
10582 (delete_reinsert_breakpoints): Declare.
10583 (reinsert_breakpoint): Delete declaration.
10584 (reinsert_breakpoints_at): Declare.
10585 (uninsert_breakpoint): Delete declaration.
10586 (uninsert_breakpoints_at): Declare.
10587 (check_breakpoints): Adjust prototype.
10588 * server.h: Adjust include order.
10589 (struct thread_info): Declare here. Add a `last_status' field.
10591 2010-03-23 Michael Snyder <msnyder@vmware.com>
10593 * server.c (crc32): New function.
10594 (handle_query): Add handling for 'qCRC:' request.
10596 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10598 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10599 lwp had been stopped by a watchpoint.
10601 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10603 * server.h (internal_error): Declare.
10604 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10605 * utils.c (internal_error): New function.
10607 2010-03-15 Andreas Schwab <schwab@redhat.com>
10609 * configure.srv: Fix typo setting srv_regobj.
10611 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10613 * linux-low.c (fetch_register): Avoid passing a non string literal
10615 (usr_store_inferior_registers): Ditto.
10617 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10619 * linux-low.c (linux_write_memory): Bail out early if peeking
10622 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10624 * linux-low.h (struct lwp_info): New fields
10625 `stopped_by_watchpoint' and `stopped_data_address'.
10626 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10627 here, and cache them in the lwp object.
10628 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10630 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10632 (linux_stopped_by_watchpoint): Rewrite.
10633 (linux_stopped_data_address): Rewrite.
10635 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10637 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10638 switching the current inferior, not before.
10640 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10642 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10643 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10644 i386-linux.c and amd64-linux.c.
10645 (reg-i386.o): Removed.
10646 (reg-i386.c): Likewise.
10647 (reg-i386-linux.o): Likewise.
10648 (reg-i386-linux.c): Likewise.
10649 (reg-x86-64.o): Likewise.
10650 (reg-x86-64.c): Likewise.
10651 (reg-x86-64-linux.o): Likewise.
10652 (reg-x86-64-linux.c): Likewise.
10654 (i386.c): Likewise.
10655 (i386-linux.o): Likewise.
10656 (i386-linux.c): Likewise.
10657 (amd64.o): Likewise.
10658 (amd64.c): Likewise.
10659 (amd64-linux.o): Likewise.
10660 (amd64-linux.c): Likewise.
10662 * configure.srv (srv_i386_regobj): New.
10663 (srv_i386_linux_regobj): Likewise.
10664 (srv_amd64_regobj): Likewise.
10665 (srv_amd64_linux_regobj): Likewise.
10666 (srv_i386_32bit_xmlfiles): Likewise.
10667 (srv_i386_64bit_xmlfiles): Likewise.
10668 (srv_i386_xmlfiles): Likewise.
10669 (srv_amd64_xmlfiles): Likewise.
10670 (srv_i386_linux_xmlfiles): Likewise.
10671 (srv_amd64_linux_xmlfiles): Likewise.
10672 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10673 srv_xmlfiles to $srv_i386_xmlfiles.
10674 (i[34567]86-*-mingw32ce*): Likewise.
10675 (i[34567]86-*-mingw*): Likewise.
10676 (i[34567]86-*-nto*): Likewise.
10677 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10678 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10679 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10680 (x86_64-*-linux*): Likewise.
10682 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10683 (init_registers_amd64_linux): New.
10684 (x86_arch_setup): Replace init_registers_x86_64_linux with
10685 init_registers_amd64_linux.
10687 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10689 * configure.ac: Check for libdl. If it is not available link against
10690 static libthread_db.
10691 * configure: Regenerate.
10693 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10697 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10698 handing a read watchpoint.
10699 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10701 2010-02-12 Doug Evans <dje@google.com>
10703 * linux-low.c (linux_supports_tracefork_flag): Document.
10704 (linux_look_up_symbols): Add comment.
10706 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10708 * regcache.c (supply_register): Clear regcache if buf is NULL.
10710 2010-02-02 Nicolas Roche <roche@sourceware.org>
10711 Joel Brobecker <brobecker@adacore.com>
10713 * inferiors.c (find_inferior): Add function documentation.
10714 (unloaded_dll): Handle the case where the unloaded dll has not
10715 been previously registered in the dll list.
10717 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10719 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10720 (thumb2_breakpoint): New.
10721 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10723 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10725 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10726 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10729 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10731 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10733 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10735 * linux-s390-low.c (s390_collect_ptrace_register)
10736 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10738 2010-01-21 Doug Evans <dje@google.com>
10740 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10741 (PTRACE_ARG4_TYPE): New macro.
10742 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10743 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10744 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10745 (usr_store_inferior_registers): Ditto.
10746 (linux_read_memory, linux_write_memory): Ditto.
10747 (linux_test_for_tracefork): Ditto.
10749 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10750 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10752 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10754 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10757 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10759 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10760 prototype to take a regcache. Adjust.
10762 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10764 * regcache.h (struct thread_info): Forward declare.
10765 (struct regcache): New.
10766 (new_register_cache): Adjust prototype.
10767 (get_thread_regcache): Declare.
10768 (free_register_cache): Adjust prototype.
10769 (registers_to_string, registers_from_string): Ditto.
10770 (supply_register, supply_register_by_name, collect_register)
10771 (collect_register_as_string, collect_register_by_name): Ditto.
10772 * regcache.c (struct inferior_regcache_data): Delete.
10773 (get_regcache): Rename to ...
10774 (get_thread_regcache): ... this. Adjust. Switch inferior before
10775 fetching registers.
10776 (regcache_invalidate_one): Adjust.
10777 (regcache_invalidate): Fix prototype.
10778 (new_register_cache): Return the new register cache.
10779 (free_register_cache): Change prototype.
10780 (realloc_register_cache): Adjust.
10781 (registers_to_string): Change prototype to take a regcache. Adjust.
10782 (registers_from_string): Ditto.
10783 (register_data): Ditto.
10784 (supply_register): Ditto.
10785 (supply_register_by_name): Ditto.
10786 (collect_register): Ditto.
10787 (collect_register_as_string): Ditto.
10788 (collect_register_by_name): Ditto.
10789 * server.c (process_serial_event): Adjust.
10790 * linux-low.h (regset_fill_func, regset_store_func): Change
10792 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10794 * linux-low.c (get_stop_pc): Adjust.
10795 (check_removed_breakpoint): Adjust.
10796 (linux_wait_for_event): Adjust.
10797 (linux_resume_one_lwp): Adjust.
10798 (fetch_register): Add regcache parameter. Adjust.
10799 (usr_store_inferior_registers): Ditto.
10800 (regsets_fetch_inferior_registers): Ditto.
10801 (regsets_store_inferior_registers): Ditto.
10802 (linux_fetch_registers, linux_store_registers): Ditto.
10803 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10805 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10807 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10808 prototype to take a regcache.
10809 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10810 * remote-utils.c (convert_ascii_to_int, outreg)
10811 (prepare_resume_reply): Change prototype to take a regcache.
10813 * target.h (struct target_ops) <fetch_registers, store_registers>:
10814 Change prototype to take a regcache.
10815 (fetch_inferior_registers, store_inferior_registers): Change
10816 prototype to take a regcache. Adjust.
10817 * proc-service.c (ps_lgetregs): Adjust.
10818 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10819 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10820 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10821 take a regcache. Adjust.
10822 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10823 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10824 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10825 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10826 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10827 (cris_cannot_fetch_register):
10828 (cris_breakpoint_at): Change prototype to take a regcache.
10830 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10831 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10832 to take a regcache. Adjust.
10833 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10835 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10836 take a regcache. Adjust.
10837 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10838 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10839 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10840 * linux-mips-low.c (mips_get_pc):
10841 (mips_set_pc): Change prototype to take a regcache. Adjust.
10842 (mips_reinsert_addr): Adjust.
10843 (mips_collect_register): Change prototype to take a regcache.
10845 (mips_supply_register):
10846 (mips_collect_register_32bit, mips_supply_register_32bit)
10847 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10848 (mips_store_fpregset): Ditto.
10849 * linux-ppc-low.c (ppc_supply_ptrace_register)
10850 (ppc_supply_ptrace_register): Ditto.
10851 (parse_spufs_run): Adjust.
10852 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10853 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10854 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10855 take a regcache. Adjust.
10856 * linux-s390-low.c (s390_collect_ptrace_register)
10857 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10858 (s390_set_pc): Change prototype to take a regcache. Adjust.
10859 (s390_arch_setup): Adjust.
10860 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10861 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10862 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10863 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10864 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10866 (sparc_breakpoint_at): Adjust.
10867 * linux-xtensa-low.c (xtensa_fill_gregset):
10868 (xtensa_store_gregset):
10869 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10870 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10871 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10872 prototype to take a regcache. Adjust.
10873 * win32-arm-low.c (arm_fetch_inferior_register)
10874 (arm_store_inferior_register): Change prototype to take a
10876 * win32-i386-low.c (i386_fetch_inferior_register)
10877 (i386_store_inferior_register): Change prototype to take a
10879 * win32-low.c (child_fetch_inferior_registers)
10880 (child_store_inferior_registers): Change prototype to take a
10882 (win32_wait): Adjust.
10883 (win32_fetch_inferior_registers): Change prototype to take a
10885 (win32_store_inferior_registers): Adjust.
10886 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10887 store_inferior_register>: Change prototype to take a regcache.
10889 2010-01-20 Doug Evans <dje@google.com>
10891 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10893 (linux_wait_for_event1, linux_init_signals): Ditto.
10894 (W_STOPCODE): Provide definition if missing.
10896 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10898 * linux-low.c (linux_core_of_thread): New.
10899 (compare_ints, show_process, list_threads): New.
10900 (linux_qxfer_osdata): Report threads and cores.
10901 (linux_target_op): Register linux_core_of_thread.
10902 * remote-utils.c (prepare_resume_reply): Report the core.
10903 (buffer_xml_printf): Support %d specifier.
10904 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10906 (handle_query): Handle qXfer:threads. Announce availability
10908 * target.h (struct target_ops): New field core_of_thread.
10910 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10912 * Makefile.in (clean): Remove new generated files.
10913 (reg-s390.o, reg-s390.c): Remove rules.
10914 (reg-s390x.o, reg-s390x.c): Likewise.
10915 (s390-linux32.o, s390-linux32.c): Add rules.
10916 (s390-linux64.o, s390-linux64.c): Likewise.
10917 (s390x-linux64.o, s390x-linux64.c): Likewise.
10918 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10919 * linux-s390-low.c: Include <elf.h>.
10920 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10921 (init_registers_s390): Remove prototype.
10922 (init_registers_s390x): Likewise.
10923 (init_registers_s390_linux32): Add prototype.
10924 (init_registers_s390_linux64): Likewise.
10925 (init_registers_s390x_linux64): Likewise.
10926 (s390_num_regs_3264): New define.
10927 (s390_regmap_3264): New global variable.
10928 (s390_cannot_fetch_register): Remove obsolete check.
10929 (s390_cannot_store_register): Likewise.
10930 (s390_collect_ptrace_register): Handle upper/lower register halves.
10931 (s390_supply_ptrace_register): Likewise.
10932 (s390_fill_gregset): Update to register number changes.
10933 (s390_get_hwcap): New routine.
10934 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10935 Install appropriate regmap and register set.
10937 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10939 * server.c (gdbserver_version): Update copyright year to 2010.
10940 * gdbreplay.c (gdbreplay_version): Likewise.
10942 2009-12-28 Doug Evans <dje@google.com>
10944 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10945 elf/external.h. Include <elf.h> instead but only if necessary.
10947 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10949 * linux-low.c (linux_remove_process): Remove `detaching'
10950 parameter. Don't release/detach from thread_db here.
10951 (linux_kill): Release/detach from thread_db here, ...
10952 (linux_detach): ... and here, before actually detaching.
10953 (linux_wait_1): ... and here, when a process exits.
10954 * thread-db.c (any_thread_of): New.
10955 (thread_db_free): Switch the current inferior to a thread of the
10958 2009-12-21 Doug Evans <dje@google.com>
10960 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10962 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10963 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10964 warning ifndef __NR_tkill. Move setting of errno there too.
10965 Delete unnecessary resetting of errno after syscall.
10966 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10968 * configure.ac: Check for dladdr.
10969 * config.in: Regenerate.
10970 * configure: Regenerate.
10971 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10972 (try_thread_db_load): Update.
10974 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10976 2009-12-18 Doug Evans <dje@google.com>
10978 * event-loop.c: Include unistd.h if it exists.
10980 * linux-low.c (my_waitpid): Move definition away from being in
10981 between linux_tracefork_child/linux_test_for_tracefork.
10983 * gdb_proc_service.h (psaddr_t): Fix type.
10984 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10985 signature to match glibc.
10987 2009-12-16 Doug Evans <dje@google.com>
10989 * linux-low.c (linux_read_memory): Fix argument to read.
10991 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10993 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10994 events, don't leave current_inferior pointing at null.
10996 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10998 * win32-low.c (LOG): Delete.
10999 (OUTMSG): Output to stderr.
11000 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11001 on compile time LOG macro.
11002 (win32_wait): Fix debug output.
11004 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11006 * win32-low.c (win32_add_one_solib): If the dll name is
11007 "ntdll.dll", prepend the system directory to the dll path.
11009 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11011 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11013 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11014 Vladimir Prus <vladimir@codesourcery.com>
11016 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11017 * configure.ac: Check for __mcoldfire__ and set
11018 gdb_cv_m68k_is_coldfire.
11019 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11020 reg-cf.o and reg-m68k.o.
11021 * configure: Regenerated.
11023 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11025 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11026 Pass it to thread_db_free.
11027 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11028 proper `detaching' argument to linux_remove_process.
11029 * linux-low.h (thread_db_free): Add `detaching' parameter.
11030 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11032 (thread_db_free): Add `detaching' parameter. Only
11033 call td_ta_clear_event if detaching from process.
11035 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11037 * thread-db.c (thread_db_free): Fix typo.
11039 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11042 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11044 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11046 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11047 with an i686 compiler.
11048 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11050 * configure: Rebuilt.
11052 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11056 * server.c (handle_search_memory_1): Correct read_addr initialization
11057 in loop for searching subsequent chunks.
11059 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11061 * configure.ac: New --with-libthread-db option.
11062 * thread-db.c: Allow direct dependence on libthread_db.
11063 (thread_db_free): Adjust.
11064 * config.in: Regenerate.
11065 * configure: Likewise.
11067 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11070 * thread-db.c (attach_thread): New function.
11071 (maybe_attach_thread): Return success/failure.
11072 (find_new_threads_callback): Adjust.
11073 (thread_db_find_new_threads): Loop until no new threads.
11075 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11077 * proc-service.c (ps_lgetregs): Formatting.
11079 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11081 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11082 * configure.ac: Adjust.
11083 * linux-low.h (struct process_info_private): Move members to struct
11085 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11086 * linux-low.c (linux_remove_process): Adjust.
11087 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11088 * server.c (handle_query): Move code ...
11089 (handle_monitor_command): ... here. New function.
11090 * target.h (struct target_ops): New member.
11091 * thread-db.c (struct thread_db): New.
11092 (libthread_db_search_path): New variable.
11093 (thread_db_create_event, thread_db_enable_reporting)
11094 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11095 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11096 (try_thread_db_load_1, dladdr_to_soname): New functions.
11097 (try_thread_db_load, thread_db_load_search): New functions.
11098 (thread_db_init): Search for libthread_db.
11099 (thread_db_free): New function.
11100 (thread_db_handle_monitor_command): Likewise.
11101 * config.in: Regenerate.
11102 * configure: Regenerate.
11104 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11106 * spu-low.c (spu_kill): Wait for inferior to terminate.
11107 Call clear_inferiors.
11108 (spu_detach): Call clear_inferiors.
11110 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11112 * aclocal.m4: Regenerate.
11113 * config.in: Likewise.
11114 * configure: Likewise.
11116 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11118 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11119 (parse_spufs_run): New function.
11120 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11121 (ppc_breakpoint_at): Handle SPU breakpoints.
11123 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11125 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11126 (SPUFS_MAGIC): Define.
11127 (spu_enumerate_spu_ids): New function.
11128 (linux_qxfer_spu): New function.
11129 (linux_target_ops): Install linux_qxfer_spu.
11131 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11133 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11134 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11135 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11136 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11137 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11138 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11139 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11140 (init_registers_powerpc_cell32l): Add prototype.
11141 (init_registers_powerpc_cell64l): Likewise.
11142 (ppc_arch_setup): Detect Cell/B.E. architecture.
11144 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11146 * Makefile.in (datarootdir): New variable.
11148 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11150 * linux-low.c (linux_write_memory): Update debugging output.
11151 * Makefile.in (clean): Add new descriptions.
11152 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11153 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11154 * configure.srv: Add new files for arm*-*-linux*.
11155 * linux-arm-low.c: Add new declarations.
11156 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11157 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11158 (HWCAP_VFPv3D16): New.
11159 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11160 instead of __IWMMXT__.
11161 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11162 (arm_arch_setup): New.
11163 (target_regsets): Remove #ifdef. Add VFP regset.
11164 (the_low_target): Use arm_arch_setup.
11166 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11168 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11169 the main thread again.
11171 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11173 Adding Neutrino gdbserver.
11174 * configure: Regenerated.
11175 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11176 * configure.srv (i[34567]86-*-nto*): New target.
11177 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11178 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11179 (nto_comctrl) [__QNX__]: New function.
11180 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11182 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11184 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11187 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11188 Pedro Alves <pedro@codesourcery.com>
11190 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11191 don't support CONTEXT_EXTENDED_REGISTERS.
11192 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11193 (the_low_target): Install them.
11194 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11195 failing with ERROR_PIPE_NOT_CONNECTED.
11197 2009-06-30 Doug Evans <dje@google.com>
11198 Pierre Muller <muller@ics.u-strasbg.fr>
11200 Add h/w watchpoint support to x86-linux, win32-i386.
11201 * Makefile.in (SFILES): Add i386-low.c
11202 (i386_low_h): Define.
11203 (i386-low.o): Add dependencies.
11204 (linux-x86-low.o): Add i386-low.h dependency.
11205 (win32-i386-low.o): Ditto.
11206 * i386-low.c: New file.
11207 * i386-low.h: New file.
11208 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11209 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11210 * linux-low.c (linux_add_process): Initialize arch_private.
11211 (linux_remove_process): Free arch_private.
11212 (add_lwp): Initialize arch_private.
11213 (delete_lwp): Free arch_private.
11214 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11216 * linux-low.h (process_info_private): New member arch_private.
11217 (lwp_info): New member arch_private.
11218 (linux_target_ops): New members new_process, new_thread,
11220 (ptid_of): New macro.
11221 * linux-x86-low.c: Include stddef.h, i386-low.h.
11222 (arch_process_info): New struct.
11223 (arch_lwp_info): New struct.
11224 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11225 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11226 (i386_dr_low_get_status): New function.
11227 (x86_insert_point, x86_remove_point): New functions.
11228 (x86_stopped_by_watchpoint): New function.
11229 (x86_stopped_data_address): New function.
11230 (x86_linux_new_process, x86_linux_new_thread): New functions.
11231 (x86_linux_prepare_to_resume): New function.
11232 (the_low_target): Add entries for insert_point, remove_point,
11233 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11235 * server.c (debug_hw_points): New global.
11236 (monitor_show_help): Document set debug-hw-points.
11237 (handle_query): Process "set debug-hw-points".
11238 * server.h (debug_hw_points): Declare.
11239 (paddress): Declare.
11240 * utils.c (NUMCELLS, CELLSIZE): New macros.
11241 (get_sell, xsnprintf, paddress): New functions.
11242 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11243 remove_point, stopped_by_watchpoint, stopped_data_address.
11244 * win32-i386-low.c: Include i386-low.h.
11245 (debug_reg_state): Replaces dr.
11246 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11247 (i386_dr_low_get_status): New function.
11248 (i386_insert_point, i386_remove_point): New functions.
11249 (i386_stopped_by_watchpoint): New function.
11250 (i386_stopped_data_address): New function.
11251 (i386_initial_stuff): Update.
11252 (get_thread_context,set_thread_context,i386_thread_added): Update.
11253 (the_low_target): Add entries for insert_point,
11254 remove_point, stopped_by_watchpoint, stopped_data_address.
11255 * win32-low.c (win32_insert_watchpoint): New function.
11256 (win32_remove_watchpoint): New function.
11257 (win32_stopped_by_watchpoint): New function.
11258 (win32_stopped_data_address): New function.
11259 (win32_target_ops): Add entries for insert_watchpoint,
11260 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11261 * win32-low.h (win32_target_ops): New members insert_point,
11262 remove_point, stopped_by_watchpoint, stopped_data_address.
11264 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11266 * server.c (process_serial_event): Re-return unsupported, not
11267 error, if the type isn't recognized. Re-allow supporting only
11268 insert or remove packets. Also call require_running for
11269 breakpoints. Add missing break statement to default case. Tidy.
11270 * target.h (struct target_ops): Rename insert_watchpoint to
11271 insert_point, and remove_watchpoint to remove_point.
11273 * linux-low.h (struct linux_target_ops): Likewise.
11274 * linux-low.c (linux_insert_watchpoint): Rename to ...
11275 (linux_insert_point): ... this. Adjust.
11276 (linux_remove_watchpoint): Rename to ...
11277 (linux_remove_point): ... this. Adjust.
11278 (linux_target_ops): Adjust.
11279 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11280 (cris_insert_point): ... this.
11281 (cris_remove_watchpoint): Rename to ...
11282 (cris_remove_point): ... this.
11283 (the_low_target): Adjust.
11285 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11287 * server.c (handle_v_kill): Pass signal_pid to
11288 kill_inferior if multi_process is zero.
11290 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11292 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11293 * target.h (target_ops): Comment for *_watchpoint to make it clear
11294 the functions can get types '0' and '1'.
11296 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11298 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11299 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11300 * regcache.c (get_regcache): Likewise.
11301 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11302 * win32-low.c (child_fetch_inferior_registers): Remove check for
11305 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11306 Pedro Alves <pedro@codesourcery.com>
11308 * target.h (struct target_ops) <supports_multi_process>: New
11310 (target_supports_multi_process): New.
11311 * server.c (handle_query): Even if GDB reports support, only
11312 enable multi-process if the target also supports it. Report
11313 multi-process support only if the target backend supports it.
11314 * linux-low.c (linux_supports_multi_process): New function.
11315 (linux_target_ops): Install it as target_supports_multi_process
11318 2009-05-24 Doug Evans <dje@google.com>
11320 Global renaming of find_thread_pid to find_thread_ptid.
11321 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11322 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11323 All callers updated.
11325 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11326 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11329 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11330 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11331 (linux_resume_one_lwp): Ditto.
11333 2009-05-23 Doug Evans <dje@google.com>
11335 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11336 from struct inferior_list_entry * to struct lwp_info *.
11337 All callers updated.
11339 2009-05-13 Doug Evans <dje@google.com>
11341 * linux-x86-low.c: Don't include assert.h.
11342 (x86_siginfo_fixup): Use fatal, not assert.
11343 (x86_arch_setup): Fix comment.
11345 2009-05-12 Doug Evans <dje@google.com>
11347 Biarch support for i386/amd64 gdbserver.
11348 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11349 Add linux-x86-low.c.
11350 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11351 (linux-x86-low.o): Add.
11352 * linux-x86-64-low.c: Delete.
11353 * linux-i386-low.c: Delete.
11354 * linux-x86-low.c: New file.
11355 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11357 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11359 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11360 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11361 (linux_child_pid_to_exec_file): New function.
11362 (elf_64_header_p, elf_64_file_p): New functions.
11363 (siginfo_fixup): New function.
11364 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11365 give target a chance to convert layout.
11366 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11367 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11369 2009-05-07 Doug Evans <dje@google.com>
11371 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11372 (regsets_store_inferior_registers): Ditto.
11374 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11378 * linux-low.c (must_set_ptrace_flags): Delete.
11379 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11381 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11382 `lwp->must_set_ptrace_flags' instead.
11383 (linux_wait_for_event_1): Set ptrace options here.
11384 (linux_wait_1): ... not here.
11386 2009-04-30 Doug Evans <dje@google.com>
11388 * inferiors.c (started_inferior_callback): New function.
11389 (attached_inferior_callback): New function.
11390 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11391 * server.c (print_started_pid, print_attached_pid): New functions.
11392 (detach_or_kill_for_exit): New function.
11393 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11394 * server.h (have_started_inferiors_p): Declare.
11395 (have_attached_inferiors_p): Declare.
11397 * inferiors.c (remove_process): Fix memory leak, free process.
11398 * linux-low.c (linux_remove_process): New function.
11399 (linux_kill): Call it instead of remove_process.
11400 (linux_detach, linux_wait_1): Ditto.
11402 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11404 * configure.srv: Add x86 Windows CE target.
11406 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11408 * inferiors.c (get_thread_process): Make global.
11409 * server.h (get_thread_process): Add prototype.
11410 * thread-db.c (find_one_thread): Use get_thread_process
11411 instead of current_process.
11412 (thread_db_get_tls_address): Do not crash if called when
11413 thread layer is not yet initialized.
11415 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11417 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11418 * spu-low.c (current_tid): Rename to ...
11419 (current_ptid): ... this.
11420 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11421 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11422 ptid_get_lwp (current_ptid) instead of current_tid.
11423 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11424 instead of current_tid. Use find_process_pid to verify pid
11425 argument is valid. Pass proper argument to remove_process.
11426 (spu_thread_alive): Compare current_ptid instead of current_tid.
11427 (spu_resume): Likewise.
11429 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11431 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11434 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11436 Implement the multiprocess extensions, and add linux multiprocess
11439 * server.h (ULONGEST): Declare.
11440 (struct ptid, ptid_t): New.
11441 (minus_one_ptid, null_ptid): Declare.
11442 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11443 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11444 (struct inferior_list_entry): Change `id' type from unsigned from
11446 (struct sym_cache, struct breakpoint, struct
11447 process_info_private): Forward declare.
11448 (struct process_info): Declare.
11449 (current_process): Declare.
11450 (all_processes): Declare.
11451 (initialize_inferiors): Declare.
11452 (add_thread): Adjust to use ptid_t.
11453 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11454 (add_process, remove_process, find_thread_pid): Declare.
11455 (find_inferior_id): Adjust to use ptid_t.
11456 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11457 (multi_process): Declare.
11458 (push_event): Adjust to use ptid_t.
11459 (read_ptid, write_ptid): Declare.
11460 (prepare_resume_reply): Adjust to use ptid_t.
11461 (clear_symbol_cache): Declare.
11462 * inferiors.c (all_processes): New.
11463 (null_ptid, minus_one_ptid): New.
11464 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11465 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11466 (add_thread): Change unsigned long to ptid. Remove gdb_id
11468 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11469 (gdb_id_to_thread): Rename to ...
11470 (find_thread_pid): ... this. Change unsigned long to ptid.
11471 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11472 (loaded_dll, pull_pid_from_list): Adjust.
11473 (add_process, remove_process, find_process_pid)
11474 (get_thread_process, current_process, initialize_inferiors): New.
11475 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11476 (struct target_waitstatus) <related_pid>: Ditto.
11477 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11478 return type to int.
11479 (struct target_ops) <join>: Add `pid' argument.
11480 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11481 (struct target_ops) <wait>: Add `ptid' field. Change return type
11483 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11484 (mywait): Add `ptid' argument. Change return type to ptid_t.
11485 (target_pid_to_str): Declare.
11486 * target.c (set_desired_inferior): Adjust to use ptids.
11487 (mywait): Add new `ptid' argument. Adjust.
11488 (target_pid_to_str): New.
11489 * mem-break.h (free_all_breakpoints): Declare.
11490 * mem-break.c (breakpoints): Delelete.
11491 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11492 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11493 to use per-process breakpoint list.
11494 (free_all_breakpoints): New.
11495 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11496 (symbol_cache, all_symbols_looked_up): Delete.
11498 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11500 (prepare_resume_reply): Change ptid argument's type from unsigned
11501 long to ptid_t. Adjust. Implement W;process and X;process.
11502 (free_sym_cache, clear_symbol_cache): New.
11503 (look_up_one_symbol): Adjust to per-process symbol cache. *
11504 * server.c (cont_thread, general_thread, step_thread): Change type
11506 (attached): Delete.
11507 (multi_process): New.
11508 (last_ptid): Change type to ptid_t.
11509 (struct vstop_notif) <ptid>: Change type to ptid_t.
11510 (queue_stop_reply, push_event): Change `ptid' argument's type to
11512 (discard_queued_stop_replies): Add `pid' argument.
11513 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11514 changes. Don't reference the `attached' global.
11515 (attach_inferior): Adjust to mywait interface changes.
11516 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11517 features. Handle and report "multiprocess+". Handle
11519 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11521 (handle_v_kill): New.
11522 (handle_v_stopped): Adjust to use target_pid_to_str.
11523 (handle_v_requests): Allow multiple attaches and runs when
11524 multiprocess extensions are in effect. Handle "vKill".
11525 (myresume): Adjust to use ptids.
11526 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11527 (handle_status): Adjust to discard_queued_stop_replies interface
11529 (first_thread_of, kill_inferior_callback)
11530 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11531 (main): Call initialize_inferiors. Adjust to use ptids, killing
11532 and detaching from all inferiors. Handle multiprocess packet
11534 * linux-low.h: Include gdb_proc_service.h.
11535 (struct process_info_private): New.
11536 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11537 <lwpid_of>: Use ptid_get_lwp.
11538 (get_lwp_thread): Adjust.
11539 (struct lwp_info): Add `dead' member.
11540 (find_lwp_pid): Declare.
11541 * linux-low.c (thread_db_active): Delete.
11542 (new_inferior): Adjust comment.
11543 (inferior_pid): Delete.
11544 (linux_add_process): New.
11545 (handle_extended_wait): Adjust.
11546 (add_lwp): Change unsigned long to ptid.
11547 (linux_create_inferior): Add process to processes table. Adjust
11548 to use ptids. Don't set new_inferior here.
11549 (linux_attach_lwp): Rename to ...
11550 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11551 it. Adjust to use ptids.
11552 (linux_attach_lwp): New.
11553 (linux_attach): Add process to processes table. Don't set
11555 (struct counter): New.
11556 (second_thread_of_pid_p, last_thread_of_process_p): New.
11557 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11558 multiple processes.
11559 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11560 processes. Remove process from process table.
11561 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11562 to multiple processes.
11563 (any_thread_of): New.
11564 (linux_detach): Add `pid' argument, and handle it. Remove process
11565 from processes table.
11566 (linux_join): Add `pid' argument. Handle it.
11567 (linux_thread_alive): Change unsighed long argument to ptid_t.
11568 Consider dead lwps as not being alive.
11569 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11570 threads we're not interested in.
11571 (same_lwp, find_lwp_pid): New.
11572 (linux_wait_for_lwp): Change `pid' argument's type from int to
11574 (linux_wait_for_event): Rename to ...
11575 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11576 from int to ptid_t. Adjust.
11577 (linux_wait_for_event): New.
11578 (linux_wait_1): Add `ptid' argument. Change return type to
11579 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11580 that exit from the process table.
11581 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11583 (mark_lwp_dead): New.
11584 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11585 stopping all threads, mark its main lwp as dead.
11586 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11588 (fetch_register, usr_store_inferior_registers)
11589 (regsets_fetch_inferior_registers)
11590 (regsets_store_inferior_registers, linux_read_memory)
11591 (linux_write_memory): Inline `inferior_pid'.
11592 (linux_look_up_symbols): Adjust to use per-process
11593 `thread_db_active'.
11594 (linux_request_interrupt): Adjust to use ptids.
11595 (linux_read_auxv): Inline `inferior_pid'.
11596 (initialize_low): Don't reference thread_db_active.
11597 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11598 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11599 (ps_getpid): Return the pid of the current inferior.
11600 * thread-db.c (proc_handle, thread_agent): Delete.
11601 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11603 (find_one_thread): Change argument type to ptid_t. Adjust to
11605 (maybe_attach_thread): Adjust to per-process data and ptids.
11606 (thread_db_find_new_threads): Ditto.
11607 (thread_db_init): Ditto.
11608 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11609 processes table. Adjust to use ptids.
11610 (spu_kill, spu_detach): Adjust interface. Remove process from
11612 (spu_join, spu_thread_alive): Adjust interface.
11613 (spu_wait): Adjust interface. Remove process from processes
11614 table. Adjust to use ptids.
11615 * win32-low.c (current_inferior_tid): Delete.
11616 (current_inferior_ptid): New.
11617 (debug_event_ptid): New.
11618 (thread_rec): Take a ptid. Adjust.
11619 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11620 (child_delete_thread): Ditto.
11621 (do_initial_child_stuff): Add `attached' argument. Add process to
11623 (child_fetch_inferior_registers, child_store_inferior_registers):
11625 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11626 (win32_attach): Pass 1 to do_initial_child_stuff.
11627 (win32_kill): Adjust interface. Remove process from processes
11629 (win32_detach): Ditto.
11630 (win32_join): Adjust interface.
11631 (win32_thread_alive): Take a ptid.
11632 (win32_resume): Adjust to use ptids.
11633 (get_child_debug_event): Ditto.
11634 (win32_wait): Adjust interface. Remove exiting process from
11637 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11639 Non-stop mode support.
11641 * server.h (non_stop): Declare.
11642 (gdb_client_data, handler_func): Declare.
11643 (delete_file_handler, add_file_handler, start_event_loop):
11645 (handle_serial_event, handle_target_event, push_event)
11646 (putpkt_notif): Declare.
11647 * target.h (enum resume_kind): New.
11648 (struct thread_resume): Replace `step' field by `kind' field.
11649 (TARGET_WNOHANG): Define.
11650 (struct target_ops) <wait>: Add `options' argument.
11651 <supports_non_stop, async, start_non_stop>: New fields.
11652 (target_supports_non_stop, target_async): New.
11653 (start_non_stop): Declare.
11654 (mywait): Add `options' argument.
11655 * target.c (mywait): Add `options' argument. Print child exit
11656 notifications here.
11657 (start_non_stop): New.
11658 * server.c (non_stop, own_buf, mem_buf): New globals.
11659 (struct vstop_notif): New.
11660 (notif_queue): New global.
11661 (queue_stop_reply, push_event, discard_queued_stop_replies)
11662 (send_next_stop_reply): New.
11663 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11665 (attach_inferior): In non-stop mode, don't wait for the target
11667 (handle_general_set): Handle QNonStop.
11668 (handle_query): When handling qC, return the current general
11669 thread, instead of the first thread of the list.
11670 (handle_query): If the backend supports non-stop mode, include
11671 QNonStop+ in the qSupported query response.
11672 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11674 (handle_v_attach, handle_v_run): Handle non-stop mode.
11675 (handle_v_stopped): New.
11676 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11677 (myresume): Adjust to use resume_kind. Handle non-stop.
11678 (queue_stop_reply_callback): New.
11679 (handle_status): Handle non-stop mode.
11680 (main): Clear non_stop flag on reconnection. Use the event-loop.
11681 Refactor serial protocol handling from here ...
11682 (process_serial_event): ... to this new function. When GDB
11683 selects any thread, select one here. In non-stop mode, wait until
11684 GDB acks all pending events before exiting.
11685 (handle_serial_event, handle_target_event): New.
11686 * remote-utils.c (remote_open): Install remote_desc in the event
11688 (remote_close): Remove remote_desc from the event loop.
11689 (putpkt_binary): Rename to...
11690 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11691 (putpkt_binary): New as wrapper around putpkt_binary_1.
11692 (putpkt_notif): New.
11693 (prepare_resume_reply): In non-stop mode, don't change the
11695 * event-loop.c: New.
11696 * Makefile.in (OBJ): Add event-loop.o.
11697 (event-loop.o): New rule.
11699 * linux-low.h (pid_of): Moved here.
11701 (get_lwp_thread): Use lwpid_of.
11702 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11703 * linux-low.c (pid_of): Delete.
11704 (inferior_pid): Use lwpid_of.
11705 (linux_event_pipe): New.
11706 (target_is_async_p): New.
11708 (handle_extended_wait): Use lwpid_of.
11709 (add_lwp): Don't set lwpid field.
11710 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11711 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11712 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11713 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11714 first. Adjust to linux_wait_for_event interface changes. Use
11716 (linux_detach): Don't delete the main lwp here.
11717 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11718 (status_pending_p): Don't consider explicitly suspended lwps.
11719 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11720 pointer. Add OPTIONS argument. Change return type to int. Use
11721 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11722 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11723 pointer. Add status pointer argument. Return a pid instead of a
11724 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11725 changes. In non-stop mode, don't switch to a random thread.
11726 (linux_wait): Rename to...
11727 (linux_wait_1): ... this. Add target_options argument, and handle
11728 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11729 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11730 clean exit and signal exit code. Don't stop all threads in
11731 non-stop mode. In all-stop mode, only stop all threads when
11732 reporting a stop to GDB. Handle explicit thread stop requests.
11733 (async_file_flush, async_file_mark): New.
11735 (send_sigstop): Use lwpid_of.
11736 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11737 interface changes. In non-stop mode, don't switch to a random
11739 (linux_resume_one_lwp): Use lwpid_of.
11740 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11741 (linux_resume_one_thread): ... this. Handle resume_stop. In
11742 non-stop mode, don't look for pending flag in all threads.
11743 (resume_status_pending_p): Don't consider explicitly suspended
11745 (my_waitpid): Reimplement. Emulate __WALL.
11746 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11748 (sigchld_handler, linux_supports_non_stop, linux_async)
11749 (linux_start_non_stop): New.
11750 (linux_target_ops): Register linux_supports_non_stop, linux_async
11751 and linux_start_non_stop.
11752 (initialize_low): Install SIGCHLD handler.
11753 * thread-db.c (thread_db_create_event, find_one_thread)
11754 (thread_db_get_tls_address): Use lwpid_of.
11755 * win32-low.c (win32_detach): Adjust to use resume_kind.
11756 (win32_wait): Add `options' argument.
11757 * spu-low.c (spu_resume): Adjust to use resume_kind.
11758 (spu_wait): Add `options' argument.
11760 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11762 Decouple target code from remote protocol.
11764 * target.h (enum target_waitkind): New.
11765 (struct target_waitstatus): New.
11766 (struct target_ops) <wait>: Return an unsigned long. Take a
11767 target_waitstatus pointer instead of a char pointer.
11768 (mywait): Likewise.
11769 * target.c (mywait): Change prototype to return an unsigned long.
11770 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11771 * server.h (thread_from_wait, old_thread_from_wait): Delete
11773 (prepare_resume_reply): Change prototype to take a
11775 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11776 (last_status, last_ptid): New.
11777 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11778 pid instead of a signal.
11779 (attach_inferior): Remove "status" and "signal" parameters.
11781 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11783 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11784 (handle_v_requests, myresume): Remove "status" and "signal"
11785 parameters. Adjust.
11786 (handle_status): New.
11787 (main): Delete local `status'. Adjust.
11788 * remote-utils.c: Include target.h.
11789 (prepare_resume_reply): Change prototype to take a
11790 target_waitstatus. Adjust.
11792 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11794 * spu-low.c (spu_wait): Adjust.
11795 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11797 (win32_wait): Adjust.
11799 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11801 * target.h (struct thread_resume): Delete leave_stopped member.
11802 (struct target_ops): Add a `n' argument to the `resume' callback.
11803 * server.c (start_inferior): Adjust.
11804 (handle_v_cont, myresume): Adjust.
11805 * linux-low.c (check_removed_breakpoint): Adjust to resume
11806 interface change, and to removed leave_stopped field.
11807 (resume_ptr): Delete.
11808 (struct thread_resume_array): New.
11809 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11810 resume interface change.
11811 (linux_continue_one_thread, linux_queue_one_thread)
11812 (resume_status_pending_p): Check if the resume field is NULL
11813 instead of checking the leave_stopped member.
11814 (linux_resume): Adjust to the target resume interface change.
11815 * spu-low.c (spu_resume): Adjust to the target resume interface
11817 * win32-low.c (win32_detach, win32_resume): Ditto.
11819 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11821 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11823 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11825 (linux_continue_one_thread): Only preserve the stepping flag if
11826 there's a pending breakpoint.
11828 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11830 * server.c (main): After the inferior having exited, call
11831 remote_close before exiting gdbserver.
11833 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11835 Fix size of FPSCR in Power 7 processors.
11836 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11837 (PPC_FEATURE_HAS_DFP): New #define.
11838 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11841 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11843 * server.c (handle_query) Whitespace and formatting.
11845 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11847 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11848 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11849 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11850 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11851 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11852 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11853 Makefile.in, configure.ac: Fix whitespace throughout.
11854 * configure: Regenerate.
11856 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11858 * inferiors.c (find_inferior): Make it safe for the callback
11859 function to delete the currently iterated inferior.
11861 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11863 * Makefile.in (linuw_low_h): Move higher.
11864 (thread-db.o): Depend on $(linux_low_h).
11866 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11868 Rename "process" to "lwp" throughout.
11870 * linux-low.c (all_processes): Rename to...
11871 (all_lwps): ... this.
11872 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11873 (add_process): Rename to ...
11874 (add_lwp): ... this. Adjust.
11875 (linux_create_inferior): Adjust.
11876 (linux_attach_lwp): Adjust.
11877 (linux_attach): Adjust.
11878 (linux_kill_one_process): Rename to ...
11879 (linux_kill_one_lwp): ... this. Adjust.
11880 (linux_kill): Adjust.
11881 (linux_detach_one_process): Rename to ...
11882 (linux_detach_one_lwp): ... this. Adjust.
11883 (linux_detach): Adjust.
11884 (check_removed_breakpoint): Adjust.
11885 (status_pending_p): Adjust.
11886 (linux_wait_for_process): Rename to ...
11887 (linux_wait_for_lwp): ... this. Adjust.
11888 (linux_wait_for_event): Adjust.
11889 (send_sigstop): Adjust.
11890 (wait_for_sigstop): Adjust.
11891 (stop_all_processes): Rename to ...
11892 (stop_all_lwps): ... this.
11893 (linux_resume_one_process): Rename to ...
11894 (linux_resume_one_lwp): ... this. Adjust.
11895 (linux_set_resume_request, linux_continue_one_thread)
11896 (linux_queue_one_thread, resume_status_pending_p)
11897 (usr_store_inferior_registers, regsets_store_inferior_registers)
11898 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11900 * linux-low.h (get_process): Rename to ...
11901 (get_lwp): ... this. Adjust.
11902 (get_thread_process): Rename to ...
11903 (get_thread_lwp): ... this. Adjust.
11904 (get_process_thread): Rename to ...
11905 (get_lwp_thread): ... this. Adjust.
11906 (struct process_info): Rename to ...
11907 (struct lwp_info): ... this.
11908 (all_processes): Rename to ...
11909 (all_lwps): ... this.
11910 * proc-service.c (ps_lgetregs): Adjust.
11911 * thread-db.c (thread_db_create_event, find_one_thread)
11912 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11914 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11916 * server.c (handle_query): Handle "qAttached".
11918 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11920 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11921 GPLv3, update license URL.
11923 2009-03-01 Doug Evans <dje@google.com>
11925 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11926 (server_h): Add gdb_signals.h.
11927 (signals.o): Update.
11928 * server.h (target_signal_from_host,target_signal_to_host_p)
11929 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11931 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11933 * remote-utils.c (getpkt): Also generate remote-debug
11934 information if noack_mode is set.
11936 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11938 * server.c (handle_query): Report qXfer:siginfo:read and
11939 qXfer:siginfo:write as supported and handle them.
11940 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11941 * linux-low.c (linux_xfer_siginfo): New.
11942 (linux_target_ops): Set it.
11944 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11946 * server.c (gdbserver_usage): Mention --remote-debug.
11947 (main): Accept '--remote-debug' switch.
11949 2009-01-18 Doug Evans <dje@google.com>
11951 * regcache.c (new_register_cache): No need to check result of xcalloc.
11952 * server.c (handle_search_memory): Back out calls to xmalloc,
11953 result is checked and error is returned to user upon failure.
11954 (handle_query): Ditto. Add more checks for result of malloc.
11955 (handle_v_cont): Check result of malloc, report error back to
11957 (handle_v_run): Ditto. Call freeargv.
11958 * server.h (freeargv): Declare.
11959 * utils.c (freeargv): New fn.
11961 2009-01-15 Doug Evans <dje@google.com>
11963 * gdbreplay.c (perror_with_name): Make arg const char *.
11964 * server.h (target_signal_to_name): Make return type const char *.
11965 * thread-db.c (thread_db_err_str): Make return type const char *.
11966 * utils.c (perror_with_name): Make arg const char *.
11968 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11970 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11971 when handling a EXIT_PROCESS_DEBUG_EVENT.
11973 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11975 * gdbreplay.c (gdbreplay_version): Update copyright year.
11976 * server.c (gdbserver_version): Likewise.
11978 2009-01-05 Doug Evans <dje@google.com>
11980 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11981 (handle_extended_wait): Improve comment.
11983 2008-12-13 Doug Evans <dje@google.com>
11985 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11986 * server.h (ATTR_MALLOC): New macro.
11987 (xmalloc,xcalloc,xstrdup): Declare.
11988 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11989 * inferiors.c: Ditto.
11990 * linux-low.c: Ditto.
11991 * mem-break.c: Ditto.
11992 * regcache.c: Ditto.
11993 * remote-utils.c: Ditto.
11996 * win32-low.c: Ditto.
11998 2008-12-12 Doug Evans <dje@google.com>
12000 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12001 in debugging printf.
12003 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12005 2008-12-09 Doug Evans <dje@google.com>
12007 * linux-low.h (struct process_info): Delete member tid, unused.
12008 * thread-db.c (find_one_thread): Update.
12009 (maybe_attach_thread): Update.
12011 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12013 * target.h (struct target_ops): Add qxfer_osdata member.
12014 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12016 (linux_qxfer_osdata): New functions.
12017 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12019 * server.c (handle_query): Handle "qXfer:osdata:read:".
12020 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12021 (buffer_xml_printf): New functions.
12022 * server.h (struct buffer): New.
12023 (buffer_grow_str, buffer_grow_str0): New macros.
12024 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12025 (buffer_xml_printf): Declare.
12027 2008-11-24 Doug Evans <dje@google.com>
12029 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12031 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12033 * server.c (handle_v_run): Always use the supplied argument list.
12035 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12037 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12038 (xtensa_regmap_table): Add entry for scompare1.
12040 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12042 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12043 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12044 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12045 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12046 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12047 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12048 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12049 XML target descriptions.
12050 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12051 when inferior is running on an ISA 2.05 or later processor. Add
12052 special case to return offset for full 64-bit slot of FPSCR when
12055 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12057 * Makefile.in (SFILES, clean): Added sparc64 files.
12058 (reg-sparc64.o, reg-sparc64.c): New.
12059 * configure.srv (sparc*-*-linux*): New configuration.
12060 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12061 syscall arguments for SPARC.
12062 (regsets_store_inferior_registers): Likewise.
12063 * linux-sparc-low.c: New file.
12065 2008-10-21 Doug Evans <dje@google.com>
12067 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12068 (READLINE_DIR,READLINE_DEP): Delete.
12069 (INTERNAL_CFLAGS): Update.
12070 (LINTFLAGS): Update.
12072 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12074 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12075 whole argv from the last run, not just argv[0].
12077 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12079 * regcache.c (new_register_cache): Return NULL if the register
12080 cache size isn't known yet.
12081 (free_register_cache): Avoid dereferencing a NULL regcache.
12083 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12085 * configure.srv: Merge MIPS and MIPS64.
12087 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12089 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12091 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12093 * Makefile.in: Add required vsx dependencies.
12095 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12096 Declare init_registers_powerpc_vsx32l.
12097 Declare init_registers_powerpc_vsx64l.
12098 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12099 (ppc_arch_setup): Check for VSX in hwcap.
12100 (ppc_fill_vsxregset): New function.
12101 (ppc_store_vsxregset): New function.
12102 Add new VSX entry in regset_info target_regsets.
12104 * configure.srv: Add new VSX dependencies.
12106 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12108 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12109 (remote_open): Set or clear transport_is_reliable.
12110 (putpkt_binary): Don't expect acks in noack mode.
12111 (getpkt): Don't send ack/nac in noack mode.
12112 * server.c (handle_general_set): Handle QStartNoAckMode.
12113 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12115 (main): Reset noack_mode on every connection.
12116 * server.h (noack_mode): Declare.
12118 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12120 * Makefile.in (GDBREPLAY_OBS): New variable.
12121 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12123 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12124 Daniel Jacobowitz <dan@codesourcery.com>
12126 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12127 (usr_store_inferior_registers): Likewise.
12128 (regsets_store_inferior_registers): Likewise.
12130 2008-07-31 Rolf Jansen <rj@surtec.com>
12131 Pedro Alves <pedro@codesourcery.com>
12133 * configure.ac: Check for memmem declaration.
12134 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12135 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12136 (disable_packet_qfThreadInfo): Unconditionally compile.
12137 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12138 * configure, config.in: Regenerate.
12140 2008-07-28 Doug Kwan <dougkwan@google.com>
12142 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12143 (linux_write_memory): Remove declaration of errno.
12145 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12147 * linux-low.c (handle_extended_wait): Do not use "status"
12148 variable uninitialized.
12150 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12152 * server.c (handle_v_attach): Inhibit reporting dll changes.
12154 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12156 * remote-utils.c (prepare_resume_reply): If requested, don't
12157 output "thread:TID" in the T stop reply.
12159 * server.c (disable_packet_vCont, disable_packet_Tthread)
12160 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12161 (handle_query): If requested, disable support for qC, qfThreadInfo
12163 (handle_v_requests): If requested, disable support for vCont.
12164 (gdbserver_show_disableable): New.
12165 (main): Handle --disable-packet and --disable-packet=LIST.
12167 * server.h (disable_packet_vCont, disable_packet_Tthread)
12168 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12170 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12172 * server.c (gdbserver_usage): Mention --version.
12174 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12176 * Makefile.in (gdbreplay.o): New rule.
12178 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12180 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12181 message, not gdbserver.
12183 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12184 Nathan Sidwell <nathan@codesourcery.com>
12185 Joseph Myers <joseph@codesourcery.com>
12187 * acinclude.m4: Include ../../config/acx.m4.
12188 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12189 * configure, config.in: Regenerate.
12190 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12191 * server.c (gdbserver_version): Print PKGVERSION.
12192 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12193 (main): Adjust gdbserver_usage calls.
12194 * gdbreplay.c (version, host_name): Add declarations.
12195 (gdbreplay_version, gdbreplay_usage): New.
12196 (main): Accept --version and --help options.
12198 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12200 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12201 (arm_breakpoint_at): Handle Thumb.
12202 (the_low_target): Add comment.
12204 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12206 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12208 2008-05-09 Doug Evans <dje@google.com>
12210 * server.h (decode_search_memory_packet): Declare.
12211 * remote-utils.c (decode_search_memory_packet): New fn.
12212 * server.c (handle_search_memory_1): New fn.
12213 (handle_search_memory): New fn.
12214 (handle_query): Process qSearch:memory packets.
12216 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12218 * regcache.c (registers_length): Remove.
12219 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12220 full register packet.
12221 * regcache.h (registers_length): Remove prototype.
12222 * server.h (PBUFSIZ): Define to 16384.
12224 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12226 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12227 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12228 powerpc-64l.o, and powerpc-altivec64l.o.
12229 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12230 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12231 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12232 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12233 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12236 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12237 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12238 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12239 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12240 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12241 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12242 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12243 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12244 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12245 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12248 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12249 (init_registers_powerpc_32l): ... this new prototype.
12250 (init_registers_powerpc_32): Remove, replace by ...
12251 (init_registers_powerpc_altivec32l): ... this new prototype.
12252 (init_registers_powerpc_e500): Remove, replace by ...
12253 (init_registers_powerpc_e500l): ... this new prototype.
12254 (init_registers_ppc64): Remove, replace by ...
12255 (init_registers_powerpc_64l): ... this new prototype.
12256 (init_registers_powerpc_64): Remove, replace by ...
12257 (init_registers_powerpc_altivec64l): ... this new prototype.
12258 (ppc_num_regs): Set to 73.
12259 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12260 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12261 (ppc_cannot_store_register): Handle orig_r3 and trap.
12262 (ppc_arch_setup): Update init_registers_... calls.
12263 (ppc_fill_gregset): Handle orig_r3 and trap.
12265 * inferiors.c (clear_inferiors): Reset current_inferior.
12267 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12269 * acinclude.m4: Add override.m4.
12270 * configure: Regenerate.
12272 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12274 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12275 initial call to init_register_ppc64.
12277 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12279 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12280 single powerpc*-*-linux* case.
12281 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12283 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12285 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12286 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12288 * linux-ppc-low.c: Include <elf.h>.
12289 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12290 (ppc_hwcap): New global variable.
12291 (ppc_regmap): Remove __SPE__ #ifdef sections.
12292 (ppc_regmap_e500): New global variable.
12293 (ppc_cannot_store_register): Update __SPE__ special case.
12294 (ppc_get_hwcap): New function.
12295 (ppc_arch_setup): Use it to determine whether inferior supports
12296 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12297 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12298 Do not access registers if target does not support AltiVec.
12299 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12300 Do not access registers if target does not support SPE.
12301 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12303 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12305 * linux-low.c (disabled_regsets, num_regsets): New.
12306 (use_regsets_p): Delete.
12307 (linux_wait_for_process): Clear disabled_regsets.
12308 (regsets_fetch_inferior_registers): Check and set it.
12309 (regsets_store_inferior_registers): Likewise.
12310 (linux_fetch_registers, linux_store_registers): Do not use
12312 (initialize_low): Allocate disabled_regsets.
12314 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12316 * Makefile.in (LIBOBJS): New.
12317 (OBS): Use LIBOBJS.
12318 (memmem.o): New rule.
12319 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12320 * configure: Regenerated.
12322 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12324 * server.c (handle_query): Never return "unsupported" for
12325 qXfer:features:read queries.
12327 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12329 * server.c (get_features_xml): Fix inverted condition.
12330 (handle_query): Always support qXfer:feature:read.
12332 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12334 * server.c (wrapper_argv): New.
12335 (start_inferior): Handle wrapper_argv. If set, expect an extra
12337 (gdbserver_usage): Document --wrapper.
12338 (main): Parse --wrapper.
12340 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12342 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12343 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12344 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12345 (ppc_set_pc): Likewise.
12346 (ppc_arch_setup): New function.
12347 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12348 of collect_register.
12349 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12351 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12353 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12354 instead of linux-ppc64-low.o.
12355 * linux-ppc64-low.c: Remove file.
12356 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12357 (linux-ppc64-low.o): Remove rule.
12359 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12360 (init_registers_powerpc_64): Likewise.
12361 (ppc_regmap): Conditionally define depending on __powerpc64__.
12362 (ppc_cannot_store_register): Do not special-case "fpscr" when
12363 compiled on __powerpc64__.
12364 (ppc_collect_ptrace_register): New function.
12365 (ppc_supply_ptrace_register): New function.
12366 (ppc_breakpoint): Change type to "unsigned int".
12367 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12368 (the_low_target): Conditionally provide initializers for the
12369 arch_setup member depending on __powerpc64__. Install
12370 collect_ptrace_register and supply_ptrace_register members.
12372 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12374 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12375 * server.c (gdbserver_xmltarget): Define.
12376 (get_features_xml): Use it to replace "target.xml" and arch_string.
12378 * configure.srv: Remove srv_xmltarget. Add XML files that were
12379 mentioned there to srv_xmlfiles instead. Remove conditional tests
12380 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12381 srv_xmlfiles and srv_regobj to include all possible choices.
12382 * configure.ac (srv_xmltarget): Remove.
12383 (srv_xmlfiles): Do not add "target.xml".
12384 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12385 checks for supplementary target information.
12386 * configure: Regenerate.
12387 * Makefile.in (XML_TARGET): Remove.
12388 (target.xml): Remove rule.
12389 (clean): Do not clean up target.xml.
12390 (.PRECIOUS): Do not mention target.xml.
12392 * target.h (struct target_ops): Remove arch_string member.
12393 * linux-low.c (linux_arch_string): Remove.
12394 (linux_target_ops): Remove arch_string initializer.
12395 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12396 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12397 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12398 * spu-low.c (spu_arch_string): Remove.
12399 (spu_target_ops): Remove arch_string initializer.
12400 * win32-low.c (win32_arch_string): Remove.
12401 (win32_target_ops): Remove arch_string initializer.
12402 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12403 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12404 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12406 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12408 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12409 by collect_ptrace_register and supply_ptrace_register hooks.
12410 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12411 instead of checking for the_low_target.left_pad_xfer.
12412 (usr_store_inferior_registers): Use collect_ptrace_register callback
12413 instead of checking for the_low_target.left_pad_xfer.
12415 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12416 (s390_supply_ptrace_register): Likewise.
12417 (s390_fill_gregset): Call s390_collect_ptrace_register.
12418 (the_low_target): Update.
12420 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12421 (ppc_supply_ptrace_register): Likewise.
12422 (the_low_target): Update.
12424 * linux-i386-low.c (the_low_target): Update.
12425 * linux-x86-64-low.c (the_low_target): Update.
12427 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12429 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12430 reg-s390.o and reg-s390x.o.
12432 * linux-low.c (new_inferior): New global variable.
12433 (linux_create_inferior, linux_attach): Set it.
12434 (linux_wait_for_process): Call the_low_target.arch_setup after the
12435 target has stopped for the first time.
12436 (initialize_low): Do not call the_low_target.arch_setup.
12438 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12439 (s390_set_pc): Likewise.
12440 (s390_arch_setup): New function.
12441 (the_low_target): Use s390_arch_setup as arch_setup routine.
12443 * regcache.c (realloc_register_cache): New function.
12444 (set_register_cache): Call it for each existing regcache.
12446 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12448 * server.h (init_registers): Remove prototype.
12450 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12451 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12452 instead of init_registers ().
12453 * linux-arm-low.c (init_registers_arm): Add prototype.
12454 (init_registers_arm_with_iwmmxt): Likewise.
12455 (the_low_target): Add initializer for arch_setup field.
12456 * linux-cris-low.c (init_registers_cris): Add prototype.
12457 (the_low_target): Add initializer for arch_setup field.
12458 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12459 (the_low_target): Add initializer for arch_setup field.
12460 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12461 (the_low_target): Add initializer for arch_setup field.
12462 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12463 (the_low_target): Add initializer for arch_setup field.
12464 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12465 (the_low_target): Add initializer for arch_setup field.
12466 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12467 (the_low_target): Add initializer for arch_setup field.
12468 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12469 (init_registers_mips64_linux): Likewise.
12470 (the_low_target): Add initializer for arch_setup field.
12471 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12472 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12473 (the_low_target): Add initializer for arch_setup field.
12474 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12475 (init_registers_powerpc_64): Likewise.
12476 (the_low_target): Add initializer for arch_setup field.
12477 * linux-s390-low.c (init_registers_s390): Add prototype.
12478 (init_registers_s390x): Likewise.
12479 (the_low_target): Add initializer for arch_setup field.
12480 * linux-sh-low.c (init_registers_sh): Add prototype.
12481 (the_low_target): Add initializer for arch_setup field.
12482 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12483 (the_low_target): Add initializer for arch_setup field.
12484 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12485 (the_low_target): Add initializer for arch_setup field.
12487 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12488 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12489 instead of init_registers ().
12490 * win32-arm-low.c (init_registers_arm): Add prototype.
12491 (the_low_target): Add initializer for arch_setup field.
12492 * win32-i386-low.c (init_registers_i386): Add prototype.
12493 (the_low_target): Add initializer for arch_setup field.
12495 * spu-low.c (init_registers_spu): Add prototype.
12496 (initialize_low): Call initialie_registers_spu () instead of
12497 initialize_registers ().
12499 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12501 * server.c (handle_v_requests): When handling the vRun and vAttach
12502 packets, if already debugging a process, don't kill it. Return an
12505 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12507 * server.c (handle_query): Correct length check.
12509 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12511 * win32-low.c (do_initial_child_stuff): Add process handle
12512 parameter. Set current_process_handle and current_process_id from the
12513 parameters. Clear globals.
12514 (win32_create_inferior): Don't set current_process_handle and
12515 current_process_id here. Instead pass them on the call to
12516 do_initial_child_stuff.
12517 (win32_attach): Likewise.
12518 (win32_clear_inferiors): New.
12519 (win32_kill): Don't close the current process handle or the
12520 current thread handle here. Instead call win32_clear_inferiors.
12521 (win32_detach): Don't open a new handle to the process. Call
12522 win32_clear_inferiors.
12523 (win32_join): Don't rely on current_process_handle; open a new
12524 handle using the process id.
12525 (win32_wait): Call win32_clear_inferiors when the inferior process
12528 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12530 * server.c (monitor_show_help): Add "exit".
12532 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12534 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12535 (clean): Add reg-xtensa.c.
12536 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12537 * configure.srv (xtensa*-*-linux*) New target.
12538 * linux-xtensa-low.c: New.
12539 * xtensa-xtregs.c: New.
12541 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12543 * hostio.c: Don't include errno.h.
12544 (errno_to_fileio_errno): Move to hostio-errno.
12545 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12546 error number outputting to the target->hostio_last_error callback.
12547 (hostio_packet_error): Use FILEIO_EINVAL directly.
12548 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12549 calls to hostio_error.
12550 * hostio-errno.c: New.
12551 * server.h (hostio_last_error_from_errno): Declare.
12552 * target.h (target_ops): Add hostio_last_error member.
12553 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12554 as hostio_last_error handler.
12555 * spu-low.c (spu_target_ops): Likewise.
12556 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12557 (wince_hostio_last_error): New functions.
12558 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12559 as hostio_last_error handler.
12560 (win32_target_ops) [!_WIN32_WCE]: Register
12561 hostio_last_error_from_errno as hostio_last_error handler.
12562 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12563 (hostio-errno.o): New rule.
12564 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12565 * configure.srv (srv_hostio_err_objs): New variable. Default to
12567 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12568 * configure: Regenerate.
12570 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12572 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12573 (linux_kill, linux_detach): Clean up the process list.
12574 * remote-utils.c (remote_open): Improve port number parsing.
12575 (putpkt_binary, input_interrupt): Only send interrupts if the target
12577 * server.c (extended_protocol): Make static.
12578 (attached): Define earlier.
12579 (exit_requested, response_needed, program_argv): New variables.
12580 (target_running): New.
12581 (start_inferior): Clear attached here.
12582 (attach_inferior): Set attached here.
12583 (require_running): Define.
12584 (handle_query): Use require_running and target_running. Implement
12586 (handle_v_attach, handle_v_run): New.
12587 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12588 (gdbserver_usage): Update.
12589 (main): Redo argument parsing. Handle --debug and --multi. Handle
12590 --attach along with other options or after the port. Save
12591 program_argv. Support no initial program. Resynchronize
12592 communication with GDB after an error. Handle "monitor exit".
12593 Use require_running and target_running. Always allow the extended
12594 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12595 restart in extended mode.
12596 * README: Refer to the GDB manual. Update --attach usage.
12598 2007-12-20 Andreas Schwab <schwab@suse.de>
12600 * linux-low.c (STACK_SIZE): Define.
12601 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12602 (linux_test_for_tracefork): Likewise.
12604 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12606 * linux-low.c (linux_wait_for_event): Update messages. Do not
12607 reinsert auto-delete breakpoints.
12608 * mem-break.c (struct breakpoint): Change return type of handler to
12610 (set_breakpoint_at): Update handler type.
12611 (reinsert_breakpoint_handler): Return 1 instead of calling
12613 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12615 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12616 * mem-break.h (set_breakpoint_at): Update handler type.
12617 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12618 * win32-low.c (auto_delete_breakpoint): New.
12619 (get_child_debug_event): Use it.
12621 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12623 * configure.ac: Check for pread and pwrite.
12624 * hostio.c (handle_pread): Fall back to lseek and read.
12625 (handle_pwrite): Fall back to lseek and write.
12626 * config.in, configure: Regenerated.
12628 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12630 * server.c (myresume): Add own_buf argument.
12631 (main): Update calls.
12633 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12635 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12636 * remote-utils.c (remote_open): Do not call disable_async_io.
12637 (block_async_io): Delete.
12638 (unblock_async_io): Make static.
12639 (initialize_async_io): New.
12640 * server.c (handle_v_cont): Handle async I/O here.
12641 (myresume): Likewise. Move other common resume tasks here...
12642 (main): ... from here. Call initialize_async_io. Disable async
12643 I/O before the main loop.
12644 * server.h (initialize_async_io): Declare.
12645 (block_async_io, unblock_async_io): Delete prototypes.
12646 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12648 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12650 * remote-utils.c (readchar): Allow binary data in received messages.
12652 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12654 * win32-low.c (attaching): New global.
12655 (win32_create_inferior): Clear the `attaching' global.
12656 (win32_attach): Set the `attaching' global.
12657 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12658 attaching. Only set a breakpoint at the entry point if not
12661 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12663 * server.c (main): Don't report dll events on the initial
12664 connection on attaches.
12666 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12668 * server.c (main): Relax numerical bases supported for the pid of
12669 the --attach command line argument.
12671 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12673 * win32-low.c (win32_attach): Call OpenProcess before
12674 DebugActiveProcess, not after. Add last error output to error
12677 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12679 * win32-low.c (win32_get_thread_context)
12680 (win32_set_thread_context): New functions.
12681 (thread_rec): Use win32_get_thread_context.
12682 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12683 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12686 2007-12-03 Leo Zayas
12687 Pedro Alves <pedro_alves@portugalmail.pt>
12689 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12691 (child_add_thread): Minor cleanup.
12692 (child_continue): Resume artificially suspended threads before
12693 calling ContinueDebugEvent.
12694 (suspend_one_thread): New.
12695 (fake_breakpoint_event): New.
12696 (get_child_debug_event): Change return type to int. Check here if
12697 gdb sent an interrupt request. If a soft interrupt was requested,
12698 fake a breakpoint event. Return 0 if there is no event to handle,
12700 (win32_wait): Don't check here if gdb sent an interrupt request.
12701 Ensure there is a valid event to handle.
12702 (win32_request_interrupt): Add soft interruption method as last
12705 2007-12-03 Leo Zayas
12706 Pedro Alves <pedro_alves@portugalmail.pt>
12708 * win32-low.h (win32_thread_info): Add descriptions to the
12709 structure members. Replace `suspend_count' counter by a
12711 * win32-low.c (thread_rec): Update condition of when to get the
12712 context from the inferior. Rely on ContextFlags being set if it
12713 has already been retrieved. Only suspend the inferior thread if
12714 we haven't already. Warn if that fails.
12715 (continue_one_thread): s/suspend_count/suspended/. Only call
12716 ResumeThread once. Warn if that fails.
12718 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12720 * win32-low.c (win32_wait): Don't read from the inferior when it
12721 has already exited.
12723 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12725 * Makefile.in (win32_low_h): New variable.
12726 (win32-low.o): Add dependency on $(win32_low_h).
12727 (win32-arm-low.o, win32-i386-low.o): New rules.
12729 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12731 * hostio.c: Correct copyright year.
12733 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12735 * Makefile.in (OBS): Add hostio.o.
12736 (hostio.o): New rule.
12737 * server.h (handle_vFile): Declare.
12738 * hostio.c: New file.
12739 * server.c (handle_v_requests): Take packet_len and new_packet_len
12740 for binary packets. Call handle_vFile.
12741 (main): Update call to handle_v_requests.
12743 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12745 * linux-low.c: Include <sched.h>.
12747 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12749 * linux-low.c (linux_tracefork_grandchild): New.
12750 (linux_tracefork_child): Use clone.
12751 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12753 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12755 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12757 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12759 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12761 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12763 * inferiors.c (change_inferior_id): Delete.
12764 (add_pid_to_list, pull_pid_from_list): New.
12765 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12766 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12767 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12768 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12769 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12770 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12771 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12772 (using_threads): Always set to 1.
12773 (handle_extended_wait): New.
12774 (add_process): Do not set TID.
12775 (linux_create_inferior): Set must_set_ptrace_flags.
12776 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12777 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12778 (linux_thread_alive): Rename TID argument to LWPID.
12779 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12780 (linux_wait_for_event): Do not use TID or check using_threads. Update
12781 call to dead_thread_notify. Call handle_extended_wait.
12782 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12783 (send_sigstop): Delete sigstop_sent.
12784 (wait_for_sigstop): Avoid TID.
12785 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12786 (linux_test_for_tracefork): New.
12787 (linux_lookup_signals): Use thread_db_active and
12788 linux_supports_tracefork_flag.
12789 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12790 * linux-low.h (get_process_thread): Avoid TID.
12791 (struct process_ifo): Move thread_known and tid to the end. Remove
12793 (linux_attach_lwp, thread_db_init): Update prototypes.
12794 * server.h (change_inferior_id): Delete prototype.
12795 (add_pid_to_list, pull_pid_from_list): New prototypes.
12796 * thread-db.c (thread_db_use_events): New.
12797 (find_first_thread): Rename to...
12798 (find_one_thread): ...this. Update callers and messages. Do not
12799 call fatal. Check thread_db_use_events. Do not call
12800 change_inferior_id or new_thread_notify.
12801 (maybe_attach_thread): Update. Do not call new_thread_notify.
12802 (thread_db_init): Set thread_db_use_events. Check use_events.
12803 * utils.c (fatal, warning): Correct message prefix.
12805 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12807 * Makefile.in (clean): Remove new files.
12808 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12809 (powerpc-64.o, powerpc-64.c): New rules.
12810 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12811 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12813 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12815 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12816 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12817 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12818 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12819 (target_regsets): Add AltiVec and SPE register sets.
12820 * configure.ac: Check for AltiVec and SPE.
12821 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12822 (ppc_fill_vrregset, ppc_store_vrregset): New.
12823 (target_regsets): Add AltiVec register set.
12824 * configure: Regenerated.
12826 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12828 * linux-low.c (O_LARGEFILE): Define.
12829 (linux_read_memory): Use /proc/PID/mem.
12830 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12831 * configure, config.in: Regenerated.
12833 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12835 * linux-low.c (linux_wait_for_event): Do not pass signals while
12838 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12840 * win32-low.c (create_process): New.
12841 (win32_create_inferior): Use create_process instead of
12842 CreateProcess. If create_process failed retry appending an ".exe"
12843 suffix. Store the GetLastError result immediatelly after
12844 create_process calls and use it on the call to error.
12846 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12848 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12850 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12852 * configure.ac: Switch license to GPLv3.
12854 2007-08-01 Michael Snyder <msnyder@access-company.com>
12856 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12858 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12860 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12862 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12863 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12864 CloseToolhelp32Snapshot.
12865 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12866 CloseToolhelp32Snapshot.
12868 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12870 * server.c (main): Check for inferior exit before main loop.
12872 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12874 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12875 instead of on tmp_desc.
12877 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12878 Daniel Jacobowitz <dan@codesourcery.com>
12880 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12881 (add_thread): Minor cleanups.
12882 (clear_inferiors): Move lower in the file. Clear the DLL
12884 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12885 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12886 (xml_escape_text): New.
12887 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12889 (handle_v_cont): Report errors.
12890 (gdbserver_version): Update.
12891 (main): Correct size of own_buf. Do not report initial DLL events.
12892 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12893 (unloaded_dll, xml_escape_text): New.
12894 * win32-low.c (enum target_waitkind): Update comments.
12895 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12896 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12897 (win32_EnumProcessModules, win32_GetModuleInformation)
12898 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12899 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12900 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12901 (win32_Module32First, win32_Module32Next, load_toolhelp)
12902 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12903 (get_child_debug_event): Handle DLL events.
12904 (win32_wait): Likewise.
12906 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12908 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12909 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12911 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12913 * win32-low.c (handle_output_debug_string): Ignore event if not
12916 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12918 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12920 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12922 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12924 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12926 * inferiors.c (change_inferior_id): Add comment.
12927 * linux-low.c (check_removed_breakpoint): Add an early
12928 prototype. Improve debug output.
12929 (linux_attach): Doc update.
12930 (linux_detach_one_process, linux_detach): Clean up before releasing
12932 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12933 * linux-low.h (struct process_info): Doc improvement.
12934 * mem-break.c (delete_all_breakpoints): New.
12935 * mem-break.h (delete_all_breakpoints): New prototype.
12936 * thread-db.c (find_first_thread): New.
12937 (thread_db_create_event): Call it instead of
12938 thread_db_find_new_threads. Clean up unused variables.
12939 (maybe_attach_thread): Remove first thread handling.
12940 (thread_db_find_new_threads): Use find_first_thread.
12941 (thread_db_get_tls_address): Likewise.
12943 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12945 * thread-db.c (thread_db_find_new_threads): Add prototype.
12946 (thread_db_create_event): Check for the main thread before adding
12948 (maybe_attach_thread): Only enable event reporting if TID == 0.
12949 (thread_db_get_tls_address): Check for new threads.
12951 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12953 * linux-low.c (linux_create_inferior): Try execv before execvp.
12954 * spu-low.c (spu_create_inferior): Likewise.
12956 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12958 * linux-low.c (linux_create_inferior): Change execv to execvp.
12959 * spu-low.c (spu_create_inferior): Likewies.
12961 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12963 * Makefile.in (clean): Clean new files instead of deleted ones.
12964 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12965 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12967 * configure.srv: Specify XML files and new regformats for MIPS and
12969 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12970 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12971 an entry for the restart register.
12972 (mips_cannot_fetch_register, mips_cannot_store_register)
12973 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12974 register names to match the XML descriptions.
12975 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12976 restart register instead of $0.
12978 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12979 Markus Deuling <deuling@de.ibm.com>
12981 * remote-utils.c (decode_xfer_write): New function.
12982 * server.h (decode_xfer_write): Add prototype.
12983 * server.c (handle_query): Add PACKET_LEN argument. Support
12984 qXfer:spu:read and qXfer:spu:write packets.
12985 (main): Pass packet_len to handle_query.
12986 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12987 * target.h (target_ops): Add qxfer_spu.
12989 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12991 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12992 accessing non-seekable spufs files.
12994 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12996 * server.c (handle_query): Add reply for qC packet.
12998 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12999 Leo Zayas <lerele@champenstudios@com>
13001 * server.h (check_remote_input_interrupt_request): New function.
13002 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13003 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13004 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13005 (check_remote_input_interrupt_request): New function.
13006 * server.h (check_remote_input_interrupt_request): Declare.
13007 * win32-low.c (winapi_DebugBreakProcess,
13008 winapi_GenerateConsoleCtrlEvent): New typedefs.
13009 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13011 (win32_wait): Check for remote interrupt request
13012 with check_remote_input_interrupt_request.
13013 (win32_request_interrupt): New function.
13014 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13016 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13018 * win32-low.c (debug_registers_changed,
13019 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13020 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13021 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13022 (thread_rec): Get context using the low target.
13023 (child_add_thread): Call thread_added on the low target,
13024 which does the same thing.
13026 (do_initial_child_stuff): Remove debug registers references.
13027 Set context using the low target. Resume threads after
13028 setting the contexts.
13029 (child_continue): Remove dead variable. Remove debug
13030 registers references.
13031 (child_fetch_inferior_registers): Go through the low target.
13032 (do_child_store_inferior_registers): Remove.
13033 (child_store_inferior_registers): Go through the low target.
13034 (win32_resume): Remove debug registers references.
13035 Set context using the low target.
13036 (handle_exception): Change return type to void. Don't record
13037 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13038 first chance exception.
13039 (get_child_debug_event): Change return type to void. Remove
13040 goto loop. Always return after waiting for debug event.
13041 (win32_wait): Convert to switch statement. Handle spurious
13044 * win32-i386-low.c (debug_registers_changed,
13045 debug_registers_used): New.
13046 (initial_stuff): Rename to ...
13047 (i386_initial_stuff): ... this. Clear debug registers
13049 (store_debug_registers): Delete.
13050 (i386_get_thread_context): New.
13051 (load_debug_registers): Delete.
13052 (i386_set_thread_context): New.
13053 (i386_thread_added): New.
13054 (single_step): Rename to ...
13055 (i386_single_step): ... this.
13056 (do_fetch_inferior_registers): Rename to ...
13057 (i386_fetch_inferior_register): ... this.
13058 (i386_store_inferior_register): New.
13059 (the_low_target): Adapt to new interface.
13061 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13062 (arm_get_thread_context): New.
13063 (arm_set_thread_context): New.
13065 (do_fetch_inferior_registers): Rename to ...
13066 (arm_fetch_inferior_register): ... this.
13067 (arm_store_inferior_register): New.
13068 (arm_wince_breakpoint): Reimplement as unsigned long.
13069 (arm_wince_breakpoint_len): Define.
13070 (the_low_target): Adapt to new interface.
13072 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13073 load_debug_registers. Add get_thread_context, set_thread_context,
13074 thread_added and store_inferior_register. Rename
13075 fetch_inferior_registers to fetch_inferior_register.
13076 (regptr): Remove declaration.
13078 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13080 * linux-low.c (linux_detach): Change return type to int. Return 0.
13081 * spu-low.c (spu_detach): Likewise.
13083 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13085 * target.h (target_ops): Change return type of detach to int.
13087 (join_inferior): New.
13088 * server.c (main): Don't skip detach support on mingw32.
13089 If the inferior doesn't support detaching return error.
13090 Call join_inferior instead of using waitpid.
13091 * linux-low.c (linux_join): New.
13092 (linux_target_op): Add linux_join.
13093 * spu-low.c (spu_join): New.
13094 (spu_target_ops): Add spu_join.
13095 * win32-low.c (win32_detach): Adapt to new interface.
13096 Reopen current_process_handle before detaching. Issue a child
13097 resume before detaching.
13099 (win32_target_op): Add win32_join.
13101 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13103 * win32-low.c (win32-attach): Fix return value.
13104 * target.h (target_ops): Describe ATTACH return values.
13106 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13108 * win32-low.c (GETPROCADDRESS): Define.
13109 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13110 (winapi_DebugSetProcessKillOnExit): Likewise.
13111 (win32_create_inferior): Force usage of ansi CreateProcessA.
13112 (win32_attach): Use GETPROCADDRESS.
13113 (win32_detach): Likewise.
13115 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13117 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13119 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13121 * win32-low.c: Commit leftover changes from 2007-03-29.
13123 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13125 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13126 fields short instead of int. Add explicit padding.
13127 (i387_cache_to_fsave): Remove unnecessary casts.
13128 (i387_fsave_to_cache): Doc fix.
13129 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13131 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13133 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13134 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13136 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13138 * configure.srv (arm*-*-mingw32ce*): Move near the other
13141 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13143 * configure.ac: Add errno checking.
13144 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13145 sys/file.h and malloc.h.
13146 (AC_CHECK_DECLS): Add perror.
13147 (srv_mingwce): Handle.
13148 * configure.srv (i[34567]86-*-cygwin*): Add
13149 win32-i386-low.o to srv_tgtobj.
13150 (i[34567]86-*-mingw*): Likewise.
13151 (arm*-*-mingw32ce*): Add case.
13152 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13153 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13154 [__MINGW32CE__] (strerror): New function.
13155 [__MINGW32CE__] (errno): Define to GetLastError.
13156 [__MINGW32CE__] (COUNTOF): New macro.
13157 (remote_open): Remove extra close call.
13158 * mem-break.c (delete_breakpoint_at): New function.
13159 * mem-break.h (delete_breakpoint_at): Declare.
13160 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13161 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13162 [USE_WIN32API] (read, write): Add char* casts.
13163 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13164 * server.h: Include wincecompat.h on Windows CE.
13165 [HAVE_ERRNO_H]: Check.
13166 (perror): Declare if not declared.
13167 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13168 (perror_with_name): Remove errno declaration.
13169 * wincecompat.h: New.
13170 * wincecompat.c: New.
13171 * win32-low.h: New.
13172 * win32-arm-low.c: New.
13173 * win32-i386-low.c: New.
13174 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13175 (OUTMSG2): Make it safe.
13177 (COUNTOF): New macro.
13178 (NUM_REGS): Get it from the low target.
13179 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13180 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13181 (thread_rec): Let low target handle debug registers.
13182 (child_add_thread): Likewise.
13183 (child_init_thread_list): Likewise.
13184 (continue_one_thread): Likewise.
13186 (do_child_fetch_inferior_registers): Move to ...
13187 * win32-i386-low.c: ... here, and rename to ...
13188 (do_fetch_inferior_registers): ... this.
13189 * win32-low.c (child_fetch_inferior_registers):
13190 Go through the low target.
13191 (do_child_store_inferior_registers): Use regptr.
13192 (strwinerror): New function.
13193 (win32_create_inferior): Handle Windows CE.
13194 Use strwinerror instead of strerror on Windows error
13195 codes. Add program to the error output.
13196 Don't close the main thread handle on Windows CE.
13197 (win32_attach): Use coredll.dll on Windows CE.
13198 (win32_kill): Close current process and current
13200 (win32_detach): Use coredll.dll on Windows CE.
13201 (win32_resume): Let low target handle debug registers, and
13203 (handle_exception): Add/Remove initial breakpoint. Avoid
13204 non-existant WSTOPSIG on Windows CE.
13205 (win32_read_inferior_memory): Cast to remove warning.
13206 (win32_arch_string): Go through the low target.
13207 (initialize_low): Call set_breakpoint_data with the low
13208 target's breakpoint.
13209 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13210 FOP_REGNUM, mappings): Move to ...
13211 * win32-i386-low.c: ... here.
13212 * win32-low.c (win32_thread_info): Move to ...
13213 * win32-low.h: ... here.
13214 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13215 win32-arm-low.c and wincecompat.c.
13216 (all:): Add $EXEEXT.
13217 (install-only:): Likewise.
13218 (gdbserver:): Likewise.
13219 (gdbreplay:): Likewise.
13220 * config.in: Regenerate.
13221 * configure: Regenerate.
13223 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13225 * win32-low.c: Rename typedef thread_info to
13226 win32_thread_info throughout.
13228 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13230 * win32-i386-low.c: Rename to ...
13231 * win32-low.c: ... this.
13232 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13233 * Makefile.in: Likewise.
13235 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13237 * remote-utils.c (monitor_output): Constify msg parameter.
13238 * server.h (monitor_output): Likewise.
13239 * win32-i386-low.c (handle_output_debug_string): New.
13240 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13241 handle_output_debug_string.
13242 (get_child_debug_event): Likewise.
13244 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13246 * server.c (main): Correct strtoul check.
13248 2007-03-27 Jon Ringle <jon@ringle.org>
13250 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13252 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13254 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13256 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13258 * terminal.h: Check HAVE_SGTTY_H.
13260 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13262 * remote-utils.c (remote_open): Print out the assigned port number.
13264 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13266 * remote-utils.c (monitor_output): New function.
13267 * server.c (debug_threads): Define here.
13268 (monitor_show_help): New function.
13269 (handle_query): Handle qRcmd.
13270 (main): Do not handle 'd' packet.
13271 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13272 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13275 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13277 * Makefile.in (EXEEXT): New.
13278 (clean): Use $(EXEEXT).
13280 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13282 * target.h (target_ops): Rename send_signal to request_interrupt,
13283 and remove enum target_signal parameter.
13284 * linux-low.c (linux_request_interrupt): Rename from
13285 linux_send_signal, and always send SIGINT.
13286 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13287 and always send SIGINT.
13288 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13290 (input_interrupt): Likewise.
13292 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13294 * server.c (get_features_xml): Check if target implemented
13296 * win32-i386-low.c (win32_arch_string): New.
13297 (win32_target_ops): Add win32_arch_string as arch_string member.
13299 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13301 * spu-low.c (spu_arch_string): New.
13302 (spu_target_ops): Add spu_arch_string.
13304 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13306 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13307 * configure.ac: Do not check for terminal.h.
13308 * configure, config.in: Regenerated.
13310 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13312 * Makefile.in (OBS): Add $(XML_BUILTIN).
13313 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13315 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13316 (arm-with-iwmmxt.c): New.
13317 * config.in, configure: Regenerate.
13318 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13319 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13320 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13321 (arm*-*-linux*): Add iWMMXt and regset support.
13322 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13323 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13324 (arm_store_wmmxregset, target_regsets): New.
13325 * server.c (get_features_xml): Take annex argument. Check builtin
13327 (handle_query): Handle multiple annexes.
13329 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13331 * remote-utils.c [USE_WIN32API] (read, write): Define.
13332 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13335 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13337 * linux-i386-low.c (the_low_target): Set arch_string.
13338 * linux-x86-64-low.c (the_low_target): Likewise.
13339 * linux-low.c (linux_arch_string): New.
13340 (linux_target_ops): Add it.
13341 * linux-low.h (struct linux_target_ops): Add arch_string.
13342 * server.c (write_qxfer_response): Use const void * for DATA.
13343 (get_features_xml): New.
13344 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13345 * target.h (struct target_ops): Add arch_string method.
13347 2007-01-03 Denis Pilat <denis.pilat@st.com>
13348 Daniel Jacobowitz <dan@codesourcery.com>
13350 * linux-low.c (linux_kill): Handle being called with no threads.
13351 * win32-i386-low.c (win32_kill): Likewise.
13352 (get_child_debug_event): Clear current_process_handle.
13354 2006-12-30 Denis PILAT <denis.pilat@st.com>
13355 Daniel Jacobowitz <dan@codesourcery.com>
13357 * remote-utils.c (remote_open): Check the type of specified
13358 serial port devices before opening them.
13359 * server.c (main): Kill the inferior if an error occurs during
13360 the first remote_open.
13362 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13364 * README: Update supported targets.
13366 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13368 * Makefile.in (clean): Remove reg-mips64.c.
13369 (reg-mips64.c, reg-mips64.o): New rules.
13370 * configure.srv: Handle mips64. Include regset support for mips.
13371 * linux-mips-low.c (union mips_register): New.
13372 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13373 (mips_breakpoint, mips_breakpoint_at): Use int.
13374 (mips_collect_register, mips_supply_register)
13375 (mips_collect_register_32bit, mips_supply_register_32bit)
13376 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13377 (mips_store_fpregset, target_regsets): New.
13378 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13380 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13382 * configure.srv: Add target "spu*-*-*".
13383 * Makefile.in (clean): Remove reg-spu.c.
13384 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13385 * spu-low.c: New file.
13387 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13389 * configure.ac: Correct td_thr_tls_get_addr test.
13390 * configure: Regenerated.
13392 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13394 * linux-low.c (linux_wait_for_event): Reformat. Use the
13395 pass_signals array.
13396 * remote-utils.c (decode_address_to_semicolon): New.
13397 * server.c (pass_signals, handle_general_set): New.
13398 (handle_query): Mention QPassSignals for qSupported.
13399 (main): Call handle_general_set.
13400 * server.h (pass_signals, decode_address_to_semicolon): New.
13402 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13404 * server.c (handle_query): Correct error handling for read_auxv.
13406 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13408 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13409 and srv_linux_thread_db to yes.
13410 * linux-s390-low.c (s390_fill_gregset): New function.
13411 (target_regsets): Define data structure.
13413 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13415 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13416 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13417 * config.in, configure: Regenerated.
13418 * inferiors.c (gdb_id_to_thread): New function.
13419 (gdb_id_to_thread_id): Use it.
13420 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13421 * linux-low.h (struct process_info): Add th member.
13422 (thread_db_get_tls_address): New prototype.
13423 * remote-utils.c (decode_address): Make non-static.
13424 * server.c (handle_query): Handle qGetTLSAddr.
13425 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13426 * target.h (struct target_ops): Add get_tls_address.
13427 * thread-db.c (maybe_attach_thread): Save the thread handle.
13428 (thread_db_get_tls_address): New.
13430 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13432 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13433 (linux_resume_one_process): Take a siginfo_t *. Update all
13434 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13435 (struct pending_signals): Add a siginfo_t.
13436 (linux_wait_for_process): Always set last_status.
13437 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13438 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13439 * linux-low.h (struct process_info): Add last_status.
13441 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13443 * remote-utils.c (try_rle): New function.
13444 (putpkt_binary): Use it.
13446 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13448 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13449 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13450 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13451 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13452 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13455 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13457 * server.c (terminal_fd): New variable.
13458 (old_foreground_pgrp): Likewise.
13459 (restore_old_foreground_pgrp): New function.
13460 (start_inferior): Record the terminal file descriptor in terminal_fd
13461 and its original foreground group in old_foreground_pgrp. Register
13462 restore_old_foreground_pgrp with atexit().
13464 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13466 * server.c (handle_query): Correct qPart to qXfer.
13468 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13470 * configure.ac: Check for more headers which are missing on
13471 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13472 * configure.srv: Add Cygwin and mingw32.
13473 * remote-utils.c: Don't include headers unconditionally which
13474 are missing on mingw32. Include <winsock.h> for mingw32.
13475 (remote_open): Adjust for mingw32 support. Flush
13476 standard error after writing to it.
13477 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13478 (unblock_async_io, enable_async_io, disable_async_io)
13479 (readchar, getpkt): Update for Winsock support.
13480 (prepare_resume_reply): Expect a protocol signal number.
13481 * server.c: Disable <sys/wait.h> on mingw32.
13482 (start_inferior): Adjust for mingw32 support. Flush
13483 standard error after writing to it.
13484 (attach_inferior): Likewise. Use protocol signal
13486 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13488 * win32-i386-low.c: New file.
13489 * Makefile.in (XM_CLIBS): Set.
13490 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13491 (win32-i386-low.o): New dependency rule.
13492 * linux-low.c (linux_wait): Use target signal numbers.
13493 * target.h (struct target_ops): Doc fix.
13494 * server.h (target_signal_to_name): New prototype.
13495 * gdbreplay.c: Don't include headers unconditionally which
13496 are missing on mingw32. Include <winsock.h> for mingw32.
13497 (remote_close, remote_open): Adjust for Winsock support.
13498 * configure, config.in: Regenerated.
13500 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13502 * server.c (decode_xfer_read, write_qxfer_response): New.
13503 (handle_query): Take a packet length argument. Handle
13504 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13505 the qSupported response.
13506 (main): Update call to handle_query.
13508 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13510 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13511 (putpkt_binary): Renamed from putpkt and adjusted for binary
13513 (putpkt): New wrapper for putpkt_binary.
13514 (readchar): Don't mask off the high bit.
13515 (decode_X_packet): New function.
13516 * server.c (main): Call putpkt_binary if a handler sets the packet
13517 length. Save the length of the incoming packet. Handle 'X'.
13518 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13520 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13522 * server.c (handle_query): Handle qSupported.
13524 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13526 * remote-utils.c (all_symbols_looked_up): New variable.
13527 (look_up_one_symbol): Check it.
13528 * server.h (look_up_one_symbol): New declaration.
13529 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13531 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13533 * Makefile.in (linux-arm-low.o): Update dependencies.
13534 * linux-arm-low.c: Include "gdb_proc_service.h".
13535 (PTRACE_GET_THREAD_AREA): Define.
13536 (ps_get_thread_area): New function.
13538 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13540 * configure.srv (m68k*-*-uclinux*): New target.
13541 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13542 (linux_resume_one_process): Remove extraneous cast.
13543 (linux_read_offsets): New.
13544 (linux_target_op): Add linux_read_offsets on mmuless systems.
13545 * server.c (handle_query): Add qOffsets logic.
13546 * target.h (struct target_ops): Add read_offsets.
13548 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13550 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13551 (PTRACE_GET_THREAD_AREA): Define.
13552 (ps_get_thread_area): New function.
13553 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13554 (linux-x86-64-low.o): Update.
13556 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13558 * configure.ac: Remove checks for prfpregset_t.
13559 * gdb_proc_service.h: New file.
13560 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13561 new "gdb_proc_service.h".
13562 * proc-service.c: Likewise.
13563 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13564 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13565 * Makefile.in (gdb_proc_service_h): Updated.
13566 * configure, config.in: Regenerated.
13568 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13570 * remote-utils.c (prepare_resume_reply): Move declaration
13571 of gdb_id_from_wait to the top of the block.
13573 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13575 * linux-low.c (regsets_store_inferior_registers): Read the regset
13576 from the target before filling it.
13578 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13580 * server.c (attach_inferior): Return SIGTRAP for a successful
13583 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13585 * Makefile.in (OBS): Add version.o.
13586 (STAGESTUFF): Delete.
13587 (version.o): Add dependencies.
13588 (version.c): Replace rule.
13589 (clean): Remove version.c.
13590 * server.c (gdbserver_version): New.
13591 (gdbserver_usage): Use printf.
13592 (main): Handle --version and --help.
13593 * server.h (version, host_name): Add declarations.
13595 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13607 * linux-x86-64-low.c:
13609 * linux-s390-low.c:
13610 * linux-ppc64-low.c:
13612 * linux-mips-low.c:
13613 * linux-m68k-low.c:
13614 * linux-m32r-low.c:
13617 * linux-ia64-low.c:
13618 * linux-i386-low.c:
13619 * linux-crisv32-low.c:
13631 * gdbserver.1: Add (C) after Copyright. Update the FSF
13634 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13636 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13637 (arm_breakpoint_at): Recognize both breakpoints.
13638 (the_low_target): Use the correct breakpoint instruction.
13640 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13642 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13643 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13644 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13645 (the_low_target): Update.
13647 2005-10-25 Andreas Schwab <schwab@suse.de>
13649 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13651 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13652 (ia64_num_regs): Reduce to 462.
13654 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13656 * acinclude.m4: Correct quoting.
13657 * aclocal.m4: Regenerated.
13659 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13660 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13661 (thread_db_init): Call thread_db_err_str.
13662 * configure.ac: Check for TD_VERSION.
13663 * config.in, configure: Regenerated.
13665 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13667 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13669 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13671 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13672 is not available. Define HAVE_PTRACE_GETREGS if it is.
13673 * config.in, configure: Regenerated.
13674 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13675 * linux-i386-low.c, linux-m68k-low.c: Update to use
13676 HAVE_PTRACE_GETREGS.
13677 * linux-low.c (regsets_fetch_inferior_registers)
13678 (regsets_store_inferior_registers): Only return 0 if we processed
13680 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13681 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13683 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13685 * inferiors.c (struct thread_info): Add gdb_id.
13686 (add_thread): Add gdb_id argument.
13687 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13688 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13689 calls to add_thread.
13690 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13691 * server.c (handle_query): Use thread_to_gdb_id.
13692 (handle_v_cont, main): Use gdb_id_to_thread_id.
13693 * server.h (add_thread): Update prototype.
13694 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13697 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13699 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13700 left-padded registers.
13701 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13702 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13704 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13706 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13707 * configure: Regenerate.
13708 * config.in: Regenerate.
13709 * server.h (NEED_DECLARATION_STRERROR):
13710 Replace with !HAVE_DECL_STRERROR.
13712 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13714 * linux-low.c (linux_wait, linux_send_signal): Don't test
13715 an unsigned long variable for > 0 if it could be MAX_ULONG.
13716 * server.c (myresume): Likewise.
13717 * target.c (set_desired_inferior): Likewise.
13719 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13721 * configure.ac: Simplify and improve check for socklen_t.
13722 * configure, config.in: Regenerate.
13724 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13726 * acconfig.h: Remove.
13727 * configure.ac: Add a test for socklen_t. Use three-argument
13728 AC_DEFINE throughout.
13729 * config.in: Regenerated using autoheader 2.59.
13730 * configure: Regenerated.
13732 * gdbreplay.c (socklen_t): Provide a default.
13733 (remote_open): Use socklen_t.
13734 * remote-utils.c (socklen_t): Provide a default.
13735 (remote_open): Use socklen_t.
13736 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13739 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13741 * linux-low.c (linux_read_memory, linux_write_memory)
13742 (linux_read_auxv): Likewise.
13743 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13744 (check_mem_write): Likewise.
13745 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13747 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13748 (registers_from_string, register_data): Likewise.
13749 * server.c (handle_query, main): Likewise.
13750 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13751 (decode_M_packet): Likewise.
13752 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13753 * target.h (struct target_ops): Update read_memory, write_memory,
13755 (read_inferior_memory, write_inferior_memory): Update.
13756 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13757 to unsigned char *.
13758 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13759 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13760 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13761 linux-s390-low.c, linux-sh-low.c: Update for changes in
13762 read_inferior_memory and the_low_target->breakpoint.
13764 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13766 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13767 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13768 * configure.srv: Add powerpc64-*-linux*.
13769 * linux-ppc64-low.c: New file.
13771 2005-05-23 Orjan Friberg <orjanf@axis.com>
13773 * linux-cris-low.c: New file with support for CRIS.
13774 * linux-crisv32-low.c: Ditto for CRISv32.
13775 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13776 (clean): Add reg-cris.c and reg-crisv32.c.
13777 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13778 reg-crisv32.o, and reg-crisv32.c to make rules.
13779 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13780 recognized targets.
13782 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13784 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13785 of sizeof (PTRACE_XFER_TYPE).
13786 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13788 2005-05-12 Orjan Friberg <orjanf@axis.com>
13790 * target.h (struct target_ops): Add insert_watchpoint,
13791 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13792 pointers for hardware watchpoint support.
13793 * linux-low.h (struct linux_target_ops): Ditto.
13794 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13795 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13796 to linux_target_ops.
13797 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13799 * server.c (main): Recognize 'Z' and 'z' packets.
13801 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13803 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13804 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13805 (the_low_target): Add new members.
13807 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13809 * proc-service.c (ps_lgetregs): Search all_processes instead of
13812 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13814 * server.c (start_inferior): Change return type to int.
13815 (attach_inferior): Change sigptr to int *.
13816 (handle_v_cont, handle_v_requests): Change signal to int *.
13817 (main): Change signal to int.
13819 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13821 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13822 * configure.srv: Add m32r*-*-linux*.
13823 * linux-m32r-low.c: New file.
13825 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13827 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13829 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13831 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13832 Take unsigned long arguments for PIDs.
13833 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13834 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13835 (wait_for_sigstop, linux_resume_one_process)
13836 (regsets_fetch_inferior_registers, linux_send_signal)
13837 (linux_read_auxv): Likewise. Update the types of variables holding
13838 PIDs. Update format string specifiers.
13839 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13840 * remote-utils.c (prepare_resume_reply): Likewise.
13841 * server.c (cont_thread, general_thread, step_thread)
13842 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13844 (handle_query): Update format specifiers.
13845 (handle_v_cont, main): Use strtoul for thread IDs.
13846 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13847 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13848 (general_thread, step_thread, thread_from_wait)
13849 (old_thread_from_wait): Update.
13850 * target.h (struct thread_resume): Use unsigned long for THREAD.
13851 (struct target_ops): Use unsigned long for arguments to attach and
13854 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13856 * acinclude.m4: Include bfd/bfd.m4 directly.
13857 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13858 <agriffis@toolchain.org>.
13859 * aclocal.m4, configure: Regenerated.
13861 2005-01-07 Andrew Cagney <cagney@gnu.org>
13863 * configure.ac: Rename configure.in, require autoconf 2.59.
13864 * configure: Re-generate.
13866 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13868 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13869 LIBS when finished.
13870 * aclocal.m4: Regenerated.
13871 * configure: Regenerated.
13873 2004-11-21 Andreas Schwab <schwab@suse.de>
13875 * linux-m68k-low.c (m68k_num_gregs): Define.
13876 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13877 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13878 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13879 (m68k_breakpoint_at): New. Add to the_low_target.
13881 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13882 srv_linux_thread_db to yes.
13884 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13886 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13887 (ARCH_SET_FS): Likewise.
13888 (ARCH_GET_FS): Likewise.
13889 (ARCH_GET_GS): Likewise.
13891 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13893 * linux-i386-low.c (ps_get_thread_area): New.
13894 * linux-x86-64-low.c (ps_get_thread_area): New.
13895 * linux-low.c: Include <sys/syscall.h>.
13896 (linux_kill_one_process): Don't kill the first thread here.
13897 (linux_kill): Kill the first thread here.
13898 (kill_lwp): New function.
13899 (send_sigstop, linux_send_signal): Use it.
13900 * proc-service.c: Clean up #ifdefs.
13901 (fpregset_info): Delete.
13902 (ps_lgetregs): Update and enable implementation.
13903 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13905 * remote-utils.c (struct sym_cache, symbol_cache): New.
13906 (input_interrupt): Print a clearer message.
13907 (async_io_enabled): New variable.
13908 (enable_async_io, disable_async_io): Use it. Update comments.
13909 (look_up_one_symbol): Use the symbol cache.
13910 * thread-db.c (thread_db_look_up_symbols): New function.
13911 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13913 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13915 * configure.in: Test for -rdynamic.
13916 * configure: Regenerated.
13917 * Makefile (INTERNAL_LDFLAGS): New.
13918 (gdbserver, gdbreplay): Use it.
13920 2004-09-02 Andrew Cagney <cagney@gnu.org>
13922 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13924 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13926 * linux-low.c (linux_wait): Clear all_processes list also.
13928 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13930 * linux-low.c: Include <errno.h>. Remove extern declaration of
13933 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13935 * gdbreplay.c, server.h, utils.c: Update copyright years.
13937 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13939 * server.c (main): Print child status or termination signal from
13940 variable 'signal', not 'sig'.
13942 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13944 * linux-low.c (linux_read_memory): Change return type to
13945 int. Check for and return error from ptrace().
13946 * target.c (read_inferior_memory): Change return type to int. Pass
13947 back return status from the_target->read_memory().
13948 * target.h (struct target_ops): Adapt *read_memory() prototype.
13950 (read_inferior_memory): Adapt prototype.
13951 * server.c (main): Return an error packet if
13952 read_inferior_memory() returns an error.
13954 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13956 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13957 Unify with other clean targets.
13959 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13961 * server.c (handle_v_cont): Call set_desired_inferior.
13963 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13965 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13967 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13969 * linux-low.c (linux_wait): Unblock async I/O.
13970 (linux_resume): Block and enable async I/O.
13971 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13972 * server.h (block_async_io, unblock_async_io): Add prototypes.
13974 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13976 * remote-utils.c (remote_open): Print a status notice after
13977 opening a TCP port.
13978 * server.c (attach_inferior): Print a status notice after
13981 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13983 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13985 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13987 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13989 * server.c, target.h: Update copyright years.
13991 2004-02-25 Roland McGrath <roland@redhat.com>
13993 * target.h (struct target_ops): New member `read_auxv'.
13994 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13995 * linux-low.c (linux_read_auxv): New function.
13996 (linux_target_ops): Initialize `read_auxv' member to that.
13998 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14000 Committed by Jim Blandy <jimb@redhat.com>.
14002 * linux-s390-low.c (s390_num_regs): Update.
14003 (s390_regmap): Remove control registers. Use __s390x__ predefine
14004 instead of GPR_SIZE to distiguish s390 and s390x targets.
14006 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14008 * linux-low.c: Update copyright year.
14009 (check_removed_breakpoint): Clear pending_is_breakpoint.
14010 (linux_set_resume_request, linux_queue_one_thread)
14011 (resume_status_pending_p): New functions.
14012 (linux_continue_one_thread): Use process->resume.
14013 (linux_resume): Only resume threads if there are no pending events.
14014 * linux-low.h (struct process_info): Add resume request
14017 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14019 * regcache.c (new_register_cache): Clear the allocated register
14020 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14022 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14024 * linux-low.c (linux_resume): Take a struct thread_resume *
14026 (linux_wait): Update call.
14027 (resume_ptr): New static variable.
14028 (linux_continue_one_thread): Renamed from
14029 linux_continue_one_process. Use resume_ptr.
14030 (linux_resume): Use linux_continue_one_thread.
14031 * server.c (handle_v_cont, handle_v_requests): New functions.
14032 (myresume): New function.
14033 (main): Handle 'v' case.
14034 * target.h (struct thread_resume): New type.
14035 (struct target_ops): Change argument of "resume" to struct
14037 (myresume): Delete macro.
14039 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14041 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14042 (uninstall): Support DESTDIR.
14044 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14046 * configure.srv: Add xscale*linux copy of arm*linux entry.
14048 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14050 * linux-arm-low.c (arm_reinsert_addr): New function.
14051 (the_low_target): Add arm_reinsert_addr.
14053 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14055 * mem-break.c: Remove whitespace at end of file.
14057 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14059 * configure.in: Check whether we need to prototype strerror.
14060 * server.h: Optionally prototype strerror.
14061 * gdbreplay.c (perror_with_name): Use strerror.
14062 * linux-low.c (linux_attach_lwp): Use strerror.
14063 * utils.c (perror_with_name): Use strerror.
14064 * config.in, configure: Regenerated.
14066 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14068 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14069 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14071 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14073 * Makefile.in (SFILES): Update.
14074 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14075 low-sun3.c: Remove files.
14077 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14079 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14080 (linux_detach_one_process, linux_detach): New functions.
14081 (linux_target_ops): Add linux_detach.
14082 * server.c (main): Handle 'D' packet.
14083 * target.h (struct target_ops): Add "detach" member.
14084 (detach_inferior): Define.
14086 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14088 From Kelley Cook <kelleycook@wideopenwest.com>:
14089 * configure.srv: Accept i[34567]86 variants.
14091 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14093 * linux-low.c (linux_wait_for_event): Correct comment typos.
14094 (linux_resume_one_process): Call check_removed_breakpoint.
14095 (linux_send_signal): New function.
14096 (linux_target_ops): Add linux_send_signal.
14097 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14099 * target.h (struct target_ops): Add send_signal.
14101 2003-05-29 Jim Blandy <jimb@redhat.com>
14103 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14104 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14105 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14106 away part of the register's value.
14108 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14110 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14111 (linux_wait_for_event, linux_init_signals): Likewise.
14113 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14115 * configure.in: Check for stdlib.h.
14116 * configure: Regenerated.
14117 * config.in: Regenerated.
14119 2003-01-04 Andreas Schwab <schwab@suse.de>
14121 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14123 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14125 * Makefile.in: Remove obsolete code.
14127 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14129 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14130 defined(PT_FPR0_HI).
14132 2002-11-17 Stuart Hughes <seh@zee2.com>
14134 * linux-arm-low.c (arm_num_regs): Increase.
14135 (arm_regmap): Include status register.
14137 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14139 * linux-low.c (register_addr): Remove incorrect -1 check.
14141 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14143 * linux-low.c (linux_create_inferior): Call setpgid. Return
14145 (unstopped_p, linux_signal_pid): Remove.
14146 (linux_target_ops): Remove linux_signal_pid.
14147 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14148 global instead of target method.
14149 * target.h (struct target_ops): Remove signal_pid. Update comment
14150 for create_inferior.
14151 * server.c (signal_pid): New variable.
14152 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14153 gdbserver. Set the child to be the foreground process group.
14154 (attach_inferior): Set signal_pid.
14156 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14158 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14160 2002-08-20 Jim Blandy <jimb@redhat.com>
14162 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14165 2002-08-01 Andrew Cagney <cagney@redhat.com>
14167 * Makefile.in: Make chill references obsolete.
14169 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14171 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14172 * configure: Regenerate.
14173 * config.in: Regenerate.
14175 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14177 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14178 (perror_with_name, remote_close, remote_open, expect, play): Static.
14180 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14182 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14183 byte offsets instead of an array of indexes.
14184 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14186 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14188 * regcache.c: Add comment.
14190 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14192 * thread-db.c: New file.
14193 * proc-service.c: New file.
14194 * acinclude.m4: New file.
14195 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14196 proc-service.o, and thread-db.o.
14197 (linux-low.o): Add USE_THREAD_DB.
14198 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14199 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14200 * aclocal.m4: Regenerated.
14201 * config.in: Regenerated.
14202 * configure: Regenerated.
14203 * configure.in: Check for proc_service.h, sys/procfs.h,
14204 thread_db.h, and linux/elf.h headrs.
14205 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14206 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14207 Check for -lthread_db and thread support.
14208 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14209 PowerPC, and SuperH.
14210 * i387-fp.c: Constify arguments.
14211 * i387-fp.h: Likewise.
14212 * inferiors.c: (struct thread_info): Renamed from
14213 `struct inferior_info'. Remove PID member. Use generic inferior
14214 list header. All uses updated.
14215 (inferiors, signal_pid): Removed.
14216 (all_threads): New variable.
14217 (get_thread): Define.
14218 (add_inferior_to_list): New function.
14219 (for_each_inferior): New function.
14220 (change_inferior_id): New function.
14221 (add_inferior): Removed.
14222 (remove_inferior): New function.
14223 (add_thread): New function.
14224 (free_one_thread): New function.
14225 (remove_thread): New function.
14226 (clear_inferiors): Use for_each_inferior and free_one_thread.
14227 (find_inferior): New function.
14228 (find_inferior_id): New function.
14229 (inferior_target_data): Update argument type.
14230 (set_inferior_target_data): Likewise.
14231 (inferior_regcache_data): Likewise.
14232 (set_inferior_regcache_data): Likewise.
14233 * linux-low.c (linux_bp_reinsert): Remove.
14234 (all_processes, stopping_threads, using_thrads)
14235 (struct pending_signals, debug_threads, pid_of): New.
14236 (inferior_pid): Replace with macro.
14237 (struct inferior_linux_data): Remove.
14238 (get_stop_pc, add_process): New functions.
14239 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14240 Use add_process and add_thread.
14241 (linux_attach_lwp): New function, based on old linux_attach. Use
14242 add_process and add_thread. Set stop_expected for new threads.
14243 (linux_attach): New function.
14244 (linux_kill_one_process): New function.
14245 (linux_kill): Kill all LWPs.
14246 (linux_thread_alive): Use find_inferior_id.
14247 (check_removed_breakpoints, status_pending_p): New functions.
14248 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14249 Update. Use WNOHANG. Wait for cloned processes also. Update process
14250 struct for the found process.
14251 (linux_wait_for_event): New function.
14252 (linux_wait): Use it. Support LWPs.
14253 (send_sigstop, wait_for_sigstop, stop_all_processes)
14254 (linux_resume_one_process, linux_continue_one_process): New functions.
14255 (linux_resume): Support LWPs.
14256 (REGISTER_RAW_SIZE): Remove.
14257 (fetch_register): Use register_size instead. Call supply_register.
14258 (usr_store_inferior_registers): Likewise. Call collect_register.
14259 Fix recursive case.
14260 (regsets_fetch_inferior_registers): Improve error message.
14261 (regsets_store_inferior_registers): Add debugging.
14262 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14263 (unstopped_p, linux_signal_pid): New functions.
14264 (linux_target_ops): Add linux_signal_pid.
14265 (linux_init_signals): New function.
14266 (initialize_low): Call it. Initialize using_threads.
14267 * regcache.c (inferior_regcache_data): Add valid
14269 (get_regcache): Fetch registers lazily. Add fetch argument
14270 and update all callers.
14271 (regcache_invalidate_one, regcache_invalidate): New
14273 (new_register_cache): Renamed from create_register_cache.
14274 Return the new regcache.
14275 (free_register_cache): Change argument to a void *.
14276 (registers_to_string, registers_from_string): Call get_regcache
14277 with fetch flag set.
14278 (register_data): Make static. Pass fetch flag to get_regcache.
14279 (supply_register): Call get_regcache with fetch flag clear.
14280 (collect_register): Call get_regcache with fetch flag set.
14281 (collect_register_as_string): New function.
14282 * regcache.h: Update.
14283 * remote-utils.c (putpkt): Flush after debug output and use
14285 Handle input interrupts while waiting for an ACK.
14286 (input_interrupt): Use signal_pid method.
14287 (getpkt): Flush after debug output and use stderr.
14288 (outreg): Use collect_register_as_string.
14289 (new_thread_notify, dead_thread_notify): New functions.
14290 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14291 and general_thread.
14292 (look_up_one_symbol): Flush after debug output.
14293 * server.c (step_thread, server_waiting): New variables.
14294 (start_inferior): Don't use signal_pid. Update call to mywait.
14295 (attach_inferior): Update call to mywait.
14296 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14297 (main): Don't fetch/store registers explicitly. Use
14298 set_desired_inferior. Support proposed ``Hs'' packet. Update
14300 * server.h: Update.
14301 (struct inferior_list, struct_inferior_list_entry): New.
14302 * target.c (set_desired_inferior): New.
14303 (write_inferior_memory): Constify.
14304 (mywait): New function.
14305 * target.h: Update.
14306 (struct target_ops): New signal_pid method.
14307 (mywait): Removed macro, added prototype.
14309 * linux-low.h (regset_func): Removed.
14310 (regset_fill_func, regset_store_func): New.
14311 (enum regset_type): New.
14312 (struct regset_info): Add type field. Use new operation types.
14313 (struct linux_target_ops): stop_pc renamed to get_pc.
14314 Add decr_pc_after_break and breakpoint_at.
14315 (get_process, get_thread_proess, get_process_thread)
14316 (strut process_info, all_processes, linux_attach_lwp)
14317 (thread_db_init): New.
14319 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14320 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14321 (the_low_target): Add new members.
14322 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14323 (i386_store_fpxregset): Constify.
14324 (target_regsets): Add new kind identifier.
14325 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14326 (i386_set_pc): Add debugging.
14327 (i386_breakpoint_at): New function.
14328 (the_low_target): Add new members.
14329 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14330 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14331 (mips_breakpoint_at): New.
14332 (the_low_target): Add new members.
14333 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14334 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14335 (the_low_target): Add new members.
14336 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14337 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14338 (the_low_target): Add new members.
14339 * linux-x86-64-low.c (target_regsets): Add new kind
14342 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14344 From Martin Pool <mbp@samba.org>:
14345 * server.c (gdbserver_usage): New function.
14348 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14350 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14351 stop_at -> stop_pc.
14353 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14355 * Makefile.in: Remove obsolete code.
14357 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14359 * linux-low.c (regsets_fetch_inferior_registers),
14360 (regsets_store_inferior_registers): Removed cast to int from
14362 * regcache.h: Added declaration of struct inferior_info.
14364 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14366 * inferiors.c (struct inferior_info): Add regcache_data.
14367 (add_inferior): Call create_register_cache.
14368 (clear_inferiors): Call free_register_cache.
14369 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14370 * regcache.c (struct inferior_regcache_data): New.
14371 (registers): Remove.
14372 (get_regcache): New function.
14373 (create_register_cache, free_register_cache): New functions.
14374 (set_register_cache): Don't initialize the register cache here.
14375 (registers_to_string, registers_from_string, register_data): Call
14377 * regcache.h: Add prototypes.
14378 * server.h: Likewise.
14380 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14382 * mem-break.c: New file.
14383 * mem-break.h: New file.
14384 * Makefile.in: Add mem-break.o rule; update server.h
14386 * inferiors.c (struct inferior_info): Add target_data
14388 (clear_inferiors): Free target_data member if set.
14389 (inferior_target_data, set_inferior_target_data): New functions.
14390 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14391 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14392 * linux-low.c (linux_bp_reinsert): New variable.
14393 (struct inferior_linux_data): New.
14394 (linux_create_inferior): Use set_inferior_target_data.
14395 (linux_attach): Likewise. Call add_inferior.
14396 (linux_wait_for_one_inferior): New function.
14397 (linux_wait): Call it.
14398 (linux_write_memory): Add const.
14399 (initialize_low): Call set_breakpoint_data.
14400 * linux-low.h (struct linux_target_ops): Add breakpoint
14402 * server.c (attach_inferior): Remove extra add_inferior
14404 * server.h: Include mem-break.h. Update inferior.c
14406 * target.c (read_inferior_memory)
14407 (write_inferior_memory): New functions.
14408 * target.h (read_inferior_memory)
14409 (write_inferior_memory): Change macros to prototypes.
14410 (struct target_ops): Update comments. Add const to write_memory
14413 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14415 * linux-low.c (usr_store_inferior_registers): Support
14416 registers which are allowed to fail to store.
14417 * linux-low.h (linux_target_ops): Likewise.
14418 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14419 (ppc_cannot_store_register): FPSCR may not be storable.
14421 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14423 * server.h: Include <string.h> if HAVE_STRING_H.
14424 * ChangeLog: Correct paths in last ChangeLog entry.
14426 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14428 * linux-low.h: Remove obsolete prototypes.
14429 (struct linux_target_ops): New.
14430 (extern the_low_target): New.
14431 * linux-low.c (num_regs, regmap): Remove declarations.
14432 (register_addr): Use the_low_target explicitly.
14433 (fetch_register): Likewise.
14434 (usr_fetch_inferior_registers): Likewise.
14435 (usr_store_inferior_registers): Likewise.
14436 * linux-arm-low.c (num_regs): Remove.
14437 (arm_num_regs): Define.
14438 (arm_regmap): Renamed from regmap, made static.
14439 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14441 (arm_cannot_store_register): Renamed from cannot_store_register,
14443 (the_low_target): New.
14444 * linux-i386-low.c (num_regs): Remove.
14445 (i386_num_regs): Define.
14446 (i386_regmap): Renamed from regmap, made static.
14447 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14449 (i386_cannot_store_register): Renamed from cannot_store_register,
14451 (the_low_target): New.
14452 * linux-ia64-low.c (num_regs): Remove.
14453 (ia64_num_regs): Define.
14454 (ia64_regmap): Renamed from regmap, made static.
14455 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14457 (ia64_cannot_store_register): Renamed from cannot_store_register,
14459 (the_low_target): New.
14460 * linux-m68k-low.c (num_regs): Remove.
14461 (m68k_num_regs): Define.
14462 (m68k_regmap): Renamed from regmap, made static.
14463 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14465 (m68k_cannot_store_register): Renamed from cannot_store_register,
14467 (the_low_target): New.
14468 * linux-mips-low.c (num_regs): Remove.
14469 (mips_num_regs): Define.
14470 (mips_regmap): Renamed from regmap, made static.
14471 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14473 (mips_cannot_store_register): Renamed from cannot_store_register,
14475 (the_low_target): New.
14476 * linux-ppc-low.c (num_regs): Remove.
14477 (ppc_num_regs): Define.
14478 (ppc_regmap): Renamed from regmap, made static.
14479 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14481 (ppc_cannot_store_register): Renamed from cannot_store_register,
14483 (the_low_target): New.
14484 * linux-s390-low.c (num_regs): Remove.
14485 (s390_num_regs): Define.
14486 (s390_regmap): Renamed from regmap, made static.
14487 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14489 (s390_cannot_store_register): Renamed from cannot_store_register,
14491 (the_low_target): New.
14492 * linux-sh-low.c (num_regs): Remove.
14493 (sh_num_regs): Define.
14494 (sh_regmap): Renamed from regmap, made static.
14495 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14497 (sh_cannot_store_register): Renamed from cannot_store_register,
14499 (the_low_target): New.
14500 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14501 (the_low_target): New.
14503 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14505 * Makefile.in: Add stamp-h target.
14506 * configure.in: Create stamp-h.
14507 * configure: Regenerated.
14509 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14511 * inferiors.c: New file.
14512 * target.c: New file.
14513 * target.h: New file.
14514 * Makefile.in: Add target.o and inferiors.o. Update
14516 * linux-low.c (inferior_pid): New static variable,
14517 moved from server.c.
14518 (linux_create_inferior): Renamed from create_inferior.
14519 Call add_inferior. Return 0 on success instead of a PID.
14520 (linux_attach): Renamed from myattach.
14521 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14522 (linux_thread_alive): Renamed from mythread_alive.
14523 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14525 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14526 (regsets_store_inferior_registers): Correct error message.
14527 Add missing ``return 0''.
14528 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14529 (linux_store_registers): Renamed from store_inferior_registers.
14530 (linux_read_memory): Renamed from read_inferior_memory.
14531 (linux_write_memory): Renamed from write_inferior_memory.
14532 (linux_target_ops): New structure.
14533 (initialize_low): Call set_target_ops ().
14534 * remote-utils.c (unhexify): New function.
14535 (hexify): New function.
14536 (input_interrupt): Send signals to ``signal_pid''.
14537 * server.c (inferior_pid): Remove.
14538 (start_inferior): Update create_inferior call.
14539 (attach_inferior): Call add_inferior.
14540 (handle_query): New function.
14541 (main): Call handle_query for `q' packets.
14542 * server.h: Include "target.h". Remove obsolete prototypes.
14543 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14545 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14547 * Makefile.in: Add WARN_CFLAGS. Update configury
14549 * configure.in: Check for <string.h>
14550 * configure: Regenerate.
14551 * config.in: Regenerate.
14552 * gdbreplay.c: Include needed system headers.
14553 (remote_open): Remove strchr prototype.
14554 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14555 * regcache.c (supply_register): Change buf argument to const void *.
14556 (supply_register_by_name): Likewise.
14557 (collect_register): Change buf argument to void *.
14558 (collect_register_by_name): Likewise.
14559 * regcache.h: Add missing prototypes.
14560 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14561 * server.c (handle_query): New function.
14562 (attached): New static variable, moved out of main.
14563 (main): Quiet longjmp clobber warnings.
14564 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14565 * utils.c (error): Remove NORETURN.